BASS.NET API for the Un4seen BASS Audio Library

BASSConfig Enumeration

BASS.NET API for the Un4seen BASS Audio Library

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

public enum BASSConfig
Members

  Member nameValueDescription
BASS_CONFIG_BUFFER0 Playback buffer length.

length (int): The buffer length in milliseconds. The minimum length is 1ms above the update period (see BASS_CONFIG_UPDATEPERIOD), the maximum is 5000 milliseconds. If the length specified is outside this range, it is automatically capped.

The default buffer length is 500 milliseconds. Increasing the length, decreases the chance of the sound possibly breaking-up on slower computers, but also increases the latency for DSP/FX.

Small buffer lengths are only required if the sound is going to be changing in real-time, for example, in a soft-synth. If you need to use a small buffer, then the minbuf member of BASS_INFO should be used to get the recommended minimum buffer length supported by the device and it's drivers. Even at this default length, it's still possible that the sound could break up on some systems, it's also possible that smaller buffers may be fine. So when using small buffers, you should have an option in your software for the user to finetune the length used, for optimal performance.

Using this config option only affects the HMUSIC/HSTREAM channels that you create afterwards, not the ones that have already been created. So you can have channels with differing buffer lengths by using this config option each time before creating them.

If automatic updating is disabled, make sure you call BASS_Update(Int32) frequently enough to keep the buffers updated.

BASS_CONFIG_UPDATEPERIOD1 The update period of HSTREAM and HMUSIC channel playback buffers.

period (int): The update period in milliseconds... 0 = disable automatic updating. The minimum period is 5ms, the maximum is 100ms. If the period specified is outside this range, it is automatically capped.

The update period is the amount of time between updates of the playback buffers of HSTREAM/HMUSIC channels. Shorter update periods allow smaller buffers to be set with the BASS_CONFIG_BUFFER option, but as the rate of updates increases, so the overhead of setting up the updates becomes a greater part of the CPU usage. The update period only affects HSTREAM and HMUSIC channels, it does not affect samples. Nor does it have any effect on decoding channels, as they are not played.

BASS creates one or more threads (determined by BASS_CONFIG_UPDATETHREADS) specifically to perform the updating, except when automatic updating is disabled (period=0) - then you must regularly call BASS_Update(Int32) or BASS_ChannelUpdate(Int32, Int32)instead. This allows you to synchronize BASS's CPU usage with your program's. For example, in a game loop you could call BASS_Update(Int32) once per frame, which keeps all the processing in sync so that the frame rate is as smooth as possible. BASS_Update should be called at least around 8 times per second, even more often if the BASS_CONFIG_BUFFER option is used to set smaller buffers.

The update period can be altered at any time, including during playback. The default period is 100ms.

BASS_CONFIG_GVOL_SAMPLE4 Global sample volume.

volume (int): Sample global volume level... 0 (silent) - 10000 (full).

This config option allows you to have control over the volume levels of all the samples, which is useful for setup options (eg. separate music and fx volume controls).

A channel's final volume = channel volume * global volume / max volume. So, for example, if a stream channel's volume is 0.5 and the global stream volume is 8000, then effectively the stream's volume level is 0.4 (0.5 * 8000 / 10000 = 0.4).

BASS_CONFIG_GVOL_STREAM5 Global stream volume.

volume (int): Stream global volume level... 0 (silent) - 10000 (full).

This config option allows you to have control over the volume levels of all streams, which is useful for setup options (eg. separate music and fx volume controls).

A channel's final volume = channel volume * global volume / max volume. So, for example, if a stream channel's volume is 0.5 and the global stream volume is 8000, then effectively the stream's volume level is 0.4 (0.5 * 8000 / 10000 = 0.4).

BASS_CONFIG_GVOL_MUSIC6 Global music volume.

volume (int): MOD music global volume level... 0 (silent) - 10000 (full).

This config option allows you to have control over the volume levels of all the MOD musics, which is useful for setup options (eg. separate music and fx volume controls).

A channel's final volume = channel volume * global volume / max volume. So, for example, if a stream channel's volume is 0.5 and the global stream volume is 8000, then effectively the stream's volume level is 0.4 (0.5 * 8000 / 10000 = 0.4).

BASS_CONFIG_CURVE_VOL7 Volume translation curve.

logvol (bool): Volume curve... = linear, = logarithmic.

DirectSound uses logarithmic volume and panning curves, which can be awkward to work with. For example, with a logarithmic curve, the audible difference between 10000 and 9000, is not the same as between 9000 and 8000. With a linear "curve" the audible difference is spread equally across the whole range of values, so in the previous example the audible difference between 10000 and 9000, and between 9000 and 8000 would be identical.

When using the linear curve, the volume range is from 0% (silent) to 100% (full). When using the logarithmic curve, the volume range is from -100 dB (effectively silent) to 0 dB (full). For example, a volume level of 0.5 is 50% linear or -50 dB logarithmic.

The linear curve is used by default.

BASS_CONFIG_CURVE_PAN8 Panning translation curve.

logpan (bool): Panning curve... = linear, = logarithmic.

The panning curve affects panning in exactly the same way as the volume curve (BASS_CONFIG_CURVE_VOL) affects the volume.

The linear curve is used by default.

BASS_CONFIG_FLOATDSP9 Pass 32-bit floating-point sample data to all DSP functions?

floatdsp (bool): If , 32-bit floating-point sample data is passed to all DSPPROC callback functions.

Normally DSP functions receive sample data in whatever format the channel is using, ie. it can be 8, 16 or 32-bit. But using this config option, BASS will convert 8/16-bit sample data to 32-bit floating-point before passing it to DSP functions, and then convert it back after all the DSP functions are done. As well as simplifying the DSP code (no need for 8/16-bit processing), this also means that there is no degradation of quality as sample data passes through a chain of DSP.

This config option also applies to effects set via BASS_ChannelSetFX(Int32, BASSFXType, Int32), except for DX8 effects when using the "With FX flag" DX8 effect implementation.

Changing the setting while there are DSP or FX set could cause problems, so should be avoided.

Platform-specific: On Android and Windows CE, 8.24 bit fixed-point is used instead of floating-point. Floating-point DX8 effect processing requires DirectX 9 (or above) on Windows.

BASS_CONFIG_3DALGORITHM10 The 3D algorithm for software mixed 3D channels.

algo (int): Use one of the BASS3DAlgorithm flags.

These algorithms only affect 3D channels that are being mixed in software. BASS_ChannelGetInfo(Int32, BASS_CHANNELINFO) can be used to check whether a channel is being software mixed.

Changing the algorithm only affects subsequently created or loaded samples, musics, or streams; it does not affect any that already exist.

On Windows, DirectX 7 or above is required for this option to have effect. On other platforms, only the BASS_3DALG_DEFAULT and BASS_3DALG_OFF options are available.

BASS_CONFIG_NET_TIMEOUT11 Time to wait for a server to respond to a connection request.

timeout (int): The time to wait, in milliseconds.

The default timeout is 5 seconds (5000 milliseconds).

The BASS_CONFIG_THREAD flag can be used to make the setting specific to the current thread. When that is non-zero, it will override the global setting in the current thread.

When playlist processing is enabled via the BASS_CONFIG_NET_PLAYLIST option, the timeout applies to each playlist entry rather than the playlist as a whole.

