Skip to main content

Topic: [C++] Playing a raw vorbis stream (Read 8203 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Ksilver986
  • [*]
[C++] Playing a raw vorbis stream
Hello all and thank you in advance for any advice.

I am trying to put together a (linux) C++ application which will send/receive Vorbis audio over RTP.  The sender will read an OGG audio-only file and stream the vorbis data. On the receiver end I would like it to play the audio.  For information my linux platform is Ubuntu.

If any of the following is the wrong approach for this task then please do let me know I am open to learning the right way!

I have looked at RFC 5215 describing the RTP format for Vorbis Audio and tat seems to make sense (I hope).  As I understand it the OGG page headers etc are redundant in the RTP stream and so are not sent.  Only the Vorbis headers are sent.  To that end I have written a simple parser which currently extracts all of the vorbis packets into a buffer.  This bufer now contains all the packets from the file including the Identification, Comment and setup headers but none of the OGG information.  I expect audio sample rate data etc will be sent in SDP messages accompanying the RTP.

I (hope) that this buffer would now be split into the rtp packets and sent.  I am happy to work on this part (The RTP packetising) myself. 

What I want to do first however is test the data in my buffer but I can't find a direct reference of how to play vorbis audio from memory without OGG encapsulation?  Can anybody advise me of the best way to do this?

Thank you in advance, if I've been unclear at all or if you would like more information please feel free to ask!