diff options
author | Einar Johan Trøan Sømåen | 2012-07-22 22:29:07 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-22 22:29:07 +0200 |
commit | 4c3421288d2d74396579f35b25a7b78e14afa7f4 (patch) | |
tree | 12764931105c3adf985cfb2eff995b0074af47f2 /engines/wintermute/base | |
parent | 3bcbd1881c9a22a594707726154c568d187e313b (diff) | |
download | scummvm-rg350-4c3421288d2d74396579f35b25a7b78e14afa7f4.tar.gz scummvm-rg350-4c3421288d2d74396579f35b25a7b78e14afa7f4.tar.bz2 scummvm-rg350-4c3421288d2d74396579f35b25a7b78e14afa7f4.zip |
WINTERMUTE: Add an audio-debug-channel and reduce the use of warning()
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/base_file_manager.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/sound/base_sound_buffer.cpp | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp index f651835fe4..0a59a3b134 100644 --- a/engines/wintermute/base/base_file_manager.cpp +++ b/engines/wintermute/base/base_file_manager.cpp @@ -472,7 +472,7 @@ bool BaseFileManager::registerPackage(Common::SeekableReadStream *package, const ((byte *)name)[k] ^= 'D';
}
}
-
+ debugC(kWinterMuteDebugFileAccess, "Package contains %s", name);
// some old version of ProjectMan writes invalid directory entries
// so at least prevent strupr from corrupting memory
name[nameLength - 1] = '\0';
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp index b8c19c2985..e1dba2120d 100644 --- a/engines/wintermute/base/sound/base_sound_buffer.cpp +++ b/engines/wintermute/base/sound/base_sound_buffer.cpp @@ -33,6 +33,7 @@ #include "engines/wintermute/base/sound/base_sound_buffer.h"
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/utils/utils.h"
+#include "engines/wintermute/wintermute.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/vorbis.h"
@@ -95,13 +96,7 @@ void BaseSoundBuffer::setStreaming(bool Streamed, uint32 NumBlocks, uint32 Block //////////////////////////////////////////////////////////////////////////
bool BaseSoundBuffer::loadFromFile(const char *filename, bool forceReload) {
- warning("BSoundBuffer::LoadFromFile(%s,%d)", filename, forceReload);
-#if 0
- if (_stream) {
- BASS_StreamFree(_stream);
- _stream = NULL;
- }
-#endif
+ debugC(kWinterMuteDebugAudio, "BSoundBuffer::LoadFromFile(%s,%d)", filename, forceReload);
// Load a file, but avoid having the File-manager handle the disposal of it.
_file = _gameRef->_fileManager->openFile(filename, true, false);
@@ -123,11 +118,11 @@ bool BaseSoundBuffer::loadFromFile(const char *filename, bool forceReload) { _file = new Common::SeekableSubReadStream(_file, 0, waveSize);
_stream = Audio::makeRawStream(_file, waveRate, waveFlags, DisposeAfterUse::YES);
} else {
- warning("BSoundBuffer::LoadFromFile - WAVE not supported yet for %s with type %d", filename, waveType);
+ error("BSoundBuffer::LoadFromFile - WAVE not supported yet for %s with type %d", filename, waveType);
}
}
} else {
- warning("BSoundBuffer::LoadFromFile - Unknown filetype for %s", filename);
+ error("BSoundBuffer::LoadFromFile - Unknown filetype for %s", filename);
}
if (!_stream) {
return STATUS_FAILED;
|