*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Mon, 17 Dec 2001 02:39:12 +0000
changeset 14259564a17ae18
parent 141 a32c8cca251c
child 143 5744cdd4e407
*** empty log message ***
configure.in
load_aiff.c
load_voc.c
mikmod/virtch_common.c
mixer.c
music.c
native_midi/native_midi_mac.c
timidity/playmidi.c
wavestream.c
     1.1 --- a/configure.in	Fri Dec 14 14:59:08 2001 +0000
     1.2 +++ b/configure.in	Mon Dec 17 02:39:12 2001 +0000
     1.3 @@ -90,14 +90,6 @@
     1.4  
     1.5  dnl Check command-line options
     1.6  
     1.7 -dnl rcg06052001 VOC file support by Ryan C. Gordon (icculus@linuxgames.com).
     1.8 -AC_ARG_ENABLE(samples-voc,
     1.9 -[  --enable-samples-voc    enable support for VOC samples [default=yes]],
    1.10 -              , enable_samples_voc=yes)
    1.11 -if test x$enable_samples_voc = xyes; then
    1.12 -    CFLAGS="$CFLAGS -DVOC_SAMPLES"
    1.13 -fi
    1.14 -
    1.15  AC_ARG_ENABLE(music-cmd,
    1.16  [  --enable-music-cmd      support an external music player [default=yes]],
    1.17                , enable_music_cmd=yes)
     2.1 --- a/load_aiff.c	Fri Dec 14 14:59:08 2001 +0000
     2.2 +++ b/load_aiff.c	Mon Dec 17 02:39:12 2001 +0000
     2.3 @@ -26,8 +26,10 @@
     2.4  
     2.5  /* $Id$ */
     2.6  
     2.7 +#include <stdlib.h>
     2.8  #include <string.h>
     2.9  
    2.10 +#include "SDL_endian.h"
    2.11  #include "SDL_mixer.h"
    2.12  #include "load_aiff.h"
    2.13  
    2.14 @@ -62,7 +64,7 @@
    2.15  	int was_error;
    2.16  	int found_SSND;
    2.17  	int found_COMM;
    2.18 -	long start;
    2.19 +	long start = 0;
    2.20  
    2.21  	Uint32 chunk_type;
    2.22  	Uint32 chunk_length;
    2.23 @@ -77,11 +79,11 @@
    2.24  	Uint32 blocksize;
    2.25  
    2.26  	/* COMM format chunk */
    2.27 -	Uint16 channels;
    2.28 -	Uint32 numsamples;
    2.29 -	Uint16 samplesize;
    2.30 +	Uint16 channels = 0;
    2.31 +	Uint32 numsamples = 0;
    2.32 +	Uint16 samplesize = 0;
    2.33  	Uint8 sane_freq[10];
    2.34 -	Uint32 frequency;
    2.35 +	Uint32 frequency = 0;
    2.36  
    2.37  	/* Make sure we are passed a valid data source */
    2.38  	was_error = 0;
     3.1 --- a/load_voc.c	Fri Dec 14 14:59:08 2001 +0000
     3.2 +++ b/load_voc.c	Mon Dec 17 02:39:12 2001 +0000
     3.3 @@ -40,8 +40,6 @@
     3.4  #include "SDL_mixer.h"
     3.5  #include "load_voc.h"
     3.6  
     3.7 -#ifdef VOC_SAMPLES
     3.8 -
     3.9  /* Private data for VOC file */
    3.10  typedef struct vocstuff {
    3.11  	Uint32	rest;			/* bytes remaining in current block */
    3.12 @@ -458,15 +456,4 @@
    3.13      return(spec);
    3.14  } /* Mix_LoadVOC_RW */
    3.15  
    3.16 -#else
    3.17 -
    3.18 -SDL_AudioSpec *Mix_LoadVOC_RW (SDL_RWops *src, int freesrc,
    3.19 -        SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
    3.20 -{
    3.21 -    SDL_SetError("VOC file loading not supported");
    3.22 -    return(NULL);
    3.23 -}
    3.24 -
    3.25 -#endif /* VOC_SAMPLES */
    3.26 -
    3.27  /* end of load_voc.c ... */
     4.1 --- a/mikmod/virtch_common.c	Fri Dec 14 14:59:08 2001 +0000
     4.2 +++ b/mikmod/virtch_common.c	Mon Dec 17 02:39:12 2001 +0000
     4.3 @@ -105,22 +105,22 @@
     4.4  
     4.5  #ifdef __STDC__
     4.6  #define VC_PROC0(suffix) \
     4.7 -void VC_##suffix##(void) { VC_##suffix##_ptr(); }
     4.8 +void VC_##suffix (void) { VC_##suffix##_ptr(); }
     4.9  
    4.10  #define VC_FUNC0(suffix,ret) \
    4.11 -ret VC_##suffix##(void) { return VC_##suffix##_ptr(); }
    4.12 +ret VC_##suffix (void) { return VC_##suffix##_ptr(); }
    4.13  
    4.14  #define VC_PROC1(suffix,typ1) \
    4.15 -void VC_##suffix##(typ1 a) { VC_##suffix##_ptr(a); }
    4.16 +void VC_##suffix (typ1 a) { VC_##suffix##_ptr(a); }
    4.17  
    4.18  #define VC_FUNC1(suffix,ret,typ1) \
    4.19 -ret VC_##suffix##(typ1 a) { return VC_##suffix##_ptr(a); }
    4.20 +ret VC_##suffix (typ1 a) { return VC_##suffix##_ptr(a); }
    4.21  
    4.22  #define VC_PROC2(suffix,typ1,typ2) \
    4.23 -void VC_##suffix##(typ1 a,typ2 b) { VC_##suffix##_ptr(a,b); }
    4.24 +void VC_##suffix (typ1 a,typ2 b) { VC_##suffix##_ptr(a,b); }
    4.25  
    4.26  #define VC_FUNC2(suffix,ret,typ1,typ2) \
    4.27 -ret VC_##suffix##(typ1 a,typ2 b) { return VC_##suffix##_ptr(a,b); }
    4.28 +ret VC_##suffix (typ1 a,typ2 b) { return VC_##suffix##_ptr(a,b); }
    4.29  #else
    4.30  #define VC_PROC0(suffix) \
    4.31  void VC_/**/suffix/**/(void) { VC_/**/suffix/**/_ptr(); }
    4.32 @@ -141,7 +141,7 @@
    4.33  ret VC_/**/suffix/**/(typ1 a,typ2 b) { return VC_/**/suffix/**/_ptr(a,b); }
    4.34  #endif
    4.35  
    4.36 -VC_FUNC0(Init,BOOL)
    4.37 +VC_FUNC0(Init,BOOL);
    4.38  VC_PROC0(Exit)
    4.39  VC_FUNC0(SetNumVoices,BOOL)
    4.40  VC_FUNC1(SampleSpace,ULONG,int)
     5.1 --- a/mixer.c	Fri Dec 14 14:59:08 2001 +0000
     5.2 +++ b/mixer.c	Mon Dec 17 02:39:12 2001 +0000
     5.3 @@ -105,8 +105,6 @@
     5.4  /* rcg06122001 Cleanup effect callbacks. */
     5.5  static void Mix_ChannelDonePlaying(int channel)
     5.6  {
     5.7 -	effect_info *i = NULL;
     5.8 -
     5.9  	if (channel_done_callback) {
    5.10  	    channel_done_callback(channel);
    5.11  	}
     6.1 --- a/music.c	Fri Dec 14 14:59:08 2001 +0000
     6.2 +++ b/music.c	Mon Dec 17 02:39:12 2001 +0000
     6.3 @@ -81,7 +81,6 @@
     6.4  static int volatile music_stopped = 0;
     6.5  static int music_loops = 0;
     6.6  static char *music_cmd = NULL;
     6.7 -static int samplesize;
     6.8  static Mix_Music * volatile music_playing = NULL;
     6.9  static int music_volume = MIX_MAX_VOLUME;
    6.10  static int music_swap8;
    6.11 @@ -130,6 +129,7 @@
    6.12  #ifdef MID_MUSIC
    6.13  #ifdef USE_TIMIDITY_MIDI
    6.14  static int timidity_ok;
    6.15 +static int samplesize;
    6.16  #endif
    6.17  #ifdef USE_NATIVE_MIDI
    6.18  static int native_midi_ok;
    6.19 @@ -338,7 +338,7 @@
    6.20  #endif
    6.21  #ifdef MID_MUSIC
    6.22  #ifdef USE_TIMIDITY_MIDI
    6.23 -	samplesize = mixer->size/mixer->samples;
    6.24 +	samplesize = mixer->size / mixer->samples;
    6.25  	if ( Timidity_Init(mixer->freq, mixer->format,
    6.26  	                    mixer->channels, mixer->samples) == 0 ) {
    6.27  		timidity_ok = 1;
     7.1 --- a/native_midi/native_midi_mac.c	Fri Dec 14 14:59:08 2001 +0000
     7.2 +++ b/native_midi/native_midi_mac.c	Mon Dec 17 02:39:12 2001 +0000
     7.3 @@ -498,7 +498,7 @@
     7.4  			   but for QTMA, we specify it as a 8.8 fixed point of semitones
     7.5  			   TODO: detect "pitch bend range changes" & honor them!
     7.6  			*/
     7.7 -			bend = eventPos->data[0] & 0x7f | (eventPos->data[1] & 0x7f) << 7;
     7.8 +			bend = (eventPos->data[0] & 0x7f) | ((eventPos->data[1] & 0x7f) << 7);
     7.9  			
    7.10  			/* "Center" the bend */
    7.11  			bend -= 0x2000;
     8.1 --- a/timidity/playmidi.c	Fri Dec 14 14:59:08 2001 +0000
     8.2 +++ b/timidity/playmidi.c	Mon Dec 17 02:39:12 2001 +0000
     8.3 @@ -761,7 +761,7 @@
     8.4  
     8.5  int Timidity_PlaySome(void *stream, int samples)
     8.6  {
     8.7 -  int rc;
     8.8 +  int rc = RC_NONE;
     8.9    int32 end_sample;
    8.10    
    8.11    if ( ! midi_playing ) {
     9.1 --- a/wavestream.c	Fri Dec 14 14:59:08 2001 +0000
     9.2 +++ b/wavestream.c	Mon Dec 17 02:39:12 2001 +0000
     9.3 @@ -446,11 +446,11 @@
     9.4  	Uint32 offset;
     9.5  	Uint32 blocksize;
     9.6  	/* COMM format chunk */
     9.7 -	Uint16 channels;
     9.8 -	Uint32 numsamples;
     9.9 -	Uint16 samplesize;
    9.10 +	Uint16 channels = 0;
    9.11 +	Uint32 numsamples = 0;
    9.12 +	Uint16 samplesize = 0;
    9.13  	Uint8 sane_freq[10];
    9.14 -	Uint32 frequency;
    9.15 +	Uint32 frequency = 0;
    9.16  
    9.17  
    9.18  	/* Make sure we are passed a valid data source */