Added support for GME (Game_Music_Emu).

This makes it possible for LÖVE to play music files for NES, SNES, MegaDrive,
and many more. It's pretty cool.

The feature is disabled until each platform is ready to link with GME. Packages
exist for Debian and Arch, and it compiled without any issues in MSVC++, so
I don't expect this to a problem for anyone.
This commit is contained in:
rude
2012-07-02 00:19:43 +02:00
parent f6099402e7
commit 098ffb7336
3 changed files with 216 additions and 0 deletions
+7
View File
@@ -18,11 +18,14 @@
* 3. This notice may not be removed or altered from any source distribution.
**/
#include "common/config.h"
#include "Sound.h"
#include "ModPlugDecoder.h"
#include "Mpg123Decoder.h"
#include "VorbisDecoder.h"
#include "GmeDecoder.h"
//#include "FLACDecoder.h"
namespace love
@@ -64,6 +67,10 @@ sound::Decoder *Sound::newDecoder(love::filesystem::File *file, int bufferSize)
#endif // LOVE_NOMPG123
else if (VorbisDecoder::accepts(ext))
decoder = new VorbisDecoder(data, ext, bufferSize);
#ifdef LOVE_SUPPORT_GME
else if (GmeDecoder::accepts(ext))
decoder = new GmeDecoder(data, ext, bufferSize);
#endif // LOVE_SUPPORT_GME
/*else if (FLACDecoder::accepts(ext))
decoder = new FLACDecoder(data, ext, bufferSize);*/