未验证 提交 74a06ede 编写于 作者: O openharmony_ci 提交者: Gitee

!7613 modify opensles getState monthly_20221018

Merge pull request !7613 from zhoushufang/cherry-pick-1676512847
......@@ -218,6 +218,12 @@ static SLresult OpenSlTestConcurrent()
AUDIO_INFO_LOG("OpenSlTestConcurrent outPut Realize result: %{public}lu", result);
return result;
}
SLuint32 state;
result = (*outputMixObject)->GetState(outputMixObject, &state);
if (SL_RESULT_SUCCESS != result) {
AUDIO_INFO_LOG("OpenSlTestConcurrent outPut GetState result: %{public}lu", result);
return result;
}
SLDataLocator_OutputMix slOutputMix = {SL_DATALOCATOR_OUTPUTMIX, outputMixObject};
SLDataSink slSink = {&slOutputMix, nullptr};
......@@ -361,6 +367,12 @@ static SLresult PlayerStart(SLPlayItf sPlayItf, SLOHBufferQueueItf sBufferQueueI
AUDIO_INFO_LOG("PlayerStart SetPlayState result: %{public}lu", result);
return result;
}
SLuint32 state = SL_PLAYSTATE_PLAYING;
result = (*playItf)->GetPlayState(sPlayItf, &state);
if (SL_RESULT_SUCCESS != result) {
AUDIO_INFO_LOG("PlayerStart GetPlayState result: %{public}lu", result);
return result;
}
if (!feof(wavFile)) {
SLuint8* buffer = nullptr;
SLuint32 pSize = 0;
......
......@@ -180,6 +180,12 @@ static SLresult CaptureStart(SLRecordItf sRecordItf, SLOHBufferQueueItf sBufferQ
AUDIO_INFO_LOG("CaptureStart SetRecordState result: %{public}lu", result);
return result;
}
SLuint32 state = SL_RECORDSTATE_RECORDING;
result = (*recordItf)->GetRecordState(sRecordItf, &state);
if (SL_RESULT_SUCCESS != result) {
AUDIO_INFO_LOG("CaptureStart GetRecordState result: %{public}lu", result);
return result;
}
if (wavFile != nullptr) {
SLuint8* buffer = nullptr;
SLuint32 pSize = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册