joeforker
joeforker

Reputation: 41817

How do I play an ogg vorbis file in Silverlight?

I'd like to play back ogg vorbis audio from http in Silverlight. What do I need to make this happen?

Upvotes: 2

Views: 1267

Answers (2)

Ken Smith
Ken Smith

Reputation: 20445

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.

Upvotes: 7

JustinAngel
JustinAngel

Reputation: 16102

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

Upvotes: 1

Related Questions