so what I have is a short[] array which represents the raw data of a WAV file. This means it doesn't include any header or footer information which is usually included. In order to play this audio, I need to convert it to a stream of some sort, unfortunately the data in this short[] array is Int16 and many of the values exceed 255, therefore cannot be converted to bytes and cannot be converted to a stream. Does anyone have any idea how I would be able to play this audio data?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You can convert the short array back to a byte array:
Then you can create a wave stream using the
WaveMemoryStream
class below - for that you will need to know the wave format of your sample data. This stream can then i.e be saved as a WAV file or played back bySoundPlayer
.