mirror of
https://github.com/edubart/otclient.git
synced 2025-12-16 21:57:11 +01:00
change logger
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user