I took a binary file encoded in U-law and decoded开发者_StackOverflow社区 it to PCM. Now I need to play it. However, it has no WAV header.
Can DirectSound play a raw binary sound file that has no WAV header?
It has been years since I did any DX programming, but it certainly should be possible to place the sound data in an appropriately formatted sound buffer. The header of a WAV just sets the number of channels, bitrate etc on the sound buffer, which you can set yourself manually.
You can always have the fallback of writing your raw data to a wav format file first (there are C# sample apps about).
精彩评论