diff options
author | Sven Hesse | 2008-12-14 03:08:02 +0000 |
---|---|---|
committer | Sven Hesse | 2008-12-14 03:08:02 +0000 |
commit | bbe6ff006e79473a0beeac5a4d88f901c68102fb (patch) | |
tree | 3a8dd3e71625e40567b9586c3571283b91d67a15 /engines/gob/sound/sound.cpp | |
parent | 126c5a1dc8ec76b74a33f9b62d553d652a382df4 (diff) | |
download | scummvm-rg350-bbe6ff006e79473a0beeac5a4d88f901c68102fb.tar.gz scummvm-rg350-bbe6ff006e79473a0beeac5a4d88f901c68102fb.tar.bz2 scummvm-rg350-bbe6ff006e79473a0beeac5a4d88f901c68102fb.zip |
Music/Video handling fixes/stubs
svn-id: r35351
Diffstat (limited to 'engines/gob/sound/sound.cpp')
-rw-r--r-- | engines/gob/sound/sound.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 78ef69c912..84f47990ec 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -520,6 +520,25 @@ void Sound::cdTest(int trySubst, const char *label) { _cdrom->testCD(trySubst, label); } +void Sound::bgPlay(const char *file) { + if (!_bgatmos) + return; + + debugC(1, kDebugSound, "BackgroundAtmosphere: Playing \"%s\"", file); + + _bgatmos->stop(); + _bgatmos->queueClear(); + + SoundDesc *sndDesc = new SoundDesc; + if (!sampleLoad(sndDesc, file)) { + delete sndDesc; + return; + } + + _bgatmos->queueSample(*sndDesc); + _bgatmos->play(); +} + void Sound::bgPlay(const char *base, int count) { if (!_bgatmos) return; @@ -539,6 +558,8 @@ void Sound::bgPlay(const char *base, int count) { sndDesc = new SoundDesc; if (sampleLoad(sndDesc, fileName)) _bgatmos->queueSample(*sndDesc); + else + delete sndDesc; } _bgatmos->play(); |