Skip to content

Commit

Permalink
Updated Xcode project and fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 17, 2017
1 parent 8145eec commit 7d308b4
Show file tree
Hide file tree
Showing 13 changed files with 353 additions and 449 deletions.
302 changes: 133 additions & 169 deletions Xcode-iOS/SDL_mixer.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Xcode/Info-Framework.plist
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>SDL2_mixer</string>
<key>CFBundleIdentifier</key>
<string>org.libsdl.SDL2-mixer</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
449 changes: 196 additions & 253 deletions Xcode/SDL_mixer.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion effect_stereoreverse.c
Expand Up @@ -112,7 +112,7 @@ int Mix_SetReverseStereo(int channel, int flip)

if (channels == 2) {
int bits = (format & 0xFF);
switch (format & 0xFF) {
switch (bits) {
case 8:
f = _Eff_reversestereo8;
break;
Expand Down
6 changes: 3 additions & 3 deletions music.c
Expand Up @@ -149,7 +149,7 @@ static void music_internal_initialize_volume(void);
static void music_internal_volume(int volume);
static int music_internal_play(Mix_Music *music, double position);
static int music_internal_position(double position);
static SDL_bool music_internal_playing();
static SDL_bool music_internal_playing(void);
static void music_internal_halt(void);


Expand Down Expand Up @@ -370,7 +370,7 @@ Mix_MusicType detect_music_type_from_magic(const Uint8 *magic)

static Mix_MusicType detect_music_type(SDL_RWops *src)
{
char magic[12];
Uint8 magic[12];

if (SDL_RWread(src, magic, 1, 12) != 12) {
Mix_SetError("Couldn't read first 12 bytes of audio data");
Expand Down Expand Up @@ -859,7 +859,7 @@ int Mix_PausedMusic(void)
}

/* Check the status of the music */
static SDL_bool music_internal_playing()
static SDL_bool music_internal_playing(void)
{
if (music_playing == NULL) {
return SDL_FALSE;
Expand Down
4 changes: 1 addition & 3 deletions music_cmd.c
Expand Up @@ -163,7 +163,6 @@ static int MusicCMD_Play(void *context)

/* Child process - executes here */
case 0: {
char *command;
char **argv;

/* Unblock signals in case we're called from a thread */
Expand Down Expand Up @@ -242,12 +241,11 @@ static void MusicCMD_Stop(void *context)
}

/* Close the given music stream */
int MusicCMD_Delete(void *context)
void MusicCMD_Delete(void *context)
{
MusicCMD *music = (MusicCMD *)context;
SDL_free(music->file);
SDL_free(music);
return 0;
}

Mix_MusicInterface Mix_MusicInterface_CMD =
Expand Down
6 changes: 3 additions & 3 deletions music_ogg.c
Expand Up @@ -264,7 +264,7 @@ static void OGG_getsome(OGG_music *music)
#ifdef OGG_USE_TREMOR
len = vorbis.ov_read(&music->vf, data, sizeof(data), &section);
#else
len = vorbis.ov_read(&music->vf, data, sizeof(data), 0, 2, 1, &section);
len = (int)vorbis.ov_read(&music->vf, data, sizeof(data), 0, 2, 1, &section);
#endif
if (len <= 0) {
if (len == 0) {
Expand All @@ -277,7 +277,7 @@ static void OGG_getsome(OGG_music *music)
vorbis_info *vi;

vi = vorbis.ov_info(&music->vf, -1);
SDL_BuildAudioCVT(cvt, AUDIO_S16, vi->channels, vi->rate,
SDL_BuildAudioCVT(cvt, AUDIO_S16, vi->channels, (int)vi->rate,
music_spec.format, music_spec.channels, music_spec.freq);
if (cvt->buf) {
SDL_free(cvt->buf);
Expand Down Expand Up @@ -385,7 +385,7 @@ Mix_MusicInterface Mix_MusicInterface_OGG =
OGG_Seek,
NULL, /* Pause */
NULL, /* Resume */
NULL, /* Stop */
OGG_Stop,
OGG_Delete,
NULL, /* Close */
OGG_Unload,
Expand Down
1 change: 0 additions & 1 deletion music_wav.c
Expand Up @@ -295,7 +295,6 @@ static void WAVStream_Delete(void *context)

static SDL_bool ParseFMT(WAVStream *wave, Uint32 chunk_length)
{
SDL_RWops *src = wave->src;
SDL_AudioSpec *spec = &wave->spec;
WaveFMT *format;
Uint8 *data;
Expand Down
6 changes: 3 additions & 3 deletions native_midi/native_midi.h
Expand Up @@ -26,12 +26,12 @@

typedef struct _NativeMidiSong NativeMidiSong;

int native_midi_detect();
int native_midi_detect(void);
NativeMidiSong *native_midi_loadsong_RW(SDL_RWops *src, int freesrc);
void native_midi_freesong(NativeMidiSong *song);
void native_midi_start(NativeMidiSong *song, int loops);
void native_midi_stop();
int native_midi_active();
void native_midi_stop(void);
int native_midi_active(void);
void native_midi_setvolume(int volume);
const char *native_midi_error(void);

Expand Down
6 changes: 3 additions & 3 deletions native_midi/native_midi_haiku.cpp
Expand Up @@ -206,7 +206,7 @@ struct _NativeMidiSong {

char lasterr[1024];

int native_midi_detect()
int native_midi_detect(void)
{
status_t res = synth.EnableInput(true, false);
return res == B_OK;
Expand Down Expand Up @@ -261,7 +261,7 @@ void native_midi_start(NativeMidiSong *song, int loops)
song->store->Start();
currentSong = song;
}
void native_midi_stop()
void native_midi_stop(void)
{
if (currentSong == NULL) return;
currentSong->store->Stop();
Expand All @@ -270,7 +270,7 @@ void native_midi_stop()
usleep(1000);
currentSong = NULL;
}
int native_midi_active()
int native_midi_active(void)
{
if (currentSong == NULL) return 0;
return currentSong->store->IsPlaying();
Expand Down
6 changes: 3 additions & 3 deletions native_midi/native_midi_mac.c
Expand Up @@ -83,7 +83,7 @@ static char gErrorBuffer[ERROR_BUF_SIZE] = "";


/* Check whether QuickTime is available */
int native_midi_detect()
int native_midi_detect(void)
{
/* TODO */
return 1;
Expand Down Expand Up @@ -242,7 +242,7 @@ void native_midi_start(NativeMidiSong *song, int loops)
SDL_PauseAudio(0);
}

void native_midi_stop()
void native_midi_stop(void)
{
if (gTunePlayer == NULL)
return;
Expand All @@ -254,7 +254,7 @@ void native_midi_stop()
TuneUnroll(gTunePlayer);
}

int native_midi_active()
int native_midi_active(void)
{
if (gTunePlayer != NULL)
{
Expand Down
6 changes: 3 additions & 3 deletions native_midi/native_midi_macosx.c
Expand Up @@ -150,7 +150,7 @@ GetSequenceAudioUnit(MusicSequence sequence, AudioUnit *aunit)
}


int native_midi_detect()
int native_midi_detect(void)
{
return 1; /* always available. */
}
Expand Down Expand Up @@ -287,7 +287,7 @@ void native_midi_start(NativeMidiSong *song, int loops)
SDL_PauseAudio(0);
}

void native_midi_stop()
void native_midi_stop(void)
{
if (currentsong) {
SDL_PauseAudio(1);
Expand All @@ -299,7 +299,7 @@ void native_midi_stop()
}
}

int native_midi_active()
int native_midi_active(void)
{
MusicTimeStamp currentTime = 0;
if (currentsong == NULL)
Expand Down
6 changes: 3 additions & 3 deletions native_midi/native_midi_win32.c
Expand Up @@ -189,7 +189,7 @@ void CALLBACK MidiProc( HMIDIIN hMidi, UINT uMsg, DWORD_PTR dwInstance,
}
}

int native_midi_detect()
int native_midi_detect(void)
{
MMRESULT merr;
HMIDISTRM MidiStream;
Expand Down Expand Up @@ -272,7 +272,7 @@ void native_midi_start(NativeMidiSong *song, int loops)
}
}

void native_midi_stop()
void native_midi_stop(void)
{
if (!hMidiStream)
return;
Expand All @@ -282,7 +282,7 @@ void native_midi_stop()
hMidiStream = NULL;
}

int native_midi_active()
int native_midi_active(void)
{
return currentsong->MusicPlaying;
}
Expand Down

0 comments on commit 7d308b4

Please sign in to comment.