Hi,guys<br>Hope you are doing well!<br>I am an ogg format starter, and I am implementing ogg audio streaming.<br>I meet some problems for streaming. <br><br>My application is as follows:<br>I send download request to server,and server sends the download ogg file to client side.<br>
when  a certain amount of data is downloaded, and I start to play the ogg file by using a library.<br><br>I use juce c++ library which uses vorbisfile.c to read and write ogg format.<br><br>I updated the lengthInSamples of the ogg file to the size of ogg file.<br>
After certain chunk of data is downloaded,<br>ogg length in samples is initialized by <br><br>        callbacks.read_func = &amp;oggReadCallback;<br>        callbacks.seek_func = &amp;oggSeekCallback;<br>        callbacks.close_func = &amp;oggCloseCallback;<br>
        callbacks.tell_func = &amp;oggTellCallback;<br><br>        const int err = ov_open_callbacks (input, &amp;ovFile, 0, 0, callbacks);<br><br>    lengthInSamples = (uint32) ov_pcm_total (&amp;ovFile, -1);<br>input is the file stream.<br>
<br>The first chunk data is played excellent, however, after that , it gives me static noise.<br>I debugged the decoder, and it seems that the ogg pattern is not decoded right in this case.<br>In vorbisfile.c<br>static long _get_data(OggVorbis_File *vf){<br>
....<br>  long bytes=(vf-&gt;callbacks.read_func)(<b>buffer</b>,1,CHUNKSIZE,vf-&gt;datasource); <br>..<br>}<br><br>The <b>buffer </b>should hold the header feild &quot;oggs&quot;, however, it did not.<br><br>I think the problem is vf-&gt;seekable = 1.<br>
if the vf-&gt;seekable = 1, is it the problem for streaming? How can I achieve ogg streaming?<br><br>Thank you in advance!<br><br>Leon<br>