Browse Source

Tweaked streaming Sources to use fewer OpenAL buffers (and increased the amount of decoded data per buffer to compensate), and removed some unnecessary #include statements.

Alex Szpakowski 11 years ago
parent
commit
808e533b02

+ 0 - 1
src/modules/audio/openal/Audio.h

@@ -24,7 +24,6 @@
 // STD
 // STD
 #include <queue>
 #include <queue>
 #include <map>
 #include <map>
-#include <iostream>
 #include <cmath>
 #include <cmath>
 
 
 // LOVE
 // LOVE

+ 0 - 1
src/modules/audio/openal/Pool.h

@@ -24,7 +24,6 @@
 // STD
 // STD
 #include <queue>
 #include <queue>
 #include <map>
 #include <map>
-#include <iostream>
 #include <cmath>
 #include <cmath>
 
 
 // LOVE
 // LOVE

+ 1 - 1
src/modules/audio/openal/Source.h

@@ -145,7 +145,7 @@ private:
 	ALuint source;
 	ALuint source;
 	bool valid;
 	bool valid;
 
 
-	static const unsigned int MAX_BUFFERS = 32;
+	static const unsigned int MAX_BUFFERS = 8;
 	ALuint streamBuffers[MAX_BUFFERS];
 	ALuint streamBuffers[MAX_BUFFERS];
 
 
 	Object::StrongRef<StaticDataBuffer> staticBuffer;
 	Object::StrongRef<StaticDataBuffer> staticBuffer;

+ 3 - 0
src/modules/audio/wrap_Audio.cpp

@@ -26,6 +26,9 @@
 
 
 #include "common/runtime.h"
 #include "common/runtime.h"
 
 
+// C++
+#include <iostream>
+
 namespace love
 namespace love
 {
 {
 namespace audio
 namespace audio

+ 1 - 1
src/modules/event/sdl/Event.h

@@ -27,7 +27,7 @@
 #include "common/EnumMap.h"
 #include "common/EnumMap.h"
 
 
 // SDL
 // SDL
-#include <SDL.h>
+#include <SDL_events.h>
 
 
 // STL
 // STL
 #include <map>
 #include <map>

+ 0 - 1
src/modules/filesystem/physfs/Filesystem.h

@@ -24,7 +24,6 @@
 // STD
 // STD
 #include <cstdlib>
 #include <cstdlib>
 #include <cstring>
 #include <cstring>
-#include <iostream>
 #include <string>
 #include <string>
 
 
 // LOVE
 // LOVE

+ 2 - 1
src/modules/graphics/opengl/Graphics.cpp

@@ -35,6 +35,7 @@
 
 
 // C
 // C
 #include <cmath>
 #include <cmath>
+#include <cstdio>
 
 
 namespace love
 namespace love
 {
 {
@@ -259,7 +260,7 @@ bool Graphics::setMode(int width, int height, bool &sRGB)
 
 
 	// Reload all volatile objects.
 	// Reload all volatile objects.
 	if (!Volatile::loadAll())
 	if (!Volatile::loadAll())
-		std::cerr << "Could not reload all volatile objects." << std::endl;
+		::printf("Could not reload all volatile objects.\n");
 
 
 	// Restore the graphics state.
 	// Restore the graphics state.
 	restoreState(states.back());
 	restoreState(states.back());

+ 0 - 1
src/modules/graphics/opengl/Graphics.h

@@ -22,7 +22,6 @@
 #define LOVE_GRAPHICS_OPENGL_GRAPHICS_H
 #define LOVE_GRAPHICS_OPENGL_GRAPHICS_H
 
 
 // STD
 // STD
-#include <iostream>
 #include <stack>
 #include <stack>
 #include <vector>
 #include <vector>
 
 

+ 1 - 1
src/modules/sound/Decoder.h

@@ -40,7 +40,7 @@ public:
 	 * Indicates how many bytes of raw data should be generated at each
 	 * Indicates how many bytes of raw data should be generated at each
 	 * call to Decode.
 	 * call to Decode.
 	 **/
 	 **/
-	static const int DEFAULT_BUFFER_SIZE = 2048;
+	static const int DEFAULT_BUFFER_SIZE = 16384;
 
 
 	/**
 	/**
 	 * Indicates the quality of the sound.
 	 * Indicates the quality of the sound.