Skip to content

Commit

Permalink
Use audio channels configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
f1xpl committed Mar 11, 2018
1 parent d65d3f8 commit 38a9bd0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/autoapp/Projection/ServiceFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,17 @@ ServiceList ServiceFactory::create(aasdk::messenger::IMessenger::Pointer messeng
IAudioInput::Pointer audioInput(new AudioInput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1));
serviceList.emplace_back(std::make_shared<AudioInputService>(ioService_, messenger, std::move(audioInput)));

IAudioOutput::Pointer mediaAudioOutput(new AudioOutput(2, 16, 48000), std::bind(&QObject::deleteLater, std::placeholders::_1));
serviceList.emplace_back(std::make_shared<MediaAudioService>(ioService_, messenger, std::move(mediaAudioOutput)));
if(configuration_->musicAudioChannelEnabled())
{
IAudioOutput::Pointer mediaAudioOutput(new AudioOutput(2, 16, 48000), std::bind(&QObject::deleteLater, std::placeholders::_1));
serviceList.emplace_back(std::make_shared<MediaAudioService>(ioService_, messenger, std::move(mediaAudioOutput)));
}

IAudioOutput::Pointer speechAudioOutput(new AudioOutput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1));
serviceList.emplace_back(std::make_shared<SpeechAudioService>(ioService_, messenger, std::move(speechAudioOutput)));
if(configuration_->speechAudioChannelEnabled())
{
IAudioOutput::Pointer speechAudioOutput(new AudioOutput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1));
serviceList.emplace_back(std::make_shared<SpeechAudioService>(ioService_, messenger, std::move(speechAudioOutput)));
}

IAudioOutput::Pointer systemAudioOutput(new AudioOutput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1));
serviceList.emplace_back(std::make_shared<SystemAudioService>(ioService_, messenger, std::move(systemAudioOutput)));
Expand Down

0 comments on commit 38a9bd0

Please sign in to comment.