From 4c012861bcf9b9babb95df2d2faaed380d914859 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Wed, 24 Jul 2019 02:53:28 +0530 Subject: HDB: Play a MP3 sound from hdb.cpp --- engines/hdb/hdb.cpp | 7 +++++++ engines/hdb/hdb.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index ec99b7e0ae..cde6aa3b2b 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -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 diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h index cea8ab3548..c6c26f9821 100644 --- a/engines/hdb/hdb.h +++ b/engines/hdb/hdb.h @@ -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" -- cgit v1.2.3