BASS_CONFIG_NET_BUFFER12 The internet download buffer length.

length (int): The buffer length, in milliseconds.

Increasing the buffer length decreases the chance of the stream stalling, but also increases the time taken by BASS_StreamCreateURL(String, Int32, BASSFlag, DOWNLOADPROC, IntPtr) to create the stream, as it has to pre-buffer more data (adjustable via the BASS_CONFIG_NET_PREBUF option). Aside from the pre-buffering, this setting has no effect on streams without either the BASS_STREAM_BLOCK or BASS_STREAM_RESTRATE flags.

When streaming in blocks, this option determines the download buffer length. The effective buffer length can actually be a bit more than that specified, including data that has been read from the buffer by the decoder but not yet decoded.

The BASS_CONFIG_THREAD flag can be used to make the setting specific to the current thread. This config option also determines the buffering used by "buffered" user file streams created with BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr).

The default buffer length is 5 seconds (5000 milliseconds). The net buffer length should be larger than the length of the playback buffer (BASS_CONFIG_BUFFER), otherwise the stream is likely to briefly stall soon after starting playback.

Using this config option only affects streams created afterwards, not any that have already been created.

BASS_CONFIG_PAUSE_NOPLAY13 Prevent channels being played when the output is paused?

noplay (bool): If , channels can't be played while the output is paused.

When the output is paused using BASS_Pause, and this config option is enabled, channels can't be played until the output is resumed using BASS_Start. Attempts to play a channel will give a BASS_ERROR_START error.

By default, this config option is enabled.

BASS_CONFIG_NET_PREBUF15 Amount to pre-buffer when opening internet streams.

prebuf (int): Amount (percentage) to pre-buffer.

This setting determines what percentage of the buffer length (BASS_CONFIG_NET_BUFFER) should be filled by BASS_StreamCreateURL(String, Int32, BASSFlag, DOWNLOADPROC, IntPtr). The default is 75%. Setting this lower (eg. 0) is useful if you want to display a "buffering progress" (using BASS_StreamGetFilePosition(Int32, BASSStreamFilePosition)) when opening internet streams, but note that this setting is just a minimum - BASS will always pre-download a certain amount to verify the stream.

The pre-buffering can be done by BASS_StreamCreateURL(String, Int32, BASSFlag, DOWNLOADPROC, IntPtr) or asynchronously, depending on the BASS_CONFIG_NET_PREBUF_WAIT setting.

As well as internet streams, this config setting also applies to "buffered" user file streams created with BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr).

BASS_CONFIG_NET_AGENT16 The "User-Agent" request header sent to servers.

agent (string pointer): The "User-Agent" header.

BASS makes a copy of the provided string, so it does not need to persist beyond the call. Changes take effect from the next internet stream creation call.

On Windows and Windows CE, the BASS_UNICODE flag can be used with a UTF-16 string.

BASS_CONFIG_NET_PROXY17 Proxy server settings (in the form of "user:pass@server:port"... = don't use a proxy).

proxy (string pointer): The proxy server settings, in the form of "user:pass@server:port"... NULL = don't use a proxy. "" (empty string) = use the OS's default proxy settings. If only the "user:pass@" part is specified, then those authorization credentials are used with the default proxy server. If only the "server:port" part is specified, then that proxy server is used without any authorization credentials.

makes a copy of the provided string, so it does not need to persist beyond the call. Changes take effect from the next internet stream creation call.

On Windows and Windows CE, the BASS_UNICODE flag can be used with a UTF-16 string.

BASS_CONFIG_NET_PASSIVE18 Use passive mode in FTP connections?

passive (bool): If , passive mode is used, otherwise normal/active mode is used.

Changes take effect from the next internet stream creation call. By default, passive mode is enabled.

BASS_CONFIG_REC_BUFFER19 The buffer length for recording channels.

length (int): The buffer length in milliseconds... 10 (min) - 5000 (max). If the length specified is outside this range, it is automatically capped.

Unlike a playback buffer, where the aim is to keep the buffer full, a recording buffer is kept as empty as possible and so this setting has no effect on latency. The default recording buffer length is 2000 milliseconds. Unless processing of the recorded data could cause significant delays, or you want to use a large recording period with BASS_RecordStart(Int32, Int32, BASSFlag, RECORDPROC, IntPtr), there should be no need to increase this.

Using this config option only affects the recording channels that are created afterwards, not any that have already been created. So you can have channels with differing buffer lengths by using this config option each time before creating them.

BASS_CONFIG_NET_PLAYLIST21 Process URLs in PLS, M3U, WPL or ASX playlists?

netlists (int): When to process URLs in PLS, M3U, WPL or ASX playlists... 0 = never, 1 = in BASS_StreamCreateURL(String, Int32, BASSFlag, DOWNLOADPROC, IntPtr) only, 2 = in BASS_StreamCreateFile(String, Int64, Int64, BASSFlag) and BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr) too.

When enabled, BASS will process PLS, M3U, WPL and ASX playlists, going through each entry until it finds a URL that it can play. By default, playlist procesing is disabled.

BASS_CONFIG_MUSIC_VIRTUAL22 The maximum number of virtual channels to use in the rendering of IT files.

number (int): The number of virtual channels... 1 (min) to 512 (max). If the value specified is outside this range, it is automatically capped.

This setting only affects IT files, as the other MOD music formats do not have virtual channels. The default setting is 64. Changes only apply to subsequently loaded files, not any that are already loaded.

BASS_CONFIG_VERIFY23 The amount of data to check in order to verify/detect the file format.

length (int): The amount of data to check, in bytes... 1000 (min) to 100000 (max). If the value specified is outside this range, it is automatically capped.

Of the file formats supported as standard, this setting only affects the detection of MP3/MP2/MP1 formats, but it may also be used by add-ons (see the documentation). For internet (and "buffered" user file) streams, a quarter of the length is used, up to a minimum of 1000 bytes.

The verification length excludes any tags that may be at the start of the file. The default length is 16000 bytes.

For internet (and "buffered" user file) streams, the BASS_CONFIG_VERIFY_NET setting determines how much data is checked.

BASS_CONFIG_UPDATETHREADS24 The number of threads to use for updating playback buffers.

threads (int): The number of threads to use... 0 = disable automatic updating.

The number of update threads determines how many HSTREAM/HMUSIC channel playback buffers can be updated in parallel; each thread can process one channel at a time. The default is to use a single thread, but additional threads can be used to take advantage of multiple CPU cores. There is generally nothing much to be gained by creating more threads than there are CPU cores, but one benefit of using multiple threads even with a single CPU core is that a slow updating channel need not delay the updating of other channels.

When automatic updating is disabled (threads = 0), BASS_Update(Int32) or BASS_ChannelUpdate(Int32, Int32) should be used instead.

The number of update threads can be changed at any time, including during playback.

Platform-specific: The number of update threads is limited to 1 on Windows CE platforms.

BASS_CONFIG_DEV_BUFFER27 Linux, Android and CE only: The output device buffer length.

length (int): The buffer length in milliseconds.

The device buffer is where the final mix of all playing channels is placed, ready for the device to play. Its length affects the latency of things like starting and stopping playback of a channel, so you will probably want to avoid setting it unnecessarily high, but setting it too short could result in breaks in the output.

