2007-02-24 20:36:27 +00:00
|
|
|
/* PlaybackController */
|
2006-01-20 15:41:31 +00:00
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
2007-02-28 00:35:27 +00:00
|
|
|
#import <Growl/GrowlApplicationBridge.h>
|
|
|
|
|
2007-02-24 20:36:27 +00:00
|
|
|
#import "CogAudio/AudioPlayer.h"
|
2006-01-20 15:41:31 +00:00
|
|
|
#import "PlaylistController.h"
|
|
|
|
#import "TrackingSlider.h"
|
2007-02-25 02:43:56 +00:00
|
|
|
#import "AudioScrobbler.h"
|
2006-01-20 15:41:31 +00:00
|
|
|
|
|
|
|
@class PlaylistView;
|
|
|
|
|
2007-02-28 00:35:27 +00:00
|
|
|
@interface PlaybackController : NSObject <GrowlApplicationBridgeDelegate>
|
2006-01-20 15:41:31 +00:00
|
|
|
{
|
|
|
|
IBOutlet PlaylistController *playlistController;
|
|
|
|
IBOutlet PlaylistView *playlistView;
|
|
|
|
|
|
|
|
IBOutlet TrackingSlider *positionSlider;
|
2006-05-13 13:37:32 +00:00
|
|
|
IBOutlet NSSlider *volumeSlider;
|
2006-01-20 15:41:31 +00:00
|
|
|
IBOutlet NSTextField *timeField;
|
|
|
|
IBOutlet NSTextField *lengthField;
|
|
|
|
IBOutlet NSTextField *bitrateField;
|
|
|
|
|
|
|
|
IBOutlet NSButton *playButton;
|
|
|
|
|
2007-02-20 01:02:23 +00:00
|
|
|
IBOutlet NSArrayController *outputDevices;
|
|
|
|
|
2006-04-02 15:44:08 +00:00
|
|
|
NSTimer *positionTimer;
|
|
|
|
|
2006-01-20 15:41:31 +00:00
|
|
|
BOOL waitingForPlay; //No sneaky changing on us
|
2007-02-24 20:36:27 +00:00
|
|
|
AudioPlayer *audioPlayer;
|
2006-01-20 15:41:31 +00:00
|
|
|
|
|
|
|
int playbackStatus;
|
|
|
|
|
2007-02-18 23:41:44 +00:00
|
|
|
double currentVolume;
|
2006-04-04 01:08:21 +00:00
|
|
|
|
2006-01-20 15:41:31 +00:00
|
|
|
BOOL showTimeRemaining;
|
2007-02-25 02:43:56 +00:00
|
|
|
|
|
|
|
AudioScrobbler *scrobbler;
|
2006-01-20 15:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (IBAction)toggleShowTimeRemaining:(id)sender;
|
|
|
|
- (IBAction)changeVolume:(id)sender;
|
|
|
|
|
2007-02-18 23:41:44 +00:00
|
|
|
- (IBAction)volumeDown:(id)sender;
|
|
|
|
- (IBAction)volumeUp:(id)sender;
|
|
|
|
|
2006-01-20 15:41:31 +00:00
|
|
|
- (IBAction)playPauseResume:(id)sender;
|
|
|
|
- (IBAction)pauseResume:(id)sender;
|
|
|
|
|
|
|
|
- (IBAction)play:(id)sender;
|
|
|
|
- (IBAction)pause:(id)sender;
|
|
|
|
- (IBAction)resume:(id)sender;
|
|
|
|
- (IBAction)stop:(id)sender;
|
|
|
|
|
|
|
|
- (IBAction)next:(id)sender;
|
|
|
|
- (IBAction)prev:(id)sender;
|
|
|
|
- (IBAction)seek:(id)sender;
|
|
|
|
|
2007-02-26 05:26:48 +00:00
|
|
|
- (void)initDefaults;
|
2006-01-20 15:41:31 +00:00
|
|
|
|
|
|
|
- (void)updateTimeField:(double)pos;
|
|
|
|
|
|
|
|
- (void)playEntryAtIndex:(int)i;
|
|
|
|
- (void)playEntry:(PlaylistEntry *)pe;
|
|
|
|
|
|
|
|
@end
|