Author: awy
Date: Fri Sep 26 02:56:58 2008
New Revision: 2990

URL: http://svn.slimdevices.com?rev=2990&root=Jive&view=rev
Log:
Note exact sample at new-track start.

Modified:
    7.3/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_output.c

Modified: 7.3/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_output.c
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_output.c?rev=2990&root=Jive&r1=2989&r2=2990&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_output.c 
(original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_output.c Fri 
Sep 26 02:56:58 2008
@@ -93,12 +93,13 @@
 
 bool_t decode_check_start_point(void) {
        bool_t reached_start_point;
+       long track_start_offset;
 
        if (!check_start_point) {
                /* We are past the start point */
                return false;
        }
-
+       
        /* We mark the start point of a track in the decode FIFO. This function
         * tells us whether we've played past that point.
         */
@@ -115,11 +116,16 @@
                /* We have not reached the start point */
                return false;
        }
+       
+       track_start_offset = decode_fifo.rptr - track_start_point;
+       if (track_start_offset < 0) {
+               track_start_offset += DECODE_FIFO_SIZE;
+       }
 
        /* Past the start point */
        check_start_point = FALSE;
        decode_num_tracks_started++;
-       decode_elapsed_samples = 0;
+       decode_elapsed_samples = BYTES_TO_SAMPLES(track_start_offset);
 
        return true;
 }

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to