<div dir="ltr">Yes, I have tried plain wav data with file and stream functions of decoder and encoder. They work succesfully.<div style>You're right about FLAC can't find the first block in stream, because I didn't add any metadata in stream. The documentation of FLAC says that metadata callback function is optional for stream function of decoder, so I didn't need adding metadata.</div>
<div style><br></div><div style>Actually, I am sure about network data transferring is good, there is no problem, i have tested so much and observed all data has transmitted at every time. I suspend that sync problem occurs from network latency.</div>
<div style>Do you have any idea about this? If read callback may sleep or process more than excepted time, does sync lost?</div><div style><br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/7/2 Martijn van Beurden <span dir="ltr"><<a href="mailto:mvanb1@gmail.com" target="_blank">mvanb1@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
<div>On 02-07-13 11:01, Burak Orçun Özkablan
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I don't use any metadata when encoding and
decoding. When I call
<div><br>
</div>
<div><b>FLAC__StreamDecoderStateString[FLAC__stream_decoder_get_state(m_decoder)] </b><br>
</div>
<div><b><br>
</b></div>
<div>it returns </div>
<div><br>
</div>
<div>FLAC__STREAM_DECODER_SEARCH_FOR_METADATA<br>
</div>
<div><br>
</div>
<div>enum value. Is it an error ?</div>
</div>
</blockquote>
<br></div>
There is always metadata in a FLAC stream, for example, the
samplerate, number of channels used, FLAC encoder version etc. This
is called the STREAMINFO block. This is the very first block of the
stream. This state tells that the decoder is still looking for that
block.<br>
<br>
So it seems there's something wrong in the data transfer, as FLAC
can't find the first block in the stream. I can think of three
things: there is no data received at all (because there is something
wrong with the connection or because it isn't sent at all), the data
transferred is corrupted/transformed somewhere or there is something
wrong in the process of reading data from the network stream.<br>
<br>
Have you tried plain wav data first? That's a lot easier to
troubleshoot, you can make sure the problem is not in the
network-related stuff.<br>
</div>
<br>_______________________________________________<br>
flac-dev mailing list<br>
<a href="mailto:flac-dev@xiph.org">flac-dev@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/flac-dev" target="_blank">http://lists.xiph.org/mailman/listinfo/flac-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br></blockquote><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Burak Orçun ÖZKABLAN</blockquote><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Computer Science Engineer</blockquote>
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br></blockquote><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Mobile : 0 541 302 18 78</blockquote></blockquote></div>
</div>