Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: How to play an a-law-encoded network stream

$
0
0

Hi Mark,

inspired by the network streaming demo (NetworkChatPanel.cs) I simplified the code like this:

BufferedWaveProvider myBufferedWaveProvider = new BufferedWaveProvider(WaveFormat.CreateALawFormat(8000, 1));
WaveOut myWaveOut = new WaveOut();
myWaveOut.Init(myBufferedWaveProvider);
myWaveOut.Play();

Now an MMException (WaveBadFormat calling waveOutOpen) is thrown in myWaveOut.Init(). I'm wondering about the WaveBadFormat, because at this time the buffer does contain no samples at all.

Any idea?

Norbert


Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>