Upgrading

With every release, all new and modified functions/options/etc are listed in the "History" section of the BASS.TXT file. To make upgrading easier, a list of changes that may require some modification of existing code is provided below.

Upgrading from 2.4.16

BASS_RecordInit, BASS_RecordGetDeviceInfo
A "Default" recording device has been added on Windows and macOS. It can be disabled via the BASS_CONFIG_REC_DEFAULT config option.

BASS_StreamCreateFileUser, BASS_StreamCreateURL, BASS_CONFIG_NET_PREBUF_WAIT
Pre-buffering during internet (and buffered user) stream creation is always disabled.

BASS_ATTRIB_NET_RESUME
The initial value is now determined by the BASS_CONFIG_NET_PREBUF config option rather than always being 50.

BASS_PluginLoad
iOS add-ons are now dynamic libraries, so can be loaded by filename (as on the other platforms) instead of symbol. Old static library add-ons can still be used with the BASS_PLUGIN_PROC flag.

Upgrading from 2.4.15

BASS_INFO, BASS_SAMPLE, BASS_SetEAXParameters, BASS_GetEAXParameters, BASS_ATTRIB_EAXMIX
DirectSound mixing is removed (BASS always does the mixing itself), so DirectSound-specific features are no longer available: hardware mixing, EAX and VAM options. Note that those features were already unavailable since Windows Vista anyway.

BASS_RecordInit
WASAPI recording is the default on Windows Vista and above. The BASS_CONFIG_REC_WASAPI config option can be used to keep using DirectSound instead.

BASS_StreamCreateFileUser, BASS_StreamCreateURL
The BASS_STREAM_BLOCK is applied automatically on files larger than 2GB.

BASS_SampleGetChannel
The boolean "newonly" parameter has changed to flags. The BASS_SAMCHAN_NEW flag (1) should be used to preserve the old behaviour (-1 will too for languages where true = -1).

BASS_CONFIG_DEV_DEFAULT
This config option is now enabled by default on Windows and macOS.

BASS_ChannelPause, BASS_ChannelSetDevice, BASS_ChannelSetLink
These functions now report success rather than failing with BASS_ERROR_ALREADY.

Upgrading from 2.4.13.8

BASS_StreamCreateFile, BASS_StreamCreateFileUser, BASS_StreamCreateURL
Plugin-specific flags are ignored. Those flags can only be used with an add-on's dedicated stream creation functions, or BASS_ChannelFlags in some cases.

BASS_StreamCreateFileUser, BASS_StreamCreateURL
Pre-buffering during internet (and buffered user) stream creation is disabled by default, but can be re-enabled via the BASS_CONFIG_NET_PREBUF_WAIT config option.

BASS_CONFIG_NET_READTIMEOUT
Changes no longer affect existing streams.

Upgrading from 2.4.13

BASS_ChannelGetData
FFT levels will be adjusted/raised to compensate when less sample data than needed (the FFT size) is available.

BASS_CHANNELINFO
The "origres" member may have the BASS_ORIGRES_FLOAT flag set to indicate a floating-point sample format.

Upgrading from 2.4.12

BASS_Init
WASAPI output is the default on Windows Vista and above. The BASS_DEVICE_DSOUND flag can be used to keep using DirectSound instead.

BASS_CONFIG_NET_PLAYLIST
Nested playlist processing is limited to 1 level below the root by default. This can be adjusted via the BASS_CONFIG_NET_PLAYLIST_DEPTH config option.

BASS_PluginLoad
HPLUGIN handles are no longer the base address of the loaded add-on.

FILEREADPROC
Returning 0 when using the STREAMFILE_BUFFERPUSH system will not end the file. Return -1 instead to end the file.

BASS_CHANNELINFO
Dummy streams have a dedicated BASS_CTYPE_STREAM_DUMMY "ctype" value instead of sharing BASS_CTYPE_STREAM.

Upgrading from 2.4.11

BASS_CONFIG_NET_AGENT, BASS_CONFIG_NET_PROXY
BASS_SetConfigPtr makes a copy of the provided string, so it no longer needs to persist beyond the call. This also means that the setting cannot be changed by just modifying the string without making another call.

BASS_StreamCreateFile, BASS_StreamCreateFileUser, BASS_StreamCreateURL
529 samples of silence are removed from the start of MP3 files that do not include delay info (eg. in a LAME header).

Upgrading from 2.4.10

DOWNLOADPROC
When HTTP headers are enabled via the BASS_StreamCreateURL BASS_STREAM_STATUS flag, there will be an additional callback for each redirection.

Upgrading from 2.4.9

BASS_SYNC_OGG_CHANGE sync
This sync is no longer automatically "mixtime" without the BASS_SYNC_MIXTIME flag.

