androidaudio: Fixed incorrect JNI call (thanks, @madebr!)

main
Ryan C. Gordon 2023-07-27 18:13:01 -04:00
parent 660054f3dc
commit 5cbdf1168e
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 2 additions and 2 deletions

View File

@ -1563,14 +1563,14 @@ void Android_StartAudioHotplug(SDL_AudioDevice **default_output, SDL_AudioDevice
{ {
JNIEnv *env = Android_JNI_GetEnv(); JNIEnv *env = Android_JNI_GetEnv();
// this will fire the callback for each existing device right away (which will eventually SDL_AddAudioDevice), and again later when things change. // this will fire the callback for each existing device right away (which will eventually SDL_AddAudioDevice), and again later when things change.
(void) (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midRegisterAudioDeviceCallback); (*env)->CallStaticVoidMethod(env, mAudioManagerClass, midRegisterAudioDeviceCallback);
*default_output = *default_capture = NULL; // !!! FIXME: how do you decide the default device id? *default_output = *default_capture = NULL; // !!! FIXME: how do you decide the default device id?
} }
void Android_StopAudioHotplug(void) void Android_StopAudioHotplug(void)
{ {
JNIEnv *env = Android_JNI_GetEnv(); JNIEnv *env = Android_JNI_GetEnv();
(void) (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midUnregisterAudioDeviceCallback); (*env)->CallStaticVoidMethod(env, mAudioManagerClass, midUnregisterAudioDeviceCallback);
} }
int Android_JNI_OpenAudioDevice(SDL_AudioDevice *device) int Android_JNI_OpenAudioDevice(SDL_AudioDevice *device)