I'd like to play back ogg vorbis audio from http in Silverlight. What do I need to make this happen?
How do I play an ogg vorbis file in Silverlight?
1.2k views Asked by joeforker At
2
There are 2 answers
1
On
Silverlight does not support playing ogg vorbis files.
If you'd like Silverlight to play files already encoded in ogg vorbis, I suggest converting them. Either do a one time sweeping convert of all your files, or convert them on the fly while your server is serving them.
Alternatively, In Silverlight 4, assuming you know enough about Media Formats and Ogg vorbis is particular, you can implement MediaStreamSource to support ogg vorbis. http://msdn.microsoft.com/en-us/library/system.windows.media.mediastreamsource(VS.96).aspx
A better answer than "Silverlight doesn't support Ogg Vorbis" is to say that Silverlight doesn't support playing them natively. As one of the other commenters pointed out, a way to play them is described at http://veritas-vos-liberabit.com/monogatari/2009/03/moonvorbis.html, with the current source for CSVorbis available at https://github.com/mono/csvorbis. You would indeed need to implement a MediaStreamSource to play the resulting PCM stream, but that's not rocket science.