Android patches

This commit is contained in:
pelya
2014-03-15 19:44:27 +02:00
parent f177e48d88
commit 6dc8be0332
14 changed files with 97 additions and 19 deletions

View File

@@ -21,6 +21,10 @@
/** Factory for the SDL sound driver. */
static FSoundDriver_SDL iFSoundDriver_SDL;
#ifdef __ANDROID__
extern void Android_MidiMixMusic(Sint16 *stream, int len);
#endif
/**
* Callback that fills the sound buffer.
* @param userdata Ignored.
@@ -30,6 +34,9 @@ static FSoundDriver_SDL iFSoundDriver_SDL;
static void CDECL fill_sound_buffer(void *userdata, Uint8 *stream, int len)
{
MxMixSamples(stream, len / 4);
#if defined(__ANDROID__) && defined(LIBTIMIDITY)
Android_MidiMixMusic((Sint16 *)stream, len / 2);
#endif
}
const char *SoundDriver_SDL::Start(const char * const *parm)