Android: make Detect devices common between aaudio and android driver. (#6828)

remove VLA, dynamic alloc, check max length get using GetIntArrayRegion
This commit is contained in:
Sylvain Becker
2022-12-18 12:07:38 +01:00
committed by GitHub
parent 78725dc0cd
commit 186687bda9
4 changed files with 53 additions and 101 deletions

View File

@@ -47,8 +47,7 @@ extern SDL_DisplayOrientation Android_JNI_GetDisplayOrientation(void);
extern int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi);
/* Audio support */
extern void Android_JNI_GetAudioOutputDevices(int* devices, int *length);
extern void Android_JNI_GetAudioInputDevices(int* devices, int *length);
extern void Android_DetectDevices(void);
extern int Android_JNI_OpenAudioDevice(int iscapture, int device_id, SDL_AudioSpec *spec);
extern void *Android_JNI_GetAudioBuffer(void);
extern void Android_JNI_WriteAudioBuffer(void);