BASS.NET API for the Un4seen BASS Audio LibraryBASSConfig EnumerationBASS.NET API for the Un4seen BASS Audio Library

Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
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).

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.

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.

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... 1000 (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_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) call.

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 Windows-only: Include a "Default" entry in the output device list?

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

BASS does not usually include a "Default" entry in its device list, as that would ultimately map to one of the other devices and be a duplicate entry. When the default device is requested in a BASS_Init(Int32, Int32, BASSInit, IntPtr) call (with device = -1), BASS will check the default device at that time, and initialize it. But Windows 7 has the ability to automatically switch the default output to the new default device whenever it changes, and in order for that to happen, the default device (rather than a specific device) needs to be used. That is where this option comes in.

When enabled, the "Default" device will also become the default device to BASS_Init(Int32, Int32, BASSInit, IntPtr) (with device = -1). When the "Default" device is used, 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.

This option can only be set before BASS_GetDeviceInfo(Int32, BASS_DEVICEINFO) or BASS_Init(Int32, Int32, BASSInit, IntPtr) has been called.

Platform-specific: This config option is only available on Windows. It is available on all Windows versions (not including CE), but only Windows 7 has the default output switching feature.

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, infinite).

When the timeout is hit, the connection with the server will be closed. The default setting is 0, no timeout.

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_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) 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. 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).

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, Boolean) 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_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_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_AC3_DYNRNG65537 BASS_AC3 add-on: dynamic range compression option

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

BASS_CONFIG_WMA_PREBUF65793 BASSWMA add-on: Prebuffer internet streams on creation, before returning from BASS_WMA_StreamCreateFile?

prebuf (bool): The Windows Media modules must prebuffer a stream before starting decoding/playback of it. This option determines when/where to wait for that to be completed.

The Windows Media modules must prebuffer a stream before starting decoding/playback of it. This option determines whether the stream creation function (eg. BASS_WMA_StreamCreateFile(String, Int64, Int64, BASSFlag)) will wait for the prebuffering to complete before returning. If playback of a stream is attempted before it has prebuffered, it will stall and then resume once it has finished prebuffering. The prebuffering progress can be monitored via BASS_StreamGetFilePosition(Int32, BASSStreamFilePosition) (BASS_FILEPOS_WMA_BUFFER).

This option is enabled by default.

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 "freedb.freedb.org". .

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

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 10000, 0=no limit)

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

When queued encoding is enabled, the queue's buffer will grow as needed to hold the queued data, up to a limit specified by this config option. The default limit is 10 seconds (10000 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, Boolean), 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_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_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.

See Also

Reference