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

New Post: Weird issue with Waveprovider16

$
0
0
I'm using WasapiOut with a class derived from WaveProvider16, since I'm getting streamed data in from the network and playing it out.

Problem is, when my Read routine gets called, what is 'supposed' to be a short[] buffer is actually a byte[] buffer. I was trying to use Array.Copy to slam some PCM 16 data into the buffer, but it throws an exception due to the incompatible types.

Any idea how to get an actual short[] buffer passed to my Read routine?

Viewing all articles
Browse latest Browse all 5831

Trending Articles



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