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

@@ -40,14 +40,14 @@ bool SoundBuffer::fillBuffer(const SoundFilePtr& soundFile)
{
ALenum format = soundFile->getSampleFormat();
if(format == AL_UNDETERMINED) {
logError("unable to determine sample format for '%s'", soundFile->getName());
g_logger.error(stdext::format("unable to determine sample format for '%s'", soundFile->getName()));
return false;
}
DataBuffer<char> samples(soundFile->getSize());
int read = soundFile->read(&samples[0], soundFile->getSize());
if(read <= 0) {
logError("unable to fill audio buffer data for '%s'", soundFile->getName());
g_logger.error(stdext::format("unable to fill audio buffer data for '%s'", soundFile->getName()));
return false;
}
@@ -59,7 +59,7 @@ bool SoundBuffer::fillBuffer(ALenum sampleFormat, const DataBuffer<char>& data,
alBufferData(m_bufferId, sampleFormat, &data[0], size, rate);
ALenum err = alGetError();
if(err != AL_NO_ERROR) {
logError("unable to fill audio buffer data: %s", alGetString(err));
g_logger.error(stdext::format("unable to fill audio buffer data: %s", alGetString(err)));
return false;
}
return true;