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

AudioInput: bind the buffer to itself to be able to read from it

Change-Id: I481b28f407ba8928c6fe355e6eba093bb4d4f028
parent 450cc32a
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,7 @@ AudioInput::~AudioInput()
{
if (playingFile_) {
Manager::instance().getRingBufferPool().unBindHalfDuplexOut(RingBufferPool::DEFAULT_ID, id_);
Manager::instance().getRingBufferPool().unBindHalfDuplexOut(id_, id_);
}
ringBuf_.reset();
loop_.join();
......@@ -214,6 +215,9 @@ AudioInput::configureFilePlayback(const std::string& path,
// have file audio mixed into the local buffer so it gets played
Manager::instance().getRingBufferPool().bindHalfDuplexOut(RingBufferPool::DEFAULT_ID, id_);
// Bind to itself to be able to read from the ringbuffer
Manager::instance().getRingBufferPool().bindHalfDuplexOut(id_, id_);
deviceGuard_ = Manager::instance().startAudioStream(AudioDeviceType::PLAYBACK);
wakeUp_ = std::chrono::steady_clock::now() + MS_PER_PACKET;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment