[vorbis] Ogg ouput using libvorbisfile

Michael Smith msmith at xiph.org
Sun Jul 27 18:58:12 PDT 2003



On Monday 28 July 2003 03:48, David St.Clair wrote:
> Hi, I'm new to writing any kind of sound program and somewhat new to C.
> I am on linux and I've been trying to get the example code
> (http://www.xiph.org/ogg/vorbis/doc/vorbisfile/example.html)for the
> decoder using libvorbisfile to work.  I think my main problem is output
> to /dev/dsp.  If I use the example where the only change I made were to
> open a file instead of using stdin and I ouput to /dev/dsp after opening
> it, I get a weird static noise.
>
> Any idea what I'm doing wrong or not doing?

By default, /dev/dsp is opened in 8 bit mono u-law mode (I think). You need to 
set it to the correct format (generally 16 bit signed samples, and the 
appropriate sample rate and number of channels) using ioctl().

Mike

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