Upgrading from 2.4.4

BASS_RecordGetInput
If the volume is requested but not available, a value of -1 instead of 1 will be received.

Upgrading from 2.3

BASS_GetDeviceDescription, BASS_RecordGetDeviceDescription
These functions have been superseded by the new BASS_GetDeviceInfo and BASS_RecordGetDeviceInfo functions, respectively.

BASS_INFO, BASS_RECORDINFO
The "driver" member has been moved to the new BASS_DEVICEINFO structure.

BASS_Init, BASS_RecordInit
The default device (-1) is no longer hardcoded to the first device on Windows (already the case on macOS).

BASS_ChannelGetAttributes, BASS_ChannelSetAttributes, BASS_ChannelSlideAttributes
These functions have been replaced by BASS_ChannelGetAttribute, BASS_ChannelSetAttribute and BASS_ChannelSlideAttribute, respectively.

BASS_ChannelIsSliding
An "attrib" parameter has been added to check if a specific attribute is sliding.

BASS_MusicGetAttribute, BASS_MusicSetAttribute
These functions have been incorporated into BASS_ChannelGetAttribute and BASS_ChannelSetAttribute. The channel and instrument volume settings are also now floating-point, with a range of 0 to 1. The attribute names have also changed slightly: the "MUSIC" and "ATTRIB" parts are swapped around.

BASS_ChannelGetLength, BASS_ChannelGetPosition, BASS_ChannelSetPosition
A "mode" parameter has been added to these 3 functions. Set that to BASS_POS_BYTE (or 0) to maintain the previous functionality.

BASS_MusicGetOrders, BASS_MusicGetOrderPosition, MAKEMUSICPOS
These functions (and macro) have been incorporated into BASS_ChannelGetLength, BASS_ChannelGetPosition and BASS_ChannelSetPosition, via the BASS_POS_MUSIC_ORDER "mode".

BASS_MusicLoad
The "offset" parameter is now 64-bit (QWORD).

BASS_SampleLoad
The "offset" parameter is now 64-bit (QWORD).

BASS_SampleCreate
This function now returns a sample handle. The sample's data can be set using the new BASS_SampleSetData function.

BASS_SampleCreateDone
This function is no longer required following the change to BASS_SampleCreate.

BASS_StreamCreateFile
The "offset" and "length" parameters are now 64-bit (QWORD).

BASS_StreamGetFilePosition
The return value is now 64-bit (QWORD).

BASS_GetVolume, BASS_SetVolume
The volume is now a floating-point value, with a range of 0 to 1.

BASS_CONFIG_MAXVOL
This config option has been removed, as it is no longer needed following the advent of floating-point volume settings.

BASS_CONFIG_GVOL_MUSIC, BASS_CONFIG_GVOL_SAMPLE, BASS_CONFIG_GVOL_STREAM
The global volume settings now have a range of 0 to 10000.

BASS_RecordGetInput, BASS_RecordSetInput
The volume has been separated from the flags and made a floating-point value, with a range of 0 to 1.

BASS_Update
A "length" parameter has been added.

BASS_ChannelPreBuf
This function has been superseded by BASS_ChannelUpdate. No parameter changes are required.

BASS_ChannelSetFlags
This function has been superseded by BASS_ChannelFlags. For the same functionality, set the "mask" parameter to -1.

BASS_ChannelSetSync
BASS_SYNC_META sync callbacks no longer receive the metadata in the "data" parameter. It can be retrieved via BASS_ChannelGetTags (BASS_TAG_META) instead. The BASS_SYNC_META sync is also no longer triggered by a new logical bitstream in a chained OGG stream; a dedicated BASS_SYNC_OGG_CHANGE sync has been added for that purpose. The BASS_SYNC_MESSAGE flag has been removed, and can be reproduced by using the PostMessage Win32 API function in a SYNCPROC.

BASS_ChannelBytes2Seconds
The return value is now 64-bit floating-point (double).

BASS_ChannelSeconds2Bytes
The "pos" parameter is now 64-bit floating-point (double).

BASS_SetConfig
This function now returns a boolean value, instead of the config's new setting. If needed, BASS_GetConfig can be used to get that.

BASS_CONFIG_NET_AGENT, BASS_CONFIG_NET_PROXY
Config options that deal with pointers, like these 2, are now handled by the new BASS_SetConfigPtr and BASS_GetConfigPtr functions.

BASS_CHANNELINFO
"sample" and "filename" members have been added.

DSPPROC, DOWNLOADPROC, RECORDPROC, STREAMPROC, SYNCPROC
All callback function "user" parameters are now pointers.

Upgrading from 2.2

BASS_GetVersion
The format of the return value has been changed, to include the minor revision.

