#ifndef DISABLE_MOBILE_BACK_COMP
if (pClient->__mIsInit == false) {
- AUDIO_IO_LOGD("Occurred this listener when an out stream is on the way to create : Write dummy, length[%d]", length);
+ AUDIO_IO_LOGD("Occurred this listener when an out stream is on the way to create : Write dummy, length[%zu]", length);
__dummy_write(s, length);
return;
}
if (pClient->isCorked()) {
- AUDIO_IO_LOGD("Occurred this listener when an out stream is CORKED : Write dummy, length[%d]", length);
+ AUDIO_IO_LOGD("Occurred this listener when an out stream is CORKED : Write dummy, length[%zu]", length);
__dummy_write(s, length);
return;
}
then write dummy data to ensure the start */
if (pClient->__mSpec.getStreamLatency() == CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_DEFAULT_ASYNC &&
pClient->__mIsFirstStream) {
- AUDIO_IO_LOGW("[async] Write dummy of length[%d] since not written in first callback during prepare", length);
+ AUDIO_IO_LOGW("[async] Write dummy of length[%zu] since not written in first callback during prepare", length);
__dummy_write(s, length);
pClient->__mIsFirstStream = false;
}
if (__mSyncReadLength <= 0) {
#ifdef _AUDIO_IO_DEBUG_TIMING_
- AUDIO_IO_LOGD("readLength(%d byte) is not valid. wait...", __mSyncReadLength);
+ AUDIO_IO_LOGD("readLength(%zu byte) is not valid. wait...", __mSyncReadLength);
#endif
pa_threaded_mainloop_wait(__mpMainloop);
} else if (__mpSyncReadDataPtr == NULL) {
// Copy partial pcm data on out parameter
#ifdef _AUDIO_IO_DEBUG_TIMING_
- AUDIO_IO_LOGD("memcpy() that a peeked buffer[0x%x], index[%d], length[%d] on out buffer", (const uint8_t*)(__mpSyncReadDataPtr) + __mSyncReadIndex, __mSyncReadIndex, l);
+ AUDIO_IO_LOGD("memcpy() that a peeked buffer[%p], index[%zu], length[%zu] on out buffer", (const uint8_t*)(__mpSyncReadDataPtr) + __mSyncReadIndex, __mSyncReadIndex, l);
#endif
memcpy(buffer, (const uint8_t*)__mpSyncReadDataPtr + __mSyncReadIndex, l);
}
#ifdef _AUDIO_IO_DEBUG_TIMING_
- AUDIO_IO_LOGD("buffer[%p], length[%d]", *buffer, *length);
+ AUDIO_IO_LOGD("buffer[%p], length[%zu]", *buffer, *length);
#endif
if (ret < 0) {
int ret = 0;
#ifdef _AUDIO_IO_DEBUG_TIMING_
- AUDIO_IO_LOGD("data[%p], length[%d], First[%d]", data, length, __mIsFirstStream);
+ AUDIO_IO_LOGD("data[%p], length[%zu], First[%d]", data, length, __mIsFirstStream);
#endif
- if (pa_stream_is_corked(__mpStream)) {
- AUDIO_IO_LOGW("stream is corked...do uncork here first!!!!");
- pa_operation_unref(pa_stream_cork(__mpStream, 0, NULL, this));
- }
if (isInThread() == false) {
pa_threaded_mainloop_lock(__mpMainloop);
+ if (pa_stream_is_corked(__mpStream)) {
+ AUDIO_IO_LOGW("stream is corked...do uncork here first!!!!");
+ pa_operation_unref(pa_stream_cork(__mpStream, 0, NULL, this));
+ }
+
ret = pa_stream_write(__mpStream, data, length, NULL, 0LL, PA_SEEK_RELATIVE);
pa_threaded_mainloop_unlock(__mpMainloop);
} else {
+ if (pa_stream_is_corked(__mpStream)) {
+ AUDIO_IO_LOGW("stream is corked...do uncork here first!!!!");
+ pa_operation_unref(pa_stream_cork(__mpStream, 0, NULL, this));
+ }
+
if (__mIsFirstStream) {
const pa_buffer_attr* attr = pa_stream_get_buffer_attr(__mpStream);
uint32_t prebuf = attr->prebuf;
delete [] dummy;
}
__mIsFirstStream = false;
- AUDIO_IO_LOGW("FIRST STREAM CALLBACK : length[%d], prebuf[%d], dummy[%d]",
+ AUDIO_IO_LOGW("FIRST STREAM CALLBACK : length[%zu], prebuf[%d], dummy[%zu]",
length, prebuf, (length < prebuf) ? prebuf - length : 0);
}
ret = pa_stream_write(__mpStream, data, length, NULL, 0LL, PA_SEEK_RELATIVE);
if (__mDirection == EStreamDirection::STREAM_DIRECTION_PLAYBACK) {
ret = attr->tlength;
- AUDIO_IO_LOGD("PLAYBACK buffer size[%d]", ret);
+ AUDIO_IO_LOGD("PLAYBACK buffer size[%zu]", ret);
} else {
ret = attr->fragsize;
- AUDIO_IO_LOGD("RECORD buffer size[%d]", ret);
+ AUDIO_IO_LOGD("RECORD buffer size[%zu]", ret);
}
} catch (CAudioError& e) {
if (isInThread() == false) {