From 9a43ad56f8dfca7cc9f4f241f91bf422a59a6940 Mon Sep 17 00:00:00 2001 From: areff Date: Tue, 19 Feb 2008 07:49:06 +0000 Subject: [PATCH] Added Repeat One logic to playbackController's requestNextStream. This is the only point on playback where repeat one should do anything at all, IMO. Repeat All logic added at same place, but this is only a temporary solution, as it does not heed shuffle in any way and generally feels less than optimal. Updated KnownIssues to reflect these changes. --- Application/PlaybackController.m | 12 +++++++++++- KnownIssues | 13 ++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Application/PlaybackController.m b/Application/PlaybackController.m index 9270aa69a..95a058ac6 100644 --- a/Application/PlaybackController.m +++ b/Application/PlaybackController.m @@ -485,7 +485,17 @@ - (void)audioPlayer:(AudioPlayer *)player requestNextStream:(id)userInfo { PlaylistEntry *curEntry = (PlaylistEntry *)userInfo; - PlaylistEntry *pe = [playlistController getNextEntry:curEntry]; + PlaylistEntry *pe; + + if ([playlistController repeat] == RepeatOne) + pe = curEntry; + // either this needs to be moved, or we need to determine a way to handle shuffle + // from here. + else if (([playlistController repeat] == RepeatAll) && + ([[curEntry index] intValue] == [[playlistController arrangedObjects]count]-1)) + pe = [playlistController entryAtIndex:0]; + else + pe = [playlistController getNextEntry:curEntry]; [player setNextStream:[pe url] withUserInfo:pe]; } diff --git a/KnownIssues b/KnownIssues index bb5615012..c6b1403fe 100644 --- a/KnownIssues +++ b/KnownIssues @@ -1,9 +1,16 @@ Font resize of playlist does not change file tree, and does not resize columns (needs a lower bound) -Code for fading and seeking should be moved into the AudioPlayer, -so we can escape ugly event* functions +Code for seeking should be moved into the AudioPlayer, +so we can escape ugly event* functions (the problem is +that the AppController needs access to seeker functions +because of apple remote seeking incrementally) -Repeat states have no logic tied to them. +Repeat state Repeat Album is missing. Repeat All is +naively implemented in the playbackController, and +does not heed Shuffle. + +Shuffle parts of the playlistController need rewrite, +they still go by the old repeat code. mp3 bitrate is a tad off.