VS2008 can't compile dr_mp3.h

This commit is contained in:
kaetemi 2019-04-28 03:31:26 +08:00
parent 0174001273
commit 705ad16d93
3 changed files with 10 additions and 0 deletions

View file

@ -18,6 +18,8 @@
#define NLSOUND_AUDIO_DECODER_MP3_H
#include <nel/misc/types_nl.h>
#if (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */
#include <nel/sound/audio_decoder.h>
// disable drmp3_init_file()
@ -91,6 +93,8 @@ public:
} /* namespace NLSOUND */
#endif /* (NL_COMP_VC_VERSION > 90) */
#endif // NLSOUND_AUDIO_DECODER_MP3_H
/* end of file */

View file

@ -103,10 +103,12 @@ IAudioDecoder *IAudioDecoder::createAudioDecoder(const std::string &type, NLMISC
{
return new CAudioDecoderVorbis(stream, loop);
}
#if (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */
else if (type_lower == "mp3")
{
return new CAudioDecoderMP3(stream, loop);
}
#endif
else
{
nlwarning("Music file type unknown: '%s'", type_lower.c_str());

View file

@ -17,6 +17,8 @@
#include "stdsound.h"
#if (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */
#include <nel/sound/audio_decoder_mp3.h>
#define DR_MP3_IMPLEMENTATION
@ -221,4 +223,6 @@ void CAudioDecoderMP3::setLooping(bool loop)
} /* namespace NLSOUND */
#endif /* (NL_COMP_VC_VERSION > 90) */
/* end of file */