<div dir="ltr">Thank you so much for polite help Martijn.<div class="gmail_extra">
</div><div><br></div><div style>Allison,</div><div style><br></div><div style>My read callback function is just ;</div><div style><br></div><div style><div><b><span class="" style="white-space:pre">        </span>/// \brief read callback function of decoder</b></div>
<div><b><span class="" style="white-space:pre">        </span>FLAC__StreamDecoderReadStatus decoderReadCallback( const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *callback_param)</b></div><div><b><span class="" style="white-space:pre">        </span>{</b></div>
<div><b><span class="" style="white-space:pre">                </span>// mutex lock</b></div><div><b><span class="" style="white-space:pre">                </span>m_mutex.lock();</b></div><div><b><br></b></div><div><b><span class="" style="white-space:pre">                </span>// copy buffer array to m_pile_array</b></div>
<div><b><span class="" style="white-space:pre">                </span>if(input_pile_size > 0) {</b></div><div><b><span class="" style="white-space:pre">                        </span>memcpy(input_pile_array, buffer, input_pile_size);</b></div><div><b><span class="" style="white-space:pre">                        </span>*bytes = input_pile_size;// = 0;</b></div>
<div><b><br></b></div><div><b><span class="" style="white-space:pre">                        </span>// mutex unlock</b></div><div><b><span class="" style="white-space:pre">                        </span>m_mutex.unlock();</b></div><div><b><br></b></div><div><b><span class="" style="white-space:pre">                        </span>return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;</b></div>
<div><b><span class="" style="white-space:pre">                </span>}</b></div><div><b><br></b></div><div><b><span class="" style="white-space:pre">                </span>// mutex unlock</b></div><div><b><span class="" style="white-space:pre">                </span>m_mutex.unlock();</b></div>
<div><b><br></b></div><div><b><span class="" style="white-space:pre">                </span>return FLAC__STREAM_DECODER_READ_STATUS_ABORT;</b></div><div><b><span class="" style="white-space:pre">        </span>}</b></div><div><b><br></b></div>
<div style>input_pile_array is encoded audio data from network, input_pile_size is size of encoded data size. Both of them are transmitted over network from client to server.</div><div style>I haven't known that I should increment buffer pointer, I have always write data at beginning of buffer. I think, error arise from increment?</div>
<div><br></div><div><br></div></div></div>