[vorbis-dev] ogg123 buffer -- help!?!?
Monty
xiphmont at xiph.org
Sun Jul 30 22:26:54 PDT 2000
> Can somebody give me some ideas on how to do buffering cross-platform?
>
> open (O_NONBLOCK) - ???
> select (fd+1, NULL, &set, NULL, &tv) - NO - Unix only
Actually, some variant of this is available just about everywhere. But the
implementation details can differ even in UNIX and you could screw yourself if
you also want to use threads.
> fork(); open (block) -- Unix only
Ugly, don't do this.
> threading -- cross-platform mess
Not really. Unless you're counting on very eclectic features of a particular
thread implementation, the basic thread mechanisms are essentially the same on
all platforms.
> plugin modules - too much work
> ifdefs - evil
I suggest tightly compartmentalized threads. In the old ogg player, the
threads were part of the playback module (which was different for every
platform anyway).
Monty
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
More information about the Vorbis-dev
mailing list