How to decode wav, mp3 and / or ogg in .Net / Mono?

I am looking for a cross-platform (.Net and Mono for Windows, MacOSX and Linux) way to decode wav, mp3 or ogg files so that I can then play decoded streams through DirectSound or OpenAL as desired.

A solution that can decode either mp3 or ogg would be sufficient - decoding of both is not required. If this (or another solution) could also decode wav, that would be ideal, but that was not strictly necessary, since I could convert my wav files to mp3 or ogg.

A solution that can only decode wav files is only a partial solution, but I will take what I can get .; -)

Here is what I already watched:

  • DirectSound and Alut support WAV decoding, but Alut is deprecated.
  • ffmpeg will decode anything, but it doesn't seem to have a common stable release on different platforms?
  • I have not tried csvorbis yet, but it is very old and I'm not sure what its current status is.

You can more than try to persecute me because one of these solutions is actually the best option.

Thanks.

+5
source share
7 answers

For simple support for WAV files, you can see the mono implementation in mcs / class / System / System.Media / AudioData.cs ( http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/System/System. Media / ).

ogg csvorbis mono sn: http://anonsvn.mono-project.com/viewvc/trunk/csvorbis/

+1

, . FMOD, . , ogg mp3, API . -, .

FMOD ; , 3D ( ).

, , , # OGG .

+4

.wav System.Media.SoundPlayer. , .

+1

ffmpeg, . , , .

0

https://sites.google.com/site/cobnut3d/

SlimDX.DirectSound is sample code for C #.

-1
source

All Articles