When using a large device buffer, the BASS_ATTRIB_NOBUFFER attribute could be used to skip the channel buffering stage, to avoid further increasing latency for real-time generated sound and/or DSP/FX changes.

Changes to this config setting only affect subsequently initialized devices, not any that are already initialized.

This config option is only available on Linux, Android and Windows CE. The device's buffer is determined automatically on other platforms.

Platform-specific: On Linux, the driver may choose to use a different buffer length if it decides that the specified length is too short or long. The buffer length actually being used can be obtained with BASS_INFO, like this: latency + minbuf / 2.

BASS_CONFIG_REC_LOOPBACK28 Include loopback devices in the device enumeration.

errors (bool): Include loopback devices? (default is ).

BASS_CONFIG_VISTA_TRUEPOS30 Enable true play position mode on Windows Vista and newer?

truepos (bool): If enabled, DirectSound's 'true play position' mode is enabled on Windows Vista and newer (default is ).

Unless this option is enabled, the reported playback position will advance in 10ms steps on Windows Vista and newer. As well as affecting the precision of BASS_ChannelGetPosition(Int32, BASSMode), this also affects the timing of non-mixtime syncs. When this option is enabled, it allows finer position reporting but it also increases latency

The default setting is enabled. Changes only affect channels that are created afterwards, not any that already exist. The latency and minbuf values in the BASS_INFO structure reflect the setting at the time of the device's BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) call.

BASS_CONFIG_IOS_SESSION34 Audio session configuration on iOS.

config (BASSiOSSession a combination of these flags)

BASS_IOS_SESSION_MIX = allow other audio to mix with the app's audio (enables kAudioSessionProperty_OverrideCategoryMixWithOthers).

BASS_IOS_SESSION_DUCK = also 'duck' the other audio (enables kAudioSessionProperty_OtherMixableAudioShouldDuck).

BASS_IOS_SESSION_AMBIENT = use the 'ambient' category (enables kAudioSessionCategory_SoloAmbientSound/AmbientSound instead of kAudioSessionCategory_MediaPlayback).

BASS_IOS_SESSION_SPEAKER = Route the output to the speaker instead of the receiver. Enables AVAudioSessionCategoryOptionDefaultToSpeaker.

BASS_IOS_SESSION_AIRPLAY = Allow playback on Airplay devices when recording (Airplay is always allowed when only playing). Enables AVAudioSessionCategoryOptionAllowAirPlay.

BASS_IOS_SESSION_BTHFP = Allow Bluetooth HFP (hands-free) devices when recording (Bluetooth is always allowed when only playing). Enables AVAudioSessionCategoryOptionAllowBluetooth.

BASS_IOS_SESSION_BTA2DP = Allow Bluetooth A2DP devices when recording (Bluetooth is always allowed when only playing). Enables AVAudioSessionCategoryOptionAllowBluetoothA2DP.

BASS_IOS_SESSION_DEACTIVATE = 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_DISABLE = Disable BASS's audio session configuration management so that the app can handle that itself.

The default setting is BASS_IOS_SESSION_MIX + BASS_IOS_SESSION_BTHFP.

When using AAC encoding (via BASS_Encode_StartCA), BASS_CONFIG_IOS_MIXAUDIO needs to be set to 0.

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.

BASS_CONFIG_IOS_MIXAUDIO34 iOS only: Sets the mixing (kAudioSessionProperty_OverrideCategoryMixWithOthers) option.

mixing (int): 1 = allow other audio to mix with the app's audio (enables kAudioSessionProperty_OverrideCategoryMixWithOthers), 2 = also "duck" the other audio (enables kAudioSessionProperty_OtherMixableAudioShouldDuck), 4 = use the "ambient" category (enables kAudioSessionCategory_SoloAmbientSound/AmbientSound instead of kAudioSessionCategory_MediaPlayback). The default setting is 1.

When using AAC encoding (via BASS_Encode_StartCA), BASS_CONFIG_IOS_MIXAUDIO needs to be set to 0.

BASS_CONFIG_MP3_ERRORS35 Suppress silencing for corrupted MP3 frames.

errors (bool): Suppress error correction silences? (default is ).

When BASS is detecting some corruption in an MP3 file's Huffman coding, it silences the frame to avoid any unpleasent noises that can result from corruption. Set this parameter to in order to suppress this behavior and

This applies only to the regular BASS version and NOT the "mp3-free" version.

BASS_CONFIG_DEV_DEFAULT36 Include a 'Default' entry in the output device list?

default (bool): If , a 'Default' device will be included in the device list (default).

This option adds a 'Default' entry to the output device list, which maps to the device that is currently the system's default. Its output will automatically switch over when the system's default device setting changes.

When enabled, the "Default" device will also become the default device to BASS_Init (with device = -1). Both it and the device that it currently maps to will have the BASS_DEVICE_DEFAULT flag set by BASS_GetDeviceInfo(Int32, BASS_DEVICEINFO).

This option is enabled by default, and can only be disabled before BASS_GetDeviceInfo(Int32, BASS_DEVICEINFO) or BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) has been called.

Platform-specific: This config option is only available on Windows and macOS (a 'Default' entry is always included on other platforms). On Windows, the automatic device switching feature requires Windows Vista or above (Windows 7 when DirectSound is used). BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) can be called with the BASS_DEVICE_REINIT flag to manually switch to the new default device on older Windows.

When the 'Default' device is used with DirectSound, the BASS_SetVolume(Single) and BASS_GetVolume functions work a bit differently to usual; they deal with the 'session' volume, which only affects the current process's output on the device, rather than the device's volume.

BASS_CONFIG_NET_READTIMEOUT37 The time to wait for a server to deliver more data for an internet stream.

timeout (int): The time to wait in milliseconds (default=0, no timeout).

When the timeout is hit, the connection with the server will be closed. The default setting is 0, no timeout. Changes only affect subsequently created streams, not any that already exist.

The BASS_CONFIG_THREAD flag can be used to make the setting specific to the current thread. When that is non-zero, it will override the global setting in the current thread.

BASS_CONFIG_VISTA_SPEAKERS38 Enable speaker assignment with panning/balance control on Windows Vista and newer?

enable (bool): If , speaker assignment with panning/balance control is enabled on Windows Vista and newer.

Panning/balance control via the BASS_ATTRIB_PAN attribute is not available when speaker assignment is used on Windows due to the way that the speaker assignment needs to be implemented there. The situation is improved with Windows Vista, and speaker assignment can generally be done in a way that does permit panning/balance control to be used at the same time, but there may still be some drivers that it does not work properly with, so it is disabled by default and can be enabled via this config option. Changes only affect channels that are created afterwards, not any that already exist.

Platform-specific: This config option is only available on Windows. It is available on all Windows versions (not including CE), but only has effect on Windows Vista and newer. Speaker assignment with panning/balance control is always possible on other platforms, where BASS generates the final mix.

BASS_CONFIG_IOS_SPEAKER39 iOS only: Send the output to the speaker instead of the receiver?

mixing (int): When set to 1, sends the output to the speaker instead of the receiver (enables kAudioSessionProperty_OverrideCategoryDefaultToSpeaker). The default setting is 0 (off).

BASS_CONFIG_MF_DISABLE40 Disable the use of Media Foundation?

enable (bool): Disable Media Foundation?

