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

Function openSLstopRecording

src/android/openslesSource.cpp:907–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

905}
906
907SLresult openSLstopRecording(opensl_stream2 *p) {
908 SLresult result;
909 if (p->recorderRecord != NULL) {
910 // in case already recording, stop recording and clear buffer queue
911 result = (*p->recorderRecord)->SetRecordState(p->recorderRecord, SL_RECORDSTATE_STOPPED);
912 if (result != SL_RESULT_SUCCESS) {
913 SMILE_ERR(3, "openSL: failed to set recorder state to stopped.");
914 return result;
915 }
916 // (void)result;
917 result = (*p->recorderBufferQueue)->Clear(p->recorderBufferQueue);
918 if (result != SL_RESULT_SUCCESS) {
919 SMILE_ERR(3, "openSL: failed to clear recorder buffer queue.");
920 return result;
921 }
922 SMILE_MSG(3, "openSL: recording: set state = stopped, success");
923 } else {
924 SMILE_ERR(1, "openSL: no recorder present, cannot stop recording");
925 return -1;
926 }
927 return SL_RESULT_SUCCESS;
928}
929
930SLresult openSLstartRecording(opensl_stream2 *p) {
931 SLresult result;

Callers 1

recordingThreadLoopMethod · 0.85

Calls 1

ClearMethod · 0.45

Tested by

no test coverage detected