BASS_StreamGetTags
This function is replaced by BASS_ChannelGetTags. No parameter changes are required.

BASS_MusicGetName
This function is replaced by BASS_ChannelGetTags and the BASS_TAG_MUSIC_NAME tag type.

BASS_PluginLoad
A "flags" parameter has been added.

BASS_CONFIG_NET_NOPROXY
This config option has been replaced by the more flexible BASS_CONFIG_NET_PROXY config option. The BASS_CONFIG_NET_NOPROXY behaviour can be reproduced by setting the new option to NULL.

BASS_CTYPE_STREAM_WAV
This "ctype" is now just a flag to indicate any type of WAVE file, and is no longer a channel type in itself. The LOWORD used with this flag indicates the specific codec (PCM, ADPCM, etc).

BASS_CHANNELINFO, BASS_INFO, BASS_RECORDINFO, BASS_SAMPLE
These four structures have new "plugin", "freq", "freq" and "mingap" members, respectively.

Upgrading from 2.1

BASS_StreamGetLength, BASS_MusicGetLength
These functions have been merged into BASS_ChannelGetLength, which gives the byte length of a channel. To get the number of orders in a MOD music, BASS_MusicGetOrders has been added. Also note that requesting the length when streaming in blocks will now result in a BASS_ERROR_NOTAVAIL error, instead of just 0.

BASS_ChannelGetPosition
This function now returns the position in bytes with MOD musics, as it does with other channels. BASS_MusicGetOrderPosition has been added to get the order/row position.

BASS_ChannelSetPosition
This function now sets the position in bytes with MOD musics by default. A MAKEMUSICPOS macro has been added for setting the position in orders/rows.

BASS_ChannelSetSync
The BASS_SYNC_POS sync parameter is now in bytes for MOD musics too. Use the BASS_SYNC_MUSICPOS sync for order/row positions. BASS_ChannelPreBuf
A "length" parameter has been added, to specify how much data to pre-buffer.

BASS_SampleCreate
The number of channels is now specified in a separate parameter, rather than via the use of the BASS_SAMPLE_MONO flag. The sample length is also now specified in bytes rather than samples.

BASS_StreamCreateFile
WAV files are no longer automatically converted to the device initialization resolution (as specified in the BASS_Init call), eg. 8-bit WAV files will produce 8-bit streams.

BASS_StreamCreateURL
Shoutcast metadata is now requested automatically, so the BASS_STREAM_META flag has been removed.

BASS_INFO, BASS_RECORDINFO
The "size" member has been removed, so there's now no need to set that before calling BASS_GetInfo and BASS_RecordGetInfo.

BASS_SAMPLE
A "chans" member has been added.

STREAMFILEPROC callback
The BASS_FILE_QUERY action has been removed. The BASS_FILE_LEN action may be used more than once with unbuffered streams, not just at the start.

Upgrading from 2.0

BASS_StreamPlay
This function is replaced by BASS_ChannelPlay. The "flags" parameter is not carried forward to the new function, instead the flags can be changed at any time using BASS_ChannelSetFlags.

BASS_MusicPlay, BASS_MusicPlayEx
These functions are also replaced by BASS_ChannelPlay. The BASS_MusicPlayEx "pos" and "flags" parameters are not carried forward to the new function, instead they can be implemented via the BASS_ChannelSetPosition and BASS_ChannelSetFlags functions. The "reset" parameter is also not carried forward, the BASS_MUSIC_POSRESETEX flag replaces that.

BASS_SamplePlay, BASS_SamplePlayEx, BASS_SamplePlay3D, BASS_SamplePlay3DEx
These functions are replaced by a combination of BASS_SampleGetChannel and BASS_ChannelPlay. The BASS_ChannelSetAttributes and BASS_ChannelSet3DAttributes functions can be used to replace the functionality of the "Ex" versions.

BASS_ChannelResume
Another function replaced by BASS_ChannelPlay.

BASS_MusicSetAmplify, BASS_MusicSetPanSep, BASS_MusicSetPositionScaler, BASS_MusicSetVolume, BASS_MusicGetVolume
These functions are all replaced by BASS_MusicSetAttribute and BASS_MusicGetAttribute.

BASS_StreamPreBuf, BASS_MusicPreBuf
These functions are replaced by BASS_ChannelPreBuf.

BASS_RecordStart
The number of channels (mono/stereo) is now specified in a separate parameter, rather than via the use of the BASS_SAMPLE_MONO flag.

BASS_ChannelGetLevel
The level reading is now more precise, having a range of 0 to 32768, instead of the old 0 to 128.

BASS_ChannelSetFX
There is a new "priority" parameter.

BASS_CONFIG_FLOATDSP
Note that this config option can now affect FX too.