[vorbis] Ogg ouput using libvorbisfile

Tom Felker tcfelker at mtco.com
Sun Jul 27 11:29:30 PDT 2003



On Sunday 27 July 2003 12:48 pm, 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?

>       /* we don't bother dealing with sample rate changes, etc, but
> 	 you'll have to*/
>       fwrite(pcmout,1,ret,dspdev);

/dev/dsp probably defaults to some weird sample size and rate, so you'll need 
to do some ioctl()s on it before you write to it.  I'm guessing the noise you 
hear is similar to the noise from "cat file.wav > /dev/dsp".


-- 
Tom Felker

The whole point of communication is sharing information.

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