I have the following issue. I want to play a WAV audio file in my C# program, which I converted from MP3 to WAV before. I can't just play it as a MP3 as C# needs the Media Player library added first, but I don't want to use any other library that increases file size or adds another library dll to my export.
So when I use Audacity to convert the file from MP3 to WAV, playing the file in C# works fine, but the WAV file just gets very big, which I want to avoid (from 3 MB MP3 to 25 MB WAV).
Accordingly, I switched to Adobe Premiere Pro because this offers more options to adjust the end size of the file.
Now there are 5 different audio codecs in Adobe Premiere Pro:
- Uncompressed
- IMA ADPCM
- Microsoft ADPCM
- CCITT A-Law
- GSM 6.10
With the uncompressed mode, the WAV can be played in C# without any problems. The file size is still very large in this case.
All other audio codecs allow me to reduce the file size up to 80% without audible audio loss, but with each of them I get the error message: "System.InvalidOperationException: "The wave header is corrupt." at runtime.
I tried to fix that with previous threads saying I should try reloading the stream or changing the position of the stream to 0 but that didn't work for me, I still got the same error message.
I don't know if there is even a way to fix it as it might be an issue with the compression? I am able to play those WAV files with Media Player tho. Is there any workaround?