Commit d19ced76 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

manager: restart audio stream

Change-Id: I541e2aa1a419559c87c9f390601873bba12a0dc1
parent ab1ee8d7
......@@ -620,7 +620,7 @@ setAudioInputDevice(int32_t index)
void
startAudio()
{
jami::Manager::instance().startAudioDriverStream();
jami::Manager::instance().restartAudioDriverStream();
}
void
......
......@@ -2990,6 +2990,18 @@ Manager::startAudioDriverStream()
pimpl_->audiodriver_->startStream();
}
void
Manager::restartAudioDriverStream()
{
std::lock_guard<std::mutex> lock(pimpl_->audioLayerMutex_);
if (!pimpl_->audiodriver_) {
JAMI_ERR("Audio driver not initialized");
return;
}
pimpl_->audiodriver_->stopStream();
pimpl_->audiodriver_->startStream();
}
void
Manager::registerAccounts()
{
......
......@@ -125,6 +125,7 @@ class Manager {
std::shared_ptr<AudioLayer> getAudioDriver();
void startAudioDriverStream();
void restartAudioDriverStream();
/**
* Functions which occur with a user's action
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment