diff options
author | Einar Johan Trøan Sømåen | 2012-07-29 00:27:50 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-29 00:27:50 +0200 |
commit | 6dc1e09da93c0ba0507fd0ceadbbb504469deccc (patch) | |
tree | dae477f4ed7c6b9be7a5dd38174d81cdbae48c58 /engines/wintermute/base/sound/base_sound_manager.cpp | |
parent | e841bf16d6b955f779e5e30535848bd650d22352 (diff) | |
download | scummvm-rg350-6dc1e09da93c0ba0507fd0ceadbbb504469deccc.tar.gz scummvm-rg350-6dc1e09da93c0ba0507fd0ceadbbb504469deccc.tar.bz2 scummvm-rg350-6dc1e09da93c0ba0507fd0ceadbbb504469deccc.zip |
WINTERMUTE: Replace const char* with const Common::String & in fonts, gfx, particles, sound and files.
Diffstat (limited to 'engines/wintermute/base/sound/base_sound_manager.cpp')
-rw-r--r-- | engines/wintermute/base/sound/base_sound_manager.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp index 4659c35ff7..8df9f299ef 100644 --- a/engines/wintermute/base/sound/base_sound_manager.cpp +++ b/engines/wintermute/base/sound/base_sound_manager.cpp @@ -89,13 +89,14 @@ bool BaseSoundMgr::initialize() { }
//////////////////////////////////////////////////////////////////////////
-BaseSoundBuffer *BaseSoundMgr::addSound(const char *filename, Audio::Mixer::SoundType type, bool streamed) {
+BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::Mixer::SoundType type, bool streamed) {
if (!_soundAvailable) {
return NULL;
}
BaseSoundBuffer *sound;
+ Common::String useFilename = filename;
// try to switch WAV to OGG file (if available)
AnsiString ext = PathUtil::getExtension(filename);
if (StringUtil::compareNoCase(ext, "wav")) {
@@ -104,7 +105,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const char *filename, Audio::Mixer::Soun AnsiString newFile = PathUtil::combine(path, name + "ogg");
if (_gameRef->_fileManager->hasFile(newFile)) {
- filename = newFile.c_str();
+ useFilename = newFile;
}
}
@@ -117,9 +118,9 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const char *filename, Audio::Mixer::Soun sound->setType(type);
- bool res = sound->loadFromFile(filename);
+ bool res = sound->loadFromFile(useFilename);
if (DID_FAIL(res)) {
- _gameRef->LOG(res, "Error loading sound '%s'", filename);
+ _gameRef->LOG(res, "Error loading sound '%s'", useFilename.c_str());
delete sound;
return NULL;
}
|