Merge branch 'tizen' into tizen_line_coverage
[platform/core/api/audio-io.git] / src / cpp / CAudioInput.cpp
index c9f384c..0be4dda 100644 (file)
@@ -62,7 +62,7 @@ void CAudioInput::onStream(CPulseAudioClient* pClient, size_t length) {
      */
     if (__mIsUsedSyncRead == true) {
 #ifdef _AUDIO_IO_DEBUG_TIMING_
-        AUDIO_IO_LOGD("Sync Read Mode! - pClient:[%p], length:[%d]", pClient, length);
+        AUDIO_IO_LOGD("Sync Read Mode! - pClient:[%p], length:[%zu]", pClient, length);
 #endif
         return;
     }
@@ -71,7 +71,7 @@ void CAudioInput::onStream(CPulseAudioClient* pClient, size_t length) {
      * Accrues callback function
      */
 #ifdef _AUDIO_IO_DEBUG_TIMING_
-    AUDIO_IO_LOGD("pClient:[%p], length:[%d]", pClient, length);
+    AUDIO_IO_LOGD("pClient:[%p], length:[%zu]", pClient, length);
 #endif
     CAudioIO::onStream(pClient, length);
 }
@@ -138,6 +138,10 @@ void CAudioInput::prepare() {
         /* Init StreamSpec */
         AUDIO_IO_LOGD("Set Stream Spec : CPulseStreamSpec::STREAM_LATENCY_INPUT_DEFAULT");
         CPulseStreamSpec::EStreamLatency streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_INPUT_DEFAULT;
+        /* Override the default value by audio type */
+        if (audioType == CAudioInfo::EAudioType::AUDIO_IN_TYPE_VOIP)
+            streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_INPUT_VOIP;
+
         CPulseStreamSpec spec(streamSpec, mAudioInfo);
 
         internalLock();