summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2017-01-26 16:36:43 -0500
committerJacob Keeler <jacob.keeler@livioradio.com>2017-01-26 16:36:43 -0500
commit3d88ee3a9316adfdcd923fb399037f63b1e9fb13 (patch)
treefcac93adfdb71bd8ba74ccef416f746e0003effe
parent6cc4475f1300dfd351d3b203d9881fa6fe6e4ee1 (diff)
downloadsdl_core-fix/OnAudioPassThru_frequency.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.cc8
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();
}
}