HDB: Play a MP3 sound from hdb.cpp

This commit is contained in:
Nipun Garg 2019-07-24 02:53:28 +05:30 committed by Eugene Sandulenko
parent a9fbd1ae1e
commit 4c012861bc
2 changed files with 11 additions and 0 deletions

View File

@ -858,6 +858,13 @@ Common::Error HDBGame::run() {
initGraphics(kScreenWidth, kScreenHeight, &_format);
_console = new Console();
#if USE_MAD
Common::SeekableReadStream *soundStream = _fileMan->findFirstData("M00_AIRLOCK_01_MP3", TYPE_BINARY);
Audio::SeekableAudioStream *audioStream = Audio::makeMP3Stream(soundStream, DisposeAfterUse::YES);
Audio::SoundHandle *handle = new Audio::SoundHandle();
g_hdb->_mixer->playStream(Audio::Mixer::kPlainSoundType, handle, audioStream);
#endif
start();
#if 0

View File

@ -36,6 +36,10 @@
#include "common/config-manager.h"
#include "graphics/surface.h"
#include "graphics/thumbnail.h"
#include "audio/mixer.h"
#include "audio/audiostream.h"
#include "audio/decoders/wave.h"
#include "audio/decoders/mp3.h"
#include "gui/debugger.h"
#include "engines/engine.h"