Skip to content

Commit

Permalink
Add stub native MIDI functions for iOS and tvOS
Browse files Browse the repository at this point in the history
These shouldn't be built, but just in case it's accidentally enabled on those platforms.
  • Loading branch information
slouken committed Oct 9, 2024
1 parent 8312f46 commit 6c42578
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/codecs/native_midi/native_midi_macosx.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,55 @@ const char *native_midi_error(void)
return ""; /* !!! FIXME */
}

#else

#include "native_midi.h"

bool native_midi_detect(void)
{
return false;
}

NativeMidiSong *native_midi_loadsong_IO(SDL_IOStream *src, bool closeio)
{
if (closeio) {
SDL_CloseIO(src);
}
SDL_Unsupported();
return NULL;
}

void native_midi_freesong(NativeMidiSong *song)
{
}

void native_midi_start(NativeMidiSong *song, int loops)
{
}

void native_midi_pause(void)
{
}

void native_midi_resume(void)
{
}

void native_midi_stop(void)
{
}

bool native_midi_active(void)
{
}

void native_midi_setvolume(int volume)
{
}

const char *native_midi_error(void)
{
return "";
}

#endif /* Mac OS X native MIDI support */

0 comments on commit 6c42578

Please sign in to comment.