Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed warnings in AudioLibrary.m.

Disabled GCC_WARN_UNUSED_PARAMETER for now.
  • Loading branch information...
commit 384676035ff00e7b1271a597ad3192976b960786 1 parent 7cacfc5
@JanX2 JanX2 authored
Showing with 34 additions and 31 deletions.
  1. +33 −31 AudioLibrary/AudioLibrary.m
  2. +1 −0  Play.xcodeproj/project.pbxproj
View
64 AudioLibrary/AudioLibrary.m
@@ -244,6 +244,8 @@ + (void)initialize
[self exposeBinding:@"canPlayNextStream"];
[self exposeBinding:@"canPlayPreviousStream"];
[self exposeBinding:@"nowPlaying"];
+ //[self exposeBinding:@"isPlaying"];
+ //[self exposeBinding:@"volume"];
[self setKeys:[NSArray arrayWithObjects:PlayQueueKey, @"playbackIndex", @"randomPlayback", @"loopPlayback", nil] triggerChangeNotificationsForDependentKey:@"canPlayNextStream"];
[self setKeys:[NSArray arrayWithObjects:PlayQueueKey, @"playbackIndex", @"randomPlayback", @"loopPlayback", nil] triggerChangeNotificationsForDependentKey:@"canPlayPreviousStream"];
@@ -1343,9 +1345,9 @@ - (IBAction) playPreviousStream:(id)sender
}
}
-- (void) playStreamAtIndex:(unsigned)index
+- (void) playStreamAtIndex:(NSUInteger)thisIndex
{
- NSParameterAssert([self countOfPlayQueue] > index);
+ NSParameterAssert([self countOfPlayQueue] > thisIndex);
AudioStream *currentStream = [self nowPlaying];
@@ -1371,7 +1373,7 @@ - (void) playStreamAtIndex:(unsigned)index
[_playQueueTable setNeedsDisplayInRect:[_playQueueTable rectOfRow:[self playbackIndex]]];
- [self setPlaybackIndex:index];
+ [self setPlaybackIndex:thisIndex];
[self setNextPlaybackIndex:NSNotFound];
[_playQueueTable setNeedsDisplayInRect:[_playQueueTable rectOfRow:[self playbackIndex]]];
@@ -1436,9 +1438,9 @@ - (unsigned) countOfPlayQueue
return [_playQueue count];
}
-- (AudioStream *) objectInPlayQueueAtIndex:(unsigned)index
+- (AudioStream *) objectInPlayQueueAtIndex:(NSUInteger)thisIndex
{
- return [_playQueue objectAtIndex:index];
+ return [_playQueue objectAtIndex:thisIndex];
}
- (void) getPlayQueue:(id *)buffer range:(NSRange)aRange
@@ -1446,31 +1448,31 @@ - (void) getPlayQueue:(id *)buffer range:(NSRange)aRange
return [_playQueue getObjects:buffer range:aRange];
}
-- (void) insertObject:(AudioStream *)stream inPlayQueueAtIndex:(unsigned)index
+- (void) insertObject:(AudioStream *)stream inPlayQueueAtIndex:(NSUInteger)thisIndex
{
- [_playQueue insertObject:stream atIndex:index];
+ [_playQueue insertObject:stream atIndex:thisIndex];
- if(NSNotFound != [self nextPlaybackIndex] && index >= [self nextPlaybackIndex])
+ if(NSNotFound != [self nextPlaybackIndex] && thisIndex >= [self nextPlaybackIndex])
[self setNextPlaybackIndex:[self nextPlaybackIndex] + 1];
- if(NSNotFound != [self playbackIndex] && index <= [self playbackIndex])
+ if(NSNotFound != [self playbackIndex] && thisIndex <= [self playbackIndex])
[self setPlaybackIndex:[self playbackIndex] + 1];
[self updatePlayButtonState];
}
-- (void) removeObjectFromPlayQueueAtIndex:(unsigned)index
+- (void) removeObjectFromPlayQueueAtIndex:(NSUInteger)thisIndex
{
- [_playQueue removeObjectAtIndex:index];
+ [_playQueue removeObjectAtIndex:thisIndex];
- if(NSNotFound != [self nextPlaybackIndex] && index < [self nextPlaybackIndex])
+ if(NSNotFound != [self nextPlaybackIndex] && thisIndex < [self nextPlaybackIndex])
[self setNextPlaybackIndex:[self nextPlaybackIndex] - 1];
- if(index == [self playbackIndex]) {
+ if(thisIndex == [self playbackIndex]) {
// [self stop:self];
[self setPlaybackIndex:NSNotFound];
}
- else if(NSNotFound != [self playbackIndex] && index < [self playbackIndex])
+ else if(NSNotFound != [self playbackIndex] && thisIndex < [self playbackIndex])
[self setPlaybackIndex:[self playbackIndex] - 1];
[self updatePlayButtonState];
@@ -1502,9 +1504,9 @@ - (void) sortStreamsAndAddToPlayQueue:(NSArray *)streams
[self addStreamsToPlayQueue:sortedStreams];
}
-- (void) insertStreams:(NSArray *)streams inPlayQueueAtIndex:(unsigned)index
+- (void) insertStreams:(NSArray *)streams inPlayQueueAtIndex:(NSUInteger)thisIndex
{
- [self insertStreams:streams inPlayQueueAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(index, [streams count])]];
+ [self insertStreams:streams inPlayQueueAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(thisIndex, [streams count])]];
}
- (void) insertStreams:(NSArray *)streams inPlayQueueAtIndexes:(NSIndexSet *)indexes
@@ -1614,7 +1616,7 @@ - (BOOL) canPlayPreviousStream
- (AudioStream *) nowPlaying
{
- unsigned thisIndex = [self playbackIndex];
+ NSUInteger thisIndex = [self playbackIndex];
return (NSNotFound == thisIndex ? nil : [self objectInPlayQueueAtIndex:thisIndex]);
}
@@ -2369,16 +2371,16 @@ - (void) updatePlayQueueHistory
{
if(NO == [[NSUserDefaults standardUserDefaults] boolForKey:@"removeStreamsFromPlayQueueWhenFinished"] && [[NSUserDefaults standardUserDefaults] boolForKey:@"limitPlayQueueHistorySize"] && NO == [self randomPlayback]) {
unsigned playQueueHistorySize = [[NSUserDefaults standardUserDefaults] integerForKey:@"playQueueHistorySize"];
- unsigned index = [self playbackIndex];
+ NSUInteger thisIndex = [self playbackIndex];
[self willChangeValueForKey:PlayQueueKey];
- while(index > playQueueHistorySize) {
+ while(thisIndex > playQueueHistorySize) {
[_playQueue removeObjectAtIndex:0];
- --index;
+ --thisIndex;
}
[self didChangeValueForKey:PlayQueueKey];
- [self setPlaybackIndex:index];
+ [self setPlaybackIndex:thisIndex];
}
}
@@ -2422,12 +2424,12 @@ - (void) setupBrowser
IconFamily *folderIconFamily = [IconFamily iconFamilyWithSystemIcon:kGenericFolderIcon];
NSImage *folderIcon = [folderIconFamily imageWithAllReps];
- [folderIcon setSize:NSMakeSize(16.0, 16.0)];
+ [folderIcon setSize:NSMakeSize(16.0f, 16.0f)];
/* IconFamily *cdIconFamily = [IconFamily iconFamilyWithSystemIcon:kGenericCDROMIcon];
NSImage *cdIcon = [cdIconFamily imageWithAllReps];
- [cdIcon setSize:NSMakeSize(16.0, 16.0)];*/
+ [cdIcon setSize:NSMakeSize(16.0f, 16.0f)];*/
BrowserNode *browserRoot = [[BrowserNode alloc] initWithName:NSLocalizedStringFromTable(@"Collection", @"Library", @"")];
[browserRoot setIcon:folderIcon];
@@ -2916,9 +2918,9 @@ - (unsigned) countOfTracks
return [[[[CollectionManager manager] streamManager] streams] count];
}
-- (AudioStream *) objectInTracksAtIndex:(unsigned)index
+- (AudioStream *) objectInTracksAtIndex:(NSUInteger)thisIndex
{
- return [[[[CollectionManager manager] streamManager] streams] objectAtIndex:index];
+ return [[[[CollectionManager manager] streamManager] streams] objectAtIndex:thisIndex];
}
- (void) getTracks:(id *)buffer range:(NSRange)range
@@ -2936,9 +2938,9 @@ - (unsigned) countOfPlaylists
return [[[[CollectionManager manager] playlistManager] playlists] count];
}
-- (Playlist *) objectInPlaylistsAtIndex:(unsigned)index
+- (Playlist *) objectInPlaylistsAtIndex:(NSUInteger)thisIndex
{
- return [[[[CollectionManager manager] playlistManager] playlists] objectAtIndex:index];
+ return [[[[CollectionManager manager] playlistManager] playlists] objectAtIndex:thisIndex];
}
- (void) getPlaylists:(id *)buffer range:(NSRange)range
@@ -2956,9 +2958,9 @@ - (unsigned) countOfSmartPlaylists
return [[[[CollectionManager manager] smartPlaylistManager] smartPlaylists] count];
}
-- (SmartPlaylist *) objectInSmartPlaylistsAtIndex:(unsigned)index
+- (SmartPlaylist *) objectInSmartPlaylistsAtIndex:(NSUInteger)thisIndex
{
- return [[[[CollectionManager manager] smartPlaylistManager] smartPlaylists] objectAtIndex:index];
+ return [[[[CollectionManager manager] smartPlaylistManager] smartPlaylists] objectAtIndex:thisIndex];
}
- (void) getSmartPlaylists:(id *)buffer range:(NSRange)range
@@ -2976,9 +2978,9 @@ - (unsigned) countOfWatchFolders
return [[[[CollectionManager manager] watchFolderManager] watchFolders] count];
}
-- (WatchFolder *) objectInWatchFoldersAtIndex:(unsigned)index
+- (WatchFolder *) objectInWatchFoldersAtIndex:(NSUInteger)thisIndex
{
- return [[[[CollectionManager manager] watchFolderManager] watchFolders] objectAtIndex:index];
+ return [[[[CollectionManager manager] watchFolderManager] watchFolders] objectAtIndex:thisIndex];
}
- (void) getWatchFolders:(id *)buffer range:(NSRange)range
View
1  Play.xcodeproj/project.pbxproj
@@ -2202,6 +2202,7 @@
"SQLITE_THREAD_OVERRIDE_LOCK=-1",
"SQLITE_OMIT_LOAD_EXTENSION=1",
);
+ GCC_WARN_UNUSED_PARAMETER = NO;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Frameworks/taglib.framework/Headers\"",
Please sign in to comment.
Something went wrong with that request. Please try again.