#include "sound_file.hpp"
#include "sound_source.hpp"
#include "stream_sound_source.hpp"
-#include "msg.hpp"
+#include "log.hpp"
SoundManager* sound_manager = 0;
} catch(std::exception& e) {
device = 0;
context = 0;
- msg_warning << "Couldn't initialize audio device:" << e.what() << std::endl;
+ log_warning << "Couldn't initialize audio device:" << e.what() << std::endl;
print_openal_version();
throw e;
}
source->play();
sources.push_back(source);
} catch(std::exception& e) {
- msg_warning << "Couldn't play sound " << filename << ": " << e.what() << std::endl;
+ log_warning << "Couldn't play sound " << filename << ": " << e.what() << std::endl;
}
}
delete music_source;
music_source = newmusic.release();
} catch(std::exception& e) {
- msg_warning << "Couldn't play music file '" << filename << "': " << e.what() << std::endl;
+ log_warning << "Couldn't play music file '" << filename << "': " << e.what() << std::endl;
}
}
void
SoundManager::print_openal_version()
{
- msg_info << "OpenAL Vendor: " << alGetString(AL_VENDOR) << std::endl;
- msg_info << "OpenAL Version: " << alGetString(AL_VERSION) << std::endl;
- msg_info << "OpenAL Renderer: " << alGetString(AL_RENDERER) << std::endl;
- msg_info << "OpenAl Extensions: " << alGetString(AL_EXTENSIONS) << std::endl;
+ log_info << "OpenAL Vendor: " << alGetString(AL_VENDOR) << std::endl;
+ log_info << "OpenAL Version: " << alGetString(AL_VERSION) << std::endl;
+ log_info << "OpenAL Renderer: " << alGetString(AL_RENDERER) << std::endl;
+ log_info << "OpenAl Extensions: " << alGetString(AL_EXTENSIONS) << std::endl;
}
void