mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Make using mpg123 optional, add option to linux build system
Added so people can make patent-free builds (easily), for example for patent-free distro's
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
|
||||
#ifndef LOVE_NOMPG123
|
||||
|
||||
#include "Mpg123Decoder.h"
|
||||
|
||||
#include <common/Exception.h>
|
||||
@@ -229,3 +231,5 @@ namespace lullaby
|
||||
} // lullaby
|
||||
} // sound
|
||||
} // love
|
||||
|
||||
#endif // LOVE_NOMPG123
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
|
||||
#ifndef LOVE_NOMPG123
|
||||
#ifndef LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H
|
||||
#define LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H
|
||||
|
||||
@@ -77,3 +78,4 @@ namespace lullaby
|
||||
} // love
|
||||
|
||||
#endif // LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H
|
||||
#endif // LOVE_NOMPG123
|
||||
|
||||
@@ -37,7 +37,9 @@ namespace lullaby
|
||||
|
||||
Sound::~Sound()
|
||||
{
|
||||
#ifndef LOVE_NOMPG123
|
||||
Mpg123Decoder::quit();
|
||||
#endif // LOVE_NOMPG123
|
||||
}
|
||||
|
||||
const char * Sound::getName() const
|
||||
@@ -55,8 +57,10 @@ namespace lullaby
|
||||
// Find a suitable decoder here, and return it.
|
||||
if (ModPlugDecoder::accepts(ext))
|
||||
decoder = new ModPlugDecoder(data, ext, bufferSize);
|
||||
#ifndef LOVE_NOMPG123
|
||||
else if (Mpg123Decoder::accepts(ext))
|
||||
decoder = new Mpg123Decoder(data, ext, bufferSize);
|
||||
#endif // LOVE_NOMPG123
|
||||
else if (VorbisDecoder::accepts(ext))
|
||||
decoder = new VorbisDecoder(data, ext, bufferSize);
|
||||
/*else if (FLACDecoder::accepts(ext))
|
||||
|
||||
Reference in New Issue
Block a user