Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Integrated Mac and iPhone versions.

  • Loading branch information...
commit c061aa334d6efb0da426af318333f5ee8351b43a 1 parent 6d0a846
Matt Gallagher authored
View
1  Classes/AudioStreamer.h
@@ -44,7 +44,6 @@ typedef enum
AS_STOPPING_EOF,
AS_STOPPING_USER_ACTION,
AS_STOPPING_ERROR,
- AS_STOPPING_END_OF_PRESCAN,
AS_STOPPING_TEMPORARILY
} AudioStreamerStopReason;
View
44 Classes/AudioStreamer.m
@@ -55,7 +55,11 @@ - (void)handleBufferCompleteForQueue:(AudioQueueRef)inAQ
buffer:(AudioQueueBufferRef)inBuffer;
- (void)handlePropertyChangeForQueue:(AudioQueueRef)inAQ
propertyID:(AudioQueuePropertyID)inID;
+
+#ifdef TARGET_OS_IPHONE
- (void)handleInterruptionChangeToState:(AudioQueuePropertyID)inInterruptionState;
+#endif
+
- (void)enqueueBuffer;
- (void)handleReadFromStream:(CFReadStreamRef)aStream
eventType:(CFStreamEventType)eventType;
@@ -327,6 +331,12 @@ + (NSString *)stringForErrorCode:(AudioStreamerErrorCode)anErrorCode
return AS_GET_AUDIO_TIME_FAILED_STRING;
case AS_NETWORK_CONNECTION_FAILED:
return AS_NETWORK_CONNECTION_FAILED_STRING;
+ case AS_AUDIO_QUEUE_STOP_FAILED:
+ return AS_AUDIO_QUEUE_STOP_FAILED_STRING;
+ case AS_AUDIO_STREAMER_FAILED:
+ return AS_AUDIO_STREAMER_FAILED_STRING;
+ default:
+ return AS_AUDIO_STREAMER_FAILED_STRING;
}
return AS_AUDIO_STREAMER_FAILED_STRING;
@@ -584,6 +594,7 @@ - (BOOL)openFileStream
kCFStreamPropertyHTTPShouldAutoredirect,
kCFBooleanTrue) == false)
{
+#ifdef TARGET_OS_IPHONE
UIAlertView *alert =
[[UIAlertView alloc]
initWithTitle:NSLocalizedStringFromTable(@"File Error", @"Errors", nil)
@@ -597,6 +608,20 @@ - (BOOL)openFileStream
withObject:nil
waitUntilDone:YES];
[alert release];
+#else
+ NSAlert *alert =
+ [NSAlert
+ alertWithMessageText:NSLocalizedStringFromTable(@"File Error", @"Errors", nil)
+ defaultButton:NSLocalizedString(@"OK", @"")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:NSLocalizedStringFromTable(@"Unable to configure network read stream.", @"Errors", nil)];
+ [alert
+ performSelector:@selector(runModal)
+ onThread:[NSThread mainThread]
+ withObject:nil
+ waitUntilDone:NO];
+#endif
return NO;
}
@@ -624,6 +649,7 @@ - (BOOL)openFileStream
if (!CFReadStreamOpen(stream))
{
CFRelease(stream);
+#ifdef TARGET_OS_IPHONE
UIAlertView *alert =
[[UIAlertView alloc]
initWithTitle:NSLocalizedStringFromTable(@"File Error", @"Errors", nil)
@@ -637,6 +663,20 @@ - (BOOL)openFileStream
withObject:nil
waitUntilDone:YES];
[alert release];
+#else
+ NSAlert *alert =
+ [NSAlert
+ alertWithMessageText:NSLocalizedStringFromTable(@"File Error", @"Errors", nil)
+ defaultButton:NSLocalizedString(@"OK", @"")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:NSLocalizedStringFromTable(@"Unable to configure network read stream.", @"Errors", nil)];
+ [alert
+ performSelector:@selector(runModal)
+ onThread:[NSThread mainThread]
+ withObject:nil
+ waitUntilDone:NO];
+#endif
return NO;
}
@@ -821,6 +861,8 @@ - (void)start
}
else if (state == AS_INITIALIZED)
{
+ NSAssert([[NSThread currentThread] isEqual:[NSThread mainThread]],
+ @"Playback can only be started from the main thread.");
notificationCenter =
[[NSNotificationCenter defaultCenter] retain];
self.state = AS_STARTING_FILE_THREAD;
@@ -1547,6 +1589,7 @@ - (void)handlePropertyChangeForQueue:(AudioQueueRef)inAQ
[pool release];
}
+#ifdef TARGET_OS_IPHONE
//
// handleInterruptionChangeForQueue:propertyID:
//
@@ -1567,6 +1610,7 @@ - (void)handleInterruptionChangeToState:(AudioQueuePropertyID)inInterruptionStat
[self pause];
}
}
+#endif
@end
View
33 Classes/MacStreamingPlayerController.h
@@ -0,0 +1,33 @@
+//
+// MacStreamingPlayerController.h
+// MacStreamingPlayer
+//
+// Created by Matt Gallagher on 28/10/08.
+// Copyright Matt Gallagher 2008. All rights reserved.
+//
+// Permission is given to use this source code file, free of charge, in any
+// project, commercial or otherwise, entirely at your risk, with the condition
+// that any redistribution (in part or whole) of source code must retain
+// this copyright and permission notice. Attribution in compiled projects is
+// appreciated but not required.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@class AudioStreamer;
+
+@interface MacStreamingPlayerController : NSObject
+{
+ IBOutlet NSTextField *downloadSourceField;
+ IBOutlet NSButton *button;
+ IBOutlet NSTextField *positionLabel;
+ AudioStreamer *streamer;
+ NSTimer *progressUpdateTimer;
+}
+
+- (IBAction)buttonPressed:(id)sender;
+- (void)spinButton;
+- (void)updateProgress:(NSTimer *)aNotification;
+
+@end
+
View
263 Classes/MacStreamingPlayerController.m
@@ -0,0 +1,263 @@
+//
+// MacStreamingPlayerController.m
+// MacStreamingPlayer
+//
+// Created by Matt Gallagher on 28/10/08.
+// Copyright Matt Gallagher 2008. All rights reserved.
+//
+// Permission is given to use this source code file, free of charge, in any
+// project, commercial or otherwise, entirely at your risk, with the condition
+// that any redistribution (in part or whole) of source code must retain
+// this copyright and permission notice. Attribution in compiled projects is
+// appreciated but not required.
+//
+
+#import "MacStreamingPlayerController.h"
+#import "AudioStreamer.h"
+#import <QuartzCore/CoreAnimation.h>
+
+@implementation MacStreamingPlayerController
+
+//
+// setButtonImage:
+//
+// Used to change the image on the playbutton. This method exists for
+// the purpose of inter-thread invocation because
+// the observeValueForKeyPath:ofObject:change:context: method is invoked
+// from secondary threads and UI updates are only permitted on the main thread.
+//
+// Parameters:
+// image - the image to set on the play button.
+//
+- (void)setButtonImage:(NSImage *)image
+{
+ [button.layer removeAllAnimations];
+ if (!image)
+ {
+ [button setImage:[NSImage imageNamed:@"playbutton"]];
+ }
+ else
+ {
+ [button setImage:image];
+
+ if ([button.image isEqual:[NSImage imageNamed:@"loadingbutton"]])
+ {
+ [self spinButton];
+ }
+ }
+}
+
+//
+// destroyStreamer
+//
+// Removes the streamer, the UI update timer and the change notification
+//
+- (void)destroyStreamer
+{
+ if (streamer)
+ {
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:self
+ name:ASStatusChangedNotification
+ object:streamer];
+ [progressUpdateTimer invalidate];
+ progressUpdateTimer = nil;
+
+ [streamer stop];
+ [streamer release];
+ streamer = nil;
+ }
+}
+
+//
+// createStreamer
+//
+// Creates or recreates the AudioStreamer object.
+//
+- (void)createStreamer
+{
+ if (streamer)
+ {
+ return;
+ }
+
+ [self destroyStreamer];
+
+ NSString *escapedValue =
+ [(NSString *)CFURLCreateStringByAddingPercentEscapes(
+ nil,
+ (CFStringRef)[downloadSourceField stringValue],
+ NULL,
+ NULL,
+ kCFStringEncodingUTF8)
+ autorelease];
+
+ NSURL *url = [NSURL URLWithString:escapedValue];
+ streamer = [[AudioStreamer alloc] initWithURL:url];
+
+ progressUpdateTimer =
+ [NSTimer
+ scheduledTimerWithTimeInterval:0.1
+ target:self
+ selector:@selector(updateProgress:)
+ userInfo:nil
+ repeats:YES];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(playbackStateChanged:)
+ name:ASStatusChangedNotification
+ object:streamer];
+}
+
+//
+// spinButton
+//
+// Shows the spin button when the audio is loading. This is largely irrelevant
+// now that the audio is loaded from a local file.
+//
+- (void)spinButton
+{
+ [CATransaction begin];
+ [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
+ CGRect frame = NSRectToCGRect([button frame]);
+ button.layer.anchorPoint = CGPointMake(0.5, 0.5);
+ button.layer.position = CGPointMake(frame.origin.x + 0.5 * frame.size.width, frame.origin.y + 0.5 * frame.size.height);
+ [CATransaction commit];
+
+ [CATransaction begin];
+ [CATransaction setValue:(id)kCFBooleanFalse forKey:kCATransactionDisableActions];
+ [CATransaction setValue:[NSNumber numberWithFloat:2.0] forKey:kCATransactionAnimationDuration];
+
+ CABasicAnimation *animation;
+ animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
+ animation.fromValue = [NSNumber numberWithFloat:0.0];
+ animation.toValue = [NSNumber numberWithFloat:2 * M_PI];
+ animation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionLinear];
+ animation.delegate = self;
+ [button.layer addAnimation:animation forKey:@"rotationAnimation"];
+
+ [CATransaction commit];
+}
+
+//
+// animationDidStop:finished:
+//
+// Restarts the spin animation on the button when it ends. Again, this is
+// largely irrelevant now that the audio is loaded from a local file.
+//
+// Parameters:
+// theAnimation - the animation that rotated the button.
+// finished - is the animation finised?
+//
+- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)finished
+{
+ if (finished)
+ {
+ [self spinButton];
+ }
+}
+
+//
+// buttonPressed:
+//
+// Handles the play/stop button. Creates, observes and starts the
+// audio streamer when it is a play button. Stops the audio streamer when
+// it isn't.
+//
+// Parameters:
+// sender - normally, the play/stop button.
+//
+- (IBAction)buttonPressed:(id)sender
+{
+ if ([button.image isEqual:[NSImage imageNamed:@"playbutton"]])
+ {
+ [downloadSourceField resignFirstResponder];
+
+ [self createStreamer];
+ [self setButtonImage:[NSImage imageNamed:@"loadingbutton"]];
+ [streamer start];
+ }
+ else
+ {
+ [streamer stop];
+ }
+}
+
+//
+// playbackStateChanged:
+//
+// Invoked when the AudioStreamer
+// reports that its playback status has changed.
+//
+- (void)playbackStateChanged:(NSNotification *)aNotification
+{
+ if ([streamer isWaiting])
+ {
+ [self setButtonImage:[NSImage imageNamed:@"loadingbutton"]];
+ }
+ else if ([streamer isPlaying])
+ {
+ [self setButtonImage:[NSImage imageNamed:@"stopbutton"]];
+ }
+ else if ([streamer isIdle])
+ {
+ [self destroyStreamer];
+ [self setButtonImage:[NSImage imageNamed:@"playbutton"]];
+ }
+}
+
+//
+// updateProgress:
+//
+// Invoked when the AudioStreamer
+// reports that its playback progress has changed.
+//
+- (void)updateProgress:(NSTimer *)updatedTimer
+{
+ if (streamer.bitRate != 0.0)
+ {
+ double progress = streamer.progress;
+ [positionLabel setStringValue:
+ [NSString stringWithFormat:@"Time Played: %.1f seconds",
+ progress]];
+ }
+ else
+ {
+ [positionLabel setStringValue:@"Time Played:"];
+ }
+}
+
+//
+// textFieldShouldReturn:
+//
+// Dismiss the text field when done is pressed
+//
+// Parameters:
+// sender - the text field
+//
+// returns YES
+//
+- (BOOL)textFieldShouldReturn:(NSTextField *)sender
+{
+ [sender resignFirstResponder];
+ [self createStreamer];
+ return YES;
+}
+
+//
+// dealloc
+//
+// Releases instance memory.
+//
+- (void)dealloc
+{
+ [self destroyStreamer];
+ if (progressUpdateTimer)
+ {
+ [progressUpdateTimer invalidate];
+ progressUpdateTimer = nil;
+ }
+ [super dealloc];
+}
+
+@end
View
BIN  English.lproj/InfoPlist.strings
Binary file not shown
View
3,314 English.lproj/MainMenu.xib
3,314 additions, 0 deletions not shown
View
BIN  Mac Resources/English.lproj/InfoPlist.strings
Binary file not shown
View
3,251 Mac Resources/English.lproj/MainMenu.xib
3,251 additions, 0 deletions not shown
View
28 MacInfo.plist
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
View
321 MacStreamingPlayer.xcodeproj/project.pbxproj
@@ -0,0 +1,321 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ C9266EB80E8F1CCA00FFA634 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9266EB70E8F1CCA00FFA634 /* AudioToolbox.framework */; };
+ C92672FB0E905BBB00FFA634 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C92672FA0E905BBB00FFA634 /* QuartzCore.framework */; };
+ C9E673630FE8C6B20033BF43 /* playbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C9E6735F0FE8C6B20033BF43 /* playbutton.png */; };
+ C9E673640FE8C6B20033BF43 /* stopbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C9E673600FE8C6B20033BF43 /* stopbutton.png */; };
+ C9E673650FE8C6B20033BF43 /* loadingbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C9E673610FE8C6B20033BF43 /* loadingbutton.png */; };
+ C9E673660FE8C6B20033BF43 /* pausebutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C9E673620FE8C6B20033BF43 /* pausebutton.png */; };
+ C9E673700FE8C6F80033BF43 /* AudioStreamer.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E6736F0FE8C6F80033BF43 /* AudioStreamer.m */; };
+ C9E673760FE8C7340033BF43 /* MacStreamingPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = C9E673740FE8C7340033BF43 /* MacStreamingPlayerController.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 8D1107320486CEB800E47090 /* StreamingAudioPlayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StreamingAudioPlayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ C9266EB70E8F1CCA00FFA634 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ C92672FA0E905BBB00FFA634 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
+ C9E6735F0FE8C6B20033BF43 /* playbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = playbutton.png; path = "Shared Resources/playbutton.png"; sourceTree = "<group>"; };
+ C9E673600FE8C6B20033BF43 /* stopbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stopbutton.png; path = "Shared Resources/stopbutton.png"; sourceTree = "<group>"; };
+ C9E673610FE8C6B20033BF43 /* loadingbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = loadingbutton.png; path = "Shared Resources/loadingbutton.png"; sourceTree = "<group>"; };
+ C9E673620FE8C6B20033BF43 /* pausebutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pausebutton.png; path = "Shared Resources/pausebutton.png"; sourceTree = "<group>"; };
+ C9E673670FE8C6DA0033BF43 /* MacInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = MacInfo.plist; sourceTree = "<group>"; };
+ C9E6736E0FE8C6F80033BF43 /* AudioStreamer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioStreamer.h; path = Classes/AudioStreamer.h; sourceTree = "<group>"; };
+ C9E6736F0FE8C6F80033BF43 /* AudioStreamer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AudioStreamer.m; path = Classes/AudioStreamer.m; sourceTree = "<group>"; };
+ C9E673740FE8C7340033BF43 /* MacStreamingPlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MacStreamingPlayerController.m; path = Classes/MacStreamingPlayerController.m; sourceTree = "<group>"; };
+ C9E673750FE8C7340033BF43 /* MacStreamingPlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MacStreamingPlayerController.h; path = Classes/MacStreamingPlayerController.h; sourceTree = "<group>"; };
+ C9E673770FE8C73E0033BF43 /* MacStreamingPlayer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacStreamingPlayer_Prefix.pch; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ C9266EB80E8F1CCA00FFA634 /* AudioToolbox.framework in Frameworks */,
+ C92672FB0E905BBB00FFA634 /* QuartzCore.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ C9E673740FE8C7340033BF43 /* MacStreamingPlayerController.m */,
+ C9E673750FE8C7340033BF43 /* MacStreamingPlayerController.h */,
+ C9E6736E0FE8C6F80033BF43 /* AudioStreamer.h */,
+ C9E6736F0FE8C6F80033BF43 /* AudioStreamer.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ C92672FA0E905BBB00FFA634 /* QuartzCore.framework */,
+ C9266EB70E8F1CCA00FFA634 /* AudioToolbox.framework */,
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* StreamingAudioPlayer.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* StreamingAudioPlayer */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = StreamingAudioPlayer;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ C9E673770FE8C73E0033BF43 /* MacStreamingPlayer_Prefix.pch */,
+ C9E673670FE8C6DA0033BF43 /* MacInfo.plist */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ C9E6735F0FE8C6B20033BF43 /* playbutton.png */,
+ C9E673600FE8C6B20033BF43 /* stopbutton.png */,
+ C9E673610FE8C6B20033BF43 /* loadingbutton.png */,
+ C9E673620FE8C6B20033BF43 /* pausebutton.png */,
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* StreamingAudioPlayer */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "StreamingAudioPlayer" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = StreamingAudioPlayer;
+ productInstallPath = "$(HOME)/Applications";
+ productName = StreamingAudioPlayer;
+ productReference = 8D1107320486CEB800E47090 /* StreamingAudioPlayer.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacStreamingPlayer" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* StreamingAudioPlayer */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* StreamingAudioPlayer */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+ 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
+ C9E673630FE8C6B20033BF43 /* playbutton.png in Resources */,
+ C9E673640FE8C6B20033BF43 /* stopbutton.png in Resources */,
+ C9E673650FE8C6B20033BF43 /* loadingbutton.png in Resources */,
+ C9E673660FE8C6B20033BF43 /* pausebutton.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072D0486CEB800E47090 /* main.m in Sources */,
+ C9E673700FE8C6F80033BF43 /* AudioStreamer.m in Sources */,
+ C9E673760FE8C7340033BF43 /* MacStreamingPlayerController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C165DFE840E0CC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 1DDD58150DA1D0A300B32029 /* English */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)\"",
+ );
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = MacStreamingPlayer_Prefix.pch;
+ INFOPLIST_FILE = MacInfo.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = StreamingAudioPlayer;
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)\"",
+ );
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = MacStreamingPlayer_Prefix.pch;
+ INFOPLIST_FILE = MacInfo.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = StreamingAudioPlayer;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ WARNING_CFLAGS = "-Wall";
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "StreamingAudioPlayer" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacStreamingPlayer" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
View
7 MacStreamingPlayer_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'StreamingAudioPlayer' target in the 'StreamingAudioPlayer' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
View
BIN  Shared Resources/loadingbutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Shared Resources/pausebutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Shared Resources/playbutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Shared Resources/stopbutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
206 iPhone Resources/MainWindow.xib
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.02">
+ <data>
+ <int key="IBDocument.SystemTarget">528</int>
+ <string key="IBDocument.SystemVersion">9E17</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.HIToolboxVersion">352.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="10"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ </object>
+ <object class="IBProxyObject" id="427554174">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524"/>
+ <object class="IBUIViewController" id="943309135">
+ <string key="IBUINibName">iPhoneStreamingPlayerViewController</string>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ </object>
+ <object class="IBUIWindow" id="117978783">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">viewController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="943309135"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="117978783"/>
+ </object>
+ <int key="connectionID">14</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="957960031">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="957960031"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="957960031"/>
+ <string key="objectName">iPhoneStreamingPlayer App Delegate</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
+ <reference key="parent" ref="957960031"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="943309135"/>
+ <reference key="parent" ref="957960031"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="117978783"/>
+ <reference key="parent" ref="957960031"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>10.CustomClassName</string>
+ <string>10.IBEditorWindowLastContentRect</string>
+ <string>10.IBPluginDependency</string>
+ <string>12.IBEditorWindowLastContentRect</string>
+ <string>12.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <string>iPhoneStreamingPlayerViewController</string>
+ <string>{{512, 351}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{525, 346}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>iPhoneStreamingPlayerAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">14</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">iPhoneStreamingPlayerAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>iPhoneStreamingPlayerViewController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/iPhoneStreamingPlayerAppDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">iPhoneStreamingPlayerAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">iPhoneStreamingPlayerViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/iPhoneStreamingPlayerViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">iPhoneStreamingPlayer.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
View
383 iPhone Resources/iPhoneStreamingPlayerViewController.xib
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
+ <data>
+ <int key="IBDocument.SystemTarget">528</int>
+ <string key="IBDocument.SystemVersion">9J61</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.46</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="6"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUITextField" id="687637752">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 49}, {280, 31}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <string key="IBUIText">http://202.6.74.107:8060/triplej.mp3</string>
+ <int key="IBUIBorderStyle">3</int>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
+ <float key="IBUIMinimumFontSize">1.700000e+01</float>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocorrectionType">1</int>
+ <int key="IBUIKeyboardType">3</int>
+ </object>
+ </object>
+ <object class="IBUILabel" id="1010863368">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 20}, {280, 21}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="IBUIText">Download URL:</string>
+ <object class="NSColor" key="IBUITextColor" id="971594825">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDAAA</bytes>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">1.000000e+01</float>
+ </object>
+ <object class="IBUIButton" id="650664856">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{124, 88}, {72, 73}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">1.500000e+01</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <object class="NSColor" key="IBUIHighlightedTitleColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ <object class="NSCustomResource" key="IBUINormalImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">playbutton.png</string>
+ </object>
+ </object>
+ <object class="IBUILabel" id="842916847">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 169}, {280, 21}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="IBUIText">Time Played:</string>
+ <reference key="IBUITextColor" ref="971594825"/>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">1.000000e+01</float>
+ </object>
+ <object class="IBUILabel" id="1000478862">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 228}, {280, 21}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="IBUIText">Volume:</string>
+ <reference key="IBUITextColor" ref="971594825"/>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">1.000000e+01</float>
+ </object>
+ <object class="IBUIView" id="1067123130">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 257}, {280, 55}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MSAwAA</bytes>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC44NTIwNDA4MyAwLjg1MjA0MDgzIDAuODUyMDQwODMAA</bytes>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">button</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="650664856"/>
+ </object>
+ <int key="connectionID">28</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">buttonPressed:</string>
+ <reference key="source" ref="650664856"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">29</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">volumeSlider</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="1067123130"/>
+ </object>
+ <int key="connectionID">36</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">downloadSourceField</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="687637752"/>
+ </object>
+ <int key="connectionID">38</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">positionLabel</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="842916847"/>
+ </object>
+ <int key="connectionID">41</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="687637752"/>
+ <reference key="destination" ref="372490531"/>
+ </object>
+ <int key="connectionID">44</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="360949347">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="360949347"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="360949347"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1010863368"/>
+ <reference ref="687637752"/>
+ <reference ref="650664856"/>
+ <reference ref="1000478862"/>
+ <reference ref="842916847"/>
+ <reference ref="1067123130"/>
+ </object>
+ <reference key="parent" ref="360949347"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">16</int>
+ <reference key="object" ref="687637752"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">21</int>
+ <reference key="object" ref="1010863368"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">23</int>
+ <reference key="object" ref="650664856"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">26</int>
+ <reference key="object" ref="1000478862"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">35</int>
+ <reference key="object" ref="1067123130"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">25</int>
+ <reference key="object" ref="842916847"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>16.IBPluginDependency</string>
+ <string>21.IBPluginDependency</string>
+ <string>23.IBPluginDependency</string>
+ <string>25.IBPluginDependency</string>
+ <string>26.IBPluginDependency</string>
+ <string>35.IBPluginDependency</string>
+ <string>6.IBEditorWindowLastContentRect</string>
+ <string>6.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>iPhoneStreamingPlayerViewController</string>
+ <string>UIResponder</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{208, 221}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">44</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">iPhoneStreamingPlayerViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">buttonPressed:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>button</string>
+ <string>downloadSourceField</string>
+ <string>positionLabel</string>
+ <string>volumeSlider</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIButton</string>
+ <string>UITextField</string>
+ <string>UILabel</string>
+ <string>UIView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/iPhoneStreamingPlayerViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">iPhoneStreamingPlayer.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">3.0</string>
+ </data>
+</archive>
View
30 iPhoneInfo.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mattgallagher.${PRODUCT_NAME:identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+</dict>
+</plist>
View
56 iPhoneStreamingPlayer.xcodeproj/project.pbxproj
@@ -14,16 +14,16 @@
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
28D7ACF80DDB3853001CB0EB /* iPhoneStreamingPlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* iPhoneStreamingPlayerViewController.m */; };
C9423DF10EF8AA6B003B785B /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9423DF00EF8AA6B003B785B /* CFNetwork.framework */; };
- C94501C90FE8716F00495BCF /* playbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C94501C30FE8716F00495BCF /* playbutton.png */; };
- C94501CA0FE8716F00495BCF /* iPhoneStreamingPlayerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C94501C40FE8716F00495BCF /* iPhoneStreamingPlayerViewController.xib */; };
- C94501CB0FE8716F00495BCF /* stopbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C94501C50FE8716F00495BCF /* stopbutton.png */; };
- C94501CC0FE8716F00495BCF /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C94501C60FE8716F00495BCF /* MainWindow.xib */; };
- C94501CD0FE8716F00495BCF /* loadingbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C94501C70FE8716F00495BCF /* loadingbutton.png */; };
- C94501CE0FE8716F00495BCF /* pausebutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C94501C80FE8716F00495BCF /* pausebutton.png */; };
C9AB93E20FCF816F0047C0FA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9AB93E10FCF816F0047C0FA /* AudioToolbox.framework */; };
C9AB93F30FCF81790047C0FA /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9AB93F20FCF81790047C0FA /* MediaPlayer.framework */; };
C9C2D87A0EB6E09C00A3D071 /* AudioStreamer.m in Sources */ = {isa = PBXBuildFile; fileRef = C9C2D8780EB6E09C00A3D071 /* AudioStreamer.m */; };
C9C2D8CE0EB6E31200A3D071 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9C2D8CD0EB6E31200A3D071 /* QuartzCore.framework */; };
+ C9E673020FE8C55B0033BF43 /* iPhoneStreamingPlayerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C9E672FF0FE8C55B0033BF43 /* iPhoneStreamingPlayerViewController.xib */; };
+ C9E673040FE8C55B0033BF43 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C9E673010FE8C55B0033BF43 /* MainWindow.xib */; };
+ C9E673090FE8C5650033BF43 /* playbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C9E673050FE8C5650033BF43 /* playbutton.png */; };
+ C9E6730A0FE8C5650033BF43 /* stopbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C9E673060FE8C5650033BF43 /* stopbutton.png */; };
+ C9E6730B0FE8C5650033BF43 /* loadingbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C9E673070FE8C5650033BF43 /* loadingbutton.png */; };
+ C9E6730C0FE8C5650033BF43 /* pausebutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C9E673080FE8C5650033BF43 /* pausebutton.png */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -37,19 +37,19 @@
28D7ACF70DDB3853001CB0EB /* iPhoneStreamingPlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iPhoneStreamingPlayerViewController.m; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* iPhoneStreamingPlayer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneStreamingPlayer_Prefix.pch; sourceTree = "<group>"; };
- 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C9423DF00EF8AA6B003B785B /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
- C94501C30FE8716F00495BCF /* playbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = playbutton.png; path = Resources/playbutton.png; sourceTree = "<group>"; };
- C94501C40FE8716F00495BCF /* iPhoneStreamingPlayerViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = iPhoneStreamingPlayerViewController.xib; path = Resources/iPhoneStreamingPlayerViewController.xib; sourceTree = "<group>"; };
- C94501C50FE8716F00495BCF /* stopbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stopbutton.png; path = Resources/stopbutton.png; sourceTree = "<group>"; };
- C94501C60FE8716F00495BCF /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainWindow.xib; path = Resources/MainWindow.xib; sourceTree = "<group>"; };
- C94501C70FE8716F00495BCF /* loadingbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = loadingbutton.png; path = Resources/loadingbutton.png; sourceTree = "<group>"; };
- C94501C80FE8716F00495BCF /* pausebutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pausebutton.png; path = Resources/pausebutton.png; sourceTree = "<group>"; };
C9AB93E10FCF816F0047C0FA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
C9AB93F20FCF81790047C0FA /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
C9C2D8780EB6E09C00A3D071 /* AudioStreamer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioStreamer.m; sourceTree = "<group>"; };
C9C2D8790EB6E09C00A3D071 /* AudioStreamer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioStreamer.h; sourceTree = "<group>"; };
C9C2D8CD0EB6E31200A3D071 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
+ C9E672FF0FE8C55B0033BF43 /* iPhoneStreamingPlayerViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = iPhoneStreamingPlayerViewController.xib; path = "iPhone Resources/iPhoneStreamingPlayerViewController.xib"; sourceTree = "<group>"; };
+ C9E673010FE8C55B0033BF43 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainWindow.xib; path = "iPhone Resources/MainWindow.xib"; sourceTree = "<group>"; };
+ C9E673050FE8C5650033BF43 /* playbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = playbutton.png; path = "Shared Resources/playbutton.png"; sourceTree = "<group>"; };
+ C9E673060FE8C5650033BF43 /* stopbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stopbutton.png; path = "Shared Resources/stopbutton.png"; sourceTree = "<group>"; };
+ C9E673070FE8C5650033BF43 /* loadingbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = loadingbutton.png; path = "Shared Resources/loadingbutton.png"; sourceTree = "<group>"; };
+ C9E673080FE8C5650033BF43 /* pausebutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pausebutton.png; path = "Shared Resources/pausebutton.png"; sourceTree = "<group>"; };
+ C9E673410FE8C6510033BF43 /* iPhoneInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhoneInfo.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -106,6 +106,7 @@
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
+ C9E673410FE8C6510033BF43 /* iPhoneInfo.plist */,
32CA4F630368D1EE00C91783 /* iPhoneStreamingPlayer_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
@@ -115,13 +116,12 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
- C94501C30FE8716F00495BCF /* playbutton.png */,
- C94501C40FE8716F00495BCF /* iPhoneStreamingPlayerViewController.xib */,
- C94501C50FE8716F00495BCF /* stopbutton.png */,
- C94501C60FE8716F00495BCF /* MainWindow.xib */,
- C94501C70FE8716F00495BCF /* loadingbutton.png */,
- C94501C80FE8716F00495BCF /* pausebutton.png */,
- 8D1107310486CEB800E47090 /* Info.plist */,
+ C9E672FF0FE8C55B0033BF43 /* iPhoneStreamingPlayerViewController.xib */,
+ C9E673010FE8C55B0033BF43 /* MainWindow.xib */,
+ C9E673050FE8C5650033BF43 /* playbutton.png */,
+ C9E673060FE8C5650033BF43 /* stopbutton.png */,
+ C9E673070FE8C5650033BF43 /* loadingbutton.png */,
+ C9E673080FE8C5650033BF43 /* pausebutton.png */,
);
name = Resources;
sourceTree = "<group>";
@@ -182,12 +182,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- C94501C90FE8716F00495BCF /* playbutton.png in Resources */,
- C94501CA0FE8716F00495BCF /* iPhoneStreamingPlayerViewController.xib in Resources */,
- C94501CB0FE8716F00495BCF /* stopbutton.png in Resources */,
- C94501CC0FE8716F00495BCF /* MainWindow.xib in Resources */,
- C94501CD0FE8716F00495BCF /* loadingbutton.png in Resources */,
- C94501CE0FE8716F00495BCF /* pausebutton.png in Resources */,
+ C9E673020FE8C55B0033BF43 /* iPhoneStreamingPlayerViewController.xib in Resources */,
+ C9E673040FE8C55B0033BF43 /* MainWindow.xib in Resources */,
+ C9E673090FE8C5650033BF43 /* playbutton.png in Resources */,
+ C9E6730A0FE8C5650033BF43 /* stopbutton.png in Resources */,
+ C9E6730B0FE8C5650033BF43 /* loadingbutton.png in Resources */,
+ C9E6730C0FE8C5650033BF43 /* pausebutton.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -217,7 +217,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iPhoneStreamingPlayer_Prefix.pch;
- INFOPLIST_FILE = Info.plist;
+ INFOPLIST_FILE = iPhoneInfo.plist;
PRODUCT_NAME = iPhoneStreamingPlayer;
};
name = Debug;
@@ -229,7 +229,7 @@
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iPhoneStreamingPlayer_Prefix.pch;
- INFOPLIST_FILE = Info.plist;
+ INFOPLIST_FILE = iPhoneInfo.plist;
PRODUCT_NAME = iPhoneStreamingPlayer;
};
name = Release;
View
14 main.m
@@ -1,6 +1,6 @@
//
// main.m
-// iPhoneStreamingPlayer
+// iPhone/MacStreamingPlayer
//
// Created by Matt Gallagher on 28/10/08.
// Copyright Matt Gallagher 2008. All rights reserved.
@@ -12,12 +12,20 @@
// appreciated but not required.
//
+#ifdef TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
+#else
+#import <Cocoa/Cocoa.h>
+#endif
-int main(int argc, char *argv[]) {
+int main(int argc, const char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- int retVal = UIApplicationMain(argc, argv, nil, nil);
+#ifdef TARGET_OS_IPHONE
+ int retVal = UIApplicationMain(argc, (char **)argv, nil, nil);
+#else
+ int retVal = NSApplicationMain(argc, argv);
+#endif
[pool release];
return retVal;
}
Please sign in to comment.
Something went wrong with that request. Please try again.