This option determines whether Media Foundation codecs can be used to decode files and streams. It is set to by default when Media Foundation codecs are available, which is on Windows 7 and above, and updated versions of Vista. It will otherwise be and read-only.

BASS_CONFIG_HANDLES41 Gets the total number of HSTREAM/HSAMPLE/HMUSIC/HRECORD handles.

none: only used with BASS_GetConfig(BASSConfig).

The handle count may not only include the app-created stuff but also internal stuff, eg. BASS_WASAPI_Init will create a stream when the BASS_WASAPI_BUFFER flag is used.

BASS_CONFIG_UNICODE42 Gets or Sets the Unicode character set in device information.

utf8 (bool): If , device information will be in UTF-8 form. Otherwise it will be ANSI.

This config option determines what character set is used in the BASS_DEVICEINFO structure and by the BASS_RecordGetInputName(Int32) function. The default setting is ANSI, and it can only be changed before BASS_GetDeviceInfo(Int32, BASS_DEVICEINFO) or BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) or BASS_RecordGetDeviceInfo(Int32, BASS_DEVICEINFO) or BASS_RecordInit(Int32) has been called.

Platform-specific: This config option is only available on Windows.

BASS_CONFIG_SRC43 Gets or Sets the default sample rate conversion quality.

quality (int): The sample rate conversion quality... 0 = linear interpolation, 1 = 8 point sinc interpolation, 2 = 16 point sinc interpolation, 3 = 32 point sinc interpolation, 4 = 64 point sinc interpolation. Other values are also accepted.

This config option determines what sample rate conversion quality new channels will initially have, except for sample channels (HCHANNEL), which use the BASS_CONFIG_SRC_SAMPLE setting. A channel's sample rate conversion quality can subsequently be changed via the BASS_ATTRIB_SRC attribute (see BASS_ChannelSetAttribute(Int32, BASSAttribute, Single)).

The default setting is 1 (8 point sinc interpolation) or 2 when SSE is available (16 point sinc interpolation).

BASS_CONFIG_SRC_SAMPLE44 Gets or Sets the default sample rate conversion quality for samples.

quality (int): The sample rate conversion quality... 0 = linear interpolation, 1 = 8 point sinc interpolation, 2 = 16 point sinc interpolation, 3 = 32 point sinc interpolation. Other values are also accepted.

This config option determines what sample rate conversion quality a new sample channel will initially have, following a BASS_SampleGetChannel(Int32, BASSFlag) call. The channel's sample rate conversion quality can subsequently be changed via the BASS_ATTRIB_SRC attribute (see BASS_ChannelSetAttribute(Int32, BASSAttribute, Single)).

The default setting is 0 (linear interpolation).

BASS_CONFIG_ASYNCFILE_BUFFER45 The buffer length for asynchronous file reading (default setting is 65536 bytes (64KB)).

length (int): The buffer length in bytes. This will be rounded up to the nearest 4096 byte (4KB) boundary.

This determines the amount of file data that can be read ahead of time with asynchronous file reading. Changes only affect streams that are created afterwards, not any that already exist. So it is possible to have streams with differing buffer lengths by using this config option before creating each of them.

When asynchronous file reading is enabled, the buffer level is available from BASS_StreamGetFilePosition(Int32, BASSStreamFilePosition).

BASS_CONFIG_IOS_NOTIFY46 iOS only: Sets a callback function to receive notification of interruptions.

proc (callback): The IOSNOTIFYPROC callback delegate to use.

You can use that instead of AudioSessionInitialize to receive the interruption notifications

BASS_CONFIG_OGG_PRESCAN47 Pre-scan chained OGG files?

prescan (bool): If , chained OGG files are pre-scanned.

This option is enabled by default, and is equivalent to including the BASS_STREAM_PRESCAN flag in a BASS_StreamCreateFile(String, Int64, Int64, BASSFlag) call when opening an OGG file. It can be disabled if seeking and an accurate length reading are not required from chained OGG files, for faster stream creation.

BASS_CONFIG_MF_VIDEO48 Play the audio from video files using Media Foundation?

video (bool): If (default) BASS will Accept video files.

This config option is only available on Windows, and only has effect on Windows Vista and newer.

BASS_CONFIG_AIRPLAY49 OSX only: Gets or Sets which Airplay receivers are enabled.

receivers (int): Enabled receivers... the 1st bit is the 1st reciever, the 2nd bit is the 2nd receiver, etc. If a bit is set, then the corresponding receiver is enabled.

This config option determines which Airplay receivers will receive the sound when the Airplay output device is used. The receiver configuration is a global setting, so changes will also affect any other software that uses the Airplay device.

BASS_GetDeviceInfo(Int32, BASS_DEVICEINFO) can be used to enumerate the available Airplay receivers. Unlike the output device list, where entries are never removed (the BASS_DEVICE_ENABLED flag is just unset), entries may be removed from the Airplay receiver list as it only contains receivers that are currently available. That means you should not depend on the bit indexes remaining constant.

BASS_CONFIG_DEV_NONSTOP50 Do not stop the output device when nothing is playing?

nonstop (bool): If , sample data will continue to be sent to the output device while nothing is playing.

By default, BASS will stop sending data to the output device when nothing is playing, to save a little CPU. When that happens, the device buffer will become empty, and the next playback will begin more quickly as a result. If more consistent playback latency (around the value given by BASS_GetInfo(BASS_INFO)) is wanted, this option can be enabled to keep the device buffer filled with silence when nothing is playing. The output will still be stopped by BASS_Stop.

The output stopping when nothing is playing does not apply on OSX or iOS, so this config option is not available on those platforms.

BASS_CONFIG_IOS_NOCATEGORY51 Disable BASS's audio session category management?

nocat (bool): If , BASS stops handling the Audio Session options.

When this option is enabled , it disables BASS's audio session category management so that the app can handle that itself. The BASS_CONFIG_IOS_MIXAUDIO/SPEAKER and BASS_CONFIG_DEV_BUFFER settings will have no effect in the case.

BASS_CONFIG_VERIFY_NET52 The amount of data to check in order to verify/detect the file format of internet streams.

length (int): The amount of data to check, in bytes... 1000 (min) to 1000000 (max), or 0 = 25% of the BASS_CONFIG_VERIFY setting (with a minimum of 1000 bytes). If the value specified is outside this range, it is automatically capped.

Of the file formats supported as standard, this setting only affects the detection of MP3/MP2/MP1 formats, but it may also be used by add-ons (see the documentation). The verification length excludes any tags that may be found at the start of the file. The default setting is 0, which means 25% of the BASS_CONFIG_VERIFY setting.

As well as internet streams, this config setting also applies to "buffered" user file streams created with BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr).

BASS_CONFIG_DEV_PERIOD53 The output device update period.

period (int): The update period in milliseconds, or in samples if negative.

The device update period determines how often data is generated and placed in an output device's buffer. A shorter period allows a smaller buffer and lower latency but may use more CPU than a longer period.

The system may choose to use a different period if the requested one is too short or long, or needs rounding for granularity. The period actually being used can be obtained with BASS_GetInfo(BASS_INFO) (the minbuf value).

The default setting is 10ms. Changes only affect subsequently initialized devices, not any that are already initialized.

Platform-specific:

