diff options
author | Jacob Keeler <jacob.keeler@livioradio.com> | 2017-01-26 16:36:43 -0500 |
---|---|---|
committer | Jacob Keeler <jacob.keeler@livioradio.com> | 2017-01-26 16:36:43 -0500 |
commit | 3d88ee3a9316adfdcd923fb399037f63b1e9fb13 (patch) | |
tree | fcac93adfdb71bd8ba74ccef416f746e0003effe | |
parent | 6cc4475f1300dfd351d3b203d9881fa6fe6e4ee1 (diff) | |
download | sdl_core-3d88ee3a9316adfdcd923fb399037f63b1e9fb13.tar.gz |
Increased frequency of OnAudioPassThru notifications to once every 50msfix/OnAudioPassThru_frequency
It was requested that during AudioPassThru, notifications should be sent on a more frequent basis to allow for better real-time processing of the data. This value is not changed from 1 second when EXTENDED_MEDIA_MODE is disabled, as the AudioPassThru data is faked in this case.
-rw-r--r-- | src/components/media_manager/src/audio/audio_stream_sender_thread.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/media_manager/src/audio/audio_stream_sender_thread.cc b/src/components/media_manager/src/audio/audio_stream_sender_thread.cc index 24b12cabad..7c18cb400b 100644 --- a/src/components/media_manager/src/audio/audio_stream_sender_thread.cc +++ b/src/components/media_manager/src/audio/audio_stream_sender_thread.cc @@ -52,7 +52,11 @@ namespace media_manager { using sync_primitives::AutoLock; -const int32_t AudioStreamSenderThread::kAudioPassThruTimeout = 1; +#ifdef EXTENDED_MEDIA_MODE +const int32_t AudioStreamSenderThread::kAudioPassThruTimeout = 50; +#else +const int32_t AudioStreamSenderThread::kAudioPassThruTimeout = 1000; +#endif const uint32_t kMqueueMessageSize = 4095; CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager") @@ -79,7 +83,7 @@ void AudioStreamSenderThread::threadMain() { while (false == getShouldBeStopped()) { AutoLock auto_lock(shouldBeStoped_lock_); - shouldBeStoped_cv_.WaitFor(auto_lock, kAudioPassThruTimeout * 1000); + shouldBeStoped_cv_.WaitFor(auto_lock, kAudioPassThruTimeout); sendAudioChunkToMobile(); } } |