Commit 605a7e59 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

configuration manager: start audio

Allow clients to restart audio. (We need it for iOS because
audio should be started after receiving callback from CallKit).

Change-Id: I06e933a62302e320788c5bad688e34cdbdbdcf0f
parent 194919fe
......@@ -617,6 +617,12 @@ setAudioInputDevice(int32_t index)
return jami::Manager::instance().setAudioDevice(index, DeviceType::CAPTURE);
}
void
startAudio()
{
jami::Manager::instance().startAudioDriverStream();
}
void
setAudioRingtoneDevice(int32_t index)
{
......
......@@ -97,6 +97,7 @@ DRING_PUBLIC std::vector<std::string> getAudioPluginList();
DRING_PUBLIC void setAudioPlugin(const std::string& audioPlugin);
DRING_PUBLIC std::vector<std::string> getAudioOutputDeviceList();
DRING_PUBLIC void setAudioOutputDevice(int32_t index);
DRING_PUBLIC void startAudio();
DRING_PUBLIC void setAudioInputDevice(int32_t index);
DRING_PUBLIC void setAudioRingtoneDevice(int32_t index);
DRING_PUBLIC std::vector<std::string> getAudioInputDeviceList();
......
......@@ -324,8 +324,13 @@ CoreLayer::startStream()
initAudioLayerIO();
// Run
checkErr(AudioUnitInitialize(ioUnit_));
checkErr(AudioOutputUnitStart(ioUnit_));
auto inputRes = AudioUnitInitialize(ioUnit_);
auto outputRes = AudioOutputUnitStart(ioUnit_);
if(inputRes || outputRes) {
stopStream();
checkErr(inputRes);
checkErr(outputRes);
}
}
void
......
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