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

Ken Rogoway Ken at Rogoway.com
Thu May 6 07:25:59 PDT 2004



Somehow I am getting the impression that you do not think I know
how callbacks work.  I have been programming professionally for
over 20 years and in C since 1985, C++ since 1990.  The problem is
not with my understanding of callbacks, it was that I was told by
someone on this newsgroup that all I had to do was make the stream
non-seekable buy having my seek callback return -1 and the tell
callback set to NULL.  This does NOT work for what I am trying to
do.  However the other suggestion where all of the callbacks point
to functions that know about my embedded file works just fine.

Please do not put down other programmers. That is a far worse use
of this newsgroup than people asking legitimate questions.

Thanks,

- Ken Rogoway

-----Original Message-----
From: owner-vorbis-dev at xiph.org [mailto:owner-vorbis-dev at xiph.org]On
Behalf Of Lourens Veen
Sent: Thursday, May 06, 2004 5:31 AM
To: vorbis-dev at xiph.org
Subject: Re: AW: [vorbis-dev] Reading OGG embedded in a pack file

<p>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.

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004

--- >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