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
6 This is free software. See 'LICENSE' for details.
7 You must read and accept the license prior to use. */
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) {
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)
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)
46 ===================================================================
47 --- src/apu.cpp (revision 1663)
48 +++ src/apu.cpp (working copy)
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);