[vorbis-dev] ogg123 sampling rate problems

Aaron Plattner aaron at Aaron.homeip.net
Wed Jan 24 18:06:20 PST 2001


On Wed, Jan 24, 2001 at 10:17:50PM +1100, Michael Smith wrote:
> The 'right' solution here is to open the audio device(s) only once the
> relevent parameters are known, and then ONLY reopen it if those change (so,
> if you're playing multiple files with the same sampling rate, etc, you
> don't close the device between files. 
Here's a patch that does that.  The sampling rate and channels are set per
device, which is probably the wrong place for them, but otherwise I'd have to
use either static or global variable, and both are bad.  Anyway, this version
still prints out the device info at the beginning even though it doesn't
actually open them until it opens the first file.

> 
> Under some circumstances you might want to do so, though (the obvious one
> is file output, but ogg123 gets this wrong for multiple files anyway - I
> haven't checked, but I think it'll just overwrite the file).
Yes, that's quite definitely broken with this version.  On the other hand,
writing two different-samplingrate stream to the same wav won't work too well, I
don't think...

By the way, how do you get ogg123 to open more than one device?  It looks like
it will only open the last one on the command line.

Aaron Plattner


<HR NOSHADE>
<UL>
<LI>text/plain attachment: ogg123.diff
</UL>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ogg.diff
Type: application/octet-stream
Size: 2718 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010124/64f8b59a/ogg.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: part
Type: application/octet-stream
Size: 233 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010124/64f8b59a/part.obj


More information about the Vorbis-dev mailing list