MCPcopy Create free account
hub / github.com/audeering/opensmile / openSLDestroyEngine

Function openSLDestroyEngine

src/android/openslesSource.cpp:979–1006  ·  view source on GitHub ↗

close the OpenSL IO and destroy the audio engine

Source from the content-addressed store, hash-verified

977
978// close the OpenSL IO and destroy the audio engine
979void openSLDestroyEngine(opensl_stream2 *p) {
980 // destroy buffer queue audio player object, and invalidate all associated interfaces
981 if (p->bqPlayerObject != NULL) {
982 (*p->bqPlayerObject)->Destroy(p->bqPlayerObject);
983 p->bqPlayerObject = NULL;
984 p->bqPlayerPlay = NULL;
985 p->bqPlayerBufferQueue = NULL;
986 p->bqPlayerEffectSend = NULL;
987 }
988 // destroy audio recorder object, and invalidate all associated interfaces
989 if (p->recorderObject != NULL) {
990 (*p->recorderObject)->Destroy(p->recorderObject);
991 p->recorderObject = NULL;
992 p->recorderRecord = NULL;
993 p->recorderBufferQueue = NULL;
994 }
995 // destroy output mix object, and invalidate all associated interfaces
996 if (p->outputMixObject != NULL) {
997 (*p->outputMixObject)->Destroy(p->outputMixObject);
998 p->outputMixObject = NULL;
999 }
1000 // destroy engine object, and invalidate all associated interfaces
1001 if (p->engineObject != NULL) {
1002 (*p->engineObject)->Destroy(p->engineObject);
1003 p->engineObject = NULL;
1004 p->engineEngine = NULL;
1005 }
1006}
1007
1008// this callback handler is called every time a buffer finishes recording
1009void bqRecorderCallback(SLAndroidSimpleBufferQueueItf bq, void *context) {

Callers 1

Calls 1

DestroyMethod · 0.45

Tested by

no test coverage detected