MixingAudioPlayerDelegate Protocol Reference

Conforms to NSObject
Declared in AdaptrAudioPlayer.h

Overview

Internal Delegate

– mixingAudioPlayerItemIsReadyForPlayback: required method

This is triggered when the player is READY_TO_PLAY and we have buffered audio so that playback may begin immediately. This is also triggered for songs that are queued up in the background so that we can switch to them as soon as they are queued up, if desired.

- (void)mixingAudioPlayerItemIsReadyForPlayback:(nonnull Audiofile *)item

Parameters

item

the audio item ready for playback

Discussion

Note that if the player is STALLED or WAITING_FOR_ITEM then this event won’t be triggered - the audio will just begin playback.

Declared In

AdaptrAudioPlayer.h

– mixingAudioPlayerItemDidBeginPlayback:waitingTimeForPlayBack:bufferingTimeforItem: required method

The player started playback of the given audio item.

- (void)mixingAudioPlayerItemDidBeginPlayback:(nonnull Audiofile *)item waitingTimeForPlayBack:(NSTimeInterval)waitingTime bufferingTimeforItem:(NSTimeInterval)bufferingTime

Parameters

item

the audio item that started playback @parm waiting time before playback started @parm buffering time for the item

Declared In

AdaptrAudioPlayer.h

– mixingAudioPlayerItemDidFinishPlayback:dueToReason:andError: required method

The player finished playback of the given audio item.

- (void)mixingAudioPlayerItemDidFinishPlayback:(nonnull Audiofile *)item dueToReason:(MixingAudioPlayerCompletionReason)reason andError:(NSError *_Nullable)error

Parameters

item

item the audio item that finished playback

reason

reason the playback completed for this item

error

the error (if any) that stopped playback

Declared In

AdaptrAudioPlayer.h

– mixingAudioPlayerItemDidFailToPrepare:withError: required method

The player was unable to prepare or retrieve the given audio item for playback.

- (void)mixingAudioPlayerItemDidFailToPrepare:(nonnull Audiofile *)item withError:(NSError *_Nullable)error

Parameters

item

the item that was not preparable or retrievable

error

the error that caused the prepare to fail

Declared In

AdaptrAudioPlayer.h

– mixingAudioPlayerStateDidChange: required method

The player changed state.

- (void)mixingAudioPlayerStateDidChange:(AdaptrAudioPlayerPlaybackState)state

Parameters

state

the new state of the player

Declared In

AdaptrAudioPlayer.h

– mixingAudioPlayerPlaybackDidElapse: required method

This is called every .5 seconds to indicate playback time has elapsed

- (void)mixingAudioPlayerPlaybackDidElapse:(CMTime)elapsedTime

Declared In

AdaptrAudioPlayer.h

– mixingAudioPlayerError: required method

Report errors back to Feed.fm

- (void)mixingAudioPlayerError:(NSString *_Nullable)description

Declared In

AdaptrAudioPlayer.h