mirror of
https://github.com/edubart/otclient.git
synced 2025-10-24 00:05:02 +02:00
change logger
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user