AW: [vorbis-dev] Reading OGG embedded in a pack file

Lourens Veen lourens at rainbowdesert.net
Thu May 6 03:31:07 PDT 2004



On Thu 6 May 2004 10:57, Andre Krause wrote:
> i cant agree with this. templates for example are a great thing i
> use since 1993. i love them. but pointers, especially function
> pointers, are a pain.

Well, personally I still don't understand the more complex template 
metaprogramming stuff in C++. I can use the STL and make a simple 
template class, but that's about it. That doesn't mean that Boost 
should add a non-template using interface, does it?

> and how can it be that in 2 weeks three different people
> (including me) are flooding the mailing list with just the same
> problem, playing oggs from an archive ? couldnt it be that just
> another variant of ov_open could have avoided this? function
> pointers are just not comfortable. and you are speaking like

Perhaps another variant of ov_open could have avoided this. Of 
course, next week there will be someone else with a slightly 
different problem, and we'd have to make yet another variant. Et 
cetera. The whole point of having these callbacks is that it is a 
very flexible way of doing things. Ogg Vorbis is an audio codec, 
not a package or file or stream manager, and the use of callbacks 
gives the user of the library a lot of flexibility in and control 
over how they want to input their streams to the library.

> someone who does not respect the novice programmers. learning and
> really understanding c / c++ is not a matter of weeks, its a
> matter of at least months if not years. so if all libraries would
> need the understanding of, for example,  function pointers, a
> beginner would never take off programming in c. take me as an

I'm not blaming anyone for not knowing or not understanding 
something, and my post was definitely not intended as a personal 
attack on you. I'm sorry if I came across that way.

I'm not saying it's easy to learn C or C++. I wouldn't exactly 
consider myself an expert in either of them either. All I'm saying 
is that if you don't understand something, you should learn about 
it, not try to replace it by something you do understand even if it 
is not as good a solution. Why limit yourself to the few tools you 
know already? Learn a new skill, and build better products with it!

If you use Vorbis files in a package file all the time, it may well 
be useful to have a convenience function like the one you 
suggested. It should be put in a separate library though, not in 
the Ogg Vorbis libs. Perhaps creating such a library would be a 
nice learning experience? Find out how these callbacks work, create 
your wrapper library, and write a nice document about how you did 
it and how it works. That way you learn how callbacks work, and 
everyone else who comes here to ask in the future can learn about 
them too.

And, thus enlightened, we shall all live happily ever after :-).

Lourens

-- 
GPG public key: http://home.student.utwente.nl/l.e.veen/lourens.key

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis-dev mailing list