Most of the Repeat logic is in place (needs some brush up here and there). Still missing Repeat Album. Disabled some annoying debug output from MADDecoder. Updated KnownIssues.
parent
9a43ad56f8
commit
f20b10fdd4
|
@ -489,11 +489,15 @@
|
|||
|
||||
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 if ([playlistController repeat] == RepeatAll)
|
||||
{
|
||||
if ([[curEntry index] intValue] == [[playlistController arrangedObjects] count] - 1)
|
||||
if ([playlistController shuffle] == YES)
|
||||
pe = [playlistController shuffledEntryAtIndex:0];
|
||||
else
|
||||
pe = [playlistController entryAtIndex:0];
|
||||
}
|
||||
else
|
||||
pe = [playlistController getNextEntry:curEntry];
|
||||
|
||||
|
|
|
@ -6,11 +6,9 @@ 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 state Repeat Album is missing. Repeat All is
|
||||
naively implemented in the playbackController, and
|
||||
does not heed Shuffle.
|
||||
Shuffle list is not reshuffled when shuffling reaches
|
||||
start or end of it (in Repeat All mode)
|
||||
|
||||
Shuffle parts of the playlistController need rewrite,
|
||||
they still go by the old repeat code.
|
||||
Repeat Album isn't implemented.
|
||||
|
||||
mp3 bitrate is a tad off.
|
||||
|
|
|
@ -85,6 +85,7 @@ typedef enum {
|
|||
- (void)addShuffledListToFront;
|
||||
- (void)resetShuffleList;
|
||||
|
||||
- (PlaylistEntry *)shuffledEntryAtIndex:(int)i;
|
||||
- (PlaylistEntry *)entryAtIndex:(int)i;
|
||||
|
||||
@end
|
||||
|
|
|
@ -422,9 +422,20 @@
|
|||
{
|
||||
PlaylistEntry *pe;
|
||||
|
||||
pe = [self getNextEntry:[self currentEntry]];
|
||||
if (pe == nil)
|
||||
if (repeat == RepeatOne)
|
||||
return NO;
|
||||
|
||||
pe = [self getNextEntry:[self currentEntry]];
|
||||
|
||||
/* needs to reshuffle playlist for added greatness */
|
||||
if (pe == nil)
|
||||
{
|
||||
// we are at end of shuffle list, and repeat all is requested
|
||||
if ((shuffle = YES) && (repeat == RepeatAll))
|
||||
pe = [self shuffledEntryAtIndex:0];
|
||||
else
|
||||
return NO;
|
||||
}
|
||||
|
||||
[self setCurrentEntry:pe];
|
||||
|
||||
|
@ -435,9 +446,18 @@
|
|||
{
|
||||
PlaylistEntry *pe;
|
||||
|
||||
if (repeat == RepeatOne)
|
||||
return NO;
|
||||
|
||||
pe = [self getPrevEntry:[self currentEntry]];
|
||||
if (pe == nil)
|
||||
return NO;
|
||||
{
|
||||
// we are at end of shuffle list, and repeat all is requested
|
||||
if ((shuffle = YES) && (repeat == RepeatAll))
|
||||
pe = [self shuffledEntryAtIndex:[shuffleList count]-1];
|
||||
else
|
||||
return NO;
|
||||
}
|
||||
|
||||
[self setCurrentEntry:pe];
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@
|
|||
int r;
|
||||
do {
|
||||
r = [self decodeMPEGFrame];
|
||||
NSLog(@"Decoding frame: %i", r);
|
||||
NSLog(@"Decoding first frame: %i", r);
|
||||
} while (r == 0);
|
||||
|
||||
return (r == -1 ? NO : YES);
|
||||
|
@ -504,7 +504,7 @@ static inline signed int scale (mad_fixed_t sample)
|
|||
}
|
||||
else if (MAD_ERROR_BUFLEN == _stream.error)
|
||||
{
|
||||
NSLog(@"Bufferlen");
|
||||
//NSLog(@"Bufferlen");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
@ -564,7 +564,7 @@ static inline signed int scale (mad_fixed_t sample)
|
|||
break;
|
||||
|
||||
int r = [self decodeMPEGFrame];
|
||||
NSLog(@"Decoding frame: %i", r);
|
||||
//NSLog(@"Decoding frame: %i", r);
|
||||
if (r == 0) //Recoverable error.
|
||||
continue;
|
||||
else if (r == -1) //Unrecoverable error
|
||||
|
|
Loading…
Reference in New Issue