MixingAudioPlayer Protocol Reference

Conforms to NSObject
Declared in AdaptrAudioPlayer.h

Overview

Internal protocol method

  eventDelegate required method

Delegate that receives events.

@property (nonatomic, strong) id<MixingAudioPlayerDelegate> _Nullable eventDelegate

Declared In

AdaptrAudioPlayer.h

  volume required method

Set or retrieve the audio volume.

@property (nonatomic) float volume

Declared In

AdaptrAudioPlayer.h

  normalizeVolume required method

When true (the default), the player will try to normalize song volumes

@property (nonatomic) BOOL normalizeVolume

Declared In

AdaptrAudioPlayer.h

  trimmingEnabled required method

When true, the player will honor start and end trim hinting.

@property (nonatomic) BOOL trimmingEnabled

Declared In

AdaptrAudioPlayer.h

  secondsOfCrossfade required method

This is the number of seconds that songs will overlap when transitioning between two songs. This defaults to 0.

@property (nonatomic) float secondsOfCrossfade

Declared In

AdaptrAudioPlayer.h

  crossfadeInEnabled required method

When this is true and secondsOfCrossfade > 0, then the song we are transitioning to will fade in during the crossfade. When this is false, then the song we are transitioning to will start at full volume while the first song starts fading out. This defaults to NO.

@property (nonatomic) BOOL crossfadeInEnabled

Declared In

AdaptrAudioPlayer.h

  state required method

Current state of the player. When this is changed, any registered delegate receives notice via ‘mixingAudioPlayerStateDidChange’ call

@property (nonatomic, readonly) AdaptrAudioPlayerPlaybackState state

Declared In

AdaptrAudioPlayer.h

  currentItem required method

Current item that we’re trying to play

@property (nonatomic, readonly) Audiofile *currentItem

Declared In

AdaptrAudioPlayer.h

  currentTime required method

Current time into the current item we’re playing, or kCMTimeZero

@property (nonatomic, readonly) CMTime currentTime

Declared In

AdaptrAudioPlayer.h

  currentDuration required method

Duration of the current item we’re playing, or kCMTimeZero

@property (nonatomic, readonly) CMTime currentDuration

Declared In

AdaptrAudioPlayer.h

– addItem: required method

Queue the given audio item into the player.

- (void)addItem:(nonnull Audiofile *)audioItem

Parameters

audioItem

audio item to queue up

Declared In

AdaptrAudioPlayer.h

– play required method

Begin or resume audio playback

- (void)play

Declared In

AdaptrAudioPlayer.h

– pause required method

Pause audio playback

- (void)pause

Declared In

AdaptrAudioPlayer.h

– skip required method

Skip to the next song. If playback was paused, this will resume playback.

- (void)skip

Declared In

AdaptrAudioPlayer.h

– skipWithCrossfade: required method

Skip to the next song. If playback was paused, this will resume playback.

- (void)skipWithCrossfade:(BOOL)applyCrossfade

Parameters

applyCrossfade

if true, the current song will fade out, rather than immediately stop

Declared In

AdaptrAudioPlayer.h

– flush required method

Stop playback and remove all items and queued up items from the player.

- (void)flush

Declared In

AdaptrAudioPlayer.h

– flushAndIncludeCurrentItem: required method

Remove all queued up items in the player and, optionally stop and unload the currently playing song.

- (void)flushAndIncludeCurrentItem:(BOOL)includeCurrentItem

Parameters

includeCurrentItem

if true, stop playback of current song and remove from player

Declared In

AdaptrAudioPlayer.h