Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

runtime data fix
Wednesday, November 21st, 2007 at 10:24:37pm UTC 

  1. diff --git a/apps/playback.c b/apps/playback.c
  2. index ac60750..d9c4b28 100644
  3. --- a/apps/playback.c
  4. +++ b/apps/playback.c
  5. @@ -316,6 +316,11 @@ static bool clear_track_info(struct track_info *track)
  6.      }
  7.  
  8.      if (track->id3_hid >= 0) {
  9. +        if (track->event_sent && track_unbuffer_callback) {
  10. +            /* If there is an unbuffer callback, call it */
  11. +            track_unbuffer_callback(bufgetid3(track->id3_hid));
  12. +        }
  13. +
  14.          if (bufclose(track->id3_hid))
  15.              track->id3_hid = -1;
  16.          else
  17. @@ -1495,11 +1500,6 @@ static void audio_clear_track_entries(bool clear_unbuffered)
  18.           * otherwise clear the track if that option is selected */
  19.          if (tracks[cur_idx].event_sent)
  20.          {
  21. -            /* If there is an unbuffer callback, call it, otherwise,
  22. -             * just clear the track */
  23. -            if (track_unbuffer_callback && tracks[cur_idx].id3_hid >= 0)
  24. -                track_unbuffer_callback(bufgetid3(tracks[cur_idx].id3_hid));
  25. -
  26.              clear_track_info(&tracks[cur_idx]);
  27.          }
  28.          else if (clear_unbuffered)
  29. @@ -2008,9 +2008,15 @@ static int audio_check_new_track(void)
  30.          new_playlist = false;
  31.      }
  32.  
  33. -    /* Save the old track's metadata to allow the WPS to display it */
  34. +    /* Save the track metadata to allow the WPS to display it
  35. +       while PCM finishes playing that track */
  36.      copy_mp3entry(&prevtrack_id3, &curtrack_id3);
  37.  
  38. +    /* Update the main buffer copy of the track metadata with the one
  39. +       the codec has been using (for the unbuffer callbacks) */
  40. +    if (CUR_TI->id3_hid >= 0)
  41. +        copy_mp3entry(bufgetid3(CUR_TI->id3_hid), &curtrack_id3);
  42. +
  43.      /* Save a pointer to the old track to allow later clearing */
  44.      prev_ti = CUR_TI;
  45.  
  46. @@ -2304,12 +2310,6 @@ static void audio_finalise_track_change(void)
  47.          automatic_skip = false;
  48.      }
  49.  
  50. -    /* Copy the track back to the main buffer */
  51. -    if (prev_ti && prev_ti->id3_hid >= 0)
  52. -    {
  53. -        copy_mp3entry(bufgetid3(prev_ti->id3_hid), &prevtrack_id3);
  54. -    }
  55. -
  56.      /* Invalidate prevtrack_id3 */
  57.      prevtrack_id3.path[0] = 0;
  58.  

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right worth-right