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

New Post: Cannot Hear Audio

$
0
0
byte[] decoded = new byte[4096];
decoded = selectedCodec.Decode(msgReceived.messageContents, 0, msgReceived.messageContents.Length);
Stream audioStream = new MemoryStream(decoded);
RawSourceWaveStream rawStream = new RawSourceWaveStream(audioStream, selectedCodec.RecordFormat);
rawStream.Position = 0;
MSMixer.AddMixerInput(rawStream.ToSampleProvider());
//WaveChannel32 rawStream32 = new WaveChannel32(rawStream);
//rawStream32.Position = 0;
//MSMixer.AddMixerInput(rawStream32);
Currently receiving an argument exception when using rawStream.ToSampleProvider()
"All mixer inputs must have the same WaveFormat"

Not positive what you want me to do here, I tried the code commented out, which worked, but the audio was incredibly choppy; After some time I received an error saying "to many mixer inputs".

Thoughts?
-Ryan

Viewing all articles
Browse latest Browse all 5831

Trending Articles



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