change logger

This commit is contained in:
Eduardo Bart
2012-06-01 17:39:23 -03:00
parent bd2faabe99
commit 14db1066fc
48 changed files with 237 additions and 287 deletions

View File

@@ -36,13 +36,13 @@ void SoundManager::init()
{
m_device = alcOpenDevice(NULL);
if(!m_device) {
logError("unable to open audio device");
g_logger.error("unable to open audio device");
return;
}
m_context = alcCreateContext(m_device, NULL);
if(!m_context) {
logError("unable to create audio context: %s", alcGetString(m_device, alcGetError(m_device)));
g_logger.error(stdext::format("unable to create audio context: %s", alcGetString(m_device, alcGetError(m_device))));
return;
}
alcMakeContextCurrent(m_context);
@@ -136,7 +136,7 @@ void SoundManager::play(const std::string& filename)
SoundSourcePtr soundSource = createSoundSource(filename);
if(!soundSource) {
logError("unable to play '%s'", filename);
g_logger.error(stdext::format("unable to play '%s'", filename));
return;
}
@@ -175,7 +175,7 @@ void SoundManager::playMusic(const std::string& filename, float fadetime)
m_musicSource = createSoundSource(filename);
if(!m_musicSource) {
logError("unable to play '%s'", filename);
g_logger.error(stdext::format("unable to play '%s'", filename));
return;
}
@@ -218,7 +218,7 @@ SoundSourcePtr SoundManager::createSoundSource(const std::string& filename)
buffer->fillBuffer(soundFile);
source->setBuffer(buffer);
m_buffers[filename] = buffer;
logWarning("uncached sound '%s' requested to be played", filename);
g_logger.warning(stdext::format("uncached sound '%s' requested to be played", filename));
} else {
StreamSoundSourcePtr streamSource(new StreamSoundSource);
streamSource->setSoundFile(soundFile);