diff options
author | Sven Hesse | 2009-03-19 23:40:59 +0000 |
---|---|---|
committer | Sven Hesse | 2009-03-19 23:40:59 +0000 |
commit | 51109a5cfcc8d9f817813499c39f243016aa170f (patch) | |
tree | 9b6fe1c1095f4fc3b2eb83c7438aca9d18936892 /engines/gob/sound/sound.cpp | |
parent | 7077ea36e0a805c356e7b7492fce6945854f95bb (diff) | |
download | scummvm-rg350-51109a5cfcc8d9f817813499c39f243016aa170f.tar.gz scummvm-rg350-51109a5cfcc8d9f817813499c39f243016aa170f.tar.bz2 scummvm-rg350-51109a5cfcc8d9f817813499c39f243016aa170f.zip |
Adding simple support for protracker playback
svn-id: r39550
Diffstat (limited to 'engines/gob/sound/sound.cpp')
-rw-r--r-- | engines/gob/sound/sound.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 4746bfa99a..dbb6b7685b 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -39,13 +39,16 @@ Sound::Sound(GobEngine *vm) : _vm(vm) { _adlib = 0; _infogrames = 0; + _protracker = 0; _cdrom = 0; _bgatmos = 0; if (!_vm->_noMusic && _vm->hasAdlib()) _adlib = new AdLib(*_vm->_mixer); - if (!_vm->_noMusic && (_vm->getPlatform() == Common::kPlatformAmiga)) + if (!_vm->_noMusic && (_vm->getPlatform() == Common::kPlatformAmiga)) { _infogrames = new Infogrames(*_vm->_mixer); + _protracker = new Protracker(*_vm->_mixer); + } if (_vm->isCD()) _cdrom = new CDROM; if (_vm->getGameType() == kGameTypeWoodruff) @@ -61,6 +64,7 @@ Sound::~Sound() { delete _blaster; delete _adlib; delete _infogrames; + delete _protracker; delete _cdrom; delete _bgatmos; @@ -183,6 +187,24 @@ bool Sound::infogramesLoadSong(const char *fileName) { return _infogrames->loadSong(fileName); } +bool Sound::protrackerPlay(const char *fileName) { + if (!_protracker) + return false; + + debugC(1, kDebugSound, "Protracker: Playing song \"%s\"", fileName); + + return _protracker->play(fileName); +} + +void Sound::protrackerStop() { + if (!_protracker) + return; + + debugC(1, kDebugSound, "Protracker: Stopping playback"); + + _protracker->stop(); +} + void Sound::infogramesPlay() { if (!_infogrames) return; |