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-31 14:31:21 -0500
commit3ff62e58128cb6f52fd7b9c865b617e6b19d0c4d (patch)
treec9e0d0efda63edbdb20c3446cbca5ba1d437187e
parent964dca17b2176f8c13f0a4e6d0652fd439541a31 (diff)
downloadsdl_core-fix/OnAudioPassThru_frequency_R4.3.tar.gz
Increased frequency of OnAudioPassThru notifications to once every 50msfix/OnAudioPassThru_frequency_R4.3
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();
}
}