BASS.NET API for the Un4seen BASS Audio Library

BASSiOSSession Enumeration

BASS.NET API for the Un4seen BASS Audio Library
Audio session configuration on iOS (flags for the BASS_CONFIG_IOS_SESSION option).

Namespace:  Un4seen.Bass
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public enum BASSiOSSession
Members

  Member nameValueDescription
BASS_IOS_SESSION_MIX1 Allow other audio to mix with the app's audio (enables kAudioSessionProperty_OverrideCategoryMixWithOthers).
BASS_IOS_SESSION_DUCK2 Also duck the other audio (enables kAudioSessionProperty_OtherMixableAudioShouldDuck).
BASS_IOS_SESSION_AMBIENT4 Use the ambient category (enables kAudioSessionCategory_SoloAmbientSound/AmbientSound instead of kAudioSessionCategory_MediaPlayback).
BASS_IOS_SESSION_SPEAKER8 Route the output to the speaker instead of the receiver. Enables AVAudioSessionCategoryOptionDefaultToSpeaker.
BASS_IOS_SESSION_DISABLE16 BASS's audio session configuration management so that the app can handle that itself.
BASS_IOS_SESSION_DEACTIVATE32 Deactivate the audio session when nothing is playing or recording. It is otherwise only deactivated when there are no initialized devices and during interruptions.
BASS_IOS_SESSION_AIRPLAY64 Allow playback on Airplay devices when recording (Airplay is always allowed when only playing). Enables AVAudioSessionCategoryOptionAllowAirPlay.
BASS_IOS_SESSION_BTHFP128 Allow Bluetooth HFP (hands-free) devices when recording (Bluetooth is always allowed when only playing). Enables AVAudioSessionCategoryOptionAllowBluetooth.
BASS_IOS_SESSION_BTA2DP256 Allow Bluetooth A2DP devices when recording (Bluetooth is always allowed when only playing). Enables AVAudioSessionCategoryOptionAllowBluetoothA2DP.
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.

See Also

Reference