diff options
author | Thanasis Antoniou | 2019-03-27 12:39:24 +0200 |
---|---|---|
committer | Thanasis Antoniou | 2019-03-27 12:39:24 +0200 |
commit | bb719ba87c5d370c3a62a660118b6cb58576b61b (patch) | |
tree | 4260f6cf0dec8a8888bae7b25db1f39362ae2471 /engines/bladerunner/audio_player.cpp | |
parent | 5795e25d73dee1ba1363546b6f351031baa6f4d3 (diff) | |
download | scummvm-rg350-bb719ba87c5d370c3a62a660118b6cb58576b61b.tar.gz scummvm-rg350-bb719ba87c5d370c3a62a660118b6cb58576b61b.tar.bz2 scummvm-rg350-bb719ba87c5d370c3a62a660118b6cb58576b61b.zip |
BLADERUNNER: Fix missing sound effects in some occassions
LABBUZZ sound for the maze and Animoid sounds
Moved lab buzz in next scene's (PS10) init, and increased size of track buffer to compensate for frequently dropping sounds in places with mayne sound effects (eg Animoid Row, Izo's door and trapdoor)
Diffstat (limited to 'engines/bladerunner/audio_player.cpp')
-rw-r--r-- | engines/bladerunner/audio_player.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/bladerunner/audio_player.cpp b/engines/bladerunner/audio_player.cpp index 4507506888..8673fab2f6 100644 --- a/engines/bladerunner/audio_player.cpp +++ b/engines/bladerunner/audio_player.cpp @@ -41,7 +41,7 @@ namespace BladeRunner { AudioPlayer::AudioPlayer(BladeRunnerEngine *vm) { _vm = vm; - for (int i = 0; i != 6; ++i) { + for (int i = 0; i != kTracks; ++i) { _tracks[i].priority = 0; _tracks[i].isActive = false; _tracks[i].channel = -1; @@ -138,8 +138,9 @@ int AudioPlayer::playAud(const Common::String &name, int volume, int panFrom, in int lowestPriority = 1000000; int lowestPriorityTrack = -1; - for (int i = 0; i != 6; ++i) { + for (int i = 0; i != kTracks; ++i) { if (!isActive(i)) { + //debug ("Assigned track %i to %s", i, name.c_str()); track = i; break; } @@ -154,12 +155,14 @@ int AudioPlayer::playAud(const Common::String &name, int volume, int panFrom, in * the new priority */ if (track == -1 && lowestPriority < priority) { + //debug ("Stop lowest priority track (with lower prio: %d %d), for %s %d!", lowestPriorityTrack, lowestPriority, name.c_str(), priority); stop(lowestPriorityTrack, true); track = lowestPriorityTrack; } /* If there's still no available track, give up */ if (track == -1) { + //debug ("No available track for %s %d - giving up", name.c_str(), priority); return -1; } @@ -168,6 +171,7 @@ int AudioPlayer::playAud(const Common::String &name, int volume, int panFrom, in if (!_vm->_audioCache->findByHash(hash)) { Common::SeekableReadStream *r = _vm->getResourceStream(name); if (!r) { + //debug ("Could not get stream for %s %d - giving up", name.c_str(), priority); return -1; } @@ -175,6 +179,7 @@ int AudioPlayer::playAud(const Common::String &name, int volume, int panFrom, in while (!_vm->_audioCache->canAllocate(size)) { if (!_vm->_audioCache->dropOldest()) { delete r; + //debug ("No available mem in cache for %s %d - giving up", name.c_str(), priority); return -1; } } @@ -201,6 +206,7 @@ int AudioPlayer::playAud(const Common::String &name, int volume, int panFrom, in if (channel == -1) { delete audioStream; + //debug ("No available channel for %s %d - giving up", name.c_str(), priority); return -1; } |