Search code examples
c#windowsaudiowindows-phone

How to reproduce audio from a stream source


Thank you for your answer, I really appreciate it, and I have to share with you that it was a useful example, but in the following link is explained how to use it on Windows Phone 8.1 and how to create your own implementation of MSS.

http://video.ch9.ms/sessions/build/2014/2-528.pptx


Solution

  • What you’re doing is impossible.

    Wave files aren’t media streams. You can’t dynamically change a .wav file and expect the MediaElement to pick those changes.

    If you’re trying to play audio that you’re receiving from the network, or audio that you're generating dynamically from something else, then you need to play from your custom media stream source, not from a file.

    The sample code is available here. The sample plays mp3; you’ll need to change it, wave audio is supported, with some limitations.