NAudio
NAudio copied to clipboard
Send short[] data to bufferedwaveprovider
Hi I seem to be missing something here. I have signed up for the PluraSight course and followed many examples out there on the web but keep running into the same issue. I have an array of shorts. Each int16 value is an audio sample. The array contains left channel and then right channel. So far so good. However, bufferedwaveprovider only takes a byte[] array. All the examples in the Plurasight course as well as on line show how to convert from a Byte[] array to a short or float and so on. This seems useless to me when the classes in nAudio all seem to take a byte[] array. So somehow I need to take this short[] array and get it into a byte[] array for naudio. So why are the examples the reverse? Can someone show me how to deal with getting my short[] data into the bufferedwaveprovider? Thanks