mono/MonoGame — pull request #572 by b3nn0 (2012-07-11 15:29:27+00:00)
Title: Use Tao.SDL for playing Songs on Linux

Hey there,
Since I diddn't get a response on the Codeplex site but need it anyway, I implemented ogg/vorbis and mp3 sound support for the Linux MediaPlayer.
It is a simple reimplementation of the Song class to use Tao.SDL for playing sound.
It also includes a few lines of initialization in OpenTKGamePlatform (but that #if'd to be only used on Linux).
It also implements the MediaStateChanged event that should be provided by the MediaPlayer class (this will work on Linux. On other platforms, only user-invoked state-changes are reported, such as when the Stop() method is called. A MediaStateCahnged event because a song has finished will only be invoked on Linux).
If you prefere to not be dependant on Tao.SDL that much, feel free to reject this pull request. I'm going to use it anyway :p

Note: this does break old code in rare circumstances. SDL can only do resampling if the sampling-rate is a multiple of 11,025 Hz. So if there are files played that are e.g. 48,000 Hz, sound may be distorted. Most common sampling rates work good, however.

Note2: This code should not only support ogg and mp3, but all formats that are supported by SDL Mixer.