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 mute
  • SPAudioSessionCategory_SoloAmbientSound: iPod music is silenced, audio silences on mute
  • SPAudioSessionCategory_MediaPlayback: iPod music is silenced, audio continues on mute
  • SPAudioSessionCategory_RecordAudio: iPod music is silenced, used for audio recording
  • SPAudioSessionCategory_PlayAndRecord: iPod music is silenced, for simultaneous in- and output
  • SPAudioSessionCategory_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.

  • + start

    Starts an audio session with with the category ‘SoloAmbientSound’.

  • + stop

    Stops the audio session. Call this before the application shuts down.

  • + masterVolume

    The 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)masterVolume

Discussion

The master volume for all audio. Default: 1.0

Declared In

SPAudioEngine.h

setMasterVolume:

Set the master volume for all audio. Range: [0.0 - 1.0]

+ (void)setMasterVolume:(float)volume

Discussion

Set the master volume for all audio. Range: [0.0 - 1.0]

Declared In

SPAudioEngine.h

start

Starts an audio session with with the category ‘SoloAmbientSound’.

+ (void)start

Discussion

Starts an audio session with with the category ‘SoloAmbientSound’.

Declared In

SPAudioEngine.h

start:

Starts an audio session with a specified category. Call this at the start of your application.

+ (void)start:(SPAudioSessionCategory)category

Discussion

Starts an audio session with a specified category. Call this at the start of your application.

Declared In

SPAudioEngine.h

stop

Stops the audio session. Call this before the application shuts down.

+ (void)stop

Discussion

Stops the audio session. Call this before the application shuts down.

Declared In

SPAudioEngine.h