ma_device_stop locks until audio worker ends. It's better called before freeing memory
This commit is contained in:
parent
54e5a539a4
commit
16ed63107f
@ -267,14 +267,13 @@ JNIEXPORT void JNICALL
|
||||
JNI_FUNC(nativeAudioStop)(JNIEnv* env, jobject thiz) {
|
||||
(void)env;
|
||||
(void)thiz;
|
||||
|
||||
if (mem != NULL)
|
||||
free(mem);
|
||||
plugin_fini(&instance);
|
||||
#if NUM_CHANNELS_IN + NUM_CHANNELS_OUT > 0
|
||||
ma_device_stop(&device);
|
||||
ma_device_uninit(&device);
|
||||
#endif
|
||||
if (mem != NULL)
|
||||
free(mem);
|
||||
plugin_fini(&instance);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
|
Loading…
Reference in New Issue
Block a user