From 43f39b30de51ffc7d357322eac0f7b9b93a08498 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 21 Aug 2019 20:05:29 +0200 Subject: HDB: FUrther simplification of sound code --- engines/hdb/sound.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp index 2d260bf976..85e20f0036 100644 --- a/engines/hdb/sound.cpp +++ b/engines/hdb/sound.cpp @@ -1636,13 +1636,11 @@ void Sound::playVoice(int index, int actor) { return; Common::SeekableReadStream *stream = nullptr; - if (g_hdb->getPlatform() == Common::kPlatformLinux) { - Common::String updatedName(soundList[index].name); + Common::String updatedName(soundList[index].name); + if (g_hdb->getPlatform() == Common::kPlatformLinux) updatedName.replace(updatedName.begin() + updatedName.size() - 4, updatedName.end(), "_OGG"); - stream = g_hdb->_fileMan->findFirstData(updatedName.c_str(), TYPE_BINARY); - } else - stream = g_hdb->_fileMan->findFirstData(soundList[index].name, TYPE_BINARY); + stream = g_hdb->_fileMan->findFirstData(updatedName.c_str(), TYPE_BINARY); if (stream == nullptr) return; -- cgit v1.2.3