Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 17, 2001
1 parent 0cca950 commit f1d5168
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 43 deletions.
8 changes: 0 additions & 8 deletions configure.in
Expand Up @@ -90,14 +90,6 @@ CFLAGS="$CFLAGS -DUSE_RWOPS"

dnl Check command-line options

dnl rcg06052001 VOC file support by Ryan C. Gordon (icculus@linuxgames.com).
AC_ARG_ENABLE(samples-voc,
[ --enable-samples-voc enable support for VOC samples [default=yes]],
, enable_samples_voc=yes)
if test x$enable_samples_voc = xyes; then
CFLAGS="$CFLAGS -DVOC_SAMPLES"
fi

AC_ARG_ENABLE(music-cmd,
[ --enable-music-cmd support an external music player [default=yes]],
, enable_music_cmd=yes)
Expand Down
12 changes: 7 additions & 5 deletions load_aiff.c
Expand Up @@ -26,8 +26,10 @@

/* $Id$ */

#include <stdlib.h>
#include <string.h>

#include "SDL_endian.h"
#include "SDL_mixer.h"
#include "load_aiff.h"

Expand Down Expand Up @@ -62,7 +64,7 @@ SDL_AudioSpec *Mix_LoadAIFF_RW (SDL_RWops *src, int freesrc,
int was_error;
int found_SSND;
int found_COMM;
long start;
long start = 0;

Uint32 chunk_type;
Uint32 chunk_length;
Expand All @@ -77,11 +79,11 @@ SDL_AudioSpec *Mix_LoadAIFF_RW (SDL_RWops *src, int freesrc,
Uint32 blocksize;

/* COMM format chunk */
Uint16 channels;
Uint32 numsamples;
Uint16 samplesize;
Uint16 channels = 0;
Uint32 numsamples = 0;
Uint16 samplesize = 0;
Uint8 sane_freq[10];
Uint32 frequency;
Uint32 frequency = 0;

/* Make sure we are passed a valid data source */
was_error = 0;
Expand Down
13 changes: 0 additions & 13 deletions load_voc.c
Expand Up @@ -40,8 +40,6 @@
#include "SDL_mixer.h"
#include "load_voc.h"

#ifdef VOC_SAMPLES

/* Private data for VOC file */
typedef struct vocstuff {
Uint32 rest; /* bytes remaining in current block */
Expand Down Expand Up @@ -458,15 +456,4 @@ SDL_AudioSpec *Mix_LoadVOC_RW (SDL_RWops *src, int freesrc,
return(spec);
} /* Mix_LoadVOC_RW */

#else

SDL_AudioSpec *Mix_LoadVOC_RW (SDL_RWops *src, int freesrc,
SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
{
SDL_SetError("VOC file loading not supported");
return(NULL);
}

#endif /* VOC_SAMPLES */

/* end of load_voc.c ... */
14 changes: 7 additions & 7 deletions mikmod/virtch_common.c
Expand Up @@ -105,22 +105,22 @@ static ULONG (*VC_VoiceRealVolume_ptr)(UBYTE);

#ifdef __STDC__
#define VC_PROC0(suffix) \
void VC_##suffix##(void) { VC_##suffix##_ptr(); }
void VC_##suffix (void) { VC_##suffix##_ptr(); }

#define VC_FUNC0(suffix,ret) \
ret VC_##suffix##(void) { return VC_##suffix##_ptr(); }
ret VC_##suffix (void) { return VC_##suffix##_ptr(); }

#define VC_PROC1(suffix,typ1) \
void VC_##suffix##(typ1 a) { VC_##suffix##_ptr(a); }
void VC_##suffix (typ1 a) { VC_##suffix##_ptr(a); }

#define VC_FUNC1(suffix,ret,typ1) \
ret VC_##suffix##(typ1 a) { return VC_##suffix##_ptr(a); }
ret VC_##suffix (typ1 a) { return VC_##suffix##_ptr(a); }

#define VC_PROC2(suffix,typ1,typ2) \
void VC_##suffix##(typ1 a,typ2 b) { VC_##suffix##_ptr(a,b); }
void VC_##suffix (typ1 a,typ2 b) { VC_##suffix##_ptr(a,b); }

#define VC_FUNC2(suffix,ret,typ1,typ2) \
ret VC_##suffix##(typ1 a,typ2 b) { return VC_##suffix##_ptr(a,b); }
ret VC_##suffix (typ1 a,typ2 b) { return VC_##suffix##_ptr(a,b); }
#else
#define VC_PROC0(suffix) \
void VC_/**/suffix/**/(void) { VC_/**/suffix/**/_ptr(); }
Expand All @@ -141,7 +141,7 @@ void VC_/**/suffix/**/(typ1 a,typ2 b) { VC_/**/suffix/**/_ptr(a,b); }
ret VC_/**/suffix/**/(typ1 a,typ2 b) { return VC_/**/suffix/**/_ptr(a,b); }
#endif

VC_FUNC0(Init,BOOL)
VC_FUNC0(Init,BOOL);
VC_PROC0(Exit)
VC_FUNC0(SetNumVoices,BOOL)
VC_FUNC1(SampleSpace,ULONG,int)
Expand Down
2 changes: 0 additions & 2 deletions mixer.c
Expand Up @@ -105,8 +105,6 @@ const SDL_version *Mix_Linked_Version(void)
/* rcg06122001 Cleanup effect callbacks. */
static void Mix_ChannelDonePlaying(int channel)
{
effect_info *i = NULL;

if (channel_done_callback) {
channel_done_callback(channel);
}
Expand Down
4 changes: 2 additions & 2 deletions music.c
Expand Up @@ -81,7 +81,6 @@ int volatile music_active = 1;
static int volatile music_stopped = 0;
static int music_loops = 0;
static char *music_cmd = NULL;
static int samplesize;
static Mix_Music * volatile music_playing = NULL;
static int music_volume = MIX_MAX_VOLUME;
static int music_swap8;
Expand Down Expand Up @@ -130,6 +129,7 @@ struct _Mix_Music {
#ifdef MID_MUSIC
#ifdef USE_TIMIDITY_MIDI
static int timidity_ok;
static int samplesize;
#endif
#ifdef USE_NATIVE_MIDI
static int native_midi_ok;
Expand Down Expand Up @@ -338,7 +338,7 @@ int open_music(SDL_AudioSpec *mixer)
#endif
#ifdef MID_MUSIC
#ifdef USE_TIMIDITY_MIDI
samplesize = mixer->size/mixer->samples;
samplesize = mixer->size / mixer->samples;
if ( Timidity_Init(mixer->freq, mixer->format,
mixer->channels, mixer->samples) == 0 ) {
timidity_ok = 1;
Expand Down
2 changes: 1 addition & 1 deletion native_midi/native_midi_mac.c
Expand Up @@ -498,7 +498,7 @@ Uint32 *BuildTuneSequence(MIDIEvent *evntlist, int ppqn, int part_poly_max[32],
but for QTMA, we specify it as a 8.8 fixed point of semitones
TODO: detect "pitch bend range changes" & honor them!
*/
bend = eventPos->data[0] & 0x7f | (eventPos->data[1] & 0x7f) << 7;
bend = (eventPos->data[0] & 0x7f) | ((eventPos->data[1] & 0x7f) << 7);

/* "Center" the bend */
bend -= 0x2000;
Expand Down
2 changes: 1 addition & 1 deletion timidity/playmidi.c
Expand Up @@ -761,7 +761,7 @@ static int compute_data(void *stream, int32 count)

int Timidity_PlaySome(void *stream, int samples)
{
int rc;
int rc = RC_NONE;
int32 end_sample;

if ( ! midi_playing ) {
Expand Down
8 changes: 4 additions & 4 deletions wavestream.c
Expand Up @@ -446,11 +446,11 @@ static FILE *LoadAIFFStream (const char *file, SDL_AudioSpec *spec,
Uint32 offset;
Uint32 blocksize;
/* COMM format chunk */
Uint16 channels;
Uint32 numsamples;
Uint16 samplesize;
Uint16 channels = 0;
Uint32 numsamples = 0;
Uint16 samplesize = 0;
Uint8 sane_freq[10];
Uint32 frequency;
Uint32 frequency = 0;


/* Make sure we are passed a valid data source */
Expand Down

0 comments on commit f1d5168

Please sign in to comment.