assert(pClient->__mpListener);
pClient->__mpListener->onStream(pClient, length);
+
+ /* If stream is not written in first callback during prepare,
+ then write dummy data to ensure the start */
+ if (pClient->__mIsFirstStream) {
+ AUDIO_IO_LOGD("Write dummy, length [%d]", length);
+
+ char* dummy = new char[length];
+ memset(dummy, 0, length);
+ pa_stream_write(s, dummy, length, NULL, 0LL, PA_SEEK_RELATIVE);
+ delete [] dummy;
+
+ pClient->__mIsFirstStream = false;
+ }
}
void CPulseAudioClient::__streamLatencyUpdateCb(pa_stream* s, void* user_data) {