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