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

Method android_CloseAudioDevice

src/android/openslesSource.cpp:563–589  ·  view source on GitHub ↗

close the android audio device

Source from the content-addressed store, hash-verified

561
562// close the android audio device
563void cOpenslesSource::android_CloseAudioDevice(opensl_stream2 *p) {
564 if (p == NULL)
565 return;
566 openSLDestroyEngine(p); // destroys player, recorder, mix, and engine
567 smileCondDestroy(p->recorderCondition_);
568 smileCondDestroy(p->playerCondition_);
569 smileMutexDestroy(p->newDataMutex_);
570 for (int i = 0; i < NUM_RECORDING_BUFFERS; ++i) {
571 if (p->deviceInputBuffers[i] != NULL) {
572 free(p->deviceInputBuffers[i]);
573 p->deviceInputBuffers[i] = NULL;
574 }
575 }
576 for (int i = 0; i < NUM_RECORDING_DBL_BUFFERS; ++i) {
577 if (p->internalInputBuffers[i] != NULL) {
578 free(p->internalInputBuffers[i]);
579 p->internalInputBuffers[i] = NULL;
580 }
581 }
582 for (int i = 0; i < NUM_PLAYBACK_BUFFERS; ++i) {
583 if (p->deviceOutputBuffers[i] != NULL) {
584 free(p->deviceOutputBuffers[i]);
585 p->deviceOutputBuffers[i] = NULL;
586 }
587 }
588 free(p);
589}
590
591// returns timestamp of the processed stream
592double cOpenslesSource::android_GetTimestamp(opensl_stream2 *p){

Callers

nothing calls this directly

Calls 3

openSLDestroyEngineFunction · 0.85
smileCondDestroyFunction · 0.85
smileMutexDestroyFunction · 0.85

Tested by

no test coverage detected