MKMusicPlayer class documentation

Authors

Generated by builder

Software documentation for the MKMusicPlayer class

MKMusicPlayer : NSObject

Declared in:
MKMusicPlayer.h
Conforms to:
Idle

MKMusicPlayer maintains a queue of files to play.


Instance Variables

Method summary

addURL: 

- (void) addURL: (NSURL*)aURL;

Add the specified file to the queue.


currentPosition 

- (int64_t) currentPosition;

Returns the position in the current file in milliseconds.


currentURL 

- (NSURL*) currentURL;

Returns the currently-playing URL.


duration 

- (int64_t) duration;

Returns the duration of the current file.


initWithDefaultDevice 

- (id) initWithDefaultDevice;

Initialise with the default output device.


initWithDevice: 

- (id) initWithDevice: (id<MKSoundDevice>)device;

Initialise with the specified output device.


isPlaying 

- (BOOL) isPlaying;

Returns whether the file is playing.


next 

- (void) next;

Skip to the next file. To get to the previous file, you must stop and recreate the queue.


pause 

- (void) pause;

Pause playback.


play 

- (void) play;

Begin playing the current file.


queueSize 

- (int) queueSize;

Returns the number of songs currently in the queue.


seekTo: 

- (void) seekTo: (int64_t)milliseconds;

Seeks a specified number of milliseconds into the currently-playing file.


setQueue: 

- (void) setQueue: (NSArray*)queue;

Replace the queue with the specified array of NSURLs. Pass a NSArray, not a NSMutableArray.


setVolume: 

- (void) setVolume: (int)aVolume;

Sets the current volume to a value from 0 to 100.


stop 

- (void) stop;

Stop playing and empty the queue.


volume 

- (int) volume;

Returns the current volume, in the range 0 to 100.




Instance Variables for MKMusicPlayer Class

buffer

@protected int16_t* buffer;
Description forthcoming.

bufferSpace

@protected size_t bufferSpace;
Description forthcoming.

file

@protected MKMediaFile* file;
Description forthcoming.

files

@protected NSMutableArray* files;
Description forthcoming.

playing

@protected BOOL playing;
Description forthcoming.

speaker

@protected id speaker;
Description forthcoming.