X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcpp%2FCAudioOutput.cpp;h=fdf70f9d20a2d6d84f391017f8b1025745c61278;hb=c77ebe4b54c63121e62edcfdbcf71031cad69ef4;hp=996cdc5668d6e5b8524301713cdb82cd58ca50ec;hpb=6725747ac78dd274bb5d9b976f86c11e1517f783;p=platform%2Fcore%2Fapi%2Faudio-io.git diff --git a/src/cpp/CAudioOutput.cpp b/src/cpp/CAudioOutput.cpp index 996cdc5..fdf70f9 100644 --- a/src/cpp/CAudioOutput.cpp +++ b/src/cpp/CAudioOutput.cpp @@ -58,7 +58,7 @@ void CAudioOutput::onStream(CPulseAudioClient* pClient, size_t length) { */ if (__mIsUsedSyncWrite == true) { #ifdef _AUDIO_IO_DEBUG_TIMING_ - AUDIO_IO_LOGD("Sync Write Mode! - signal! - pClient:[%p], length:[%d]", pClient, length); + AUDIO_IO_LOGD("Sync Write Mode! - signal! - pClient:[%p], length:[%zu]", pClient, length); #endif internalSignal(); return; @@ -68,7 +68,7 @@ void CAudioOutput::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); } @@ -140,6 +140,10 @@ void CAudioOutput::prepare() { streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_DEFAULT_ASYNC; } #endif + /* Override the default value by audio type */ + if (audioType == CAudioInfo::EAudioType::AUDIO_OUT_TYPE_VOIP) + streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_VOIP; + CPulseStreamSpec spec(streamSpec, mAudioInfo); internalLock(); @@ -272,7 +276,7 @@ size_t CAudioOutput::write(const void* buffer, size_t length) { THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INTERNAL_OPERATION, "The written result is invalid ret:%d", ret); #ifdef _AUDIO_IO_DEBUG_TIMING_ - AUDIO_IO_LOGD("CPulseAudioClient->write(buffer:%p, length:%d)", buffer, length); + AUDIO_IO_LOGD("CPulseAudioClient->write(buffer:%p, length:%zu)", buffer, length); #endif return length; } @@ -296,7 +300,7 @@ size_t CAudioOutput::write(const void* buffer, size_t length) { while ((l = mpPulseAudioClient->getWritableSize()) == 0) { #ifdef _AUDIO_IO_DEBUG_TIMING_ - AUDIO_IO_LOGD("writableSize is [%d].. wait", l); + AUDIO_IO_LOGD("writableSize is [%zu].. wait", l); #endif internalWait(); } @@ -305,7 +309,7 @@ size_t CAudioOutput::write(const void* buffer, size_t length) { l = lengthIter; #ifdef _AUDIO_IO_DEBUG_TIMING_ - AUDIO_IO_LOGD("CPulseAudioClient->write(buffer:%p, length:%d)", buffer, l); + AUDIO_IO_LOGD("CPulseAudioClient->write(buffer:%p, length:%zu)", buffer, l); #endif int ret = mpPulseAudioClient->write(buffer, l);