diff options
author | Sho Amano <samano@xevo.com> | 2018-03-27 03:35:24 +0900 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2018-04-05 16:12:51 -0400 |
commit | 70953440b8bca01bd63eaeba3db47e4f9fe64454 (patch) | |
tree | 49cd64adaf6a86537ee2c42ceef322eafd3669ec /src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc | |
parent | 61fd83fed0dc584019b305bebc82512d2c42b9e7 (diff) | |
download | sdl_core-70953440b8bca01bd63eaeba3db47e4f9fe64454.tar.gz |
Fix/unregister while audio pass thru (#1757)hotfix/unregister_during_audio_pass_thru
* fix build error in MockMediaManager
* Add SetMockMediaManager
* add AudioPassThru start/stop tests
* Add new BeginAudioPassThru() and EndAudioPassThru() methods
* fix: don't terminate AudioPassThru when another app is unregistered
* Append DEPRECATED macro only in interface header file and mock file.
* Use @deprecated comments
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc')
-rw-r--r-- | src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc index a05d41c098..20076ac50c 100644 --- a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc +++ b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc @@ -311,7 +311,8 @@ void PerformAudioPassThruRequest::SendRecordStartNotification() { void PerformAudioPassThruRequest::StartMicrophoneRecording() { LOG4CXX_AUTO_TRACE(logger_); - application_manager_.BeginAudioPassThrough(); + uint32_t app_id = connection_key(); + application_manager_.BeginAudioPassThru(app_id); application_manager_.StartAudioPassThruThread( connection_key(), @@ -370,9 +371,10 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() { void PerformAudioPassThruRequest::FinishTTSSpeak() { LOG4CXX_AUTO_TRACE(logger_); - if (application_manager_.EndAudioPassThrough()) { + uint32_t app_id = connection_key(); + if (application_manager_.EndAudioPassThru(app_id)) { LOG4CXX_DEBUG(logger_, "Stop AudioPassThru."); - application_manager_.StopAudioPassThru(connection_key()); + application_manager_.StopAudioPassThru(app_id); } if (!IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS)) { LOG4CXX_WARN(logger_, "TTS Speak is inactive."); |