On Windows, this config option only applies pre-Vista and to the 'No Sound' device, the period is otherwise set by Windows (usually 10ms). On iOS, except on the 'No Sound' device, negative (samples) settings are ignored and changes take immediate effect rather than being delayed until the next device initialization. On Windows CE, the default setting is 50ms.

BASS_CONFIG_FLOAT54 Floating-point sample data is supported?

This is a read-only config option that indicates whether floating-point sample data is supported, eg. the BASS_SAMPLE_FLOAT flag. A value of 0 means it is not. Floating-point data is not supported on platforms/architectures that do not have an FPU, eg. older ARM platforms/architectures.

When floating-point data is not supported, the BASS_CONFIG_FLOATDSP option is still available, but it will result in DSPPROC functions receiving 8.24 fixed-point data instead of floating-point.

BASS_CONFIG_NET_SEEK56 Determines the maximum forward seek that will be allowed when creating an internet or buffered user file stream.

length (int): the maximum forward seek that will be allowed.

The seeking involves downloading up to the requested position, so there needs to be some limit to avoid potentially pre-downloading massive files entirely, eg. to read ID3v1 tags from the end.

BASS_CONFIG_AM_DISABLE58 Disable the use of Android media codecs?
BASS_CONFIG_NET_PLAYLIST_DEPTH59 Maximum nested playlist processing depth.

depth (int): Maximum nested playlist processing depth... 0 = do not process nested playlists.

When playlist processing is enabled via the BASS_CONFIG_NET_PLAYLIST option, this option limits how deep into nested playlists BASS_StreamCreateURL will go. The default depth is 1, which means playlists within the root playlist will be processed, but not playlists within those playlists.

BASS_CONFIG_NET_PREBUF_WAIT60 Wait for pre-buffering when opening internet streams?

wait (bool): Wait for pre-buffering... = no, = yes.

This setting determines whether BASS_StreamCreateURL(String, Int32, BASSFlag, DOWNLOADPROC, IntPtr) will wait for an amount of data to be downloaded before returning the new stream's handle. The amount is determined by the BASS_CONFIG_NET_BUFFER and BASS_CONFIG_NET_PREBUF settings. The default setting is disabled. When it is disabled, pre-buffering will happen asynchronously and playback will begin in a stalled state while pre-buffering is in progress. The progress can be monitored with BASS_StreamGetFilePosition(Int32, BASSStreamFilePosition).

As well as internet streams, this config setting also applies to streams created with BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr) and the STREAMFILE_BUFFER file system. BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr) will never pre-buffer when using the STREAMFILE_BUFFERPUSH system.

BASS_CONFIG_ANDROID_SESSIONID62 The audio session ID to use for output on Android.

id (int): The session ID.

This option allows a session ID to be specified for BASS to use with AAudio or AudioTrack output (OpenSL ES is not affected). The session ID can then be used to apply Android's AudioEffect-based effects on the BASS output (and anything else that uses the same session ID). The AudioManager generateAudioSessionId method can be used to generate a session ID for this.

Changes take effect from the next BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) call.

BASS_CONFIG_LIBSSL64 The OpenSSL (or compatible) library to use for handling HTTPS connections.

filename (string pointer): The filename of the OpenSSL library to use... NULL = use default. This should include the full path if it is not in the system library search path.

By default, BASS will try to use the system's OpenSSL library to handle HTTPS connections. It will look for libssl.so, libssl.so.10, or libssl.so.1.0.0. If the target system uses a different filename for it, or you want to use a custom OpenSSL build, this option should be set to that. That should be done before the first HTTPS connection is opened. If the specified library cannot be loaded, BASS will fallback to trying the defaults.

BASS makes a copy of the provided string, so it does not need to persist beyond the call..

This option is only available on the Linux and Android platforms. On Android, BASS will look for the library in the app's library directory if a full path is not provided. A BASS_SSL add-on is available, which will be used by default when present. If that is not present then the default is to use the system's libssl.so or libboringssl.so library, but note that is not possible when targetting Android 7 (API level 24) or above.

BASS_CONFIG_WASAPI_PERSIST65 Presist resp. retain Windows mixer settings when using WASAPI output?

retain (bool): Retain Windows mixer settings... = no, = yes (default).

Changes should be made before calling BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr).

BASS_CONFIG_REC_WASAPI66 Use WASAPI when recording?

enable (bool): Enable the use of WASAPI for recording? (default is )

WASAPI is always used when recording from loopback devices, but this config option determines whether it or DirectSound is used when recording from other devices. WASAPI is enabled by default when available (on Windows Vista and above). Changes take effect from the next BASS_RecordInit(Int32) call, and any already initialized devices are unaffected.

BASS_CONFIG_ANDROID_AAUDIO67 Enable AAudio output on Android?

enable (bool): Enable AAudio output?

Android has three audio APIs: AudioTrack, OpenSL ES, AAudio. AudioTrack is available in all Android versions. OpenSL ES was introduced in Android 2.3. AAudio was introduced in Android 8. BASS includes support for all three. AudioTrack is used if the BASS_DEVICE_AUDIOTRACK flag is specified with BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) (or on pre-2.3 Android). Otherwise, this option determes whether OpenSL ES or AAudio is used.

The default setting is (AAudio enabled) on Android 8.1 and above, and on earlier Android versions. It can be set to on Android 8.0 devices too but AAudio is known to be buggy/crash on some of those devices. The setting will be ignored on older Android versions where AAudio is not available. Changes take effect from the next BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) call.

BASS_CONFIG_SAMPLE_ONEHANDLE69 Use the same handle for a sample and its single playback channel?

onehandle (bool): Use the same handle for a sample and its single channel? (default is )

When a sample has a channel limit of only one (max = 1 with BASS_SampleLoad(String, Int64, Int32, Int32, BASSFlag) or BASS_SampleCreate(Int32, Int32, Int32, Int32, BASSFlag)), the same handle may be used for the sample (HSAMPLE) and its playback channel (HCHANNEL), depending on this config setting. When the same handle is used, BASS_SampleGetChannel(Int32, BASSFlag) still needs to be called to create the playback channel.

This config option is enabled by default. Changes take effect from the next BASS_SampleGetChannel(Int32, BASSFlag) call.

BASS_CONFIG_DEV_TIMEOUT70 Sets or disables the device timeout.

timeout (int): device timeout in milliseconds (use 0 to disable it)

BASS_CONFIG_NET_META71 Request Shoutcast metadata from internet servers?

metadata (bool): metadata... = no, = yes (default)

By default, BASS will request Shoutcast metadata from the server when opening a URL, which is then available from BASS_ChannelGetTags(Int32, BASSTag) (BASS_TAG_META). That can be disabled via this config option to save a little bandwidth if Shoutcast metadata is not required.

BASS_CONFIG_NET_RESTRATE72 The restricted download rate for internet file streams.

rate (int): The download rate in bytes per second.

This setting determines the maximum download speed for an internet file stream with rate restriction enabled via the BASS_STREAM_RESTRATE flag. The rate restriction only comes into effect while a stream's buffered data exceeds its BASS_CONFIG_NET_BUFFER setting, and a download will otherwise be as fast as the connection allows. Note that a too low setting may result in a server closing (timing-out) the connection before the download is complete.

The default setting is 20000. Changes only affect streams that are created afterwards, not any that already exist.

As well as internet streams, this config setting also applies to 'buffered' user file streams created with BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr).

