implement release() methods in MediaCodec and related classes

This commit is contained in:
Julian Winkler
2024-02-17 15:17:37 +01:00
parent 5dfadc9c59
commit b7f06e41c1
7 changed files with 39 additions and 0 deletions

View File

@@ -248,3 +248,9 @@ JNIEXPORT void JNICALL Java_android_media_AudioTrack_native_1pause(JNIEnv *env,
snd_pcm_t *pcm_handle = _PTR(_GET_LONG_FIELD(this, "pcm_handle"));
snd_pcm_pause(pcm_handle, TRUE);
}
JNIEXPORT void JNICALL Java_android_media_AudioTrack_native_1release(JNIEnv *env, jobject this)
{
snd_pcm_t *pcm_handle = _PTR(_GET_LONG_FIELD(this, "pcm_handle"));
snd_pcm_close(pcm_handle);
}