SYAudioManager Class Reference

Manages the playback of audio output from files or TTS. More...

#import <SYAudioManager.h>

Inheritance diagram for SYAudioManager:
Collaboration diagram for SYAudioManager:

Instance Methods

((unavailable("Use +[SYAudioManager sharedAudioManager] instead.") - __attribute__
 SYAudioManager is singleton, use [SYAudioManager sharedAudioManager] to access singleton instance. More...
 
(void) - playOutput:
 Plays audio output. If audio output queue is empty, output will be played immediately. Otherwise it will be added to the end of the queue and played later. More...
 
(void) - skipCurrentOutput
 Skips the output at the front of the queue. If the current output has already started playing, it will be interrupted. The next output item in the queue will be played. More...
 
(void) - stopOutputAndClearQueue
 Stops playing the current output immediately and clears any queued output. More...
 
(void) - clearQueue
 Removes all output from the audio queue Currently played output will be allowed to finish. More...
 
(void) - redirectPCMOutput:
 Use this method to get raw PCM audio data and override SYAudioManager PCM audio output with custom solution. Pass nil to use default SYAudioManager PCM output. More...
 
(void) - redirectTTSOutput:
 Use this method to get TTS data and override SYAudioManager TTS output with custom solution. Pass nil to use default SYAudioManager TTS output. More...
 

Class Methods

(nonnull SYAudioManager *) + sharedAudioManager
 Accesses the SYAudioManager singleton instance. More...
 
((unavailable("Use +[SYAudioManager sharedAudioManager] instead.") + __attribute__
 

Properties

id< SYAudioManagerDelegatedelegate
 SYAudioManagerDelegate,. More...
 
BOOL managesAudioSession
 Controls whether the SYAudioManager manages the application's audio session. If managesAudioSession is YES, the SYAudioManager will change the type of the audio session and activate and deactivate the session as necessary to play SDK audio output. The default value is YES. More...
 
SYAudioRoute audioRoute
 The current audio output route. Effective only if SYAudioManager.managesAudioSession is set to YES. More...
 
SYAudioPlaybackMode playbackMode
 Controls interaction with other audio sources. Effective only if SYAudioManager.managesAudioSession is set to YES. More...
 

Detailed Description

Manages the playback of audio output from files or TTS.

Method Documentation

◆ __attribute__() [1/2]

- ((unavailable("Use +[SYAudioManager sharedAudioManager] instead.") __attribute__

SYAudioManager is singleton, use [SYAudioManager sharedAudioManager] to access singleton instance.

◆ __attribute__() [2/2]

+ ((unavailable("Use +[SYAudioManager sharedAudioManager] instead.") __attribute__

◆ clearQueue()

- (void) clearQueue

Removes all output from the audio queue Currently played output will be allowed to finish.

◆ playOutput:()

- (void) playOutput: (nonnull SYAudioOutput *)  output

Plays audio output. If audio output queue is empty, output will be played immediately. Otherwise it will be added to the end of the queue and played later.

◆ redirectPCMOutput:()

- (void) redirectPCMOutput: (nullable PCMDataReadyBlock)  customPCMPlay

Use this method to get raw PCM audio data and override SYAudioManager PCM audio output with custom solution. Pass nil to use default SYAudioManager PCM output.

◆ redirectTTSOutput:()

- (void) redirectTTSOutput: (nullable TTSDataReadyBlock)  customTTSPlay

Use this method to get TTS data and override SYAudioManager TTS output with custom solution. Pass nil to use default SYAudioManager TTS output.

◆ sharedAudioManager()

+ (nonnull SYAudioManager*) sharedAudioManager

Accesses the SYAudioManager singleton instance.

Returns
SYAudioManager instance.

◆ skipCurrentOutput()

- (void) skipCurrentOutput

Skips the output at the front of the queue. If the current output has already started playing, it will be interrupted. The next output item in the queue will be played.

◆ stopOutputAndClearQueue()

- (void) stopOutputAndClearQueue

Stops playing the current output immediately and clears any queued output.

Property Documentation

◆ audioRoute

- (SYAudioRoute) audioRoute
readwritenonatomicassign

The current audio output route. Effective only if SYAudioManager.managesAudioSession is set to YES.

◆ delegate

- (id<SYAudioManagerDelegate>) delegate
readwritenonatomicweak

◆ managesAudioSession

- (BOOL) managesAudioSession
readwritenonatomicassign

Controls whether the SYAudioManager manages the application's audio session. If managesAudioSession is YES, the SYAudioManager will change the type of the audio session and activate and deactivate the session as necessary to play SDK audio output. The default value is YES.

◆ playbackMode

- (SYAudioPlaybackMode) playbackMode
readwritenonatomicassign

Controls interaction with other audio sources. Effective only if SYAudioManager.managesAudioSession is set to YES.


The documentation for this class was generated from the following file: