BASS_CONFIG_IOS_SESSION config option


Audio session configuration on iOS.

BASS_SetConfig(
    BASS_CONFIG_IOS_SESSION,
    DWORD config
);

Parameters

configA combination of these flags.
BASS_IOS_SESSION_MIXAllow other apps to be heard at the same time. Enables AVAudioSessionCategoryOptionMixWithOthers.
BASS_IOS_SESSION_DUCKAllow other apps to be heard at the same time but reduce their volume level. Enables AVAudioSessionCategoryOptionDuckOthers.
BASS_IOS_SESSION_AMBIENTUse the "ambient" category.
BASS_IOS_SESSION_SPEAKERRoute the output to the speaker instead of the receiver. Enables AVAudioSessionCategoryOptionDefaultToSpeaker.
BASS_IOS_SESSION_DISABLEDisable BASS's audio session configuration management so that the app can handle that itself.

Remarks

By default, the audio session category is set to AVAudioSessionCategoryPlayback. If BASS_IOS_SESSION_AMBIENT is set then the category will be set to AVAudioSessionCategorySoloAmbient instead, or AVAudioSessionCategoryAmbient if BASS_IOS_SESSION_MIX or BASS_IOS_SESSION_DUCK is also set. If BASS_IOS_SESSION_SPEAKER is set or BASS_RecordInit has been called then the category will be set to AVAudioSessionCategoryPlayAndRecord (regardless of BASS_IOS_SESSION_AMBIENT). Descriptions of these categories and other options can be found in Apple's AVAudioSession documentation.

When BASS's audio session configuration management is disabled (BASS_IOS_SESSION_DISABLE is set), BASS will still activate the session during initialization and after an interruption but do nothing else. Except for the "No Sound" device, the BASS_CONFIG_DEV_PERIOD option is disabled by this; the AVAudioSession setPreferredIOBufferDuration method can be used instead.

The default setting is BASS_IOS_SESSION_MIX.

Platform-specific

This config option is only available on iOS.

See also

BASS_GetConfig, BASS_SetConfig, BASS_Init, BASS_RecordInit