updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / funguloids / openalsoundsystem.cpp.diff
blob779833dbd9c49b0777779ec4d3fc4cc28f397959
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
3 @@ -21,9 +21,9 @@
4 //
5 // 3. This notice may not be removed or altered from any source distribution.
6 //
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"
16 @@ -266,14 +266,14 @@
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) );
23 return 1;
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) );
31 return 2;
33 @@ -312,12 +312,12 @@
34 mSoundChannels->setVolume(vol);
36 // add a music player
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);
48 return 0;
50 @@ -480,14 +480,14 @@
51 if(mSoundDisabled) return;
52 if(file.empty()) return;
53 LogManager::getSingleton().logMessage("Going to play '" + file + "'..");
54 - assert(mStreamPlayer);
56 - // Set the volume
57 + assert(mStreamPlayer);
59 + // Set the volume
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);