updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / fakenes / gcc-4.2.patch
blob397036b760e41bfb4d1ce94303bc9ddf4f4e2485
1 Index: src/audio.cpp
2 ===================================================================
3 --- src/audio.cpp.orig 2009-01-21 23:39:16.779008450 +0100
4 +++ src/audio.cpp 2009-01-21 23:39:39.905707207 +0100
5 @@ -6,6 +6,7 @@
6 This is free software. See 'LICENSE' for details.
7 You must read and accept the license prior to use. */
9 +#include <stdio.h>
10 #include <allegro.h>
11 #include <cstdlib>
12 #include <cstring>
13 @@ -234,7 +234,7 @@
14 const unsigned queuedFrames = (audioQueue.size() / audio_channels);
15 if(queuedFrames > 0) {
16 // Determine how many frames we want to make room for.
17 - const unsigned framesToAdd = min(queuedFrames, audio_buffer_size_frames);
18 + const unsigned framesToAdd = MIN(queuedFrames, audio_buffer_size_frames);
19 // Make room for the frames in the buffer.
20 const unsigned framesToMove = (audioBufferedFrames - framesToAdd);
21 if(framesToMove > 0) {
22 @@ -258,7 +258,7 @@
23 // Determine how many frames are available in the buffer.
24 const unsigned bufferableFrames = (audio_buffer_size_frames - audioBufferedFrames);
25 // Determine the number of frames to copy to the buffer.
26 - const unsigned framesToCopy = min(queuedFrames, bufferableFrames);
27 + const unsigned framesToCopy = MIN(queuedFrames, bufferableFrames);
29 // Copy frames to the buffer.
30 for(unsigned frame = 0; frame < framesToCopy; frame++) {
31 Index: src/include/common.h
32 ===================================================================
33 --- src/include/common.h (revision 1663)
34 +++ src/include/common.h (working copy)
35 @@ -41,9 +41,6 @@
36 #define true TRUE
37 #define false FALSE
39 -#define min(x,y) MIN((x),(y))
40 -#define max(x,y) MAX((x),(y))
42 #define true_or_false(x) ((x) ? true : false)
44 #define null NULL
45 Index: src/apu.cpp
46 ===================================================================
47 --- src/apu.cpp (revision 1663)
48 +++ src/apu.cpp (working copy)
49 @@ -1930,7 +1930,7 @@
50 gain -= releaseRate;
53 - real output = (1.0 / max(gain, EPSILON));
54 + real output = (1.0 / MAX(gain, EPSILON));
55 output = fixf(output, apu_agc_gain_floor, apu_agc_gain_ceiling);
56 sample *= output;