1 --- src/openalsoundsystem.cpp 2007-05-22 11:11:46.000000000 -0400
2 +++ src/openalsoundsystem.cpp.ok 2009-12-12 03:56:37.341800903 -0500
5 // 3. This notice may not be removed or altered from any source distribution.
7 -//***************************************************************************/
9 -// NOTICE: This file is written by Piet (thanks! :), <funguloids@superpiet.de>,
10 +//***************************************************************************/
12 +// NOTICE: This file is written by Piet (thanks! :), <funguloids@superpiet.de>,
13 // for the Linux version of Funguloids.
15 #include "soundsystem.h"
18 int attributes[] = { 0 };
19 mContext = alcCreateContext(mDevice, attributes);
20 - if ( (err = alGetError()) != AL_NO_ERROR) {
21 + if ( (err = alcGetError(mDevice)) != ALC_NO_ERROR) {
22 LogManager::getSingleton().logMessage("OpanAL: error creating context: " + lastALError(err) );
25 // check_alc_error("Couldn't create audio context: ");
26 alcMakeContextCurrent(mContext);
27 // check_alc_error("Couldn't select audio context: ");
28 - if ( (err = alGetError()) != AL_NO_ERROR) {
29 + if ( (err = alcGetError(mDevice)) != ALC_NO_ERROR) {
30 LogManager::getSingleton().logMessage("OpanAL: error making context current: " + lastALError(err) );
34 mSoundChannels->setVolume(vol);
37 - mStreamPlayer = new StreamPlayer();
39 - // Set the music volume
40 + mStreamPlayer = new StreamPlayer();
42 + // Set the music volume
43 svol = GameApplication::mGameConfig->GetValue("audio", "music_volume", "1.0");
44 vol = StringConverter::parseReal(svol);
45 - mStreamPlayer->setVolume(vol);
46 + mStreamPlayer->setVolume(vol);
51 if(mSoundDisabled) return;
52 if(file.empty()) return;
53 LogManager::getSingleton().logMessage("Going to play '" + file + "'..");
54 - assert(mStreamPlayer);
57 + assert(mStreamPlayer);
60 String svol = GameApplication::mGameConfig->GetValue("audio", "music_volume", "1.0");
61 Real vol = StringConverter::parseReal(svol);
63 mStreamPlayer->play(file);
64 - mStreamPlayer->setVolume(vol);
65 + mStreamPlayer->setVolume(vol);