summaryrefslogtreecommitdiffstats
path: root/src/sound/oalsound/buffer.cpp
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2012-12-25 17:46:48 +0100
committererihel <erihel@gmail.com>2012-12-25 17:46:48 +0100
commit1fa5f7a96fb4a1700847ebcf0b07a557da630b10 (patch)
treef448e87eeb5623c4c1127dae35c7daa80ea84a82 /src/sound/oalsound/buffer.cpp
parent6d607e3ae8d60d2d5f11f053511a305db415205e (diff)
downloadcolobot-1fa5f7a96fb4a1700847ebcf0b07a557da630b10.tar.gz
colobot-1fa5f7a96fb4a1700847ebcf0b07a557da630b10.tar.bz2
colobot-1fa5f7a96fb4a1700847ebcf0b07a557da630b10.zip
* Changed log level in sound module
* Fixed warnings in sound module * Fixed problem with map loading when locale with different number separator
Diffstat (limited to 'src/sound/oalsound/buffer.cpp')
-rw-r--r--src/sound/oalsound/buffer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sound/oalsound/buffer.cpp b/src/sound/oalsound/buffer.cpp
index 37211e9..dbfdca2 100644
--- a/src/sound/oalsound/buffer.cpp
+++ b/src/sound/oalsound/buffer.cpp
@@ -36,7 +36,7 @@ Buffer::~Buffer() {
bool Buffer::LoadFromFile(std::string filename, Sound sound) {
mSound = sound;
- GetLogger()->Info("Loading audio file: %s\n", filename.c_str());
+ GetLogger()->Debug("Loading audio file: %s\n", filename.c_str());
mBuffer = alutCreateBufferFromFile(filename.c_str());
ALenum error = alutGetError();
@@ -53,7 +53,7 @@ bool Buffer::LoadFromFile(std::string filename, Sound sound) {
alGetBufferi(mBuffer, AL_CHANNELS, &channels);
alGetBufferi(mBuffer, AL_FREQUENCY, &freq);
- mDuration = (ALfloat)size / channels / bits / 8 / (ALfloat)freq;
+ mDuration = static_cast<ALfloat>(size) / channels / bits / 8 / static_cast<ALfloat>(freq);
mLoaded = true;
return true;