Manages the playback of audio output from files or TTS. More...
#import <SYAudioManager.h>
Instance Methods | |
((unavailable("Use +[SYAudioManager sharedAudioManager] instead.") | - __attribute__ |
SYAudioManager is singleton, use [SYAudioManager sharedAudioManager] to access singleton instance. More... | |
(void) | - playOutput: |
Plays audio output asynchronously. 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. The given output won't be redirected, even if redirection is set up (redirectPCMOutput or redirectTTSOutput). 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. Note: if playback is requested with SYAudioManager.playOutput, it won't be redirected. 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. Note: if playback is requested with SYAudioManager.playOutput, it won't be redirected. More... | |
Class Methods | |
(nonnull SYAudioManager *) | + sharedAudioManager |
Accesses the SYAudioManager singleton instance. More... | |
((unavailable("Use +[SYAudioManager sharedAudioManager] instead.") | + __attribute__ |
Properties | |
id< SYAudioManagerDelegate > | delegate |
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... | |
Manages the playback of audio output from files or TTS.
+ (nonnull SYAudioManager*) sharedAudioManager |
Accesses the SYAudioManager singleton instance.
- ((unavailable("Use +[SYAudioManager sharedAudioManager] instead.") __attribute__ |
SYAudioManager is singleton, use [SYAudioManager sharedAudioManager] to access singleton instance.
+ ((unavailable("Use +[SYAudioManager sharedAudioManager] instead.") __attribute__ |
- (void) playOutput: | (nonnull SYAudioOutput *) | output |
Plays audio output asynchronously. 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. The given output won't be redirected, even if redirection is set up (redirectPCMOutput or redirectTTSOutput).
- (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.
- (void) stopOutputAndClearQueue |
Stops playing the current output immediately and clears any queued output.
- (void) clearQueue |
Removes all output from the audio queue Currently played output will be allowed to finish.
- (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. Note: if playback is requested with SYAudioManager.playOutput, it won't be redirected.
- (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. Note: if playback is requested with SYAudioManager.playOutput, it won't be redirected.
|
readwritenonatomicweak |
|
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.
|
readwritenonatomicassign |
The current audio output route. Effective only if SYAudioManager.managesAudioSession is set to YES.
|
readwritenonatomicassign |
Controls interaction with other audio sources. Effective only if SYAudioManager.managesAudioSession is set to YES.