aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/sound/base_sound_buffer.cpp
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-22 22:29:07 +0200
committerEinar Johan Trøan Sømåen2012-07-22 22:29:07 +0200
commit4c3421288d2d74396579f35b25a7b78e14afa7f4 (patch)
tree12764931105c3adf985cfb2eff995b0074af47f2 /engines/wintermute/base/sound/base_sound_buffer.cpp
parent3bcbd1881c9a22a594707726154c568d187e313b (diff)
downloadscummvm-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/sound/base_sound_buffer.cpp')
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.cpp13
1 files changed, 4 insertions, 9 deletions
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;