Convert MP3 to WAV on WP8

How to convert MP3 file to WAV file on WP8?
Is there an API or do I need to use third-party code?

The need for WAV files arises due to the fact that my application occasionally plays prompts to the user. In order not to interrupt the sound from background applications, I have to use the SoundEffect class. This class can only process WAV files.

Thanks.

+4
source share
1 answer

Not sure if this will work on WP8, but you can try.

In WPF, I use NAudio. You can add it to your project via nuget.

After that, you can use the following snippet:

public static void Mp3ToWav(string mp3File, string outputFile) { using (Mp3FileReader reader = new Mp3FileReader(mp3File)) { WaveFileWriter.CreateWaveFile(outputFile, reader); } } 
0
source

Source: https://habr.com/ru/post/1488534/


All Articles