BASS_CONFIG_REC_DEFAULT73 Include a "Default" entry in the recording device list?

default (bool): If (default), a 'Default' device will be included in the device list.

This option adds a 'Default' entry to the recording device list, which maps to the device that is currently the system's default. Its input will automatically switch over when the system's default device setting changes

When enabled, the 'Default' device will also become the default device to BASS_RecordInit(Int32) (with device = -1). Both it and the device that it currently maps to will have the BASS_DEVICE_DEFAULT flag set by BASS_RecordGetDeviceInfo(Int32, BASS_DEVICEINFO).

This option is enabled by default, and can only be disabled before BASS_RecordGetDeviceInfo(Int32, BASS_DEVICEINFO) or BASS_RecordInit(Int32) has been called.

Platform-specific: This config option is only available on Windows and macOS; a 'Default' entry is always included on other platforms. On Windows, the automatic device switching feature requires using WASAPI (not DirectSound) for recording.

BASS_CONFIG_NORAMP74 The default playback ramping setting.

noramp (int): Enable or disable playback ramping... 0 = enable ramping, 1 = disable ramping, 2 = disable ramping-in only, 3 = disable ramping-out only.

This config option determines the initial BASS_ATTRIB_NORAMP attribute setting of new channels. Existing channels are unaffected by changes.

The default setting is 0 (enable ramping).

BASS_CONFIG_FILENAME75 The filename of the loaded BASS library.

This is a read-only config (BASS_GetConfigString(BASSConfig)) option that gives the full path of the loaded BASS library.

BASS_CONFIG_AC3_DYNRNG65537 BASS_AC3 add-on: dynamic range compression option

dynrng (bool): If dynamic range compression is enbaled (default is ).

BASS_CONFIG_WMA_BASSFILE65795 BASSWMA add-on: use BASS file handling.

bassfile (bool): Default is disabled ().

When enabled () BASSWMA uses BASS's file routines when playing local files. It uses the IStream interface to do that. This would also allow to support the "offset" parameter for WMA files with BASS_StreamCreateFile(String, Int64, Int64, BASSFlag). The downside of enabling this feature is, that it stops playback while encoding from working.

BASS_CONFIG_WMA_NETSEEK65796 BASSWMA add-on: enable network seeking?

seek (bool): If seeking in network files/streams is enabled (default is ).

If , it allows seeking before the entire file has been downloaded/cached. Seeking is slow that way, so it's disabled by default.

BASS_CONFIG_WMA_VIDEO65797 BASSWMA add-on: play audio from WMV (video) files?

playwmv (bool): If (default) BASSWMA will play the audio from WMV video files. If WMV files will not be played.

BASS_CONFIG_WMA_ASYNC65807 BASSWMA add-on: use a seperate thread to decode the data?

async (bool): If BASSWMA will decode the data in a seperate thread. If (default) the normal file system will be used.

The WM decoder can by synchronous (decodes data on demand) or asynchronous (decodes in the background). With the background decoding, BASSWMA buffers the data that it receives from the decoder for the STREAMPROC to access. The start of playback/seeking may well be slightly delayed due to there being no data available immediately. Internet streams are only supported by the asynchronous system, but local files can use either, and BASSWMA uses the synchronous system by default.

BASS_CONFIG_CD_FREEOLD66048 BASSCD add-on: Automatically free an existing stream when creating a new one on the same drive?

freeold (bool): Only one stream can exist at a time per CD drive. So if a stream using the same drive already exists, stream creation function calls will fail, unless this config option is enabled to automatically free the existing stream. This is enabled by default.

BASS_CONFIG_CD_RETRY66049 BASSCD add-on: Number of times to retry after a read error.

retries (int): Number of times to retry reading...0 = don't retry. The default is 2 retries.

BASS_CONFIG_CD_AUTOSPEED66050 BASSCD add-on: Automatically reduce the read speed when a read error occurs?

autospd (bool): By default, this option is disabled.

If , the read speed will be halved when a read error occurs, before retrying (if the BASS_CONFIG_CD_RETRY config setting allows).

BASS_CONFIG_CD_SKIPERROR66051 BASSCD add-on: Skip past read errors?

skip (bool): If , reading will skip onto the next frame when a read error occurs, otherwise reading will stop.

When skipping an error, it will be replaced with silence, so that the track length is unaffected. Before skipping past an error, BASSCD will first retry according to the BASS_CONFIG_CD_RETRY setting.

BASS_CONFIG_CD_CDDB_SERVER66052 BASSCD add-on: The server to use in CDDB requests.

server (string): The CDDB server address, in the form of "user:pass@server:port/path". The "user:pass@", ":port" and "/path" parts are optional; only the "server" part is required. If not provided, the port and path default to 80 and "/~cddb/cddb.cgi", respectively.

A copy is made of the provided server string, so it need not persist beyond the BASS_SetConfigPtr(BASSConfig, IntPtr) call. The default setting is "gnudb.gnudb.org".

The proxy server, as configured via the BASS_CONFIG_NET_PROXY option, is used when connecting to the CDDB server.

BASS_CONFIG_CD_READ66053 BASSCD add-on: The read block size in frames (the default is 16).

server (int): The read block size in frames.

The default is to read from CDs in 16 frame blocks. Some drives may perform better with a different number of frames. Changes only affect subsequently created CD streams, not any that already exist.

BASS_CONFIG_CD_TIMEOUT66054 BASSCD add-on: How long to wait (in milliseconds) for a drive to complete a command sent to it.

server (int): The timeout (in milliseconds).

BASS_CONFIG_ENCODE_PRIORITY66304 BASSenc add-on: Encoder DSP priority (default -1000)

priority (int): The priorty determines where in the DSP chain the encoding is performed - all DSP with a higher priority will be present in the encoding. Changes only affect subsequent encodings, not those that have already been started. The default priority is -1000.

BASS_CONFIG_ENCODE_QUEUE66305 BASSenc add-on: The maximum queue length (default 6000, 0=no limit)

limit (int): The async encoder queue size limit in milliseconds; 0=unlimited.

When the queue's length is unlimited, its buffer will grow as needed to hold the queued data, otherwise the buffer will be preallocated according to the limit during encoder initialization. If the limit is exceeded or the buffer cannot grow due to lack of memory then data will be dropped. BASS_Encode_SetNotify(Int32, ENCODENOTIFYPROC, IntPtr) can be used to get notification of when that happens, and BASS_Encode_GetCount(Int32, BASSEncodeCount) used to check how much data has been dropped. The default limit is 6 seconds (6000 milliseconds). Changes only apply to new encoders, not any already existing encoders.

BASS_CONFIG_ENCODE_ACM_LOAD66306 BASSenc add-on: ACM codec name to give priority for the formats it supports.

codec (string pointer): The ACM codec name to give priority (e.g. 'l3codecp.acm').

BASSenc does make a copy of the config string, so it can be freed right after calling it.

BASS_CONFIG_ENCODE_CAST_TIMEOUT66320 BASSenc add-on: The time to wait to send data to a cast server (default 5000ms)

timeout (int): The time to wait, in milliseconds.

When an attempt to send data is timed-out, the data is discarded. BASS_Encode_SetNotify(Int32, ENCODENOTIFYPROC, IntPtr) can be used to receive a notification of when this happens.

The default timeout is 5 seconds (5000 milliseconds). Changes take immediate effect.

