Audio output from Silverlight

Posted by leecarter on Stack Overflow See other posts from Stack Overflow or by leecarter
Published on 2009-02-25T12:51:41Z Indexed on 2010/04/20 16:13 UTC
Read the original article Hit count: 291

Filed under:
|
|
|

I'm looking to develop a Silverlight application which will take a stream of data (not an audio stream as such) from a web server.

The data stream would then be manipulated to give audio of a certain format (G.711 a-Law for example) which would then be converted into PCM so that additional effects can be applied (such as boosting the volume).

I'm OK up to this point. I've got my data, converted the G.711 into PCM but my problem is being able to output this PCM audio to the sound card.

I basing a solution on some C# code intended for a .Net application but in Silverlight there is a problem with trying to take a copy of a delegate (function pointer) which will be the topic of a separate question once I've produced a simple code sample.

So, the question is... How can I output the PCM audio that I have held in a data structure (currently an array) in my Silverlight to the user? (Please don't say write the byte values to a text box)

If it were a MP3 or WMA file I would play it using a MediaElement but I don't want to have to make it into a file as this would put a crimp on applying dynamic effects to the audio.

I've seen a few posts from people saying low level audio support is poor/non-existant in Silverlight so I'm open to any suggestions/ideas people may have.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about c#