aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/sound.cpp8
1 files 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;