HERE iOS SDK Developer's Guide

<NMAAudioManagerDelegate>

Protocol Summary

protocol <NMAAudioManagerDelegate>

Derived from: <NSObject>

A delegate interface for NMAAudioManager.

Include: NMAKit.framework/headers/NMAAudioManager.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for <NMAAudioManagerDelegate> – <NMAAudioManagerDelegate>

[For complete information, see the section Protocol Details]

See also:

NMAAudioManager::delegate

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

- @optional (BOOL) audioManager:(nonnull NMAAudioManager *) audioManager shouldPlayOutput:(nonnull NMAAudioOutput *) output

Called when the audio manager has output to play

- @optional (void) audioManagerDidPlayOutput:(nonnull NMAAudioManager *) audioManager

Called immediately after output is played by the NMAAudioManager

- @optional (void) audioManagerWillPlayOutput:(nonnull NMAAudioManager *) audioManager

Called immediately before output is played by the NMAAudioManager

Protocol Details

A delegate interface for NMAAudioManager.

Through the NMAAudioManagerDelegate protocol, a delegate object can be notified before audio playback starts and after playback completes. Optionally, the delegate may also decide to take responsibility for playing a particular output, or even to not play the output at all.

See also:

NMAAudioManager::delegate

Instance Method Details

- @optional (BOOL) audioManager:(nonnull NMAAudioManager *) audioManager shouldPlayOutput:(nonnull NMAAudioOutput *) output

Called when the audio manager has output to play.

If the delegate returns YES, or the delegate does not implement this method, the output is played immediately. If the delegate returns NO, the delegate takes over responsiblity for handling the output.

When the delegate takes responsibility for handling audio output, it may wish to delay the playback for a time. For example, in cases where the client application is managing the audio session, the delegate may require some time to properly configure the session before proceeding with playback. When the client application is ready to play the output, it does so by calling play .

If the delegate does not want the audio to be played at all, it must return NO from this method and call skipCurrentOutput . When NO is returned, the audio manager will be paused until either play is called on the output or skipCurrentOutput is called on the manager.

Note:

Some audio output (e.g. navigation voice commands) is time-sensitive and thus should not be delayed for any significant period of time. If a large delay is required for such output, it's better to just skip the output entirely.

- @optional (void) audioManagerDidPlayOutput:(nonnull NMAAudioManager *) audioManager

Called immediately after output is played by the NMAAudioManager.

Note:

This method will not be called if audioManager:shouldPlayOutput: returned NO.

- @optional (void) audioManagerWillPlayOutput:(nonnull NMAAudioManager *) audioManager

Called immediately before output is played by the NMAAudioManager.

Note:

This method will not be called if audioManager:shouldPlayOutput: returned NO.