SPAudioEngine Class Reference
| Inherits from | NSObject |
| Declared in | SPAudioEngine.h |
Overview
The SPAudioEngine prepares the system for audio playback and controls global volume.
Before you play sounds, you should start an audio session. The type of the audio session defines how iOS will handle audio processing and how iPod music will mix with your audio.
SPAudioSessionCategory_AmbientSound:iPod music mixes with your audio, audio silences on muteSPAudioSessionCategory_SoloAmbientSound:iPod music is silenced, audio silences on muteSPAudioSessionCategory_MediaPlayback:iPod music is silenced, audio continues on muteSPAudioSessionCategory_RecordAudio:iPod music is silenced, used for audio recordingSPAudioSessionCategory_PlayAndRecord:iPod music is silenced, for simultaneous in- and outputSPAudioSessionCategory_AudioProcessing:For using an audio hardware codec or signal processor
Tasks
Methods
-
+ start:Starts an audio session with a specified category. Call this at the start of your application.
-
+ startStarts an audio session with with the category ‘SoloAmbientSound’.
-
+ stopStops the audio session. Call this before the application shuts down.
-
+ masterVolumeThe master volume for all audio. Default: 1.0
-
+ setMasterVolume:Set the master volume for all audio. Range: [0.0 - 1.0]
Class Methods
masterVolume
The master volume for all audio. Default: 1.0
+ (float)masterVolumeDiscussion
The master volume for all audio. Default: 1.0
Declared In
SPAudioEngine.hsetMasterVolume:
Set the master volume for all audio. Range: [0.0 - 1.0]
+ (void)setMasterVolume:(float)volumeDiscussion
Set the master volume for all audio. Range: [0.0 - 1.0]
Declared In
SPAudioEngine.hstart
Starts an audio session with with the category ‘SoloAmbientSound’.
+ (void)startDiscussion
Starts an audio session with with the category ‘SoloAmbientSound’.
Declared In
SPAudioEngine.h