BASS_CONFIG_ENCODE_CAST_PROXY66321 BASSenc add-on: Proxy server settings when connecting to Icecast and Shoutcast (in the form of "[user:pass@]server:port"... = don't use a proxy but a direct connection).

proxy (string pointer): The proxy server settings, in the form of "[user:pass@]server:port"... = don't use a proxy but make a direct connection (default). If only the "server:port" part is specified, then that proxy server is used without any authorization credentials.

BASSenc does not make a copy of the config string, so it must reside in the heap (not the stack), eg. a global variable. This also means that the proxy settings can subsequently be changed at that location without having to call this function again.

This setting affects how the following functions connect to servers: BASS_Encode_CastInit(Int32, String, String, String, String, String, String, String, String, Int32, BASSEncodeCast), BASS_Encode_CastGetStats(Int32, BASSEncodeStats, String), BASS_Encode_CastSetTitle(Int32, String, String). When a proxy server is used, it needs to support the HTTP 'CONNECT' method. The default setting is NULL (do not use a proxy).

Changes take effect from the next internet stream creation call. By default, BASSenc will not use any proxy settings when connecting to Icecast and Shoutcast.

BASS_CONFIG_ENCODE_CAST_BIND66322 BASSenc add-on: Sets a local IP address to use for cast server connections ( = any).

address (string pointer): The local IP address, to use for cast server connections ( = any, default).

When a system has multiple networks available, this setting determines which is used by BASS_Encode_CastInit(Int32, String, String, String, String, String, String, String, String, Int32, BASSEncodeCast) when connecting to a server and by subsequent BASS_Encode_CastGetStats(Int32, BASSEncodeStats, String) and BASS_Encode_CastSetTitle(Int32, String, String) calls. It also determines whether IPv4 or IPv6 is used when a server's hostname has DNS records for both. IPv4 is preferred by default if this option is unset (). The setting is ignored if it is an IPv6 address while the server only has an IPv4 address, and vice versa. A copy is made of the provided string, so it does not need to persist beyond this call. Changes take effect from the next BASS_Encode_CastInit(Int32, String, String, String, String, String, String, String, String, Int32, BASSEncodeCast) call, so different casters can use different IPs. The other BASS_Encode_CastXXX function calls will use the same IP from when the caster was setup.

BASS_CONFIG_ENCODE_SERVER_CERT66336 BASSenc add-on: The certificate file for encrypted servers.

filename (string pointer): The filename of the certificate.

This setting determines what certificate is used for SSL/TLS encrypted server connections. The file should be in PEM format. It can also include intermediate and root certificates (in that order) after the server's certificate. The corresponding private key also needs to be set via the BASS_CONFIG_ENCODE_SERVER_KEY option.

A copy is made of the provided string, so it does not need to persist beyond the BASS_SetConfig(BASSConfig, Int32) call. Changes take effect from the next BASS_Encode_ServerInit(Int32, String, Int32, Int32, BASSEncodeServer, ENCODECLIENTPROC, IntPtr) call. Existing servers are unaffected.

BASS_CONFIG_ENCODE_SERVER_KEY66337 BASSenc add-on: The private key file for encrypted servers.

filename (string pointer): The filename of the private key.

This setting determines what private key is used for SSL/TLS encrypted server connections. The file should be in PEM format. The corresponding certificate also needs to be set via the BASS_CONFIG_ENCODE_SERVER_CERT option.

A copy is made of the provided string, so it does not need to persist beyond the BASS_SetConfig(BASSConfig, Int32) call. Changes take effect from the next BASS_Encode_ServerInit(Int32, String, Int32, Int32, BASSEncodeServer, ENCODECLIENTPROC, IntPtr) call. Existing servers are unaffected.

BASS_CONFIG_MIDI_COMPACT66560 BASSMIDI add-on: Automatically compact all soundfonts following a configuration change?

compact (bool): If , all soundfonts are compacted following a MIDI stream being freed, or a BASS_MIDI_StreamSetFonts(Int32, BASS_MIDI_FONT, Int32) call.

The compacting isn't performed immediately upon a MIDI stream being freed or BASS_MIDI_StreamSetFonts(Int32, BASS_MIDI_FONT, Int32) being called. It's actually done 2 seconds later (in another thread), so that if another MIDI stream starts using the soundfonts in the meantime, they aren't needlessly closed and reopened.

Samples that have been preloaded by BASS_MIDI_FontLoad(Int32, Int32, Int32) are not affected by automatic compacting. Other samples that have been preloaded by BASS_MIDI_StreamLoadSamples(Int32) are affected though, so it is probably wise to disable this option when using that function.

By default, this option is enabled.

BASS_CONFIG_MIDI_VOICES66561 BASSMIDI add-on: The maximum number of samples to play at a time (polyphony).

voices (int): Maximum number of samples to play at a time... 1 (min) - 1000 (max).

This setting determines the maximum number of samples that can play together in a single MIDI stream. This isn't necessarily the same thing as the maximum number of notes, due to presets often layering multiple samples. When there are no voices available to play a new sample, the voice with the lowest volume will be killed to make way for it.

The more voices that are used, the more CPU that is required. So this option can be used to restrict that, for example on a less powerful system. The CPU usage of a MIDI stream can also be restricted via the BASS_ATTRIB_MIDI_CPU attribute.

Changing this setting only affects subsequently created MIDI streams, not any that have already been created. The default setting is 128 voices.

Platform-specific

The default setting is 100, except on iOS, where it is 40.

BASS_CONFIG_MIDI_AUTOFONT66562 BASSMIDI add-on: Automatically load matching soundfonts?

autofont (bool): If , BASSMIDI will try to load a soundfont matching the MIDI file.

This option only applies to local MIDI files, loaded using BASS_MIDI_StreamCreateFile(String, Int64, Int64, BASSFlag, Int32) (or BASS_StreamCreateFile(String, Int64, Int64, BASSFlag) via the plugin system). BASSMIDI won't look for matching soundfonts for MIDI files loaded from the internet.

By default, this option is enabled.

BASS_CONFIG_MIDI_DEFFONT66563 BASSMIDI add-on: Default soundfont usage

filename (string): Filename of the default soundfont to use ( = no default soundfont).

When setting the default soundfont, a copy is made of the filename, so it does not need to persist beyond the BASS_SetConfigPtr(BASSConfig, IntPtr) call. If the specified soundfont cannot be loaded, the default soundfont setting will remain as it is. BASS_GetConfigPtr(BASSConfig) can be used to confirm what that is.

On Windows, the default is to use one of the Creative soundfonts (28MBGM.SF2 or CT8MGM.SF2 or CT4MGM.SF2 or CT2MGM.SF2), if present in the windows system directory.

BASS_CONFIG_MIDI_IN_PORTS66564 BASSMIDI add-on: The number of MIDI input ports to make available

ports (int): Number of input ports... 0 (min) - 10 (max).

MIDI input ports allow MIDI data to be received from other software, not only MIDI devices. Once a port has been initialized via BASS_MIDI_InInit(Int32, MIDIINPROC, IntPtr), the ALSA client and port IDs can be retrieved from BASS_MIDI_InGetDeviceInfo(Int32, BASS_MIDI_DEVICEINFO), which other software can use to connect to the port and send data to it. Prior to initialization, an input port will have a client ID of 0.

The default is for 1 input port to be available. Note: This option is only available on Linux.

BASS_CONFIG_MIXER_FILTER67072 BASSmix add-on: The order of filter used to reduce aliasing (only available/used pre BASSmix 2.4.7, where BASS_CONFIG_SRC is used).

order (int): The filter order... 2 (min) to 50 (max), and even. If the value specified is outside this range, it is automatically capped.

The filter order determines how abruptly the level drops at the cutoff frequency, or the roll-off. The levels rolls off at 6 dB per octave for each order. For example, a 4th order filter will roll-off at 24 dB per octave. A low order filter may result in some aliasing persisting, and sounds close to the cutoff frequency being attenuated. Higher orders reduce those things, but require more processing.

By default, a 4th order filter is used. Changes only affect channels that are subsequently plugged into a mixer, not those that are already plugged in.

BASS_CONFIG_MIXER_BUFFER67073 BASSmix add-on: The source channel buffer size multiplier.

multiple (int): The buffer size multiplier... 1 (min) to 5 (max). If the value specified is outside this range, it is automatically capped.

When a source channel has buffering enabled, the mixer will buffer the decoded data, so that it is available to the BASS_Mixer_ChannelGetData(Int32, IntPtr, Int32) and BASS_Mixer_ChannelGetLevel(Int32) functions. To reach the source channel's buffer size, the multiplier (multiple) is applied to the BASS_CONFIG_BUFFER setting at the time of the mixer's creation. If the source is played at it's default rate, then the buffer only need to be as big as the mixer's buffer. But if it's played at a faster rate, then the buffer needs to be bigger for it to contain the data that is currently being heard from the mixer. For example, playing a channel at 2x its normal speed would require the buffer to be 2x the normal size (multiple = 2).

Larger buffers obviously require more memory, so the multiplier should not be set higher than necessary.

The default multiplier is 2x. Changes only affect subsequently setup channel buffers. An existing channel can have its buffer reinitilized by disabling and then re-enabling the BASS_MIXER_CHAN_BUFFER flag using BASS_Mixer_ChannelFlags(Int32, BASSFlag, BASSFlag).

BASS_CONFIG_MIXER_POSEX67074 BASSmix add-on: How far back to keep record of source positions to make available for BASS_Mixer_ChannelGetPositionEx(Int32, BASSMode, Int32).

length (int): The length of time to back, in milliseconds.

If a mixer is not a decoding channel (not using the BASS_STREAM_DECODE flag), this config setting will just be a minimum and the mixer will always have a position record at least equal to its playback buffer length, as determined by the BASS_CONFIG_BUFFER config option.

The default setting is 2000ms. Changes only affect newly created mixers, not any that already exist.

BASS_CONFIG_SPLIT_BUFFER67088 BASSmix add-on: The splitter buffer length.

length (int): The buffer length in milliseconds... 100 (min) to 5000 (max). If the value specified is outside this range, it is automatically capped.

When a source has its first splitter stream created, a buffer is allocated for its sample data, which all of its subsequently created splitter streams will share. This config option determines how big that buffer is. The default is 2000ms.

The buffer will always be kept as empty as possible, so its size does not necessarily affect latency; it just determines how far splitter streams can drift apart before there are buffer overflow issues for those left behind.

Changes do not affect buffers that have already been allocated; any sources that have already had splitter streams created will continue to use their existing buffers.

BASS_CONFIG_MP4_VIDEO67328 BASSaac add-on: play audio from mp4 (video) files?

playmp4 (bool): If (default) BASSaac will play the audio from mp4 video files. If mp4 video files will not be played.

BASS_CONFIG_AAC_PRESCAN67330 BASSaac add-on: pre-scan ADTS AAC files for seek points and accurate length

prescan (bool): If (default) BASSaac will prescan ADTS AAC files. If prescan is disabled.

If prescan is disabled, the BASS_STREAM_PRESCAN flag can be used to override that.

BASS_CONFIG_AAC_MP467329 BASSaac add-on: Support MP4 in BASS_AAC_StreamCreateXXX functions?

usemp4 (bool): If BASSaac supports MP4 in the BASS_AAC_StreamCreateXXX functions. If (default) only AAC is supported.

BASS_CONFIG_WINAMP_INPUT_TIMEOUT67584 BASSWinamp add-on: Winamp input timeout.

timeout (int): The time (in milliseconds) to wait until timing out, because the plugin is not using the output system.

BASS_CONFIG_DSD_FREQ67584 BASSdsd add-on: the default sample rate when converting to PCM.

freq (int): the sample rate.

This setting determines what sample rate is used by default when converting to PCM. The rate actually used may be different if the specified rate is not valid for a particular DSD rate, in which case it will be rounded up (or down if there are none higher) to the nearest valid rate; the valid rates are 1/8, 1/16, 1/32, etc. of the DSD rate down to a minimum of 44100 Hz.

The default setting is 88200 Hz. Changes only affect subsequently created streams, not any that already exist.

BASS_CONFIG_DSD_GAIN67585 BASSdsd add-on: the default gain applied when converting to PCM.

gain (int): the gain in decibels.

This setting determines what gain is applied by default when converting to PCM. Changes only affect subsequently created streams, not any that already exist. An existing stream's gain can be changed via the BASS_ATTRIB_DSD_GAIN attribute.

The default setting is 6dB.

BASS_CONFIG_HLS_DOWNLOAD_TAGS67840 BASShls add-on: receive ID3v2 tags in DOWNLOADPROC callback functions?

tags (bool): if , DOWNLOADPROC callback functions will receive ID3v2 tags.

When this option is enabled, a stream's DOWNLOADPROC callback function will receive any ID3v2 tags that the stream contains. This option does not affect the availability of ID3v2 tags from BASS_ChannelGetTags.

The default setting is . Changes only affect subsequently created HLS streams, not any that already exist.

BASS_CONFIG_HLS_BANDWIDTH67841 BASShls add-on: the maximum bitrate for stream selection from master playlists.

bitrate (int): The bitrate in bits per second... 0 = ignore bitrate.

This option sets a maximum bitrate for the selection of a stream to play in a master playlist containing multiple streams. The stream with the closest bitrate that does not exceed it, or the stream with the lowest bitrate if they all exceed it, will be tried first. If that is unsuccessful then the next closest will be tried, and so on until one is successfully opened. If no bitrate has been set then the streams will be tried in their listed order.

The stream selection is based on each stream's BANDWIDTH attribute, which is for the entire stream and could include video, not only audio. The default setting is 0. Changes only affect subsequently created HLS streams, not any that already exist.

BASS_CONFIG_HLS_DELAY67842 BASShls add-on: the delay to aim for in live streams.

delay (int): the delay (in seconds) to aim for in live streams... 0 = the stream's default delay.

A live stream's delay is determined by the total length of the media segments in its media playlist (excluding any delay that occurs before the sound reaches the stream). When that exceeds the target delay set via this option, the oldest segments will be skipped to bring the delay down to the target (but not below it). Setting the delay too low may result in stalling during playback.

The default setting is 30 seconds. Changes only affect subsequently created HLS streams, not any that already exist.

BASS_CONFIG_HLS_TSSCAN67843 BASShls add-on:
BASS_CONFIG_THREAD1073741824 FLAG: thread-specific setting
See Also

Reference