Documentation

MKMusicPlayer class documentation

MKMusicPlayer : NSObject <Idle>

AuthorsGenerated by builder
Declared inMKMusicPlayer.h

Overview

MKMusicPlayer maintains a queue of files to play.


Default

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

Initialise with the specified output device.

    - (id) initWithDefaultDevice

    Initialise with the default output device.

      - (void) play

      Begin playing the current file.

        - (void) pause

        Pause playback.

          - (void) stop

          Stop playing and empty the queue.

            - (void) next

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

              - (int64_t) currentPosition

              Returns the position in the current file in milliseconds.

                - (void) seekTo: (int64_t)milliseconds

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

                  - (int64_t) duration

                  Returns the duration of the current file.

                    - (BOOL) isPlaying

                    Returns whether the file is playing.

                      - (NSURL *) currentURL

                      Returns the currently-playing URL.

                        - (void) addURL: (NSURL *)aURL

                        Add the specified file to the queue.

                          - (void) setQueue: (NSArray *)queue

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

                            - (int) volume

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

                              - (void) setVolume: (int)aVolume

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

                                - (int) queueSize

                                Returns the number of songs currently in the queue.