Hi to all,<br><br>I neet to get the time of the song when it is playing. I am using the code below:<br><br><span style="font-family: courier new,monospace;">static</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">enum mad_flow header(void *data, struct mad_header const *header)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    mad_timer_add(&amp;musicTimer, header-&gt;duration);</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    return MAD_FLOW_CONTINUE;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br><br><span style="font-family: courier new,monospace;">long mp3_song_time(void)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    return mad_timer_count(musicTimer, MAD_UNITS_MILLISECONDS);</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">}</span><br><br>The code works, but it is not fast enough. I am getting the time with &quot;<span style="font-family: courier new,monospace;">mp3_song_time</span>&quot; faster than the header is called. (obs: I am using two processors, one to decode the song and the other to run the code that uses the song time).<br>

<br>Is there another way to get the right (more accurate) time?<br><br>Thanks in advance,<br clear="all"><br>-- <br>Carlos Henrique Gomes Correia<br>Game Programmer<br>Interama Games<br><br>Skype: carloshgcorreia<br>Tel: +55 27 3345 8525<br>

Web: <a href="http://www.interama.net">www.interama.net</a><br>