<span style="font-family: Verdana; color: rgb(0, 0, 0); font-size: 10pt;">Hi All,<br> <br>     I am trying to program the &#39;Tremor&#39; decoder onto an array of Processors. I am using four Processors. <br> <br>
    I did this experiment: I split the while(!eof){} in the main() in
to four tasks using if(!eof) statements. In this modification, each
if() decodes one packet of data at-a-time, sequentially. Then, I ran
the code on a single Processor and the decoding was successful. The changes in the ivorbisfile_example.c are as follows: <br><br>while(!eof){<br>    long ret=ov_read(&amp;vf,pcmout,sizeof(pcmout),&amp;current_section);<br>
    if (ret == 0) {<br>      /* EOF */<br>      eof=1;<br>    } else if (ret &lt; 0) {<br>      /* error in the stream.  Not a problem, just reporting it in<br>     case we (the app) cares.  In this case, we don&#39;t. */<br>
    } else {<br>      /* we don&#39;t bother dealing with sample rate changes, etc, but<br>     you&#39;ll have to*/<br>      fwrite(pcmout,1,ret,fp1);<br>    }<br>    if(eof)<br>    {<br>        break;<br>    }<br>    else<br>
    {    <br>     long ret=ov_read(&amp;vf,pcmout,sizeof(pcmout),&amp;current_section);<br>    if (ret == 0) {<br>      /* EOF */<br>      eof=1;<br>    } else if (ret &lt; 0) {<br>      /* error in the stream.  Not a problem, just reporting it in<br>
     case we (the app) cares.  In this case, we don&#39;t. */<br>    } else {<br>      /* we don&#39;t bother dealing with sample rate changes, etc, but<br>     you&#39;ll have to*/<br>      fwrite(pcmout,1,ret,fp1);<br>    }<br>
}<br>if(eof)<br>    {<br>        break;<br>    }<br>    else<br>    {    <br>     long ret=ov_read(&amp;vf,pcmout,sizeof(pcmout),&amp;current_section);<br>    if (ret == 0) {<br>      /* EOF */<br>      eof=1;<br>    } else if (ret &lt; 0) {<br>
      /* error in the stream.  Not a problem, just reporting it in<br>     case we (the app) cares.  In this case, we don&#39;t. */<br>    } else {<br>      /* we don&#39;t bother dealing with sample rate changes, etc, but<br>
     you&#39;ll have to*/<br>      fwrite(pcmout,1,ret,fp1);<br>    }<br>}<br>if(eof)<br>    {<br>        break;<br>    }<br>    else<br>    {    <br>     long ret=ov_read(&amp;vf,pcmout,sizeof(pcmout),&amp;current_section);<br>
    if (ret == 0) {<br>      /* EOF */<br>      eof=1;<br>    } else if (ret &lt; 0) {<br>      /* error in the stream.  Not a problem, just reporting it in<br>     case we (the app) cares.  In this case, we don&#39;t. */<br>
    } else {<br>      /* we don&#39;t bother dealing with sample rate changes, etc, but<br>     you&#39;ll have to*/<br>      fwrite(pcmout,1,ret,fp1);<br>    }<br>}<br><br> <br>     
However, in order to run the decoder parallely on four Processors, I
need to run the ov_read() function on each Processor independently. In
order to do that each Processor should be able to seek next encoded
packet of data and there should not be duplication of packet decoding. <br> <br>
     Is it known apriori, how many Ogg-Vorbis packets are there and
their corresponding locations in the File/stream? If yes, then each
Processor can be pointed to its packet to-be-decoded. Please suggest
how I can go ahead?<br> <br> Thanks,<br> Niranjan</span>