aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-07-24 02:53:28 +0530
committerEugene Sandulenko2019-09-03 17:17:27 +0200
commit4c012861bcf9b9babb95df2d2faaed380d914859 (patch)
treecc37b9f4e70b832258bab5599fa886110c6475ae /engines
parenta9fbd1ae1e5af3e9b15efd82e476419c26f23855 (diff)
downloadscummvm-rg350-4c012861bcf9b9babb95df2d2faaed380d914859.tar.gz
scummvm-rg350-4c012861bcf9b9babb95df2d2faaed380d914859.tar.bz2
scummvm-rg350-4c012861bcf9b9babb95df2d2faaed380d914859.zip
HDB: Play a MP3 sound from hdb.cpp
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/hdb.cpp7
-rw-r--r--engines/hdb/hdb.h4
2 files changed, 11 insertions, 0 deletions
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"