Skip to content

Commit 6c42578

Browse files
committed
Add stub native MIDI functions for iOS and tvOS
These shouldn't be built, but just in case it's accidentally enabled on those platforms.
1 parent 8312f46 commit 6c42578

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

src/codecs/native_midi/native_midi_macosx.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,4 +355,55 @@ const char *native_midi_error(void)
355355
return ""; /* !!! FIXME */
356356
}
357357

358+
#else
359+
360+
#include "native_midi.h"
361+
362+
bool native_midi_detect(void)
363+
{
364+
return false;
365+
}
366+
367+
NativeMidiSong *native_midi_loadsong_IO(SDL_IOStream *src, bool closeio)
368+
{
369+
if (closeio) {
370+
SDL_CloseIO(src);
371+
}
372+
SDL_Unsupported();
373+
return NULL;
374+
}
375+
376+
void native_midi_freesong(NativeMidiSong *song)
377+
{
378+
}
379+
380+
void native_midi_start(NativeMidiSong *song, int loops)
381+
{
382+
}
383+
384+
void native_midi_pause(void)
385+
{
386+
}
387+
388+
void native_midi_resume(void)
389+
{
390+
}
391+
392+
void native_midi_stop(void)
393+
{
394+
}
395+
396+
bool native_midi_active(void)
397+
{
398+
}
399+
400+
void native_midi_setvolume(int volume)
401+
{
402+
}
403+
404+
const char *native_midi_error(void)
405+
{
406+
return "";
407+
}
408+
358409
#endif /* Mac OS X native MIDI support */

0 commit comments

Comments
 (0)