Skip to content
Snippets Groups Projects
Commit fce23741 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

opensl: notify play on rec

Change-Id: I13aaf88a3109d601fe667f20ba454749858d7721
parent 8656ab33
No related branches found
No related tags found
No related merge requests found
...@@ -247,7 +247,7 @@ OpenSLLayer::engineServiceRing(bool waiting) { ...@@ -247,7 +247,7 @@ OpenSLLayer::engineServiceRing(bool waiting) {
void void
OpenSLLayer::engineServiceRec(bool /* waiting */) { OpenSLLayer::engineServiceRec(bool /* waiting */) {
//playCv.notify_one(); playCv.notify_one();
recCv.notify_one(); recCv.notify_one();
return; return;
} }
...@@ -334,7 +334,7 @@ OpenSLLayer::startAudioCapture() ...@@ -334,7 +334,7 @@ OpenSLLayer::startAudioCapture()
recThread = std::thread([&]() { recThread = std::thread([&]() {
std::unique_lock<std::mutex> lck(recMtx); std::unique_lock<std::mutex> lck(recMtx);
while (recorder_) { while (recorder_) {
recCv.wait(lck); recCv.wait_for(lck, std::chrono::seconds(1));
if (not recorder_) if (not recorder_)
break; break;
sample_buf *buf; sample_buf *buf;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment