diff --git a/Speedy Eggbert 2 Source.vcxproj b/Speedy Eggbert 2 Source.vcxproj
index 2bb3efe..8b4902d 100644
--- a/Speedy Eggbert 2 Source.vcxproj
+++ b/Speedy Eggbert 2 Source.vcxproj
@@ -77,7 +77,7 @@
false
_WIN32;WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- dxsdk3\sdk\inc
+ dxsdk3\sdk\inc;bass\inc
UNICODE;_UNICODE
@@ -85,9 +85,9 @@
Windows
true
/DYNAMICBASE "legacy_stdio_definitions.lib" %(AdditionalOptions) /VERBOSE
- dxsdk3\sdk\lib;%(AdditionalLibraryDirectories)
+ dxsdk3\sdk\lib;bass\lib;%(AdditionalLibraryDirectories)
false
- dxsdk3/sdk/lib/*.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;%(AdditionalDependencies)
+ dxsdk3/sdk/lib/*.lib;bass/lib/*.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;%(AdditionalDependencies)
Default
true
MultiplyDefinedSymbolOnly
@@ -103,7 +103,7 @@
true
_WIN32;WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- dxsdk3\sdk\inc
+ dxsdk3\sdk\inc;bass\inc
UNICODE;_UNICODE
@@ -111,11 +111,11 @@
true
true
true
- dxsdk3\sdk\lib;%(AdditionalLibraryDirectories)
+ dxsdk3\sdk\lib;bass\lib;%(AdditionalLibraryDirectories)
MultiplyDefinedSymbolOnly
/DYNAMICBASE "legacy_stdio_definitions.lib" %(AdditionalOptions) /VERBOSE
Default
- dxsdk3/sdk/lib/*.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;%(AdditionalDependencies)
+ dxsdk3/sdk/lib/*.lib;bass/lib/*.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;%(AdditionalDependencies)
false
diff --git a/bass/bass.dll b/bass/bass.dll
new file mode 100644
index 0000000..10114b6
Binary files /dev/null and b/bass/bass.dll differ
diff --git a/bass/bass.txt b/bass/bass.txt
new file mode 100644
index 0000000..fe7bea8
--- /dev/null
+++ b/bass/bass.txt
@@ -0,0 +1,2352 @@
+BASS 2.4
+Copyright (c) 1999-2022 Un4seen Developments Ltd. All rights reserved.
+
+Files that you should have found in the BASS package
+====================================================
+Win32 version
+-------------
+BASS.TXT This file
+BASS.DLL BASS module
+BASS.CHM BASS documentation
+X64\
+ BASS.DLL 64-bit BASS module
+C\ C/C++ API and examples...
+ BASS.H BASS C/C++ header file
+ BASS.LIB BASS import library
+ BASS.SLN Visual Studio solution for examples
+ MAKEFILE Makefile for examples
+ MAKEFILE.IN Makefile helper macros
+ X64\
+ BASS.LIB 64-bit BASS import library
+ 3DTEST\ 3D example
+ ...
+ BASSTEST\ Simple playback example
+ ...
+ CONTEST\ Console example
+ ...
+ CUSTLOOP\ Custom looping example
+ ...
+ DEVLIST\ Device list example
+ ...
+ DSPTEST\ DSP example
+ ...
+ FXTEST\ Effects example
+ ...
+ LIVEFX\ Full-duplex example
+ ...
+ LIVESPEC\ Live version of spectrum analyser example
+ ...
+ MODTEST\ MOD music example
+ ...
+ MULTI\ Multiple device example
+ ...
+ NETRADIO\ Internet streaming example
+ ...
+ PLUGINS\ Plugins example
+ ...
+ RECTEST\ Recording example
+ ...
+ SPEAKERS\ Multi-speaker example
+ ...
+ SPECTRUM\ Spectrum analyser example
+ ...
+ SYNTH\ Low latency custom streaming example
+ ...
+ WRITEWAV\ WAVE writer example
+ ...
+ BIN\ Precompiled examples
+ 3DTEST.EXE
+ BASSTEST.EXE
+ CONTEST.EXE
+ CUSTLOOP.EXE
+ DEVLIST.EXE
+ DSPTEST.EXE
+ FXTEST.EXE
+ LIVEFX.EXE
+ LIVESPEC.EXE
+ MODTEST.EXE
+ MULTI.EXE
+ NETRADIO.EXE
+ RECTEST.EXE
+ SPEAKERS.EXE
+ SPECTRUM.EXE
+ SYNTH.EXE
+ WRITEWAV.EXE
+DELPHI\ Delphi API and examples...
+ BASS.PAS BASS Delphi unit
+ 3DTEST\ 3D example
+ ...
+ BASSTEST\ Simple playback example
+ ...
+ CONTEST\ Console example
+ ...
+ CUSTLOOP\ Custom looping example
+ ...
+ DSPTEST\ DSP example
+ ...
+ FXTEST\ Effects example
+ ...
+ LIVEFX\ Full-duplex example
+ ...
+ LIVESPEC\ Live version of spectrum analyser example
+ ...
+ MULTI\ Multiple device example
+ ...
+ NETRADIO\ Internet streaming example
+ ...
+ PLUGINS\ Plugins example
+ ...
+ RECTEST\ Recording example
+ ...
+ SAMPLEVIS\ Visualisation example
+ ...
+ SPEAKERS\ Multi-speaker example
+ ...
+ SPECTRUM\ Spectrum analyser example
+ ...
+ STREAMTEST\ User stream example
+ ...
+ WRITEWAV\ WAVE writer example
+ ...
+VB\ Visual Basic API and examples...
+ BASS.BAS BASS Visual Basic module
+ 3DTEST\ 3D example
+ ...
+ BASSTEST\ Simple playback example
+ ...
+ CUSTLOOP\ Custom looping example
+ ...
+ DEVLIST\ Device list example
+ ...
+ DSPTEST\ DSP example
+ ...
+ FXTEST\ Effects example
+ ...
+ LIVEFX\ Full-duplex example
+ ...
+ LIVESPEC\ Live version of spectrum analyser example
+ ...
+ MODTEST\ MOD music example
+ ...
+ MULTI\ Multiple device example
+ ...
+ NETRADIO\ Internet streaming example
+ ...
+ PLUGINS\ Plugins example
+ ...
+ RECTEST\ Recording example
+ ...
+ SPEAKERS\ Multi-speaker example
+ ...
+ SPECTRUM\ Spectrum analyser example
+ ...
+ SYNTH\ Low latency custom streaming example
+ ...
+ WRITEWAV\ WAVE writer example
+ ...
+ MEMORY\ Playing from memory example by Jobnik
+ ...
+
+NOTE: You may need to "Unblock" the BASS.CHM file in its "Properties" to view
+ it on Windows 7. The documentation can also be viewed online at the BASS
+ website.
+
+NOTE: The Delphi and VB examples may not always be up to date with the C
+ examples, so the latter should be preferred as references if possible.
+
+NOTE: To run the example EXEs, first you will need to copy BASS.DLL into the
+ same directory as them.
+
+macOS version
+-------------
+BASS.TXT This file
+LIBBASS.DYLIB BASS module
+BASS.CHM BASS documentation
+BASS.H BASS C/C++ header file
+BASS.XCODEPROJ Xcode project for examples
+MAKEFILE Makefile for specific architectures
+CONTEST\ Console example
+ ...
+DEVLIST\ Device list example
+ ...
+DSPTEST\ DSP example
+ ...
+FXTEST\ Effects example
+ ...
+LIVESPEC\ Live version of spectrum analyser example
+ ...
+MULTI\ Multiple device example
+ ...
+NETRADIO\ Internet streaming example
+ ...
+PLUGINS\ Plugins example
+ ...
+RECTEST\ Recording example
+ ...
+SPEAKERS\ Multi-speaker example
+ ...
+SPECTRUM\ Spectrum analyser example
+ ...
+SYNTH\ Low latency custom streaming example
+ ...
+WRITEWAV\ WAVE writer example
+ ...
+
+NOTE: To view the documentation, you will need a CHM viewer. The documentation
+ can also be viewed online at the BASS website.
+
+Linux version
+-------------
+BASS.TXT This file
+BASS.CHM BASS documentation
+BASS.H BASS C/C++ header file
+MAKEFILE Makefile for examples
+MAKEFILE.IN Makefile helper macros
+LIBS\ BASS modules
+ ...
+PASCAL\
+ BASS.PAS BASS Delphi/Pascal unit
+3DTEST\ 3D example
+ ...
+BASSTEST\ Simple playback example
+ ...
+CONTEST\ Console example
+ ...
+CUSTLOOP\ Custom looping example
+ ...
+DEVLIST\ Device list example
+ ...
+DSPTEST\ DSP example
+ ...
+FXTEST\ Effects example
+ ...
+LIVESPEC\ Live version of spectrum analyser example
+ ...
+MODTEST\ MOD music example
+ ...
+MULTI\ Multiple device example
+ ...
+NETRADIO\ Internet streaming example
+ ...
+PLUGINS\ Plugins example
+ ...
+RECTEST\ Recording example
+ ...
+SPEAKERS\ Multi-speaker example
+ ...
+SPECTRUM\ Spectrum analyser example
+ ...
+SYNTH\ Low latency custom streaming example
+ ...
+WRITEWAV\ WAVE writer example
+ ...
+
+NOTE: To view the documentation, you will need a CHM viewer. The documentation
+ can also be viewed online at the BASS website.
+
+Android version
+---------------
+BASS.TXT This file
+BASS.CHM BASS documentation
+LIBS\ BASS modules
+ ...
+C\ C/C++ API...
+ BASS.H BASS C/C++ header file
+JAVA\COM\UN4SEEN\BASS\
+ BASS.JAVA BASS Java class
+EXAMPLES\ Java examples
+ BUILD.GRADLE Android Studio build script for examples
+ SETTINGS.GRADLE
+ PROGUARD-BASS.PRO
+ DSPTEST\ DSP example
+ ...
+ FXTEST\ Effects example
+ ...
+ LIVESPEC\ Live version of spectrum analyser example
+ ...
+ NETRADIO\ Internet streaming example
+ ...
+ PLUGINS\ Plugins example
+ ...
+ RECTEST\ Recording example
+ ...
+ SPECTRUM\ Spectrum analyser example
+ ...
+ BASSLIB\ BASS library wrapper shared by examples
+ ...
+
+NOTE: To view the documentation, you will need a CHM viewer. The documentation
+ can also be viewed online at the BASS website.
+
+iOS version
+-----------
+BASS.TXT This file
+BASS.XCFRAMEWORK BASS framework
+BASS.CHM BASS documentation
+BASS.H BASS C/C++ header file
+
+NOTE: To view the documentation, you will need a CHM viewer. The documentation
+ can also be viewed online at the BASS website.
+
+
+What's the point?
+=================
+BASS is an audio library for use in software on several platforms. Its purpose
+is to provide developers with powerful and efficient sample, stream, MOD music,
+and recording functions. All in a compact DLL that won't bloat your software.
+
+See the documentation for descriptions of all the BASS functions. Also check
+the included example source-codes for some examples of how to use BASS in your
+own programs.
+
+
+Requirements
+============
+Win32 version
+-------------
+Windows 98 or newer is required with an SSE-supporting CPU. BASS can use WASAPI
+or DirectSound for playback and recording. WASAPI is the default on Windows
+Vista and newer, while DirectSound is on older Windows versions. 32-bit and
+64-bit Windows are supported.
+
+macOS version
+-------------
+macOS 10.5 or above is required. The x86_64 / arm64 / i386 architectures are
+supported in a single universal library.
+
+Linux version
+-------------
+BASS requires ALSA for playback and recording, but decoding and silent playback
+on the "No sound" device is still possible without it. The x86 / x86_64 /
+armhf / aarch64 architectures are supported. The x86 build requires SSE, while
+the armhf build requires ARMv6+VFP2 or above.
+
+Android version
+---------------
+Android 2.3 or above is required. BASS can use AAudio, OpenSL ES, or AudioTrack
+for playback (OpenSL ES is used for recording). AAudio is the default on Android
+8.1 and above, while OpenSL ES is on older Android versions. The armeabi-v7a /
+arm64-v8a / x86 / x86_64 architectures are supported.
+
+iOS version
+-----------
+iOS 8 or above is required. armv7 / armv7s / arm64 "device" builds and
+i386 / x86_64 / arm64 "simulator" builds are supported in a single universal
+framework.
+
+
+Main Features
+=============
+* Samples
+ supports WAV/AIFF/MP3/MP2/MP1/OGG and custom generated samples
+
+* Sample streams
+ stream any sample data in 8/16/32 bit, with both "push" and "pull" systems
+
+* File streams
+ MP3/MP2/MP1/OGG/WAV/AIFF file streaming
+
+* Internet file streaming
+ stream files from the internet, including Shout/Icecast
+
+* User file streaming
+ stream files from anywhere using any delivery method
+
+* OS codecs
+ ACM, Media Foundation and CoreAudio codec support for additional audio formats
+
+* Multi-channel streaming
+ support for more than plain stereo, including multi-channel OGG/WAV/AIFF files
+
+* MOD music
+ uses the same engine as XMPlay = best accuracy, speed, and quality
+
+* MO3 music
+ MP3/OGG compressed MOD music
+
+* Add-on system
+ support for more formats is available via add-ons (aka plugins)
+
+* Multiple outputs
+ simultaneously use multiple soundcards, and move channels between them
+
+* Recording
+ flexible recording system, with support for multiple devices
+
+* Decode without playback
+ streams and MOD musics can be outputted in any way you want
+
+* Speaker assignment
+ assign streams and MOD musics to specific speakers
+
+* High precision synchronization
+ synchronize events in your software to the streams and MOD musics
+
+* Effects
+ chorus/compressor/distortion/echo/flanger/gargle/parameq/reverb
+
+* User-defined DSP functions
+ custom effects may be applied to individual streams or the final output mix
+
+* 32 bit floating-point decoding and processing
+ floating-point stream/music decoding, DSP/FX, and recording
+
+* 3D sound
+ play samples/streams/musics in any 3D position
+
+
+Using BASS
+==========
+There is no guarantee that all future BASS versions will be compatible
+with all previous versions, so your program should use BASS_GetVersion
+to check the version that is loaded. This also means that you should
+put the BASS module in the same directory as your executable (not just
+somewhere in the path), to avoid the possibility of a wrong version being
+loaded.
+
+If you are updating your software from a previous BASS version, then
+you should check the "History" section (below), to see if any of the
+functions that you are using have been affected by a change.
+
+Win32 version
+-------------
+C/C++, Delphi, and Visual Basic APIs and example projects are provided. To
+use BASS with another language you will first have to convert the header
+file. Or, as a last resort, you could use LoadLibrary and GetProcAddress.
+
+The downside is that you have to manually import each function that you
+use, with the GetProcAddress function. But it has been made a lot simpler
+to import BASS this way by the use of the BASSDEF #define. Here's a small
+example:
+
+#define BASSDEF(f) (WINAPI *f) // define the functions as pointers
+#include "bass.h"
+...
+HINSTANCE bass=LoadLibrary("BASS.DLL"); // load BASS
+BASS_Init=GetProcAddress(bass,"BASS_Init"); // get BASS_Init
+BASS_Init(-1,44100,0,hWnd,NULL); // call BASS_Init
+
+To use BASS with Borland C++ Builder, you will first have to create a
+Borland C++ Builder import library for it. This is done by using the
+IMPLIB tool that comes with Borland C++ Builder. Simply execute this:
+
+ IMPLIB BASSBCB.LIB BASS.DLL
+
+... and then use BASSBCB.LIB in your projects to import BASS.
+
+To use BASS with LCC-Win32, you will first have to create a compatible
+import library for it. This is done by using the PEDUMP and BUILDLIB
+tools that come with LCC-Win32. Run these 2 commands:
+
+ PEDUMP /EXP BASS.LIB > BASSLCC.EXP
+ BUILDLIB BASSLCC.EXP BASSLCC.LIB
+
+... and then use BASSLCC.LIB in your projects to import BASS.
+
+For the BASS functions that return strings (char*), VB users should use
+the VBStrFromAnsiPtr function to convert the returned pointer into a VB
+string.
+
+macOS version
+-------------
+LIBBASS.DYLIB is a universal binary with support for the x86_64 / arm64 / i386
+architectures. If not all of those architectures are needed, the included
+makefile can be used to extract the wanted one(s). Type "make x86_64" or
+"make arm64" or "make i386" to extract a particular architecture. "make 64bit"
+can be used to extract the x86_64 and arm64 architectures (exclude i386), and
+"make intel" to extract the x86_64 and i386 architectures (exclude arm64). Any
+BASS add-ons placed in the same directory will also be processed.
+
+NOTE: You will need to exclude the i386 architecture (run "make 64bit") for
+ submitting an app to Apple's App Store.
+
+Since BASS 2.4.17, the BASS/add-on libraries use the "@rpath" install path,
+while "@loader_path was used by older versions. If upgrading from an old
+version, you may need to change your copy/embed destination to "Frameworks"
+rather than "Executables", unless your "Runtime Search Paths" setting includes
+"@executable_path" or "@loader_path". The included makefile ("make rpath") can
+be used to update older BASS/add-on versions to use "@rpath".
+
+See the example Xcode project.
+
+Linux version
+-------------
+The LIBBASS.SO file needs to be in the OS's library search path for it to
+be found; simply placing it in the same directory as the executable won't
+necessarily work as it does on other platforms. The BASS libraries should
+also not be placed in the standard library directories to avoid version
+conflicts. To meet those competing requirements, a wrapper script could be
+used to set the "LD_LIBRARY_PATH" environment variable before loading the
+executable. Another option is to set the "rpath" in the executable to tell
+it where to look for libraries, which is what the example makefiles do.
+
+When building for multiple architectures, it is possible to simply try linking
+with all LIBBASS.SO versions, and the linker will use the appropriate one and
+ignore the others.
+
+Android version
+---------------
+The BASS library includes support for use in Java and native code. The
+BASS.JAVA file mirrors BASS.H as much as possible, but there are some
+unavoidable differences, mainly in parameter/return types.
+
+When using ProGuard to obfuscate your Java code, the BASS classes should be
+left alone (see PROGUARD-BASS.PRO).
+
+See the example Android Studio project.
+
+iOS version
+-----------
+The BASS XCFramework should be added to XCode's "Frameworks, Libraries, and
+Embedded Content" section. If you're using an old Xcode version without
+XCFramework support then you can instead directly use the "device" or "simulator"
+framework from within the XCFramework. BASS does not include bitcode, so the
+"Enable Bitcode" option should be set to "No".
+
+
+Latest Version
+==============
+The latest version of BASS can always be found at the BASS website:
+
+ www.un4seen.com
+
+
+Licence
+=======
+BASS is free for non-commercial use. If you are a non-commercial entity
+(eg. an individual) and you are not making any money from your product
+(through sales/advertising/etc), then you can use BASS in it for free.
+If you wish to use BASS in commercial products, then please also see the
+next section.
+
+TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, BASS IS PROVIDED
+"AS IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND/OR FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS SHALL NOT BE HELD
+LIABLE FOR ANY DAMAGE THAT MAY RESULT FROM THE USE OF BASS. YOU USE
+BASS ENTIRELY AT YOUR OWN RISK.
+
+Usage of BASS indicates that you agree to the above conditions.
+
+All trademarks and other registered names contained in the BASS
+package are the property of their respective owners.
+
+Commercial licensing
+--------------------
+BASS is available for use in your commercial products. The licence
+types available are as follows:
+
+SHAREWARE: Allows the usage of BASS in an unlimited number of your
+shareware ("try before you buy") products, which must sell for no more
+than 40 Euros each. Non-shareware products are also permitted, but the
+product price limit is 10 Euros in that case. The price limit can be
+raised by purchasing duplicate licences, eg. 2 licences doubles it. If
+you are an individual (not a corporation) making and selling your own
+software, this is the licence for you.
+
+SINGLE COMMERCIAL: Allows the usage of BASS in one commercial product.
+
+UNLIMITED COMMERCIAL: Allows the usage of BASS in an unlimited number
+of your commercial products. This licence is on a per-site basis, eg.
+if you are creating products with BASS at 2 sites/locations, then 2
+licences are required.
+
+Please note the products must be end-user products, eg. not components
+used by other products.
+
+These licences only cover your own software, not the publishing of
+other's software. If you publish other's software, its developers (or
+the software itself) will need to be licensed to use BASS.
+
+These licences are on a per-platform basis, with reductions available
+when licensing for multiple platforms. In all cases there are no royalties
+to pay, and you can use future BASS updates without further cost.
+
+These licences do not allow reselling/sublicensing of BASS. For example,
+if a product is a development system, the users of said product are not
+licensed to use BASS in their productions; they will need their own
+licences.
+
+If the standard licences do not meet your requirements, or if you have
+any questions, please get in touch (email: bass@un4seen.com).
+
+Visit the BASS website for the latest pricing:
+
+ www.un4seen.com
+
+
+Credits
+=======
+MP3 decoding is based on minimp3, https://github.com/lieff/minimp3
+
+Ogg Vorbis decoding is based on libogg/vorbis,
+Copyright (c) 2002-2020 Xiph.org Foundation
+
+API/Sample contributors
+-----------------------
+Delphi: Titus Miloi, Rogier Timmermans, Alessandro Cappellozza,
+ Jesse Naranjo, Chris Troesken, Evgeny Melnikov
+Visual Basic: Adam Hoult, Hendrik Knaepen, Arthur Aminov,
+ Peter Hebels, Juan Pablo Franchi
+
+
+History
+=======
+These are the major (and not so major) changes in each release, along with the
+functions/options that are introduced/affected by them. There are other little
+tweaks and fixes made along the way too.
+
+2.4.17 - 12/10/2022
+-------------------
+* "Default" recording device on Windows/macOS
+ BASS_RecordInit
+ BASS_RecordGetDeviceInfo
+ BASS_CONFIG_REC_DEFAULT (BASS_SetConfig option)
+* Recording continues after device format changes on Windows/macOS
+ BASS_RecordStart
+ BASS_SYNC_DEV_FORMAT (BASS_ChannelSetSync type)
+* DSP volume control
+ BASS_ATTRIB_VOLDSP (BASS_ChannelSetAttribute option)
+ BASS_ATTRIB_VOLDSP_PRIORITY (BASS_ChannelSetAttribute option)
+ RECTEST example updated
+* Auto-reconnecting when a download stops before the end
+ BASS_StreamCreateURL
+* Internet streams use HTTP/1.1 instead of HTTP/1.0
+ BASS_StreamCreateURL
+* Download callback changing after stream creation
+ BASS_ATTRIB_DOWNLOADPROC (BASS_ChannelSetAttributeEx option)
+ NETRADIO example updated
+* Thread-specific internet/buffered stream download buffer option
+ BASS_CONFIG_THREAD (BASS_SetConfig option)
+ BASS_CONFIG_NET_BUFFER (BASS_SetConfig option)
+ BASS_StreamCreateURL/FileUser
+* Internet stream creation never waits for pre-buffering
+ BASS_CONFIG_NET_PREBUF_WAIT disabled
+ BASS_StreamCreateURL/FileUser
+* Stalled stream resumption buffer level defaults to prebuffer level
+ BASS_ATTRIB_NET_RESUME (BASS_ChannelSetAttribute option)
+* New simplified channel starting/playing function
+ BASS_ChannelStart
+* Channel remapping fix for various multi-channel source/output combinations
+ BASS_ChannelStart/Play
+* Support for using common add-on name instead of platform-specific filename in plugin loading
+ BASS_PluginLoad
+ NETRADIO example updated
+* Library filename/path retrieval
+ BASS_CONFIG_FILENAME (BASS_GetConfigPtr option)
+ PLUGINS and WRITEWAV examples updated
+* Device info is still available if reinitialization fails
+ BASS_GetInfo
+ BASS_DEVICE_REINIT (BASS_Init flag)
+* Playback ramping-in/out can be disabled separately
+ BASS_ATTRIB_NORAMP (BASS_ChannelSetAttribute option)
+* Default playback ramping setting
+ BASS_CONFIG_NORAMP (BASS_SetConfig option)
+* Error code for when access is denied
+ BASS_ERROR_DENIED
+ BASS_StreamCreateURL
+ BASS_RecordStart
+* REAR2 speaker flags renamed/duplicated to SIDE
+ BASS_SPEAKER_SIDE/SIDELEFT/SIDERIGHT (BASS_MusicLoad/BASS_StreamCreate/File/URL flags)
+* Switch to dynamic library/framework (rather than static) on iOS
+ BASS_PluginLoad
+* Recording routing audio session options on iOS
+ BASS_IOS_SESSION_AIRPLAY/BTHFP/BTA2DP (BASS_CONFIG_IOS_SESSION flags)
+* Audio session deactivation when nothing is playing/recording on iOS
+ BASS_IOS_SESSION_DEACTIVATE (BASS_CONFIG_IOS_SESSION flag)
+* Interrupted status retrieval on iOS
+ BASS_IsStarted
+* Floating-point recording support below Android 5 (already supported above)
+ BASS_RecordStart
+* Internet stream support for Linux systems without /etc/services file
+ BASS_StreamCreateURL
+* Fix for IPv6 addresses in URLs on Windows/Linux/Android
+ BASS_StreamCreateURL
+* Fix for getting volume changes made externally on Linux
+ BASS_GetVolume
+ BASS_RecordGetInput
+* macOS version now uses "@rpath" instead of "@loader_path" install path
+* ARM builds are now included (instead of separate) on Linux
+* Non-FPU ARM architecture support dropped (Windows CE and "softfp" Linux)
+* SSE is required on x86 platforms (Windows 95 dropped)
+
+2.4.16 - 24/6/2021
+------------------
+* DirectSound output mix is now generated by BASS (as with WASAPI output and
+ on other platforms), losing support for DirectSound-specific features but
+ gaining support for all other BASS features
+ BASS_DEVICE_DSOUND (BASS_Init flag)
+* Length trimming
+ BASS_POS_END (BASS_ChannelSetPosition mode)
+ BASS_SYNC_END (BASS_ChannelSetSync type)
+ CUSTLOOP and WRITEWAV examples updated
+* Custom loop start positions
+ BASS_POS_LOOP (BASS_ChannelSetPosition mode)
+ CUSTLOOP example updated
+* Length extending
+ BASS_ATTRIB_TAIL (BASS_ChannelSetAttribute option)
+ BASS_SYNC_END (BASS_ChannelSetSync type)
+* Device reinitialization while retaining BASS channels and 3D settings
+ BASS_DEVICE_REINIT (BASS_Init flag)
+* Retrieval of a device's activity status
+ BASS_IsStarted
+* BASS_DEVICE_3D flag is no longer needed to enable 3D support
+ BASS_Init
+* The "Default" device is now enabled by default on Windows/macOS
+ BASS_CONFIG_DEV_DEFAULT (BASS_SetConfig option)
+* Default communications device indicator on Windows
+ BASS_DEVICE_DEFAULTCOM (BASS_DEVICEINFO flag)
+* Sample channel "newonly" option changed to a flag
+ BASS_SAMCHAN_NEW (BASS_SampleGetChannel flag)
+* Sample playback streams
+ BASS_SAMCHAN_STREAM (BASS_SampleGetChannel flag)
+ BASS_CTYPE_STREAM_SAMPLE
+* Speaker assignment support for samples
+ BASS_SampleGetChannel
+ BASS_ChannelFlags
+* Overriding of default flags during sample channel creation
+ BASS_SampleGetChannel
+* Same sample channel handle when max=1 is now optional
+ BASS_CONFIG_SAMPLE_ONEHANDLE (BASS_SetConfig option)
+* 3D max distance muting can now be toggled
+ BASS_SAMPLE_MUTEMAX (BASS_ChannelFlags flag)
+* Plugin disabling without affecting existing streams
+ BASS_PluginEnable
+* WASAPI recording on Windows (DirectSound is fallback/optional)
+ BASS_CONFIG_REC_WASAPI (BASS_SetConfig option)
+ BASS_RecordInit
+* Minimum recording buffer reduced to 10ms
+ BASS_CONFIG_REC_BUFFER (BASS_SetConfig option)
+* Recording data/level retrieval without removing from buffer when not using a RECORDPROC
+ BASS_DATA_NOREMOVE (BASS_ChannelGetData flag)
+ BASS_LEVEL_NOREMOVE (BASS_ChannelGetLevelEx flag)
+* Support for level measurements longer than 1s from decoding channels
+ BASS_ChannelGetLevelEx
+* Configurable restricted download rate
+ BASS_CONFIG_NET_RESTRATE (BASS_SetConfig option)
+* Thread-specific internet stream timeout options
+ BASS_CONFIG_THREAD (BASS_SetConfig option)
+ BASS_CONFIG_NET_TIMEOUT (BASS_SetConfig option)
+ BASS_CONFIG_NET_READTIMEOUT (BASS_SetConfig option)
+ BASS_StreamCreateURL
+* Configured "User-Agent" header can be overridden in custom request headers
+ BASS_StreamCreateURL
+* Multiple IPs will be tried when available on Linux/Android (already on other platforms)
+ BASS_StreamCreateURL
+* BASS_STREAM_BLOCK applied automatically on files larger than 2GB
+ BASS_StreamCreateURL/FileUser
+* Redirected URL retrieval
+ BASS_TAG_LOCATION (BASS_ChannelGetTags type)
+* Shoutcast metadata is now optional
+ BASS_CONFIG_NET_META (BASS_SetConfig option)
+ BASS_TAG_META (BASS_ChannelGetTags type)
+* Support for a 2nd ID3v2 tag block
+ BASS_TAG_ID3V2_2 (BASS_ChannelGetTags type)
+* OpenMPT channel name retrieval
+ BASS_TAG_MUSIC_CHAN (BASS_ChannelGetTags type)
+* Delayed OGG file scanning when prescanning is disabled/impossible
+ BASS_ChannelGetLength
+ BASS_ChannelSetPosition
+ BASS_CONFIG_OGG_PRESCAN (BASS_SetConfig option)
+* Faster seeking in large OGG files
+ BASS_ChannelSetPosition
+* Unified freeing function for all channel types
+ BASS_ChannelFree
+* User-defined attribute
+ BASS_ATTRIB_USER (BASS_ChannelSetAttributeEx option)
+* Push stream buffer size limiting
+ BASS_ATTRIB_PUSH_LIMIT (BASS_ChannelSetAttribute option)
+* Retrieval of a stream's available file data amount
+ BASS_FILEPOS_AVAILABLE (BASS_StreamGetFilePosition mode)
+* Error code for unsupported URL protocols
+ BASS_ERROR_PROTOCOL (BASS_StreamCreateURL error code)
+* BASS_ERROR_ALREADY error changed to success in some functions
+ BASS_ChannelPause
+ BASS_ChannelSetDevice
+ BASS_ChannelSetLink
+* Support for custom file streaming with Android Media codecs
+ BASS_StreamCreateFileUser
+* Switch to using native APIs for Android Media codecs (Android 5 or above required now)
+ BASS_StreamCreateFile/User/URL
+* BASS_TAG_AM_MIME value changed to fix conflict on Android
+ BASS_TAG_AM_MIME (BASS_ChannelGetTags type)
+* Improved support for single active input recording devices on Linux
+ BASS_RecordGetInputName
+ BASS_RecordGetInput
+ BASS_RecordSetInput
+* Automatic resumption of recordings after an interruption on iOS
+* Fix for Media Foundation AAC streaming with Windows 10 20H1
+ BASS_StreamCreateURL
+ BASS_StreamCreateFileUser
+* Fix for freeze when freeing a stream after BASS_ChannelSetLink failed with BASS_ERROR_ALREADY on it
+ BASS_ChannelSetLink
+* macOS examples rewritten in Objective-C/Cocoa
+* "MP3-FREE" version removed (MP3 patents expired)
+* armv5 (armeabi) architecture support dropped on Android
+
+2.4.15 - 17/12/2019
+-------------------
+* Channel processing granularity option
+ BASS_ATTRIB_GRANULE (BASS_ChannelSetAttribute option)
+* Asynchronous mixtime sync callbacks
+ BASS_SYNC_THREAD (BASS_ChannelSetSync flag)
+* Output device update period can be set in samples
+ BASS_CONFIG_DEV_PERIOD (BASS_SetConfig option)
+* Continuous output when nothing is playing is now optional on macOS/iOS too
+ BASS_CONFIG_DEV_NONSTOP (BASS_SetConfig option)
+* AAudio output support on Android
+ BASS_Init
+ BASS_CONFIG_ANDROID_AAUDIO (BASS_SetConfig option)
+* Support for audio session IDs on Android
+ BASS_CONFIG_ANDROID_SESSIONID (BASS_SetConfig option)
+* ParcelFileDescriptor support on Android
+ BASS_StreamCreateFile
+ BASS_SampleLoad
+ BASS_MusicLoad
+* FloatValue Java class added to receive floating-point values on Android 10
+ BASS_Get3DFactors
+ BASS_RecordGetInput
+ BASS_ChannelGetAttribute
+ BASS_ChannelGet3DAttributes
+* Audio session configuration option on iOS
+ BASS_CONFIG_IOS_SESSION (BASS_SetConfig option)
+* OGG channel type constant renamed/duplicated to VORBIS
+ BASS_CTYPE_STREAM_VORBIS
+* Error code for recognised file formats without audio
+ BASS_ERROR_NOTAUDIO (BASS_StreamCreateFile/User/URL error code)
+* Error code for unstreamable MP4 files due to atom order
+ BASS_ERROR_UNSTREAMABLE (BASS_StreamCreateFileUser/URL error code)
+* Fix for AAC streaming with BASS_STREAM_BLOCK on macOS 10.15 and iOS 13
+ BASS_StreamCreateURL/FileUser
+* Fix for playback rate changing bug when using DirectSound
+ BASS_ATTRIB_FREQ (BASS_ChannelSetAttribute option)
+* armv6 architecture support dropped on iOS
+
+2.4.14 - 16/1/2019
+------------------
+* Support for playback on the "No sound" device
+ BASS_Init
+ BASS_StreamCreateFile/User/URL
+ BASS_SampleLoad/Create
+ BASS_ChannelPlay
+* Improved sample rate conversion quality, including 64 point option
+ BASS_ATTRIB_SRC (BASS_ChannelSetAttribute option)
+ BASS_CONFIG_SRC/_SAMPLE (BASS_SetConfig options)
+* Loopback (output device) recording on Windows Vista and newer
+ BASS_RecordInit
+ BASS_RecordGetDeviceInfo
+ BASS_DEVICE_LOOPBACK (BASS_DEVICEINFO flag)
+ DEVLIST and RECTEST examples updated
+* Native format recording option
+ BASS_RecordStart
+* Access to the 3D output mix for applying DSP/FX
+ STREAMPROC_DEVICE_3D (BASS_StreamCreate option)
+* Retrieval of a device's started/stopped status
+ BASS_IsStarted
+* Sync for when a device stops unexpectedly
+ BASS_SYNC_DEV_FAIL (BASS_ChannelSetSync type)
+* New channel playback state for a paused device
+ BASS_ACTIVE_PAUSED_DEVICE (BASS_ChannelIsActive)
+* Sync for when a device's sample format changes
+ BASS_SYNC_DEV_FORMAT (BASS_ChannelSetSync type)
+* Adjustable output device update period
+ BASS_CONFIG_DEV_PERIOD (BASS_SetConfig option)
+* Nyquist FFT option
+ BASS_DATA_FFT_NYQUIST (BASS_ChannelGetData flag)
+* Plugin-specific flags are ignored in standard stream creation functions
+ BASS_StreamCreateFile/User/URL
+* Pre-buffering during stream creation is now disabled by default
+ BASS_CONFIG_NET_PREBUF_WAIT (BASS_SetConfig option)
+ BASS_StreamCreateURL/FileUser
+* Existing internet streams are unaffected by read timeout config changes
+ BASS_CONFIG_NET_READTIMEOUT (BASS_SetConfig option)
+* Retrieval of the number of existing handles
+ BASS_CONFIG_HANDLES (BASS_GetConfig option)
+* Windows mixer settings are retained by default and optionally not
+ BASS_CONFIG_WASAPI_PERSIST (BASS_SetConfig option)
+* Configurable OpenSSL library filename on Linux/Android
+ BASS_CONFIG_LIBSSL (BASS_SetConfigPtr option)
+* Files can be deleted/renamed while streaming on Windows (already true on other platforms)
+ BASS_StreamCreateFile
+* Fix for bug in playback buffering disabling option
+ BASS_ATTRIB_NOBUFFER (BASS_ChannelSetAttribute option)
+* Fix to support long logarithmic curves in volume effects
+ BASS_FX_VOLUME (BASS_ChannelSetFX type)
+
+2.4.13.8 - 6/2/2018
+-------------------
+* Indication of a file's original sample format being floating-point
+ BASS_ORIGRES_FLOAT (BASS_CHANNELINFO/SAMPLE flag)
+* Some extra sample data is retained to account for device latency in data retrieval
+ BASS_ChannelGetData
+* FFT window is shortened to match amount of available data when less than FFT size
+ BASS_ChannelGetData
+* FFT level adjusted to be approx the same regardless of amount of available data
+ BASS_ChannelGetData
+* Fix for crash when decoding channels are dissociated from a device
+ BASS_NODEVICE (BASS_ChannelSetDevice option)
+
+2.4.13 - 19/12/2017
+-------------------
+* WASAPI output on Windows (DirectSound is fallback/optional)
+ BASS_DEVICE_DSOUND (BASS_Init flag)
+ BASS_CONFIG_DEV_BUFFER/NONSTOP (BASS_SetConfig options)
+ BASS_CONFIG_SRC/_SAMPLE (BASS_SetConfig options)
+ BASS_ATTRIB_SRC/NORAMP (BASS_ChannelSetAttribute options)
+* Default output device following support extended to Windows Vista and macOS
+ BASS_CONFIG_DEV_DEFAULT (BASS_SetConfig option)
+* Seamless playback buffer length changing
+ BASS_ATTRIB_BUFFER (BASS_ChannelSetAttribute option)
+ BASS_ATTRIB_NOBUFFER deprecated
+ SYNTH example updated
+* Access to the final output mix for applying DSP/FX
+ STREAMPROC_DEVICE (BASS_StreamCreate option)
+ BASS_CTYPE_STREAM_DEVICE
+ FXTEST example updated
+* Dissociating of decoding channels from a device
+ BASS_NODEVICE (BASS_ChannelSetDevice option)
+* Volume attribute levels above 1.0 for amplification
+ BASS_ATTRIB_VOL (BASS_ChannelSetAttribute option)
+* Logarithmic attribute slides
+ BASS_SLIDE_LOG (BASS_ChannelSlideAttribute flag)
+* Volume & panning attribute affected level retrieval
+ BASS_LEVEL_VOLPAN (BASS_ChannelGetLevelEx flag)
+* Volume level adjustment effect
+ BASS_FX_VOLUME (BASS_ChannelSetFX type)
+ BASS_FX_VOLUME_PARAM structure
+* Asynchronous pre-buffering
+ BASS_CONFIG_NET_PREBUF_WAIT (BASS_SetConfig option)
+ BASS_StreamCreateURL/FileUser
+ CONTEST and NETRADIO examples updated
+* Decoding channels can be dissociated from a device
+ BASS_ChannelSetDevice
+* Resetting of user file streams/decoders
+ BASS_POS_RESET (BASS_ChannelSetPosition flag)
+* Relative seeking
+ BASS_POS_RELATIVE (BASS_ChannelSetPosition flag)
+* RIFF cue points chunk retrieval
+ BASS_TAG_RIFF_CUE (BASS_ChannelGetTags type)
+ TAG_CUE structure
+* RIFF sample chunk retrieval
+ BASS_TAG_RIFF_SMPL (BASS_ChannelGetTags type)
+ TAG_SMPL structure
+* Support for Category/Description/Grouping/Keywords/Lyrics MP4 tags
+ BASS_TAG_MP4 (BASS_ChannelGetTags type)
+* Separate channel type for dummy streams
+ BASS_CTYPE_STREAM_DUMMY
+* Stalled internet stream buffering progress retrieval
+ BASS_FILEPOS_BUFFERING (BASS_StreamGetFilePosition mode)
+ CONTEST and NETRADIO examples updated
+* Playlist recursion depth config option
+ BASS_CONFIG_NET_PLAYLIST_DEPTH (BASS_SetConfig options)
+* Push file system read functions can now return 0 without ending the file
+ STREAMFILE_BUFFERPUSH (BASS_StreamCreateFileUser system)
+ FILEREADPROC
+* 16 point SRC is used by default when SSE is available
+ BASS_CONFIG_SRC (BASS_SetConfig option)
+* Mono downmixing for all file formats in sample loading
+ BASS_SAMPLE_MONO (BASS_SampleLoad flag)
+* Mono OGG stream downmixing
+ BASS_SAMPLE_MONO (BASS_StreamCreateFile/User/URL flag)
+* Media Foundation availability detection
+ BASS_CONFIG_MF_DISABLE (BASS_GetConfig option)
+ PLUGINS example updated
+* AudioTrack output on Android
+ BASS_DEVICE_AUDIOTRACK (BASS_Init flag)
+* Support for Android Media codecs
+ BASS_StreamCreateFile/User/URL
+ BASS_TAG_AM_MIME/NAME (BASS_ChannelGetTags type)
+ BASS_CONFIG_AM_DISABLE (BASS_SetConfig option)
+* Panning fix for MOD files created with ScreamTracker 3
+ BASS_MusicLoad
+* Fix for compressor and distotion DX8 effects with floating-point data on Windows
+ BASS_FX_DX8_COMPRESSOR/DISTORTION (BASS_ChannelSetFX types)
+* Fix for plugin freeing issue on 64-bit platforms (HPLUGIN is not library address any more)
+ BASS_PluginLoad
+ BASS_PluginFree
+
+2.4.12 - 10/3/2016
+------------------
+* DSP/FX chain order modification
+ BASS_FXSetPriority
+* Average bitrate retrieval
+ BASS_ATTRIB_BITRATE (BASS_ChannelGetAttribute option)
+* Ramping-out when stopping/pausing playback
+ BASS_ChannelStop
+ BASS_ChannelPause
+* Disabling of playback ramping
+ BASS_ATTRIB_NORAMP (BASS_ChannelSetAttribute option)
+* Pre-buffering when playback buffering is disabled
+ BASS_ChannelUpdate
+ BASS_ATTRIB_NOBUFFER (BASS_ChannelSetAttribute option)
+* Net agent and proxy config options now make a copy of the provided string
+ BASS_CONFIG_NET_AGENT/PROXY (BASS_SetConfigPtr options)
+ NETRADIO example updated
+* Unicode net agent and proxy config options on Windows
+ BASS_CONFIG_NET_AGENT/PROXY (BASS_SetConfigPtr options)
+* 32768 sample FFT
+ BASS_DATA_FFT32768 (BASS_ChannelGetData flag)
+* Support for iTunes gapless info in MP3 files
+ BASS_StreamCreateFile/User
+* 529 sample delay removed from start of MP3 files without delay info
+ BASS_StreamCreateFile/User/URL
+* Support for numerical MP4 genre (gnre) tags
+ BASS_TAG_MP4 (BASS_ChannelGetTags type)
+* Support for BASSWMA's tag option when using Media Foundation WMA codec
+ BASS_TAG_WMA (BASS_ChannelGetTags type)
+* OpenMPT author tag retrieval
+ BASS_TAG_MUSIC_AUTH (BASS_ChannelGetTags type)
+* FastTracker2 panning for XM files
+ BASS_MUSIC_FT2PAN (BASS_MusicLoad flag)
+* Support for longer device names on Windows
+ BASS_DEVICEINFO (name member)
+* Checking for floating-point support on platforms that might not have it
+ BASS_CONFIG_FLOAT (BASS_GetConfig option)
+* Attribute size retrieval fix
+ BASS_ChannelGetAttributeEx
+* Fix for missing LC_VERSION_MIN issue with Xcode 7 on OSX, ppc architecture (PowerPC) support dropped
+* LIST example renamed to DEVLIST
+
+2.4.11 - 22/12/2014
+-------------------
+* Support for custom HTTP request headers
+ BASS_StreamCreateURL
+* HTTPS support on Linux/Android
+ BASS_StreamCreateURL
+* Redirection HTTP headers provided during connection
+ BASS_STREAM_STATUS (BASS_StreamCreateURL flag)
+ DOWNLOADPROC
+* Adjustable stalled internet stream resumption buffer level
+ BASS_ATTRIB_NET_RESUME (BASS_ChannelSetAttribute option)
+* Extended level retrieval inc. multi-channel and RMS options
+ BASS_ChannelGetLevelEx
+* Inexact/faster seeking
+ BASS_POS_INEXACT (BASS_ChannelSetPosition flag)
+* Post-stream creation scanning (seek table building)
+ BASS_POS_SCAN (BASS_ChannelSetPosition flag)
+* Extended attribute support
+ BASS_ChannelGet/SetAttributeEx
+* Scanned info retrieval and setting
+ BASS_ATTRIB_SCANINFO (BASS_ChannelGet/SetAttributeEx option)
+* Built-in ADPCM WAVE file support on Linux/Android/WinCE
+ BASS_StreamCreateFile/User/URL
+ BASS_SampleLoad
+* Active MOD channel count retrieval
+ BASS_ATTRIB_MUSIC_ACTIVE (BASS_ChannelGetAttribute option)
+* Fractional sample rates
+ BASS_ATTRIB_FREQ (BASS_ChannelSetAttribute option)
+* Device type information
+ BASS_DEVICE_TYPE_xxx (BASS_DEVICEINFO flags)
+* Unicode support for recording input names
+ BASS_CONFIG_UNICODE (BASS_SetConfig option)
+ BASS_RecordGetInputName
+* File size retrieval
+ BASS_FILEPOS_SIZE (BASS_StreamGetFilePosition mode)
+* Asynchronous file reading buffer level retrieval
+ BASS_FILEPOS_ASYNCBUF (BASS_StreamGetFilePosition mode)
+* MPEG data search limit raised to 1MB
+ BASS_CONFIG_VERIFY (BASS_SetConfig option)
+* Separate MPEG data search limit for internet/buffered streams
+ BASS_CONFIG_VERIFY_NET (BASS_SetConfig option)
+* Support for iTunes gapless info with Media Foundation and CoreAudio codecs
+ BASS_StreamCreateFile/User
+* Airplay receiver enumeration and selection on OSX
+ BASS_DEVICES_AIRPLAY (BASS_GetDeviceInfo flag)
+ BASS_CONFIG_AIRPLAY (BASS_SetConfig option)
+* Media Foundation playback of audio from videos is now optional
+ BASS_CONFIG_MF_VIDEO (BASS_SetConfig option)
+* Optional floating-point or fixed-point data retrieval on Android/WinCE
+ BASS_DATA_FLOAT/FIXED (BASS_ChannelGetData flags)
+* Continuous output when nothing is playing on Linux/Android/WinCE
+ BASS_CONFIG_DEV_NONSTOP (BASS_SetConfig option)
+* Fix for decoding channels being ended when stopping the output device
+ BASS_Stop
+* Fix for Media Foundation internet/buffered streaming on Windows 8
+ BASS_StreamCreateURL
+ BASS_StreamCreateFileUser
+* Improved compatibility with recent PulseAudio versions on Linux
+* LIST and MODTEST examples added
+* MASM API and examples removed (available as separate download)
+
+2.4.10 - 16/2/2013
+------------------
+* Asynchronous file reading/buffering
+ BASS_ASYNCFILE (BASS_StreamCreateFile/User flag)
+ BASS_CONFIG_ASYNCFILE_BUFFER (BASS_SetConfig option)
+* Support for chained OGG files (multiple logical bitstreams)
+ BASS_StreamCreateFile/User
+ BASS_CONFIG_OGG_PRESCAN (BASS_SetConfig option)
+ BASS_POS_OGG (BASS_ChannelSetPosition/ChannelGetLength mode)
+* OGG logical bitstream syncs are no longer automatically "mixtime"
+ BASS_SYNC_OGG_CHANGE (BASS_ChannelSetSync type)
+* Support for Soundtracker MOD files
+ BASS_MusicLoad
+* Complex FFT data
+ BASS_DATA_FFT_COMPLEX (BASS_ChannelGetData flag)
+* Volume levels above 1.0 for decoding channels
+ BASS_ATTRIB_VOL (BASS_ChannelSetAttribute option)
+* Recording device channel count retrieval on Windows/OSX/iOS
+ BASS_RECORDINFO (formats member)
+* Minimum recording period reduced to 5ms
+ BASS_RecordStart
+* Recording device period adjustment on OSX
+ BASS_RecordStart
+* Device UID retrieval on OSX
+ BASS_DEVICEINFO (driver member)
+* The desktop window handle is used when none is provided
+ BASS_Init
+
+2.4.9 - 3/5/2012
+----------------
+* Improved and adjustable sample rate conversion quality
+ BASS_ATTRIB_SRC (BASS_ChannelSetAttribute option)
+ BASS_CONFIG_SRC/_SAMPLE (BASS_SetConfig options)
+* Support for buffered file & internet streams with CoreAudio codecs on OSX/iOS
+ BASS_StreamCreateURL
+ BASS_StreamCreateUser
+* Data and level retrieval from sample channels
+ BASS_ChannelGetData
+ BASS_ChannelGetLevel
+* Oldest sample channel will be overridden when there are multiple candidates
+ BASS_SampleGetChannel
+* Use of the device's output rate with MODs
+ BASS_MusicLoad
+* Optional device output rate setting on OSX/iOS
+ BASS_DEVICE_FREQ (BASS_Init flag)
+* UTF-8 device information on Windows
+ BASS_CONFIG_UNICODE (BASS_SetConfig option)
+* Speaker assignment with panning/balance control on Windows Vista/7
+ BASS_CONFIG_VISTA_SPEAKERS (BASS_SetConfig option)
+ BASS_ATTRIB_PAN (BASS_ChannelGet/Set/SlideAttribute option)
+* Push stream queue level can be checked after using BASS_STREAMPROC_END
+ BASS_StreamPutData
+* Support for ALSA subdevices on Linux
+ BASS_Init
+ BASS_GetDeviceInfo
+ BASS_RecordInit
+ BASS_RecordGetDeviceInfo
+* Device list fix on 64-bit OSX
+ BASS_GetDeviceInfo
+ BASS_RecordGetDeviceInfo
+* BASS_UNICODE support fix on Linux
+ BASS_PluginLoad
+* Internet streaming tweaks/fixes on Windows
+* SYNTH example updated to use device output rate
+* RECTEST example updated (C version) for better Windows Vista/7 support
+* Documentation updated with platform-specific info for Android
+
+2.4.8 - 29/8/2011
+-----------------
+* Support for Media Foundation codecs on Windows 7 and updated Vista
+ BASS_StreamCreateFile/User/URL
+ BASS_TAG_MF (BASS_ChannelGetTags type)
+ PLUGINS example updated
+* Built-in support for MP4 tags on Win32/OSX/iOS (for Media Foundation & CoreAudio AAC/ALAC codecs)
+ BASS_TAG_MP4 (BASS_ChannelGetTags type)
+* WAVE format chunk retrieval
+ BASS_TAG_WAVEFORMAT (BASS_ChannelGetTags type)
+* Adjustable sample channel limit
+ BASS_SampleSetInfo
+* Per-channel CPU usage monitoring
+ BASS_ATTRIB_CPU (BASS_ChannelGetAttribute option)
+* Pre-allocation of push stream queue space
+ BASS_StreamPutData
+* Support for AIFF files with the data chunk before the format info chunk
+ BASS_StreamCreateFile/User/URL
+* Ramping-in disabled for all but the XM format (and MODs in FT2 mode) in "normal" ramping mode
+ BASS_MUSIC_RAMP (BASS_MusicLoad flag)
+* RIFF "INFO" tag reading fix
+ BASS_TAG_RIFF_INFO (BASS_ChannelGetTags type)
+* OSX 10.7 compatibility fix
+* x86_64 architecture support on OSX
+* Delphi dynamic loading unit removed (now available as separate download)
+
+2.4.7 - 30/11/2010
+------------------
+* Decode-to-position seeking
+ BASS_POS_DECODETO (BASS_ChannelSetPosition flag)
+* Support for RIFF "DISP" text tags
+ BASS_TAG_RIFF_DISP (BASS_ChannelGetTags type)
+* Support for APEv1 tags
+ BASS_TAG_APE (BASS_ChannelGetTags type)
+ BASS_TAG_APE_BINARY (BASS_ChannelGetTags type)
+* 16384 sample FFT
+ BASS_DATA_FFT16384 (BASS_ChannelGetData flag)
+* Support for AIFF files larger than 4GB
+ BASS_StreamCreateFile/User/URL
+* Acceptance of self-signed and invalid certificates
+ BASS_StreamCreateURL
+* Internet stream reading timeout
+ BASS_CONFIG_NET_READTIMEOUT (BASS_SetConfig option)
+* Support for removing a DSP within its DSPPROC
+ BASS_ChannelRemoveDSP
+* Buffer bypassing for lower latency output (not available on Windows)
+ BASS_ATTRIB_NOBUFFER (BASS_ChannelSetAttribute option)
+ SYNTH example added (OSX)
+* A "Default" device that follows default device changes on Windows 7
+ BASS_CONFIG_DEV_DEFAULT (BASS_SetConfig option)
+* Xcode examples project added for OSX
+* Documentation updated with platform-specific info for iOS/Linux/WinCE
+
+2.4.6 - 17/6/2010
+-----------------
+* Support for APEv2 tags, including binary
+ BASS_TAG_APE (BASS_ChannelGetTags type)
+ BASS_TAG_APE_BINARY (BASS_ChannelGetTags type)
+* Unicode/IDN URL support
+ BASS_StreamCreateURL
+* Decoding position retrieval
+ BASS_POS_DECODE (BASS_ChannelGetPosition flag)
+* Support for OGG 6/7.1 channel configs
+ BASS_StreamCreateFile/User/URL
+* Support for setting syncs within mixtime SYNCPROCs
+ BASS_ChannelSetSync
+* Support for setting additional DSP/FX within DSPPROCs
+ BASS_ChannelSetDSP/FX
+* DC bias removal in FFT processing
+ BASS_DATA_FFT_REMOVEDC (BASS_ChannelGetData flag)
+* Fix for incorrect (2x) return value when getting FFT data from a 16-bit channel
+ BASS_ChannelGetData
+* Fix for incorrect (STOPPED instead of PAUSED) channel status following BASS_Pause
+ BASS_ChannelIsActive
+
+2.4.5 - 18/12/2009
+------------------
+* Support for little-endian AIFF files
+ BASS_StreamCreateFile/User/URL
+ BASS_SampleLoad
+* Support for 64-bit floating-point WAVE/AIFF files
+ BASS_StreamCreateFile/User/URL
+ BASS_SampleLoad
+* Input volume retrieval failure results in a reading of -1 instead of 1
+ BASS_RecordGetInput
+ RECTEST example updated
+* Input volume support on OSX
+ BASS_RecordSetInput
+ BASS_RecordGetInput
+ RECTEST example updated
+* Fix for deferred input settings on Vista
+ BASS_RecordSetInput
+* Windows MP3 codec given preference over other installed MP3 codecs (MP3-FREE version)
+ BASS_StreamCreateFile/User/URL
+ BASS_SampleLoad
+
+2.4.4 - 13/10/2009
+------------------
+* RIFF/BWF "radio traffic" tag retrieval
+ BASS_TAG_RIFF_CART (BASS_ChannelGetTags type)
+ TAG_CART structure
+* Support for ID3v2 tags in RIFF/WAVE/AIFF files ("ID3 " chunk)
+ BASS_TAG_ID3V2 (BASS_ChannelGetTags type)
+* Pushed fractional samples are refused rather than discarded
+ BASS_StreamPutData
+* DX8 effect emulation on OSX
+ BASS_FX_DX8_CHORUS/DISTORTION/ECHO/FLANGER/PARAMEQ/REVERB (BASS_ChannelSetFX types)
+ FXTEST example added
+* UTF-16 support on OSX
+ BASS_UNICODE (BASS_StreamCreateFile/SampleLoad/MusicLoad/PluginLoad flag)
+
+2.4.3 - 8/5/2009
+----------------
+* MOD order list retrieval
+ BASS_TAG_MUSIC_ORDERS (BASS_ChannelGetTags type)
+* Support for ID3v2 tags in RIFF/WAVE files ("id3 " chunk)
+ BASS_TAG_ID3V2 (BASS_ChannelGetTags type)
+* Improved position reporting precision on Vista
+ BASS_ChannelGetPosition
+* Length retrieval when streaming in blocks (BASS_STREAM_BLOCK)
+ BASS_ChannelGetLength
+* Support for CoreAudio codecs on OSX
+ BASS_StreamCreateFile/User
+ BASS_SampleLoad
+ BASS_TAG_CA_CODEC (BASS_ChannelGetTags type)
+ TAG_CA_CODEC structure
+* 3D algorithm option support on OSX
+ BASS_CONFIG_3DALGORITHM (BASS_SetConfig option)
+
+2.4.2 - 18/9/2008
+-----------------
+* RF64 support
+ BASS_StreamCreateFile/User
+* RIFF/BWF "Broadcast Audio Extension" tag retrieval
+ BASS_TAG_RIFF_BEXT (BASS_ChannelGetTags type)
+ TAG_BEXT structure
+* ID3v1 tag structure
+ TAG_ID3 structure
+* Multiple simultaneous recordings per device on Vista & OSX (as on XP)
+ BASS_RecordStart
+* DX8 effect parameter defaults updated/corrected in documentation
+
+2.4 - 2/4/2008
+--------------
+* "Push" streaming
+ STREAMPROC_PUSH (BASS_StreamCreate option)
+ BASS_StreamPutData
+ LIVEFX and MULTI examples updated
+* "Push" buffered file streaming
+ STREAMFILE_BUFFERPUSH (BASS_StreamCreateFileUser system)
+ BASS_StreamPutFileData
+* STREAMFILEPROC replaced by table of callbacks for each file operation
+ BASS_FILEPROCS (FILECLOSEPROC/FILELENPROC/FILEREADPROC/FILESEEKPROC)
+ STREAMFILEPROC *removed*
+* 64-bit file positioning
+ BASS_SampleLoad
+ BASS_MusicLoad
+ BASS_StreamCreateFile
+ BASS_StreamGetFilePosition
+* File buffer level retrieval
+ BASS_FILEPOS_BUFFER (BASS_StreamGetFilePosition mode)
+* Sinc interpolated MOD music mixing
+ BASS_MUSIC_SINCINTER (BASS_MusicLoad flag)
+* MO3 2.4 support
+ BASS_MusicLoad
+* MOD orders positioning incorporated into channel functions
+ BASS_ChannelGetLength
+ BASS_ChannelSetPosition
+ BASS_ChannelGetPosition
+ BASS_MusicGetOrderPosition *removed*
+ BASS_MusicGetOrders *removed*
+* Channel attribute functions consolidated
+ BASS_ChannelSetAttribute
+ BASS_ChannelGetAttribute
+ BASS_ChannelSlideAttribute
+ BASS_ChannelIsSliding
+ BASS_ChannelSetAttributes *removed*
+ BASS_ChannelGetAttributes *removed*
+ BASS_ChannelSlideAttributes *removed*
+ BASS_ChannelSetEAXMix *removed*
+ BASS_ChannelGetEAXMix *removed*
+ BASS_MusicSetAttribute *removed*
+ BASS_MusicGetAttribute *removed*
+* Floating-point volume and panning
+ BASS_SetVolume
+ BASS_GetVolume
+ BASS_RecordSetInput
+ BASS_RecordGetInput
+ BASS_ATTRIB_PAN/VOL (BASS_ChannelGet/Set/SlideAttribute options)
+ BASS_ATTRIB_MUSIC_VOL_CHAN/INST (BASS_ChannelGet/Set/SlideAttribute options)
+ BASS_SAMPLE (volume/pan/outvol members)
+ BASS_CONFIG_MAXVOL *removed*
+ BASSTEST and RECTEST examples updated
+* Output device volume control on Vista (as on other OS)
+ BASS_SetVolume
+ BASS_GetVolume
+* Multiple update threads
+ BASS_CONFIG_UPDATETHREADS (BASS_SetConfig option)
+ BASSTEST example updated
+* Global volume range increased to 10000
+ BASS_CONFIG_GVOL_SAMPLE/STREAM/MUSIC (BASS_SetConfig options)
+ BASSTEST example updated
+* Setting and retrieving of a sample's data
+ BASS_SampleSetData
+ BASS_SampleGetData
+ BASS_SampleCreate
+ BASS_SampleCreateDone *removed*
+* Channel flag setting mask
+ BASS_ChannelFlags
+ BASS_ChannelSetFlags *removed*
+ SPEAKERS example updated
+* 256 sample FFT
+ BASS_DATA_FFT256 (BASS_ChannelGetData flag)
+* Channel locking to prevent access by other threads
+ BASS_ChannelLock
+* Manual channel buffer updating
+ BASS_ChannelUpdate
+ BASS_ChannelPreBuf *removed*
+* Configurable manual update length
+ BASS_Update
+* Extended device information retrieval and detection of new/removed devices
+ BASS_GetDeviceInfo
+ BASS_RecordGetDeviceInfo
+ BASS_DEVICEINFO structure
+ BASS_GetDeviceDescription *removed*
+ BASS_RecordGetDeviceDescription *removed*
+ BASS_INFO (driver member) *removed*
+ BASS_RECORDINFO (driver member) *removed*
+ MULTI example updated
+* Default device change tracking on Windows (as on OSX)
+ BASS_Init
+ BASS_RecordInit
+* Speaker detection from Windows control panel
+ BASS_DEVICE_CPSPEAKERS (BASS_Init flag)
+* Channel automatically stopped & resumed for DX8 effects
+ BASS_ChannelSetFX
+ BASS_ChannelRemoveFX
+* "double" precision position conversion
+ BASS_ChannelBytes2Seconds
+ BASS_ChannelSeconds2Bytes
+* Separate config functions for pointers
+ BASS_SetConfigPtr
+ BASS_GetConfigPtr
+ BASS_CONFIG_NET_AGENT/PROXY (BASS_SetConfigPtr options)
+* Configurable file format verification length
+ BASS_CONFIG_VERIFY (BASS_SetConfig option)
+* Stream filename retrieval
+ BASS_CHANNELINFO (file member)
+* Channel sample retrieval
+ BASS_CHANNELINFO (sample member)
+* META syncs no longer receive metadata in the "data" parameter
+ BASS_SYNC_META (BASS_ChannelSetSync type)
+* Separate sync for OGG logical bitstream changes (instead of BASS_SYNC_META)
+ BASS_SYNC_OGG_CHANGE (BASS_ChannelSetSync type)
+ NETRADIO example updated (C version)
+* Message syncing removed (use PostMessage instead)
+ BASS_SYNC_MESSAGE (BASS_ChannelSetSync flag) *removed*
+* Data retrieval from stopped/paused channels
+ BASS_ChannelGetData
+* Callback "user" parameters changed to pointers
+ BASS_StreamCreate / STREAMPROC
+ BASS_StreamCreateFileUser
+ BASS_StreamCreateURL / DOWNLOADPROC
+ BASS_RecordStart / RECORDPROC
+ BASS_ChannelSetDSP / DSPPROC
+ BASS_ChannelSetSync / SYNCPROC
+
+2.3.0.3 - 30/7/2007
+-------------------
+* FX state resetting
+ BASS_FXReset
+* PLS/M3U playlist URL processing
+ BASS_CONFIG_NET_PLAYLIST (BASS_SetConfig option)
+ NETRADIO example updated
+* Internet stream connection status retrieval
+ BASS_FILEPOS_CONNECTED (BASS_StreamGetFilePosition mode)
+* Lyrics3v2 tags
+ BASS_TAG_LYRICS3 (BASS_ChannelGetTags type)
+* IT virtual channel configuration
+ BASS_CONFIG_MUSIC_VIRTUAL (BASS_SetConfig option)
+* Accurate speaker detection on Vista
+ BASS_INFO (speakers member)
+* Device output/input rate retrieval on Vista
+ BASS_INFO (freq member)
+ BASS_RECORDINFO (freq member)
+* Syncing upon position changes
+ BASS_SYNC_SETPOS (BASS_ChannelSetSync type)
+* Improved stall handling
+ BASS_SYNC_STALL
+* Invalid decoding channel flags produce an error instead of being ignored
+ BASS_StreamCreate/File/User/URL
+ BASS_MusicLoad
+
+2.3.0.2 - 22/1/2007
+-------------------
+* Retrieval of a sample's existing channel handles
+ BASS_SampleGetChannels
+* 8192 sample FFT
+ BASS_DATA_FFT8192 (BASS_ChannelGetData flag)
+* Adjustable recording buffer
+ BASS_CONFIG_REC_BUFFER (BASS_SetConfig option)
+* Stopping decoding channels before the end
+ BASS_ChannelStop
+* Sample channels created paused to prevent overriding before playback
+ BASS_SampleGetChannel
+* Separate "MP3-FREE" version using the OS's MP3 decoder
+ BASS_CONFIG_MP3_CODEC *removed*
+
+2.3.0.1 - 12/6/2006
+-------------------
+* Ability to move a channel to another device
+ BASS_ChannelSetDevice
+ MULTI example updated
+* Support for ID3v2.4 tags at end of file
+ BASS_TAG_ID3V2 (BASS_ChannelGetTags type)
+
+2.3 - 21/5/2006
+---------------
+* MOD message/instrument/sample text retrieval, merged with stream tag retrieval function
+ BASS_ChannelGetTags
+ BASS_TAG_MUSIC_NAME/MESSAGE/INST/SAMPLE (BASS_ChannelGetTags types)
+ BASS_MusicGetName *removed*
+ BASS_StreamGetTags *removed*
+* Plugin information retrieval
+ BASS_PluginGetInfo
+ BASS_PLUGININFO/FORM structures
+ BASS_CHANNELINFO (plugin member)
+ PLUGINS example updated
+* RIFF/WAVE "INFO" tag retrieval
+ BASS_TAG_RIFF_INFO (BASS_StreamGetTags type)
+* More specific WAVE format information
+ BASS_CTYPE_STREAM_WAV_PCM/FLOAT (channel types)
+ BASS_CTYPE_STREAM_WAV (channel type flag)
+* Proxy server configuration
+ BASS_CONFIG_NET_PROXY (BASS_SetConfig option)
+ BASS_CONFIG_NET_NOPROXY *removed*
+ NETRADIO example updated
+* Passive FTP mode
+ BASS_CONFIG_NET_PASSIVE (BASS_SetConfig option)
+* Agent changes take immediate effect
+ BASS_CONFIG_NET_AGENT (BASS_SetConfig option)
+* Minimum time gap between creating new sample channels
+ BASS_SAMPLE (mingap member)
+ BASS_SampleGetChannel
+* Support for Unicode plugin filenames
+ BASS_PluginLoad
+* Device output/input rate retrieval (MacOSX only)
+ BASS_INFO (freq member)
+ BASS_RECORDINFO (freq member)
+* Extended version info (minor revision)
+ BASS_GetVersion
+* Unsupported codec error code
+ BASS_ERROR_CODEC
+* Optional use of the Windows MP3 codec
+ BASS_CONFIG_MP3_CODEC (BASS_SetConfig option)
+* 3D support for MacOSX
+ BASS_Set3DFactors
+ BASS_Get3DFactors
+ BASS_Set3DPosition
+ BASS_Get3DPosition
+ BASS_Apply3D
+ BASS_ChannelSet3DAttributes
+ BASS_ChannelGet3DAttributes
+ BASS_ChannelSet3DPosition
+ BASS_ChannelGet3DPosition
+ 3DTEST example added (Win32 example also updated)
+* VB version of SYNTH example added
+
+2.2 - 2/10/2005
+---------------
+* Add-on plugin system
+ BASS_PluginLoad
+ BASS_PluginFree
+ BASS_StreamCreateFile/User/URL
+ BASS_SampleLoad
+ PLUGINS example added
+* MOD position & syncing in bytes
+ BASS_ChannelSetPosition
+ BASS_ChannelGetPosition
+ BASS_MusicGetOrderPosition added for orders position
+ BASS_SYNC_MUSICPOS added for orders syncing
+ MAKEMUSICPOS macro/define
+ CUSTLOOP example updated
+* Stream/MOD "length" functions combined (also works with samples), new MOD orders length function
+ BASS_ChannelGetLength
+ BASS_MusicGetOrders
+ BASS_StreamGetLength *removed*
+ BASS_MusicGetLength *removed*
+* Support for AIFF files
+ BASS_StreamCreateFile/User/URL
+ BASS_SampleLoad
+* Support for 24 and 32-bit (integer) WAV files
+ BASS_StreamCreateFile/User/URL
+ BASS_SampleLoad
+* WAV files are no longer converted to the "device" resolution
+ BASS_StreamCreateFile/User/URL
+* Recording master control
+ BASS_RecordGetInput
+ BASS_RecordSetInput
+* Adjustable pre-buffering
+ BASS_ChannelPreBuf
+* Floating-point data retrieval
+ BASS_DATA_FLOAT (BASS_ChannelGetData flag)
+* Support for floating-point samples
+ BASS_SampleLoad
+ BASS_SampleCreate
+* Multi-channel samples
+ BASS_SampleLoad/Create
+ BASS_SAMPLE (chans member)
+* Sample lengths given in bytes
+ BASS_SampleCreate
+ BASS_SAMPLE (length member)
+* MOD music 8-bit resolution option
+ BASS_MusicLoad
+* OGG vendor tag retrieval
+ BASS_TAG_VENDOR (BASS_StreamGetTags type)
+* Configurable "User-Agent" header for internet streams
+ BASS_CONFIG_NET_AGENT (BASS_SetConfig option)
+* Shoutcast metadata is now requested automatically
+ BASS_STREAM_META flag *removed*
+* Download callbacks receive all data from start of file/stream (including any non-audio data)
+ DOWNLOADPROC
+* Length when streaming in blocks is unavailable (BASS_ERROR_NOTAVAIL, not just 0)
+ BASS_ChannelGetLength
+* Support for growing custom file streams
+ BASS_FILE_LEN (STREAMFILEPROC action)
+* Query file action removed
+ BASS_FILE_QUERY *removed*
+* Recording channel syncing
+ BASS_ChannelSetSync
+* Info structure "size" members removed
+ BASS_INFO structure
+ BASS_RECORDINFO structure
+* Little bit of flag reshuffling
+ BASS_MP3_SETPOS renamed to BASS_STREAM_PRESCAN
+ BASS_MUSIC_CALCLEN value changed and renamed to BASS_MUSIC_PRESCAN
+ BASS_MUSIC_POSRESET value changed
+* Add-on API enhancements
+* MacOSX port introduced
+
+2.1 - 28/11/2004
+----------------
+* Improved "mixtime" sync system, allowing custom looping
+ SYNCPROC
+ CUSTLOOP example added
+* FX can now be in the DSP chain, so can be prioritized and applied in floating-point
+ BASS_ChannelSetFX
+ BASS_CONFIG_FLOATDSP (BASS_SetConfig option)
+* Ability to set channel flags (eg. looping) independent of playback
+ BASS_ChannelSetFlags
+ SPEAKERS example updated
+* Stream/MOD "play" and channel "resume" functions combined
+ BASS_ChannelPlay
+ BASS_StreamPlay *removed*
+ BASS_MusicPlay *removed*
+ BASS_MusicPlayEx *removed*
+ BASS_ChannelResume *removed*
+* Stream/MOD pre-buffering functions combined
+ BASS_ChannelPreBuf
+ BASS_StreamPreBuf *removed*
+ BASS_MusicPreBuf *removed*
+* MOD attribute functions combined, with added BPM/speed/globalvolume options
+ BASS_MusicSetAttribute
+ BASS_MusicGetAttribute
+ BASS_MUSIC_ATTRIB_AMPLIFY
+ BASS_MUSIC_ATTRIB_PANSEP
+ BASS_MUSIC_ATTRIB_PSCALER
+ BASS_MUSIC_ATTRIB_BPM
+ BASS_MUSIC_ATTRIB_SPEED
+ BASS_MUSIC_ATTRIB_VOL_GLOBAL
+ BASS_MUSIC_ATTRIB_VOL_CHAN
+ BASS_MUSIC_ATTRIB_VOL_INST
+ BASS_MusicSetAmplify *removed*
+ BASS_MusicSetPanSep *removed*
+ BASS_MusicSetPositionScaler *removed*
+ BASS_MusicSetVolume *removed*
+ BASS_MusicGetVolume *removed*
+* Flag to reset bpm/etc as well as notes when seeking in MOD musics
+ BASS_MUSIC_POSRESETEX (BASS_MusicLoad & BASS_ChannelSetFlags flag)
+* More flexible and concise sample channel creation system
+ BASS_SampleGetChannel
+ BASS_SamplePlay *removed*
+ BASS_SamplePlayEx *removed*
+ BASS_SamplePlay3D *removed*
+ BASS_SamplePlay3DEx *removed*
+* Support for up to 30 speakers
+ BASS_SPEAKER_N macro/define
+* More precise level measurement
+ BASS_ChannelGetLevel
+* Level can now be retrieved from decoding channels
+ BASS_ChannelGetLevel
+* Retrieval of a sample/channel's original sample resolution
+ BASS_SAMPLE (origres member)
+ BASS_CHANNELINFO (origres member)
+* Support for streaming WAV files in "blocks"
+ BASS_StreamCreateURL
+ BASS_StreamCreateFileUser
+* Status info (HTTP/ICY tags) available during connection to server
+ BASS_STREAM_STATUS (BASS_StreamCreateURL flag)
+ DOWNLOADPROC
+ NETRADIO example updated (Delphi version also added)
+* Adjustable internet stream pre-buffering
+ BASS_CONFIG_NET_PREBUF (BASS_SetConfig option)
+* Option to bypass proxy server
+ BASS_CONFIG_NET_NOPROXY (BASS_SetConfig option)
+* Option whether to allow channels to be played after BASS_Pause
+ BASS_CONFIG_PAUSE_NOPLAY (BASS_SetConfig option)
+* Recording channel count now a separate parameter
+ BASS_RecordStart (chans parameter)
+* Synchronizer for when a channel is freed
+ BASS_SYNC_FREE (BASS_ChannelSetSync type)
+* Data start file position retrieval
+ BASS_FILEPOS_START (BASS_StreamGetFilePosition mode)
+* Performance improvements
+ MP2 decoding ~20% faster
+ MP3/MP1 decoding & FFT processing all up to 10% faster
+ OGG decoding ~3% faster
+* C/C++ examples reorganised, with makefiles & VC++ projects
+* Add-on API enhancements
+* More DLL shrinkage :)
+
+2.0 - 31/10/2003
+----------------
+* Multiple output device support
+ BASS_Init (device number changes)
+ BASS_SetDevice
+ BASS_GetDevice
+ BASS_ChannelGetDevice
+ MULTI example updated (VB version also added)
+* Multiple recording device support
+ BASS_RecordSetDevice
+ BASS_RecordGetDevice
+ BASS_RecordStart
+ BASS_ChannelGetDevice
+ HRECORD handle
+ RECORDPROC (handle parameter)
+* Recording with DSP/FX
+ BASS_ChannelSetDSP
+ BASS_ChannelSetFX
+* Recording position retrieval
+ BASS_ChannelGetPosition
+* Start recording paused
+ BASS_RECORD_PAUSE (BASS_RecordStart flag)
+* Multi-channel streams, inc. support for multichannel OGG & WAV files
+ BASS_StreamCreate
+ BASS_StreamCreateFile/User/URL
+* FFT for individual channels, inc. multi-channel streams
+ BASS_DATA_FFT_INDIVIDUAL (BASS_ChannelGetData flag)
+ BASS_DATA_FFT512S/1024S/2048S/4096S *removed*
+* DSP prioritizing
+ BASS_ChannelSetDSP
+ DSPTEST example updated
+* Seeking in internet streamed files
+ BASS_ChannelSetPosition
+* Enhanced custom file stream systems
+ BASS_StreamCreateFileUser
+ BASS_FILE_SEEK (STREAMFILEPROC action)
+ BASS_STREAM_FILEPROC flag *removed*
+* Enhanced custom stream system with automatic stalling/resuming
+ STREAMPROC
+ BASS_STREAMPROC_END (STREAMPROC flag)
+* Synchronizer for stalled/resumed playback
+ BASS_SYNC_STALL (BASS_ChannelSetSync type)
+* Synchronizer for completed download
+ BASS_SYNC_DOWNLOAD (BASS_ChannelSetSync type)
+* End sync support for custom streams
+ BASS_SYNC_END (BASS_ChannelSetSync type)
+* Synchronizer support for decoding channels
+ BASS_ChannelSetSync
+* Unified configuration function
+ BASS_SetConfig
+ BASS_GetConfig
+ BASS_SetBufferLength *removed*
+ BASS_SetNetConfig *removed*
+ BASS_SetGlobalVolumes *removed*
+ BASS_GetGlobalVolumes *removed*
+ BASS_SetLogCurves *removed*
+ BASS_Set3DAlgorithm *removed*
+ BASS_DEVICE_FLOATDSP flag *removed*
+* Internet stream saving to disk replaced by more flexible callback
+ BASS_StreamCreateURL
+ DOWNLOADPROC
+ VB NETRADIO example updated
+* Buffer length retrieval when "streaming in blocks"
+ BASS_FILEPOS_END (BASS_StreamGetFilePosition mode)
+* Individual sample rate setting for MOD musics
+ BASS_MusicLoad
+* Channel type and default sample rate retrieval
+ BASS_ChannelGetInfo (replaces BASS_ChannelGetFlags)
+ BASS_CHANNELINFO
+* MOD music flag retrieval
+ BASS_CHANNELINFO (flags member)
+* Adjustable instrument volumes in MOD musics
+ BASS_MusicSetVolume (replaces BASS_MusicSetChannelVol)
+ BASS_MusicGetVolume (replaces BASS_MusicGetChannelVol)
+* Automatically free a MOD music when it stops or ends
+ BASS_MUSIC_AUTOFREE (BASS_MusicLoad flag)
+* Class GUID added to initialization parameters
+ BASS_Init
+ BASS_SetCLSID *removed*
+* Update period adjustable at any time
+ BASS_CONFIG_UPDATEPERIOD (BASS_SetConfig option)
+ BASS_DEVICE_NOTHREAD flag *removed*
+* Customizable maximum volume setting
+ BASS_CONFIG_MAXVOL (BASS_SetConfig option)
+ BASS_DEVICE_VOL1000 flag *removed*
+* Device volume is now always left as it is during init/freeing
+ BASS_DEVICE_LEAVEVOL flag *removed*
+* Device driver name retrieval
+ BASS_INFO (driver member)
+ BASS_RECORDINFO (driver member)
+* Error codes are local to the current thread
+ BASS_ErrorGetCode
+* Performance improvements
+ MP2 decoding 15-20% faster
+ MP3 decoding ~5% faster
+* Built-in CD functions removed (replaced in BASSCD)
+ BASS_CDDoor *removed*
+ BASS_CDFree *removed*
+ BASS_CDGetID *removed*
+ BASS_CDGetTrackLength *removed*
+ BASS_CDGetTracks *removed*
+ BASS_CDInDrive *removed*
+ BASS_CDInit *removed*
+ BASS_CDPlay *removed*
+* Force channels to use software mixing
+ BASS_SAMPLE_SOFTWARE (BASS_StreamCreate/File/User/URL & BASS_MusicLoad flag)
+* Support for high-pass filter and forward/reverse (S9E/F) IT/MPT effects
+* BASS_MUSIC flags rearranged to mirror BASS_SAMPLE/STREAM counterparts
+* Output automatically started during initialization
+* BASS_ChannelGetData once again accepts any "length" param
+* All function comments have been removed from the API headers to avoid
+ outdated/incorrect information - the documentation should be used.
+* TMT Pascal API removed from main distribution - now available on the website
+* A few more 'K' knocked off the DLL size :)
+
+1.8a - 18/6/2003
+----------------
+* Tweaks 'n' fixes, including...
+ Fixed seeking bug on 32-bit OGG streams
+ Fixed seeking on a decoding channel after it has reached the end
+ Low FPU precision (eg. when using Direct3D) issue addressed
+ Improved speakers (BASS_INFO) detection
+ BASS_ChannelSeconds2Bytes return value is rounded down to nearest sample
+ BASS_ChannelGetData "length" param must equal a whole number of samples
+ Slide syncs are triggered by "-2" volume slides on "autofree" streams
+* Support for Unicode filenames
+ BASS_UNICODE (BASS_SampleLoad/BASS_StreamCreateFile/BASS_MusicLoad flag)
+* 4096 sample FFT
+ BASS_DATA_FFT4096/S (BASS_ChannelGetData flags)
+* Another 'K' knocked off the DLL size
+
+1.8 - 9/3/2003
+--------------
+* 32-bit floating-point channels
+ BASS_SAMPLE_FLOAT (BASS_StreamCreate/File/URL flag)
+ BASS_MUSIC_FLOAT (BASS_MusicLoad flag)
+ BASS_SAMPLE_FLOAT (BASS_RecordStart flag)
+ BASS_DEVICE_FLOATDSP (BASS_Init flag)
+ DSPTEST example updated
+* Support for 32-bit floating-point (type 3) WAV files
+ BASS_StreamCreateFile/URL
+ BASS_SampleLoad
+* Channel speaker assignment
+ BASS_SPEAKER_FRONT (BASS_MusicLoad/BASS_StreamCreate/File/URL flag)
+ BASS_SPEAKER_REAR "
+ BASS_SPEAKER_CENLFE "
+ BASS_SPEAKER_REAR2 "
+ BASS_SPEAKER_FRONTLEFT "
+ BASS_SPEAKER_FRONTRIGHT "
+ BASS_SPEAKER_REARLEFT "
+ BASS_SPEAKER_REARRIGHT "
+ BASS_SPEAKER_CENTER "
+ BASS_SPEAKER_LFE "
+ BASS_SPEAKER_REAR2LEFT "
+ BASS_SPEAKER_REAR2RIGHT "
+ BASS_INFO (speakers member)
+ BASS_DEVICE_SPEAKERS (BASS_Init flag)
+ 4SPEAKER example replaced by SPEAKERS example
+* Recording input type retrieval
+ BASS_INPUT_TYPE_xxx (BASS_RecordGetInput)
+ RECTEST example updated
+* Non-interpolated MOD mixing
+ BASS_MUSIC_NONINTER (BASS_MusicLoad/PlayEx flag)
+* Performance improvements
+ FFT up to 100% faster!
+ MP3(MPEG2/2.5) decoding up to 60% faster
+ MMX mixers 5-10% faster
+ MP3(MPEG1)/MP2/MP1/OGG decoding all ~5% faster
+* Optional disabling of FFT windowing
+ BASS_DATA_FFT_NOWINDOW (BASS_ChannelGetData flag)
+* BASS_ERROR_FILEFORM - error code to distinguish between file and sample format
+ BASS_MusicLoad
+ BASS_SampleLoad
+ BASS_StreamCreate/File/URL
+* BASS_StreamGetFilePosition mode flags added
+ BASS_FILEPOS_DECODE/DOWNLOAD/END
+* DirectSound 9 detection
+ BASS_INFO (dsver member)
+* Initialization flags retrieval
+ BASS_INFO (initflags member)
+* Half-rate MP3 playback option removed
+ BASS_MP3_HALFRATE flag *removed*
+* New internal "plugin" system - BASSWMA is further integrated as a result
+* Improved documentation - integrated with BASSWMA, search option added
+* VB version of DSPTEST example added
+* Delphi RECORDTEST example added
+* Guess what... reduced DLL size again :)
+
+1.7 - 27/10/2002
+----------------
+* New alternative DX8 (DMO) effects implementation
+ BASS_StreamCreate/File/URL
+ BASS_MusicLoad
+ BASS_ChannelSetFX
+ SYNTH example updated
+* User file streaming
+ BASS_STREAM_FILEPROC (BASS_StreamCreate flag)
+ STREAMFILEPROC
+* DSP & FX support for decoding channels
+ BASS_ChannelSetDSP
+ BASS_ChannelSetFX
+* Support for DX8 (DMO) effects in IT/XM/MO3 files
+ BASS_MusicLoad
+* Support for chained OGG streaming (and syncing)
+ BASS_StreamCreateURL
+ BASS_SYNC_META (BASS_ChannelSetSync type)
+* Attribute (volume/frequency/pan) sliding
+ BASS_ChannelSlideAttributes
+ BASS_ChannelIsSliding
+ BASS_SYNC_SLIDE (BASS_ChannelSetSync type)
+* Recording without a callback function
+ BASS_RecordStart
+ LIVEFX example added
+* Query a channel's buffered data
+ BASS_DATA_AVAILABLE (BASS_ChannelGetData flag)
+* Discard data from the recording buffer
+ BASS_ChannelGetData
+* Adjustable internet stream config (timeout/buffer lengths)
+ BASS_SetNetConfig
+* Recommended minimum buffer length
+ BASS_INFO (minbuf member)
+* MOD music flags adjustment without changing playback position
+ BASS_MusicPlayEx
+ PLAYER (MASM) example updated
+* More functions are now useable in MOD music "mixtime" syncs
+ SYNCPROC
+ BASS_ChannelSetPosition
+ BASS_MusicPlayEx
+ BASS_MusicSetAmplify
+ BASS_MusicSetPanSep
+* Maximum buffer length increased to 5 seconds
+ BASS_SetBufferLength
+* Support for extended filter range in IT files
+ BASS_MusicLoad
+* Speedier MOD music file verification
+ BASS_MusicLoad
+* Delphi 3DTEST example fixed
+* Magically reduced DLL size again :)
+
+1.6a - 25/8/2002
+----------------
+* OGG support updated to 1.0
+* Stereo FFT
+ BASS_DATA_FFT512S/1024S/2048S (BASS_ChannelGetData flags)
+* Support for "Invert Loop" (EFx) MOD effect
+* Reduced DLL size
+* New Delphi examples
+ WRITEWAV - WAVE writer example
+ SAMPLEVIS - Visualisation example
+
+1.6 - 13/6/2002
+---------------
+* 64-bit stream lengths and positions
+ BASS_StreamGetLength
+ BASS_ChannelBytes2Seconds
+ BASS_ChannelSeconds2Bytes
+ BASS_ChannelGetPosition
+ BASS_ChannelSetPosition
+ BASS_ChannelSetSync
+* Recording input selection
+ BASS_RECORDINFO (inputs & singlein members)
+ BASS_RecordGetInputName
+ BASS_RecordGetInput
+ BASS_RecordSetInput
+* Adjustable recording update period
+ BASS_RecordStart
+* Load OGG files as samples
+ BASS_SampleLoad
+* CD drive door opening & closing
+ BASS_CDDoor
+* CDDB2 ID retrieval
+ BASS_CDID_CDDB2 (BASS_CDGetID flag)
+* Streaming beyond initial file length
+ BASS_StreamCreateFile
+* Recording position bytes<->seconds translation
+ BASS_ChannelBytes2Seconds
+ BASS_ChannelSeconds2Bytes
+* Improved multi-threaded support (play from any thread)
+ BASS_MusicPlay/Ex
+ BASS_SamplePlay/3D/Ex
+ BASS_StreamPlay
+ BASS_DEVICE_NOSYNC flag *removed*
+* Paused channel status
+ BASS_ACTIVE_PAUSED (BASS_ChannelIsActive)
+* Integrated WMA stream freeing
+ BASS_StreamFree
+ BASS_Free
+* Pin-point accurate OGG seeking without BASS_MP3_SETPOS flag
+* Win2k DS buffer bug fix
+
+1.5a - 14/4/2002
+----------------
+* NT4 fix (also enables "nosound" device without DX installed)
+ BASS_ERROR_DX error code
+* MOD music loading without the samples
+ BASS_MUSIC_NOSAMPLE (BASS_MusicLoad flag)
+* Custom decoding channels
+ BASS_STREAM_DECODE (BASS_StreamCreate flag)
+* 5 second HTTP connection timeout
+ BASS_ERROR_TIMEOUT (BASS_StreamCreateURL error code)
+
+1.5 - 31/3/2002
+---------------
+* Improved performance
+ MMX mixers lot faster (over 50% faster in some cases!)
+ OGG decoding 15-20% faster
+ MP3 decoding 5-10% faster
+* Recording
+ BASS_RecordGetDeviceDescription
+ BASS_RecordInit
+ BASS_RecordFree
+ BASS_RecordGetInfo
+ BASS_RecordStart
+* OGG support built-in (OGG/VORBIS DLLs not required)
+ BASS_DEVICE_OGG flag *removed*
+* MOD music seeking in seconds
+ BASS_MusicPlayEx
+ BASS_ChannelSetPosition
+* Shoutcast metadata retrieval
+ BASS_STREAM_META (BASS_StreamCreateURL flag)
+ BASS_TAG_META (BASS_StreamGetTags type)
+ BASS_SYNC_META (BASS_ChannelSetSync type)
+* 1000 volume levels
+ BASS_DEVICE_VOL1000 (BASS_Init/CDInit flag)
+* CDDB ID retrieval
+ BASS_CDID_CDDB (BASS_CDGetID flag)
+* Leave the CD volume as it is during init/closing
+ BASS_DEVICE_LEAVEVOL (BASS_CDInit flag)
+* FFT enabled on decoding channels
+ BASS_ChannelGetData
+* Left level duplicated on right for mono channels
+ BASS_ChannelGetLevel
+* Improved MPEG length estimation without BASS_MP3_SETPOS flag
+ BASS_StreamGetLength
+* Support for Modplug/ADPCM compressed files
+ BASS_MusicLoad
+* Device description function parameter change
+ BASS_GetDeviceDescription
+* MASM API
+
+1.4 - 30/1/2002
+---------------
+* Channel decoding without playback
+ BASS_MUSIC_DECODE (BASS_MusicLoad flag)
+ BASS_STREAM_DECODE (BASS_StreamCreateFile/URL flag)
+ BASS_ChannelGetData
+* Windows message sync callbacks
+ BASS_SYNC_MESSAGE (BASS_ChannelSetSync flag)
+* Adjustable channel volumes in MOD musics
+ BASS_MusicSetChannelVol
+ BASS_MusicGetChannelVol
+* Customizable DirectSound initialization object
+ BASS_SetCLSID
+* Retrieve HMUSIC/HSTREAM/HCHANNEL IDirectSoundBuffer interfaces
+ BASS_GetDSoundObject
+* A3D functions removed (use BASS_SetCLSID/BASS_GetDSoundObject to access A3D)
+ BASS_DEVICE_A3D (BASS_Init flag)
+ BASS_SetA3DResManager
+ BASS_GetA3DResManager
+ BASS_SetA3DHFAbsorbtion
+ BASS_GetA3DHFAbsorbtion
+* Callback functions now work in VB6
+ DSPPROC
+ STREAMPROC
+ SYNCPROC
+* Improved PCM WAVE streaming performance
+ BASS_StreamCreateFile
+ BASS_StreamCreateURL
+* OGG modules updated to RC3
+* Stereo sample support in MO3 format
+* MO3 encoder now distributed separately from BASS
+
+1.3 - 17/11/2001
+----------------
+* Manual buffer updating
+ BASS_DEVICE_NOTHREAD (BASS_Init flag)
+ BASS_Update
+* Adjustable buffer update period (allows small buffer sizes)
+ BASS_Init
+* Output device latency retrieval
+ BASS_INFO (latency member)
+* MPEG/OGG seeking without BASS_MP3_SETPOS flag
+ BASS_ChannelSetPosition
+* Internet file streaming from offsets
+ BASS_StreamCreateURL
+* File stream tag/comment retrieval (ID3/ID3v2/OGG/HTTP/ICY tags)
+ BASS_StreamGetTags
+* Byte<->time position translation
+ BASS_ChannelBytes2Seconds
+ BASS_ChannelSeconds2Bytes
+* UMX (Unreal/Tournament music package) format support
+ BASS_MusicLoad
+* S3M/IT sync fx changed to S2x (S0x conflicted with S00)
+ BASS_SYNC_MUSICFX
+* Stereo sample support in IT/XM/S3M formats
+* MO3: OGG compression supported
+
+1.2 - 25/9/2001
+---------------
+* OGG (Ogg Vorbis) stream support
+ BASS_DEVICE_OGG (BASS_Init flag)
+ BASS_StreamCreateFile
+ BASS_StreamCreateURL
+* Channel linking (start/stop/pause/resume channels together)
+ BASS_ChannelSetLink
+ BASS_ChannelRemoveLink
+* MOD music playback length calculation
+ BASS_MUSIC_CALCLEN (BASS_MusicLoad flag)
+ BASS_MusicGetLength
+* Pre-buffering
+ BASS_MusicPreBuf
+ BASS_StreamPreBuf
+* Samples with single simultaneous playbacks have same HSAMPLE/HCHANNEL handle
+ BASS_SamplePlay/Ex
+* Stopping a custom stream flushes its buffer contents
+ BASS_ChannelStop
+
+1.1a - 31/8/2001
+----------------
+* NT4 bug fixed
+* XM Wxx effect syncing
+ BASS_SYNC_MUSICFX
+* MP3/2/1 rewinding without BASS_MP3_SETPOS
+ BASS_ChannelSetPosition
+
+1.1 - 11/8/2001
+---------------
+* DX8 (DMO) effects
+ BASS_SAMPLE_FX (BASS_StreamCreate/File/URL flag)
+ BASS_MUSIC_FX (BASS_MusicLoad flag)
+ BASS_ChannelSetFX
+ BASS_ChannelRemoveFX
+ BASS_FXSetParameters
+ BASS_FXGetParameters
+ BASS_FXCHORUS structure
+ BASS_FXCOMPRESSOR structure
+ BASS_FXDISTORTION structure
+ BASS_FXECHO structure
+ BASS_FXFLANGER structure
+ BASS_FXGARGLE structure
+ BASS_FXI3DL2REVERB structure
+ BASS_FXPARAMEQ structure
+ BASS_FXREVERB structure
+* Internet file streaming in blocks (inc. Shoutcast/Icecast stream support)
+ BASS_STREAM_BLOCK (BASS_StreamCreateURL flag)
+* 512/1024/2048 sample FFT
+ BASS_DATA_FFT512/1024/2048 (BASS_ChannelGetData flags)
+* CD identification
+ BASS_CDGetID
+* Improved DX version detection
+ BASS_INFO (dsver member)
+
+1.0 - 20/6/2001
+---------------
+* Load MP3/MP2/MP1 files as samples
+ BASS_SampleLoad
+* Internet file streaming from FTP servers
+ BASS_StreamCreateURL
+* Save a local copy of internet file streams
+ BASS_StreamCreateURL
+* Sample accurate file stream seeking
+ BASS_ChannelSetPosition
+ BASS_StreamGetBlockLength *removed*
+* Stream position synchronizer
+ BASS_SYNC_POS
+* Increased synchronizer precision
+* Improved MPEG file detection and error detection
+* Stop MOD musics on a backwards jump effect
+ BASS_MUSIC_STOPBACK (BASS_MusicLoad/PlayEx flag)
+* Leave the volume as it is during closing (as well as initialization)
+ BASS_DEVICE_LEAVEVOL (BASS_Init flag)
+* Optional automatic use of foreground window handle during initialization
+ BASS_Init
+* Reduced DLL size
+* VB API fixes
+
+0.9 - 18/4/2001
+---------------
+* Internet file streaming
+ BASS_StreamCreateURL
+* MP1 & MP2 (MPEG layer 1 & 2) support
+ BASS_StreamCreateFile/URL
+* MPEG 2.5 support (12000/11025/8000hz sample rates)
+ BASS_StreamCreateFile/URL
+* Decoding/download/end file stream position retrieval
+ BASS_StreamGetFilePosition
+* XMPlay surround sound for MOD musics
+ BASS_MUSIC_SURROUND (BASS_MusicLoad/PlayEx flag)
+ BASS_MUSIC_SURROUND2 (BASS_MusicLoad/PlayEx flag)
+* Restrict the download rate of internet file streams
+ BASS_STREAM_RESTRATE (BASS_StreamCreateURL flag)
+* Check if an internet file stream is stalled
+ BASS_ChannelIsActive
+* Automatically free a stream when it stops or ends
+ BASS_STREAM_AUTOFREE (BASS_StreamCreate/File/URL flag)
+* Leave the volume as it is during initialization
+ BASS_DEVICE_LEAVEVOL (BASS_Init flag)
+* Number of CD tracks retrieval
+ BASS_CDGetTracks
+* CD track length retrieval
+ BASS_CDGetTrackLength
+* Exact stream length set after whole file is streamed
+ BASS_StreamGetLength
+* TMT Pascal API and samples
+* Dynamic-loading Delphi API
+
+0.8a - 28/2/2000
+----------------
+* Updated Delphi API and samples
+
+0.8 - 24/1/2000
+---------------
+* Improved MP3 performance on P2/K6 and above CPUs
+* User DSP functions on streams and MOD musics
+ BASS_ChannelSetDSP
+ BASS_ChannelRemoveDSP
+* DX7 voice allocation & management
+ BASS_SAMPLE_VAM (BASS_SampleLoad/Create flag)
+ BASS_VAM_xxx flags
+ BASS_SAMPLE (vam & priority members)
+* DX7 software 3D algorithm selection
+ BASS_Set3DAlgorithm
+* DirectSound interface retrieval
+ BASS_GetDSoundObject
+* Log/linear volume & panning curves
+ BASS_SetLogCurves
+* User data passed to callback functions
+ STREAMPROC - BASS_StreamCreate
+ SYNCPROC - BASS_ChannelSetSync
+* New synchronizer
+ BASS_SYNC_MUSICFX
+* New synchronizer flag
+ BASS_SYNC_MIXTIME
+* Disable synchronizers option - saves a little CPU time
+ BASS_DEVICE_NOSYNC (BASS_Init flag)
+* Hi-res floating-point CPU usage monitoring
+ BASS_GetCPU
+* Wait for playback to start when playing a CD
+ BASS_CDPlay
+* DirectSound (dsound.dll) version retrieval
+ BASS_INFO (dsver member)
+* Removed volume sliding functions (they were fairly pointless)
+ BASS_SlideVolume
+ BASS_IsSliding
+* MO3: read/write encoder settings
+* MO3: remove inst/samp/message texts now optional
+* MO3: LAME encoder settings
+
+0.7 - 3/10/1999
+---------------
+* MO3 (MP3 compressed MODs)
+* A3D functions
+ BASS_DEVICE_A3D (BASS_Init flag)
+ BASS_INFO (a3d member)
+ BASS_SetA3DResManager
+ BASS_GetA3DResManager
+ BASS_SetA3DHFAbsorbtion
+ BASS_GetA3DHFAbsorbtion
+* Music/stream immediate sample data retrieval
+ BASS_ChannelGetData
+* File stream (WAV/MP3) length retrieval
+ BASS_StreamGetLength
+ BASS_StreamGetBlockLength
+* File stream seeking
+ BASS_ChannelSetPosition
+* Mono MP3 option (lower CPU usage)
+ BASS_StreamCreateFile
+* Music length retrieval
+ BASS_MusicGetLength
+* Music name retrieval
+ BASS_MusicGetName
+* Stop notes when moving MOD music position
+ BASS_MUSIC_POSRESET (BASS_MusicLoad/BASS_MusicPlayEx flag)
+* BASS_ERROR_FREQ - invalid sample rate error code
+ BASS_SampleCreate
+ BASS_SamplePlayEx
+ BASS_SamplePlay3DEx
+ BASS_StreamCreate
+ BASS_ChannelSetAttributes
+* Delphi and VB APIs
+
+0.6a - 26/7/1999
+----------------
+* Half rate MP3 option (lower CPU usage)
+ BASS_MP3_HALFRATE
+* Loading/streaming from file offsets
+ BASS_MusicLoad
+ BASS_SampleLoad
+ BASS_StreamCreateFile
+* Global music/sample/stream volume levels
+ BASS_SetGlobalVolumes
+ BASS_GetGlobalVolumes
+* Other new function
+ BASS_SampleStop
+* New synchronizer
+ BASS_SYNC_END
+* New sample overrider
+ BASS_SAMPLE_OVER_DIST
+* LoadLibrary/GetProcAddress instructions and example
+
+0.5 - 4/7/1999
+--------------
+* Documentation!
+* File streaming (MP3 and WAV)
+ BASS_StreamCreateFile
+* Custom generated samples
+ BASS_SampleCreate
+ BASS_SampleCreateDone
+* Other new function
+ BASS_MusicSetPositionScaler
+* Renamed function
+ BASS_ChannelClearSync -> BASS_ChannelRemoveSync
+* Alterations made to
+ BASS_ChannelGetPosition
+ BASS_SampleLoad
+ BASS_StreamPlay
+
+0.4 - 30/3/1999
+---------------
+* Compressed WAV samples support (using audio CODECs)
+* Updated CD volume handling - now works with SB Live
+* More linear channel volume/pan scales (were slightly off before)
+* "No sound" device option
+* 3D sound functions
+ BASS_Set3DFactors
+ BASS_Get3DFactors
+ BASS_Set3DPosition
+ BASS_Get3DPosition
+ BASS_Apply3D
+ BASS_SamplePlay3D
+ BASS_SamplePlay3DEx
+ BASS_ChannelSet3DAttributes
+ BASS_ChannelGet3DAttributes
+ BASS_ChannelSet3DPosition
+ BASS_ChannelGet3DPosition
+* EAX functions
+ BASS_SetEAXParameters
+ BASS_GetEAXParameters
+ BASS_ChannelSetEAXMix
+ BASS_ChannelGetEAXMix
+* Other new functions
+ BASS_GetDeviceDescription
+ BASS_SetBufferLen
+ BASS_ChannelGetFlags
+ BASS_ChannelPause
+ BASS_ChannelResume
+ BASS_ChannelSetPosition
+* Replaced function
+ BASS_CDResume -> BASS_ChannelResume
+* Alterations made to
+ BASS_Init
+ BASS_CDInit
+ BASS_SampleLoad
+ BASS_StreamPlay
+ BASS_INFO structure
+ BASS_SAMPLE structure
+ BASS_DEVICE_xxx flags
+ BASS_SAMPLE_xxx flags
+
+0.3 - 8/3/1999
+--------------
+* Synchronization functions
+ BASS_ChannelSetSync
+ BASS_ChannelClearSync
+* Other new functions
+ BASS_GetVersion
+ BASS_ChannelGetPosition
+ BASS_ChannelGetLevel
+ BASS_ChannelGetAttributes
+ BASS_ChannelSetAttributes
+* Replaced functions
+ BASS_MusicStop -> BASS_ChannelStop
+ BASS_MusicSetVolume -> BASS_ChannelSetAttributes
+ BASS_CDStop -> BASS_ChannelStop
+ BASS_CDSetVolume -> BASS_ChannelSetAttributes
+ BASS_CDGetVolume -> BASS_ChannelGetAttributes
+ BASS_ChannelUpdate -> BASS_ChannelSetAttributes
+* Alterations made to
+ BASS_MusicPlayEx
+ BASS_StreamPlay
+ BASS_INFO structure
+
+0.2 - 28/2/1999
+---------------
+* First public release
+
+
+Bug reports, Suggestions, Comments, Enquiries, etc
+==================================================
+If you have any of the aforementioned please visit the BASS forum at the
+website. If you can't find an answer there, you can also email:
+
+ bass@un4seen.com
+
diff --git a/bass/bassmidi.dll b/bass/bassmidi.dll
new file mode 100644
index 0000000..6890577
Binary files /dev/null and b/bass/bassmidi.dll differ
diff --git a/bass/bassmidi.txt b/bass/bassmidi.txt
new file mode 100644
index 0000000..ae9909c
--- /dev/null
+++ b/bass/bassmidi.txt
@@ -0,0 +1,734 @@
+BASSMIDI 2.4
+Copyright (c) 2006-2024 Un4seen Developments Ltd. All rights reserved.
+
+Files that you should have found in the BASSMIDI package
+========================================================
+Win32 version
+-------------
+BASSMIDI.TXT This file
+BASSMIDI.DLL BASSMIDI module
+BASSMIDI.CHM BASSMIDI documentation
+X64\
+ BASSMIDI.DLL 64-bit BASSMIDI module
+C\ C/C++ API and examples...
+ BASSMIDI.H BASSMIDI C/C++ header file
+ BASSMIDI.LIB BASSMIDI import library
+ BASSMIDI.SLN Visual Studio solution for examples
+ MAKEFILE Makefile for examples
+ MAKEFILE.IN Makefile helper macros
+ X64\
+ BASSMIDI.LIB 64-bit BASSMIDI import library
+ MIDITEST\ MIDI playback example
+ ...
+ SF2PACK\ Soundfont packer
+ ...
+ SYNTH\ Real-time MIDI example
+ ...
+ BIN\ Precompiled examples
+ MIDITEST.EXE
+ SF2PACK.EXE
+ SYNTH.EXE
+VB\ Visual Basic API and examples...
+ BASSMIDI.BAS BASSMIDI Visual Basic module
+ MIDITEST\ MIDI playback example
+ ...
+DELPHI\ Delphi API and examples...
+ BASSMIDI.PAS BASSMIDI Delphi unit
+ MIDITEST\ MIDI playback example
+ ...
+ SYNTH\ Real-time MIDI example
+ ...
+
+NOTE: You may need to "Unblock" the BASSMIDI.CHM file in its "Properties" to
+ view it on Windows 7. The documentation can also be viewed online at
+ the BASS website.
+
+NOTE: To run the example EXEs, first you will have to copy BASSMIDI.DLL and
+ BASS.DLL into the same directory as them.
+
+NOTE: To build the examples, you will need to copy the BASS API into the same
+ directory as the BASSMIDI API.
+
+NOTE: The Delphi and VB examples may not always be up to date with the C
+ examples, so the latter should be preferred as references if possible.
+
+macOS version
+-------------
+BASSMIDI.TXT This file
+LIBBASSMIDI.DYLIB BASSMIDI module
+BASSMIDI.CHM BASSMIDI documentation
+BASSMIDI.H BASSMIDI C/C++ header file
+BASSMIDI.XCODEPROJ Xcode project for examples
+MIDITEST\ MIDI playback example
+ ...
+SF2PACK\ Soundfont packer
+ ...
+SYNTH\ Real-time MIDI example
+ ...
+
+NOTE: To build the examples, you will need to copy the BASS API into the same
+ directory as the BASSMIDI API.
+
+Linux version
+-------------
+BASSMIDI.TXT This file
+BASSMIDI.CHM BASSMIDI documentation
+BASSMIDI.H BASSMIDI C/C++ header file
+MAKEFILE Makefile for examples
+MAKEFILE.IN Makefile helper macros
+LIBS\ BASSMIDI modules
+ ...
+MIDITEST\ MIDI playback example
+ ...
+SF2PACK\ Soundfont packer
+ ...
+SYNTH\ Real-time MIDI example
+ ...
+
+NOTE: To build the examples, you will need to copy the BASS API into the same
+ directory as the BASSMIDI API.
+
+Android version
+---------------
+BASSMIDI.TXT This file
+BASSMIDI.CHM BASSMIDI documentation
+LIBS\ BASSMIDI modules
+ ...
+C\ C/C++ API...
+ BASSMIDI.H BASSMIDI C/C++ header file
+JAVA\COM\UN4SEEN\BASS\
+ BASSMIDI.JAVA BASSMIDI Java class
+EXAMPLES\ Java examples
+ BUILD.GRADLE Android Studio build script for examples
+ SETTINGS.GRADLE
+ PROGUARD-BASS.PRO
+ MIDITEST\ MIDI playback example
+ ...
+
+NOTE: To build the examples, you will need to copy the BASS API into the same
+ directory as the BASSMIDI API.
+
+iOS version
+-----------
+BASSMIDI.TXT This file
+BASSMIDI.XCFRAMEWORK BASSMIDI framework
+BASSMIDI.CHM BASSMIDI documentation
+BASSMIDI.H BASSMIDI C/C++ header file
+
+
+What's the point?
+=================
+BASSMIDI is an extension to the BASS audio library, enabling the playing of
+MIDI files and custom event sequences, using SF2 (including SF2PACK and SF3)
+and/or SFZ soundfonts to provide the sounds. MIDI input is also supported.
+
+
+Requirements
+============
+BASS 2.4 is required.
+
+
+Using BASSMIDI
+==============
+The MIDI format is used in very much the same way as any of the built-in BASS
+stream formats; simply call the MIDI stream creation function instead of the
+BASS built-in functions. The BASS plugin system (see BASS_PluginLoad) is also
+supported.
+
+SF2 and SFZ soundfonts are used to provide the sounds. There are several
+soundfonts available on the internet, including a couple on the BASS webpage.
+On Windows, the Creative 28MB (28MBGM.SF2), 8MB (CT8MGM.SF2), 4MB (CT4MGM.SF2),
+or 2MB (CT2MGM.SF2) soundfont will be used by default when present in the
+Windows system directory.
+
+The usage information in the BASS.TXT file (from the BASS package) is also
+applicable to BASSMIDI and other add-ons.
+
+TIP: The BASSMIDI.CHM file should be put in the same directory as the BASS.CHM
+ file, so that the BASSMIDI documentation can be accessed from within the
+ BASS documentation.
+
+iOS version
+-----------
+The CoreMIDI framework is required for MIDI input, so that should be added to
+the "Link Binary With Libraries" build phase in Xcode.
+
+
+Latest Version
+==============
+The latest versions of BASSMIDI & BASS can be found at the BASS website:
+
+ www.un4seen.com
+
+
+Licence
+=======
+BASSMIDI is free to use with BASS.
+
+TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, BASSMIDI IS PROVIDED
+"AS IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND/OR FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS SHALL NOT BE HELD
+LIABLE FOR ANY DAMAGE THAT MAY RESULT FROM THE USE OF BASSMIDI. YOU USE
+BASSMIDI ENTIRELY AT YOUR OWN RISK.
+
+Usage of BASSMIDI indicates that you agree to the above conditions.
+
+All trademarks and other registered names contained in the BASSMIDI
+package are the property of their respective owners.
+
+
+History
+=======
+These are the major (and not so major) changes in each release, along with the
+functions/options that are introduced/affected by them. There are other little
+tweaks and fixes made along the way too.
+
+2.4.15 - 9/10/2024
+------------------
+* Support for Key On Velocity to attackModEnv/decayModEnv/releaseModEnv and
+ Key Number to startAddrsOffset SF2 modulators
+ BASS_MIDI_FontInit/User
+* Support for fileg_vel2attack/fileg_vel2decay/fileg_vel2release/pitcheg_vel2attack/
+ pitcheg_vel2decay/pitcheg_vel2release SFZ opcodes
+ BASS_MIDI_FontInit/User
+* Improved SFZ variable parsing compatibility (uses the shortest match)
+ BASS_MIDI_FontInit/User
+* Support for high-pass filter in fil_type SFZ opcode
+ BASS_MIDI_FontInit/User
+* SoundBlaster hardware limit emulation is disabled by default for modern SF2 soundfonts
+ BASS_MIDI_FONT_SBLIMITS/NOSBLIMITS (BASS_MIDI_FontInit/User flags)
+* Extended filter cutoff range when SB limits are disabled
+ BASS_MIDI_FONT_NOSBLIMITS (BASS_MIDI_FontInit/User flag)
+* Improved single note releasing when there are overlapping instances of the same note
+ BASS_MIDI_NOTEOFF1 (BASS_MIDI_StreamCreateFile/User/URL flag)
+* Ports above 7 are mapped to lower ports (modulo 8)
+ BASS_MIDI_StreamCreateFile
+* Higher ports are shifted to lower channels when lower ports are unused
+ BASS_MIDI_StreamCreateFile
+* Default per-drum USERFX levels to 127 instead of 0 in all modes
+ BASS_MIDI_NODRUMPARAMUSER (BASS_MIDI_StreamCreate/Events/File/User/URL flag)
+* Per-drum key settings may be applied to all keys at once
+ MIDI_EVENT_DRUM_xxx (BASS_MIDI_StreamEvent/s)
+* System mode/reset events are ignored from additional ports
+ BASS_MIDI_StreamCreateFile/User/URL
+ BASS_MIDI_StreamEvents
+* Sequencer specific meta-event retrieval
+ BASS_MIDI_MARK_SEQSPEC (BASS_MIDI_StreamGetMark type)
+* Queued event buffer preallocation
+ BASS_ATTRIB_MIDI_QUEUE_TICK/BYTE/ASYNC (BASS_ChannelSetAttribute options)
+* Faster SFZ info retrieval
+ BASS_MIDI_FontGetInfo
+* Support for SF2 soundfonts embedded in RMID files
+ BASS_MIDI_StreamCreateFile/User/URL
+* RIFF/RMID "INFO" tag support
+ BASS_TAG_RIFF_INFO (BASS_ChannelGetTags type)
+* MIDI filename retrieval
+ BASS_CHANNELINFO (filename member)
+* Approximate support for AWE32 filter NRPN (7f15/7f16)
+ MIDI_EVENT_CUTOFF/RESONANCE
+* Maximum voices is practically unlimited (~14 million)
+ BASS_CONFIG_MIDI_VOICES (BASS_SetConfig option)
+ BASS_ATTRIB_MIDI_VOICES (BASS_ChannelSetAttribute option)
+
+2.4.14 - 3/5/2022
+-----------------
+* Support for Key On Velocity to startAddrsOffset/modEnvToFilterFc and CC21-24 to initialFilterFc/
+ initialAttenuation/attackVolEnv/decayVolEnv/releaseVolEnv/releaseModEnv/modEnvToFilterFc SF2 modulators
+ BASS_MIDI_FontInit/User
+* Support for all Key On Velocity to initialAttenuation SF2 modulator curve types
+ BASS_MIDI_FontInit/User
+* Support for SF3 (compressed SF2) soundfonts
+ BASS_MIDI_FontInit/User
+* Soundfont flag setting/retrieval
+ BASS_MIDI_FontFlags
+* Retrieval of currently loading samples
+ BASS_CONFIG_MIDI_SAMPLELOADING (BASS_GetConfig option)
+* Channel-specific soundfont configuration
+ BASS_MIDI_FONT_EX2 (BASS_MIDI_StreamSetFonts/GetFonts flag)
+ BASS_MIDI_FONTEX2 structure
+* MIDI port meta-event support (for more than 16 channels)
+ BASS_MIDI_StreamCreateFile/User/URL
+ BASS_MIDI_StreamEvents
+ BASS_MIDI_ConvertEvents
+* Asynchronous processing of live events
+ BASS_MIDI_ASYNC (BASS_MIDI_StreamCreate/Events/File/User/URL flag)
+ BASS_MIDI_EVENTS_ASYNC (BASS_MIDI_StreamEvents flag)
+ BASS_MIDI_EVENTS_FLUSH (BASS_MIDI_StreamEvents flag)
+ SYNTH example updated
+* Filtering of live events
+ BASS_MIDI_EVENTS_FILTER (BASS_MIDI_StreamEvents flag)
+* Improved reverb effect
+* Reverb/chorus levels raised (closer to Roland/Yamaha levels)
+* Current reverb/chorus type retrieval
+ MIDI_EVENT_REVERB_MACRO (BASS_MIDI_StreamGetEvent)
+ MIDI_EVENT_CHORUS_MACRO (BASS_MIDI_StreamGetEvent)
+* Treat soundfont reverb/chorus levels as minimums
+ BASS_MIDI_FONT_MINFX (BASS_MIDI_FontInit/User/Flags flag)
+* Default per-drum reverb/chorus levels now apply in all modes and can be disabled
+ BASS_MIDI_NODRUMPARAM (BASS_MIDI_StreamCreate/Events/File/User/URL flag)
+* Default drum channel configuration
+ BASS_EVENT_DEFDRUMS (BASS_MIDI_StreamEvent/s and BASS_MIDI_StreamCreateEvents)
+* Support for master tuning
+ MIDI_EVENT_MASTER_FINETUNE/COARSETUNE (BASS_MIDI_StreamEvent/s)
+* Omni-on/off (CC124/125) are treated as all-notes-off (CC123)
+ BASS_MIDI_StreamCreateFile/User/URL
+ BASS_MIDI_StreamEvents
+ BASS_MIDI_ConvertEvents
+* 16 point sinc interpolation support on ARM platforms with NEON
+ BASS_ATTRIB_MIDI_SRC (BASS_ChannelSetAttribute option)
+* Version number retrieval
+ BASS_MIDI_GetVersion
+* BASS_CONFIG_MIDI_SFZHEAD value changed (was same as BASS_CONFIG_MIDI_SAMPLEREAD)
+ BASS_CONFIG_MIDI_SFZHEAD (BASS_SetConfigPtr option)
+* MIDI implementation chart added to documentation
+
+2.4.13 - 16/9/2020
+------------------
+* Vibrato rate/depth/delay adjustment
+ MIDI_EVENT_VIBRATO_RATE/DEPTH/DELAY (BASS_MIDI_StreamEvent/s)
+* Support for Key Number to initialAttenuation/initialFilterFc/pan and Key On Velocity
+ to decayVolEnv/releaseVolEnv SF2 modulators
+ BASS_MIDI_FontInit/User
+* Support for amp_keycenter/amp_keytrack/ampeg_vel2release/delay_beats/fil_keycenter/
+ fil_keytrack/locc67/hicc67/pan_keycenter/pan_keytrack/sw_default/sw_last/sw_lokey/
+ sw_lolast/sw_hikey/sw_hilast SFZ opcodes
+ BASS_MIDI_FontInit/User
+* Support for global and master headers and #define directive in SFZ files
+ BASS_MIDI_FontInit/User
+* SFZ files share memory for common sample files
+ BASS_MIDI_FontInit/User
+* Partial sample loading and unloading
+ BASS_MIDI_FontLoadEx
+ SYNTH example updated
+* Non-interpolated resampling option
+ BASS_ATTRIB_MIDI_SRC (BASS_ChannelSetAttribute option)
+* Tempo modification attribute
+ BASS_ATTRIB_MIDI_SPEED (BASS_ChannelSetAttribute option)
+ MIDITEST example updated
+* Mix level control
+ BASS_ATTRIB_MIDI_VOL (BASS_ChannelSetAttribute option)
+* Reverb level modification
+ BASS_ATTRIB_MIDI_REVERB (BASS_ChannelSetAttribute option)
+* Global SFZ headers
+ BASS_CONFIG_MIDI_SFZHEAD (BASS_SetConfigPtr option)
+* Linear volume envelopes option
+ BASS_MIDI_FONT_LINDECVOL (BASS_MIDI_FontInit/User flag)
+* Disabling of sample ramping-in
+ BASS_MIDI_FONT_NORAMPIN (BASS_MIDI_FontInit/User flag)
+* Disabling of Creative/SoundBlaster hardware limit emulation
+ BASS_MIDI_FONT_NOLIMITS (BASS_MIDI_FontInit flag)
+* Duplicate soundfonts will be reloaded instead of shared if modified in the meantime
+ BASS_MIDI_FontInit
+* Memory-mapped support for default soundfont option
+ BASS_CONFIG_MIDI_DEFFONT
+* Retrieval of total memory usage for sample data
+ BASS_CONFIG_MIDI_SAMPLEMEM (BASS_GetConfig option)
+* Total sample data size available for SFZ files
+ BASS_MIDI_FontGetInfo
+* Adjustable asynchronous sample loading chunks
+ BASS_CONFIG_MIDI_SAMPLEREAD (BASS_SetConfig option)
+* CPU usage limiting is enabled by default during playback
+ BASS_MIDI_StreamCreate/Events/File/User/URL
+ BASS_ATTRIB_MIDI_CPU (BASS_ChannelSetAttribute option)
+* Option to limit sample loading waiting without killing voices
+ BASS_ATTRIB_MIDI_CPU (BASS_ChannelSetAttribute option)
+* Tick-based timing for realtime event streams
+ BASS_MIDI_StreamCreate
+ BASS_MIDI_StreamEvents
+ BASS_ATTRIB_MIDI_PPQN (BASS_ChannelSetAttribute option)
+* 48000 Hz soundfont data encoding option
+ BASS_MIDI_PACK_48KHZ (BASS_MIDI_FontPack flag)
+* macOS examples rewritten in Objective-C/Cocoa
+
+2.4.12 - 9/11/2018
+------------------
+* Support for more than 16 MIDI channels in custom event sequences
+ BASS_MIDI_StreamCreateEvents
+* Absolute timing option for custom events
+ BASS_MIDI_EVENTS_ABSTIME (BASS_MIDI_StreamEvents flag)
+* Retrieval of note-on events
+ MIDI_EVENT_NOTES (BASS_MIDI_StreamGetEvents/Ex filter)
+* Soundfont config can be modified without stopping currently playing notes
+ BASS_MIDI_StreamSetFonts
+* Memory-mapped soundfonts can be preloaded/mapped
+ BASS_MIDI_FontLoad
+* Support for Key On Velocity to initialAttenuation SF2 modulators
+ BASS_MIDI_FontInit/User
+* Linear attack phase option for SF2 modulation envelopes
+ BASS_MIDI_FONT_LINATTMOD (BASS_MIDI_FontInit/User flag)
+* The attack phase of SFZ pitch/filter envelopes is now linear instead of convex
+* Support for trigger/rt_decay/delay/amplfo_fade/fillfo_fade/pitchlfo_fade/pitch_random/
+ xfin_lokey/xfin_hikey/xfout_lokey/xfout_hikey/xf_keycurve/xfin_lovel/xfin_hivel/
+ xfout_lovel/xfout_hivel/xf_velcurve SFZ opcodes
+ BASS_MIDI_FontInit/User
+* Support for separate amplifier/filter/pitch LFOs in SFZ
+ BASS_MIDI_FontInit/User
+* Support for UTF-8 sample SFZ opcodes on Windows (already on other platforms)
+ BASS_MIDI_FontInit/User
+* Support for #include directive in SFZ files
+ BASS_MIDI_FontInit
+* SFZ files are no longer kept open/locked after being loaded
+ BASS_MIDI_FontInit
+* Samples given more time to load asynchronously when CPU usage is low
+ BASS_ATTRIB_MIDI_CPU (BASS_ChannelSetAttribute option)
+* BASS_MIDI_SINCINTER flag deprecated in favour of BASS_ATTRIB_MIDI_SRC attribute
+ BASS_MIDI_StreamCreate/Events/File/User/URL
+* Smoother low-pass filter activation and deactivation
+* Fix for transpose/tune SFZ opcodes with encoded samples
+
+2.4.11 - 30/3/2017
+------------------
+* Event modification/filtering
+ BASS_MIDI_StreamSetFilter
+ MIDIFILTERPROC
+* Simpler tempo modification
+ MIDI_EVENT_SPEED (BASS_MIDI_StreamEvent)
+ MIDITEST example updated
+* Checking whether individual notes are playing
+ MIDI_EVENT_NOTE (BASS_MIDI_StreamGetEvent)
+* Retrieval of total number of notes playing in a channel
+ MIDI_EVENT_NOTES (BASS_MIDI_StreamGetEvent)
+* Retrieval of currently active voices in a channel
+ MIDI_EVENT_VOICES (BASS_MIDI_StreamGetEvent)
+* Retrieval of currently in use presets
+ BASS_MIDI_StreamGetPreset
+* SFZ filenames are used as preset names
+ BASS_MIDI_FontGetPreset
+* Support for loop info in FLAC samples used with SFZ (requires BASSFLAC 2.4.3)
+* Faster loading of very large MIDI files
+ BASS_MIDI_StreamCreateFile/User/URL
+* Faster unfiltered event counting
+ BASS_MIDI_StreamGetEvents/Ex
+ BASS_MIDI_ConvertEvents
+* 24-bit paramater passed to MIDI_EVENT_TEMPO event sync callbacks
+ BASS_SYNC_MIDI_EVENT (BASS_ChannelSetSync type)
+* When getting the number of events, only those in the specified range are counted
+ BASS_MIDI_StreamGetEventsEx
+* Invalid event types in custom sequences will give an error instead of being ignored
+ BASS_MIDI_StreamCreateEvents
+
+2.4.10 - 8/12/2016
+------------------
+* 16 point sinc interpolation option
+ BASS_ATTRIB_MIDI_SRC (BASS_ChannelSetAttribute option)
+* Support for lorand/hirand/locc1/hicc1/locc64/hicc64/off_mode/default_path SFZ opcodes
+ BASS_MIDI_FontInit/User
+* Support for Key On Velocity to initialFilterFc/attackVolEnv SF2 modulators
+ BASS_MIDI_FontInit/User
+* Conversion of raw MIDI data to BASS_MIDI_EVENT
+ BASS_MIDI_ConvertEvents
+* Modulation (CC1) destination control
+ MIDI_EVENT_MOD_VIBRATO/PITCH/FILTER/VOLUME (BASS_MIDI_StreamEvent/s)
+ MIDI_EVENT_MODRANGE superseded by MIDI_EVENT_MOD_VIBRATO
+* Sostenuto
+ MIDI_EVENT_SOSTENUTO (BASS_MIDI_StreamEvent/s)
+* Legato channel mode
+ MIDI_EVENT_MODE (BASS_MIDI_StreamEvent)
+* Partial retrieval of events
+ BASS_MIDI_StreamGetEventsEx
+* Bulk MIDI state retrieval/setting
+ BASS_ATTRIB_MIDI_STATE (BASS_ChannelGet/SetAttributeEx option)
+* Support for delaying custom events, including delta-time info in raw MIDI data
+ BASS_MIDI_EVENTS_TIME (BASS_MIDI_StreamEvents flag)
+* Cancellation of pending custom events
+ BASS_MIDI_EVENTS_CANCEL (BASS_MIDI_StreamEvents flag)
+* Marker for the start of each track in SMF2 files
+ BASS_MIDI_MARK_TRACKSTART (BASS_MIDI_StreamGetMark type)
+* Ignoring of soundfont effect levels
+ BASS_MIDI_FONT_NOFX (BASS_MIDI_FontInit/Ex flag)
+* Maximum voice limit increased to 100000
+ BASS_CONFIG_MIDI_VOICES (BASS_SetConfig option)
+ BASS_ATTRIB_MIDI_VOICES (BASS_ChannelSetAttribute option)
+* Unicode support for default soundfont option on Windows
+ BASS_CONFIG_MIDI_DEFFONT
+* BASS_CONFIG_UNICODE option support for input device names
+ BASS_MIDI_InGetDeviceInfo
+* Improved seeking with MIDI files that have events for a channel in multiple tracks
+ BASS_ChannelSetPosition
+* Fix for 2GB size limit when unpacking a soundfont on Windows
+ BASS_MIDI_FontUnpack
+
+2.4.9 - 4/12/2014
+-----------------
+* SFZ soundfont support
+ BASS_MIDI_FontInit/User
+* Support for XG drums in bank 127 of SF2 soundfonts
+ BASS_MIDI_FONT_XGDRUMS (BASS_MIDI_FontInit/Ex flag)
+* Key pressure/aftertouch support
+ MIDI_EVENT_KEYPRES (BASS_MIDI_StreamEvent/s)
+ MIDI_EVENT_KEYPRES_VIBRATO/PITCH/FILTER/VOLUME (BASS_MIDI_StreamEvent/s)
+* 3rd effect path for custom processing
+ BASS_MIDI_CHAN_USERFX (BASS_MIDI_StreamGetChannel option)
+ MIDI_EVENT_USERFX (BASS_MIDI_StreamEvent/s)
+ MIDI_EVENT_USERFX_LEVEL (BASS_MIDI_StreamEvent/s)
+ MIDI_EVENT_USERFX_REVERB (BASS_MIDI_StreamEvent/s)
+ MIDI_EVENT_USERFX_CHORUS (BASS_MIDI_StreamEvent/s)
+* Custom reverb/chorus effect processing
+ BASS_MIDI_CHAN_CHORUS/REVERB (BASS_MIDI_StreamGetChannel options)
+* Custom channel processing output routed to reverb/chorus/custom effects
+ BASS_MIDI_StreamGetChannel
+* Default drum reverb/chorus levels set to XG spec in XG mode (GS/GM modes too)
+ MIDI_EVENT_DRUM_REVERB/CHORUS (BASS_MIDI_StreamEvent/s)
+* Decay time event
+ MIDI_EVENT_DECAY (BASS_MIDI_StreamEvent/s)
+* Support for up to 65536 presets per bank
+ BASS_MIDI_StreamSetFonts
+ MIDI_EVENT_PROGRAM (BASS_MIDI_StreamEvent/s)
+* Input ports to receive MIDI data from other software on Linux
+ BASS_MIDI_InInit
+ BASS_CONFIG_MIDI_IN_PORTS (BASS_SetConfig option)
+ SYNTH example updated
+* Single note releasing when there are overlapping instances of the same note
+ BASS_MIDI_NOTEOFF1 (BASS_MIDI_StreamCreateFile/User/URL flag)
+* Ignoring of system resets with unchanged mode
+ BASS_MIDI_NOSYSRESET (BASS_MIDI_StreamCreateFile/User/URL flag)
+ MIDI_EVENT_SYSTEM (BASS_MIDI_StreamEvent/s)
+* Disabling of running status
+ BASS_MIDI_EVENTS_NORSTATUS (BASS_MIDI_StreamEvents flag)
+* Maximum voice limit increased to 1000
+ BASS_CONFIG_MIDI_VOICES (BASS_SetConfig option)
+ BASS_ATTRIB_MIDI_VOICES (BASS_ChannelSetAttribute option)
+* Reduction of 24-bit data to 16-bit when packing soundfont samples
+ BASS_MIDI_PACK_16BIT (BASS_MIDI_FontPack flag)
+* Support for remaining SF2 generators: fixed key, fixed velocity, key to vol/mod envelope hold/decay
+* Fix for multi-track custom event sequence stream creation
+ BASS_MIDI_StreamCreateEvents
+
+2.4.8 - 2/5/2013
+----------------
+* User file soundfont loading
+ BASS_MIDI_FontInitUser
+* Retrieval of all of a soundfont's preset numbers
+ BASS_MIDI_FontGetPresets
+* More flexible soundfont preset mapping
+ BASS_MIDI_FONT_EX (BASS_MIDI_StreamSetFonts/GetFonts flag)
+ BASS_MIDI_FONTEX structure
+* Bank LSB controller support
+ MIDI_EVENT_BANK_LSB (BASS_MIDI_StreamEvent/s)
+ BASS_MIDI_FONTEX structure
+* Modulation depth range control
+ MIDI_EVENT_MODRANGE (BASS_MIDI_StreamEvent/s)
+* Channel pressure destination control
+ MIDI_EVENT_CHANPRES_VIBRATO/PITCH/FILTER/VOLUME (BASS_MIDI_StreamEvent/s)
+* Unhandled controller event
+ MIDI_EVENT_CONTROL (BASS_MIDI_StreamEvent/s)
+* Reverb send level default changed to 40 (was 0)
+ MIDI_EVENT_REVERB (BASS_MIDI_StreamEvent/s)
+* Retrieval of events from all tracks at once
+ BASS_MIDI_StreamGetEvents
+* Copyright/instrument/track name markers
+ BASS_MIDI_MARK_COPY (BASS_MIDI_StreamGetMark type)
+ BASS_MIDI_MARK_INST (BASS_MIDI_StreamGetMark type)
+ BASS_MIDI_MARK_TRACK (BASS_MIDI_StreamGetMark type)
+* Retrieval of all markers at once
+ BASS_MIDI_StreamGetMarks
+* New sync type that supports all marker types
+ BASS_SYNC_MIDI_MARK (BASS_ChannelSetSync type)
+* Non-removal of empty space at the end of a MIDI file
+ BASS_MIDI_NOCROP (BASS_MIDI_StreamCreateFile/User/URL flag)
+* Omission of a WAVE header when packing soundfont samples
+ BASS_MIDI_PACK_NOHEAD (BASS_MIDI_FontPack flag)
+* Streams created via the plugin system use the output device's sample rate
+ BASS_StreamCreateFile/etc
+* Automatic BASS_UNICODE flag use in C++ and Delphi
+ BASS_MIDI_StreamCreateFile/URL
+ BASS_MIDI_FontInit/Pack/Unpack
+
+2.4.7 - 29/6/2012
+-----------------
+* Custom event sequence streams
+ BASS_MIDI_StreamCreateEvents
+* Sinc interpolated sample mixing
+ BASS_MIDI_SINCINTER (BASS_MIDI_StreamCreate/Events/File/User/URL flag)
+* Asynchronous sample loading
+ BASS_ATTRIB_MIDI_CPU (BASS_ChannelSetAttribute option)
+* Preset unloading
+ BASS_MIDI_FontUnload
+* Note stopping without sustain/decay
+ BASS_EVENT_NOTE (BASS_MIDI_StreamEvent/s)
+* Syncing on all event types
+ BASS_SYNC_MIDI_EVENT (BASS_ChannelSetSync type)
+* Marker tick position retrieval
+ BASS_MIDI_MARK_TICK (BASS_MIDI_StreamGetMark flag)
+* Maximum voice limit increased to 500
+ BASS_CONFIG_MIDI_VOICES (BASS_SetConfig option)
+ BASS_ATTRIB_MIDI_VOICES (BASS_ChannelSetAttribute option)
+* Default voice limit raised to 40 on Android/iOS
+ BASS_CONFIG_MIDI_VOICES (BASS_SetConfig option)
+* Active voice count retrieval
+ BASS_ATTRIB_MIDI_VOICES_ACTIVE (BASS_ChannelGetAttribute option)
+* Use of the device's current output rate
+ BASS_MIDI_StreamCreate/Events/File/User/URL
+* Memory-mapped soundfont loading
+ BASS_MIDI_FONT_MMAP (BASS_MIDI_FontInit flag)
+* Fix for applying multiple events in BASS_MIDI_EVENTS_STRUCT mode
+ BASS_MIDI_StreamEvents
+* Marker sync compatibility (with mixer/splitter/tempo/reverse streams) fix
+ BASS_SYNC_MIDI_MARKER/CUE/LYRIC (BASS_ChannelSetSync types)
+* MIDI sysex input compatibility fix for some drivers on Windows
+ MIDIINPROC
+
+2.4.6 - 30/3/2011
+-----------------
+* MIDI input device support
+ BASS_MIDI_InGetDeviceInfo
+ BASS_MIDI_InInit
+ BASS_MIDI_InFree
+ BASS_MIDI_InStart
+ BASS_MIDI_InStop
+ MIDIINPROC
+ SYNTH example updated
+* Multiple event processing including support for raw MIDI data
+ BASS_MIDI_StreamEvents
+* CPU usage limiting
+ BASS_ATTRIB_MIDI_CPU (BASS_ChannelSetAttribute option)
+* Scale/octave tuning
+ MIDI_EVENT_SCALETUNING (BASS_MIDI_StreamEvent/s)
+* Soft pedal event
+ MIDI_EVENT_SOFT (BASS_MIDI_StreamEvent/s)
+* Random panning
+ MIDI_EVENT_PAN (BASS_MIDI_StreamEvent/s)
+* System reset event
+ MIDI_EVENT_SYSTEM/EX (BASS_MIDI_StreamEvent/s)
+* Resetting of overridden drum key pan/reverb/chorus back to normal
+ MIDI_EVENT_DRUM_PAN/REVERB/CHORUS (BASS_MIDI_StreamEvent)
+* Retrieval of drum key event values
+ BASS_MIDI_StreamGetEvent
+* All events initialized to a MIDI file's 1st tick values
+ BASS_MIDI_StreamGetEvent
+* Adjustable MIDI channel count
+ BASS_ATTRIB_MIDI_CHANS (BASS_ChannelSetAttribute option)
+* Adjustable voice limit
+ BASS_ATTRIB_MIDI_VOICES (BASS_ChannelSetAttribute option)
+* Preloaded presets are not automatically compacted
+ BASS_MIDI_FontLoad
+ BASS_CONFIG_MIDI_COMPACT (BASS_SetConfig option)
+* Multiple instances of a soundfont
+ BASS_MIDI_FontInit
+* Xcode examples project added for OSX
+
+2.4.5 - 8/2/2010
+----------------
+* Key signature retrieval
+ BASS_MIDI_MARK_KEYSIG (BASS_MIDI_StreamGetMark type)
+ BASS_SYNC_MIDI_KEYSIG (BASS_ChannelSetSync type)
+* Tempo event initialized to MIDI file's 1st tick value
+ MIDI_EVENT_TEMPO (BASS_MIDI_StreamGetEvent)
+* UTF-16 support on OSX
+ BASS_UNICODE (BASS_MIDI_StreamCreateFile/BASS_MIDI_FontInit/Pack/Unpack flag)
+
+2.4.4 - 24/8/2009
+-----------------
+* Attack & release time events
+ MIDI_EVENT_ATTACK/RELEASE (BASS_MIDI_StreamEvent)
+* Drum key level NRPN event
+ MIDI_EVENT_DRUM_LEVEL (BASS_MIDI_StreamEvent)
+* MIDI file event retrieval
+ BASS_MIDI_StreamGetEvents
+* Time signature retrieval
+ BASS_MIDI_MARK_TIMESIG (BASS_MIDI_StreamGetMark type)
+ BASS_SYNC_MIDI_TIMESIG (BASS_ChannelSetSync type)
+* Default soundfont configuration
+ BASS_CONFIG_MIDI_DEFFONT (BASS_SetConfig option)
+
+2.4.3 - 19/3/2009
+-----------------
+* Possibility of applying DSP/FX to individual MIDI channels
+ BASS_MIDI_StreamGetChannel
+* Per-track volume control
+ BASS_ATTRIB_MIDI_TRACK_VOL (BASS_ChannelSetAttribute option)
+* Support for all tracks in format 2 MIDI files
+ BASS_MIDI_StreamCreateFile/User/URL
+
+2.4.2 - 28/10/2008
+------------------
+* Decaying of old sound when seeking
+ BASS_MIDI_DECAYSEEK (BASS_MIDI_StreamCreateFile/User/URL flag)
+ MIDITEST example updated (C version)
+* End decaying now also applies when looping
+ BASS_MIDI_DECAYEND (BASS_MIDI_StreamCreateFile/User/URL flag)
+* Support for 28MBGM.SF2 and CT8MGM.SF2 as default soundfonts
+
+2.4.1 - 9/7/2008
+----------------
+* Ticks-per-beat retrieval
+ BASS_ATTRIB_MIDI_PPQN (BASS_ChannelGetAttribute option)
+
+2.4 - 2/4/2008
+--------------
+* Tick-based positioning
+ BASS_POS_MIDI_TICK (BASS_ChannelGetLength/GetPosition/SetPosition mode)
+ BASS_SYNC_MIDI_TICK (BASS_ChannelSetSync type)
+* Preset name retrieval
+ BASS_MIDI_FontGetPreset
+* Text markers
+ BASS_MIDI_MARK_TEXT (BASS_MIDI_StreamGetMark type)
+ BASS_SYNC_MIDI_TEXT (BASS_ChannelSetSync type)
+* Individual marker retrieval
+ BASS_MIDI_StreamGetMark
+ BASS_MIDI_StreamGetMarks *removed*
+* Marker index passed to marker sync callbacks
+ BASS_SYNC_MIDI_MARKER/CUE/LYRIC
+* Use of BASS_Init sample rate
+ BASS_MIDI_StreamCreate/File/User/URL
+* Support for updated user file stream system
+ BASS_MIDI_StreamCreateFileUser
+* 64-bit file positioning
+ BASS_MIDI_StreamCreateFile
+* Callback "user" parameters changed to pointers
+ BASS_MIDI_StreamCreateURL
+ BASS_MIDI_StreamCreateFileUser
+
+2.3.0.3 - 10/7/2007
+-------------------
+* Syncing on events
+ BASS_SYNC_MIDI_EVENT (BASS_ChannelSetSync type)
+
+2.3.0.2 - 26/2/2007
+-------------------
+* Reverb and chorus
+ MIDI_EVENT_REVERB/CHORUS (BASS_MIDI_StreamEvent)
+ MIDI_EVENT_REVERB_TIME/DELAY/LOCUTOFF/HICUTOFF/LEVEL (BASS_MIDI_StreamEvent)
+ MIDI_EVENT_CHORUS_DELAY/DEPTH/RATE/FEEDBACK/LEVEL/REVERB (BASS_MIDI_StreamEvent)
+ BASS_MIDI_NOFX (BASS_MIDI_StreamCreate/File/User/URL flag)
+* Resonant low-pass filters
+ MIDI_EVENT_CUTOFF/RESONANCE (BASS_MIDI_StreamEvent)
+* Portamento
+ MIDI_EVENT_PORTAMENTO/TIME/NOTE (BASS_MIDI_StreamEvent)
+* Fine-tuning
+ MIDI_EVENT_FINETUNE/COARSETUNE (BASS_MIDI_StreamEvent)
+* Drum key specific parameters
+ MIDI_EVENT_DRUM_FINETUNE/COARSETUNE/PAN/REVERB/CHORUS/CUTOFF/RESONANCE (BASS_MIDI_StreamEvent)
+* Support for mono channel mode
+ MIDI_EVENT_MODE (BASS_MIDI_StreamEvent)
+* Support for master volume
+ MIDI_EVENT_MASTERVOL (BASS_MIDI_StreamEvent)
+* Channel level control
+ MIDI_EVENT_MIXLEVEL (BASS_MIDI_StreamEvent)
+* Channel transposing
+ MIDI_EVENT_TRANSPOSE (BASS_MIDI_StreamEvent)
+* Retrieval of current event values
+ BASS_MIDI_StreamGetEvent
+* Soundfont volume control
+ BASS_MIDI_FontSetVolume/GetVolume
+* Track number added to markers and syncs
+ BASS_MIDI_MARK (track member)
+ BASS_SYNC_MIDI_MARKER/CUE/LYRIC
+
+2.3.0.1 - 1/12/2006
+-------------------
+* Optionally apply matching soundfonts to all banks
+ BASS_CONFIG_MIDI_AUTOFONT (BASS_SetConfig option)
+* Support for 0 length notes
+
+2.3 - 14/11/2006
+----------------
+* First release
+
+
+Bug reports, Suggestions, Comments, Enquiries, etc
+==================================================
+If you have any of the aforementioned please visit the BASS forum at the
+website.
+
diff --git a/bass/inc/bass.h b/bass/inc/bass.h
new file mode 100644
index 0000000..1e3a86f
--- /dev/null
+++ b/bass/inc/bass.h
@@ -0,0 +1,1149 @@
+/*
+ BASS 2.4 C/C++ header file
+ Copyright (c) 1999-2022 Un4seen Developments Ltd.
+
+ See the BASS.CHM file for more detailed documentation
+*/
+
+#ifndef BASS_H
+#define BASS_H
+
+#ifdef _WIN32
+#ifdef WINAPI_FAMILY
+#include
+#endif
+#include
+typedef unsigned __int64 QWORD;
+#else
+#include
+#define WINAPI
+#define CALLBACK
+typedef uint8_t BYTE;
+typedef uint16_t WORD;
+typedef uint32_t DWORD;
+typedef uint64_t QWORD;
+#ifdef __OBJC__
+typedef int BOOL32;
+#define BOOL BOOL32 // override objc's BOOL
+#else
+typedef int BOOL;
+#endif
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+#define LOBYTE(a) (BYTE)(a)
+#define HIBYTE(a) (BYTE)((a)>>8)
+#define LOWORD(a) (WORD)(a)
+#define HIWORD(a) (WORD)((a)>>16)
+#define MAKEWORD(a,b) (WORD)(((a)&0xff)|((b)<<8))
+#define MAKELONG(a,b) (DWORD)(((a)&0xffff)|((b)<<16))
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BASSVERSION 0x204 // API version
+#define BASSVERSIONTEXT "2.4"
+
+#ifndef BASSDEF
+#define BASSDEF(f) WINAPI f
+#else
+#define NOBASSOVERLOADS
+#endif
+
+typedef DWORD HMUSIC; // MOD music handle
+typedef DWORD HSAMPLE; // sample handle
+typedef DWORD HCHANNEL; // sample playback handle
+typedef DWORD HSTREAM; // sample stream handle
+typedef DWORD HRECORD; // recording handle
+typedef DWORD HSYNC; // synchronizer handle
+typedef DWORD HDSP; // DSP handle
+typedef DWORD HFX; // effect handle
+typedef DWORD HPLUGIN; // plugin handle
+
+// Error codes returned by BASS_ErrorGetCode
+#define BASS_OK 0 // all is OK
+#define BASS_ERROR_MEM 1 // memory error
+#define BASS_ERROR_FILEOPEN 2 // can't open the file
+#define BASS_ERROR_DRIVER 3 // can't find a free/valid driver
+#define BASS_ERROR_BUFLOST 4 // the sample buffer was lost
+#define BASS_ERROR_HANDLE 5 // invalid handle
+#define BASS_ERROR_FORMAT 6 // unsupported sample format
+#define BASS_ERROR_POSITION 7 // invalid position
+#define BASS_ERROR_INIT 8 // BASS_Init has not been successfully called
+#define BASS_ERROR_START 9 // BASS_Start has not been successfully called
+#define BASS_ERROR_SSL 10 // SSL/HTTPS support isn't available
+#define BASS_ERROR_REINIT 11 // device needs to be reinitialized
+#define BASS_ERROR_ALREADY 14 // already initialized/paused/whatever
+#define BASS_ERROR_NOTAUDIO 17 // file does not contain audio
+#define BASS_ERROR_NOCHAN 18 // can't get a free channel
+#define BASS_ERROR_ILLTYPE 19 // an illegal type was specified
+#define BASS_ERROR_ILLPARAM 20 // an illegal parameter was specified
+#define BASS_ERROR_NO3D 21 // no 3D support
+#define BASS_ERROR_NOEAX 22 // no EAX support
+#define BASS_ERROR_DEVICE 23 // illegal device number
+#define BASS_ERROR_NOPLAY 24 // not playing
+#define BASS_ERROR_FREQ 25 // illegal sample rate
+#define BASS_ERROR_NOTFILE 27 // the stream is not a file stream
+#define BASS_ERROR_NOHW 29 // no hardware voices available
+#define BASS_ERROR_EMPTY 31 // the file has no sample data
+#define BASS_ERROR_NONET 32 // no internet connection could be opened
+#define BASS_ERROR_CREATE 33 // couldn't create the file
+#define BASS_ERROR_NOFX 34 // effects are not available
+#define BASS_ERROR_NOTAVAIL 37 // requested data/action is not available
+#define BASS_ERROR_DECODE 38 // the channel is/isn't a "decoding channel"
+#define BASS_ERROR_DX 39 // a sufficient DirectX version is not installed
+#define BASS_ERROR_TIMEOUT 40 // connection timedout
+#define BASS_ERROR_FILEFORM 41 // unsupported file format
+#define BASS_ERROR_SPEAKER 42 // unavailable speaker
+#define BASS_ERROR_VERSION 43 // invalid BASS version (used by add-ons)
+#define BASS_ERROR_CODEC 44 // codec is not available/supported
+#define BASS_ERROR_ENDED 45 // the channel/file has ended
+#define BASS_ERROR_BUSY 46 // the device is busy
+#define BASS_ERROR_UNSTREAMABLE 47 // unstreamable file
+#define BASS_ERROR_PROTOCOL 48 // unsupported protocol
+#define BASS_ERROR_DENIED 49 // access denied
+#define BASS_ERROR_UNKNOWN -1 // some other mystery problem
+
+// BASS_SetConfig options
+#define BASS_CONFIG_BUFFER 0
+#define BASS_CONFIG_UPDATEPERIOD 1
+#define BASS_CONFIG_GVOL_SAMPLE 4
+#define BASS_CONFIG_GVOL_STREAM 5
+#define BASS_CONFIG_GVOL_MUSIC 6
+#define BASS_CONFIG_CURVE_VOL 7
+#define BASS_CONFIG_CURVE_PAN 8
+#define BASS_CONFIG_FLOATDSP 9
+#define BASS_CONFIG_3DALGORITHM 10
+#define BASS_CONFIG_NET_TIMEOUT 11
+#define BASS_CONFIG_NET_BUFFER 12
+#define BASS_CONFIG_PAUSE_NOPLAY 13
+#define BASS_CONFIG_NET_PREBUF 15
+#define BASS_CONFIG_NET_PASSIVE 18
+#define BASS_CONFIG_REC_BUFFER 19
+#define BASS_CONFIG_NET_PLAYLIST 21
+#define BASS_CONFIG_MUSIC_VIRTUAL 22
+#define BASS_CONFIG_VERIFY 23
+#define BASS_CONFIG_UPDATETHREADS 24
+#define BASS_CONFIG_DEV_BUFFER 27
+#define BASS_CONFIG_REC_LOOPBACK 28
+#define BASS_CONFIG_VISTA_TRUEPOS 30
+#define BASS_CONFIG_IOS_SESSION 34
+#define BASS_CONFIG_IOS_MIXAUDIO 34
+#define BASS_CONFIG_DEV_DEFAULT 36
+#define BASS_CONFIG_NET_READTIMEOUT 37
+#define BASS_CONFIG_VISTA_SPEAKERS 38
+#define BASS_CONFIG_IOS_SPEAKER 39
+#define BASS_CONFIG_MF_DISABLE 40
+#define BASS_CONFIG_HANDLES 41
+#define BASS_CONFIG_UNICODE 42
+#define BASS_CONFIG_SRC 43
+#define BASS_CONFIG_SRC_SAMPLE 44
+#define BASS_CONFIG_ASYNCFILE_BUFFER 45
+#define BASS_CONFIG_OGG_PRESCAN 47
+#define BASS_CONFIG_MF_VIDEO 48
+#define BASS_CONFIG_AIRPLAY 49
+#define BASS_CONFIG_DEV_NONSTOP 50
+#define BASS_CONFIG_IOS_NOCATEGORY 51
+#define BASS_CONFIG_VERIFY_NET 52
+#define BASS_CONFIG_DEV_PERIOD 53
+#define BASS_CONFIG_FLOAT 54
+#define BASS_CONFIG_NET_SEEK 56
+#define BASS_CONFIG_AM_DISABLE 58
+#define BASS_CONFIG_NET_PLAYLIST_DEPTH 59
+#define BASS_CONFIG_NET_PREBUF_WAIT 60
+#define BASS_CONFIG_ANDROID_SESSIONID 62
+#define BASS_CONFIG_WASAPI_PERSIST 65
+#define BASS_CONFIG_REC_WASAPI 66
+#define BASS_CONFIG_ANDROID_AAUDIO 67
+#define BASS_CONFIG_SAMPLE_ONEHANDLE 69
+#define BASS_CONFIG_NET_META 71
+#define BASS_CONFIG_NET_RESTRATE 72
+#define BASS_CONFIG_REC_DEFAULT 73
+#define BASS_CONFIG_NORAMP 74
+
+// BASS_SetConfigPtr options
+#define BASS_CONFIG_NET_AGENT 16
+#define BASS_CONFIG_NET_PROXY 17
+#define BASS_CONFIG_IOS_NOTIFY 46
+#define BASS_CONFIG_ANDROID_JAVAVM 63
+#define BASS_CONFIG_LIBSSL 64
+#define BASS_CONFIG_FILENAME 75
+
+#define BASS_CONFIG_THREAD 0x40000000 // flag: thread-specific setting
+
+// BASS_CONFIG_IOS_SESSION flags
+#define BASS_IOS_SESSION_MIX 1
+#define BASS_IOS_SESSION_DUCK 2
+#define BASS_IOS_SESSION_AMBIENT 4
+#define BASS_IOS_SESSION_SPEAKER 8
+#define BASS_IOS_SESSION_DISABLE 16
+#define BASS_IOS_SESSION_DEACTIVATE 32
+#define BASS_IOS_SESSION_AIRPLAY 64
+#define BASS_IOS_SESSION_BTHFP 128
+#define BASS_IOS_SESSION_BTA2DP 0x100
+
+// BASS_Init flags
+#define BASS_DEVICE_8BITS 1 // unused
+#define BASS_DEVICE_MONO 2 // mono
+#define BASS_DEVICE_3D 4 // unused
+#define BASS_DEVICE_16BITS 8 // limit output to 16-bit
+#define BASS_DEVICE_REINIT 128 // reinitialize
+#define BASS_DEVICE_LATENCY 0x100 // unused
+#define BASS_DEVICE_CPSPEAKERS 0x400 // unused
+#define BASS_DEVICE_SPEAKERS 0x800 // force enabling of speaker assignment
+#define BASS_DEVICE_NOSPEAKER 0x1000 // ignore speaker arrangement
+#define BASS_DEVICE_DMIX 0x2000 // use ALSA "dmix" plugin
+#define BASS_DEVICE_FREQ 0x4000 // set device sample rate
+#define BASS_DEVICE_STEREO 0x8000 // limit output to stereo
+#define BASS_DEVICE_HOG 0x10000 // hog/exclusive mode
+#define BASS_DEVICE_AUDIOTRACK 0x20000 // use AudioTrack output
+#define BASS_DEVICE_DSOUND 0x40000 // use DirectSound output
+#define BASS_DEVICE_SOFTWARE 0x80000 // disable hardware/fastpath output
+
+// DirectSound interfaces (for use with BASS_GetDSoundObject)
+#define BASS_OBJECT_DS 1 // IDirectSound
+#define BASS_OBJECT_DS3DL 2 // IDirectSound3DListener
+
+// Device info structure
+typedef struct {
+#if defined(_WIN32_WCE) || (defined(WINAPI_FAMILY) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+ const wchar_t *name; // description
+ const wchar_t *driver; // driver
+#else
+ const char *name; // description
+ const char *driver; // driver
+#endif
+ DWORD flags;
+} BASS_DEVICEINFO;
+
+// BASS_DEVICEINFO flags
+#define BASS_DEVICE_ENABLED 1
+#define BASS_DEVICE_DEFAULT 2
+#define BASS_DEVICE_INIT 4
+#define BASS_DEVICE_LOOPBACK 8
+#define BASS_DEVICE_DEFAULTCOM 128
+
+#define BASS_DEVICE_TYPE_MASK 0xff000000
+#define BASS_DEVICE_TYPE_NETWORK 0x01000000
+#define BASS_DEVICE_TYPE_SPEAKERS 0x02000000
+#define BASS_DEVICE_TYPE_LINE 0x03000000
+#define BASS_DEVICE_TYPE_HEADPHONES 0x04000000
+#define BASS_DEVICE_TYPE_MICROPHONE 0x05000000
+#define BASS_DEVICE_TYPE_HEADSET 0x06000000
+#define BASS_DEVICE_TYPE_HANDSET 0x07000000
+#define BASS_DEVICE_TYPE_DIGITAL 0x08000000
+#define BASS_DEVICE_TYPE_SPDIF 0x09000000
+#define BASS_DEVICE_TYPE_HDMI 0x0a000000
+#define BASS_DEVICE_TYPE_DISPLAYPORT 0x40000000
+
+// BASS_GetDeviceInfo flags
+#define BASS_DEVICES_AIRPLAY 0x1000000
+
+typedef struct {
+ DWORD flags; // device capabilities (DSCAPS_xxx flags)
+ DWORD hwsize; // unused
+ DWORD hwfree; // unused
+ DWORD freesam; // unused
+ DWORD free3d; // unused
+ DWORD minrate; // unused
+ DWORD maxrate; // unused
+ BOOL eax; // unused
+ DWORD minbuf; // recommended minimum buffer length in ms
+ DWORD dsver; // DirectSound version
+ DWORD latency; // average delay (in ms) before start of playback
+ DWORD initflags; // BASS_Init "flags" parameter
+ DWORD speakers; // number of speakers available
+ DWORD freq; // current output rate
+} BASS_INFO;
+
+// BASS_INFO flags (from DSOUND.H)
+#define DSCAPS_EMULDRIVER 0x00000020 // device does not have hardware DirectSound support
+#define DSCAPS_CERTIFIED 0x00000040 // device driver has been certified by Microsoft
+
+#define DSCAPS_HARDWARE 0x80000000 // hardware mixed
+
+// Recording device info structure
+typedef struct {
+ DWORD flags; // device capabilities (DSCCAPS_xxx flags)
+ DWORD formats; // supported standard formats (WAVE_FORMAT_xxx flags)
+ DWORD inputs; // number of inputs
+ BOOL singlein; // TRUE = only 1 input can be set at a time
+ DWORD freq; // current input rate
+} BASS_RECORDINFO;
+
+// BASS_RECORDINFO flags (from DSOUND.H)
+#define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER // device does not have hardware DirectSound recording support
+#define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED // device driver has been certified by Microsoft
+
+// defines for formats field of BASS_RECORDINFO (from MMSYSTEM.H)
+#ifndef WAVE_FORMAT_1M08
+#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
+#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
+#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
+#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
+#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
+#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
+#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
+#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
+#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
+#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
+#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
+#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
+#endif
+
+// Sample info structure
+typedef struct {
+ DWORD freq; // default playback rate
+ float volume; // default volume (0-1)
+ float pan; // default pan (-1=left, 0=middle, 1=right)
+ DWORD flags; // BASS_SAMPLE_xxx flags
+ DWORD length; // length (in bytes)
+ DWORD max; // maximum simultaneous playbacks
+ DWORD origres; // original resolution
+ DWORD chans; // number of channels
+ DWORD mingap; // minimum gap (ms) between creating channels
+ DWORD mode3d; // BASS_3DMODE_xxx mode
+ float mindist; // minimum distance
+ float maxdist; // maximum distance
+ DWORD iangle; // angle of inside projection cone
+ DWORD oangle; // angle of outside projection cone
+ float outvol; // delta-volume outside the projection cone
+ DWORD vam; // unused
+ DWORD priority; // unused
+} BASS_SAMPLE;
+
+#define BASS_SAMPLE_8BITS 1 // 8 bit
+#define BASS_SAMPLE_FLOAT 256 // 32 bit floating-point
+#define BASS_SAMPLE_MONO 2 // mono
+#define BASS_SAMPLE_LOOP 4 // looped
+#define BASS_SAMPLE_3D 8 // 3D functionality
+#define BASS_SAMPLE_SOFTWARE 16 // unused
+#define BASS_SAMPLE_MUTEMAX 32 // mute at max distance (3D only)
+#define BASS_SAMPLE_VAM 64 // unused
+#define BASS_SAMPLE_FX 128 // unused
+#define BASS_SAMPLE_OVER_VOL 0x10000 // override lowest volume
+#define BASS_SAMPLE_OVER_POS 0x20000 // override longest playing
+#define BASS_SAMPLE_OVER_DIST 0x30000 // override furthest from listener (3D only)
+
+#define BASS_STREAM_PRESCAN 0x20000 // scan file for accurate seeking and length
+#define BASS_STREAM_AUTOFREE 0x40000 // automatically free the stream when it stops/ends
+#define BASS_STREAM_RESTRATE 0x80000 // restrict the download rate of internet file stream
+#define BASS_STREAM_BLOCK 0x100000 // download internet file stream in small blocks
+#define BASS_STREAM_DECODE 0x200000 // don't play the stream, only decode
+#define BASS_STREAM_STATUS 0x800000 // give server status info (HTTP/ICY tags) in DOWNLOADPROC
+
+#define BASS_MP3_IGNOREDELAY 0x200 // ignore LAME/Xing/VBRI/iTunes delay & padding info
+#define BASS_MP3_SETPOS BASS_STREAM_PRESCAN
+
+#define BASS_MUSIC_FLOAT BASS_SAMPLE_FLOAT
+#define BASS_MUSIC_MONO BASS_SAMPLE_MONO
+#define BASS_MUSIC_LOOP BASS_SAMPLE_LOOP
+#define BASS_MUSIC_3D BASS_SAMPLE_3D
+#define BASS_MUSIC_FX BASS_SAMPLE_FX
+#define BASS_MUSIC_AUTOFREE BASS_STREAM_AUTOFREE
+#define BASS_MUSIC_DECODE BASS_STREAM_DECODE
+#define BASS_MUSIC_PRESCAN BASS_STREAM_PRESCAN // calculate playback length
+#define BASS_MUSIC_CALCLEN BASS_MUSIC_PRESCAN
+#define BASS_MUSIC_RAMP 0x200 // normal ramping
+#define BASS_MUSIC_RAMPS 0x400 // sensitive ramping
+#define BASS_MUSIC_SURROUND 0x800 // surround sound
+#define BASS_MUSIC_SURROUND2 0x1000 // surround sound (mode 2)
+#define BASS_MUSIC_FT2PAN 0x2000 // apply FastTracker 2 panning to XM files
+#define BASS_MUSIC_FT2MOD 0x2000 // play .MOD as FastTracker 2 does
+#define BASS_MUSIC_PT1MOD 0x4000 // play .MOD as ProTracker 1 does
+#define BASS_MUSIC_NONINTER 0x10000 // non-interpolated sample mixing
+#define BASS_MUSIC_SINCINTER 0x800000 // sinc interpolated sample mixing
+#define BASS_MUSIC_POSRESET 0x8000 // stop all notes when moving position
+#define BASS_MUSIC_POSRESETEX 0x400000 // stop all notes and reset bmp/etc when moving position
+#define BASS_MUSIC_STOPBACK 0x80000 // stop the music on a backwards jump effect
+#define BASS_MUSIC_NOSAMPLE 0x100000 // don't load the samples
+
+// Speaker assignment flags
+#define BASS_SPEAKER_FRONT 0x1000000 // front speakers
+#define BASS_SPEAKER_REAR 0x2000000 // rear speakers
+#define BASS_SPEAKER_CENLFE 0x3000000 // center & LFE speakers (5.1)
+#define BASS_SPEAKER_SIDE 0x4000000 // side speakers (7.1)
+#define BASS_SPEAKER_N(n) ((n)<<24) // n'th pair of speakers (max 15)
+#define BASS_SPEAKER_LEFT 0x10000000 // modifier: left
+#define BASS_SPEAKER_RIGHT 0x20000000 // modifier: right
+#define BASS_SPEAKER_FRONTLEFT BASS_SPEAKER_FRONT | BASS_SPEAKER_LEFT
+#define BASS_SPEAKER_FRONTRIGHT BASS_SPEAKER_FRONT | BASS_SPEAKER_RIGHT
+#define BASS_SPEAKER_REARLEFT BASS_SPEAKER_REAR | BASS_SPEAKER_LEFT
+#define BASS_SPEAKER_REARRIGHT BASS_SPEAKER_REAR | BASS_SPEAKER_RIGHT
+#define BASS_SPEAKER_CENTER BASS_SPEAKER_CENLFE | BASS_SPEAKER_LEFT
+#define BASS_SPEAKER_LFE BASS_SPEAKER_CENLFE | BASS_SPEAKER_RIGHT
+#define BASS_SPEAKER_SIDELEFT BASS_SPEAKER_SIDE | BASS_SPEAKER_LEFT
+#define BASS_SPEAKER_SIDERIGHT BASS_SPEAKER_SIDE | BASS_SPEAKER_RIGHT
+#define BASS_SPEAKER_REAR2 BASS_SPEAKER_SIDE
+#define BASS_SPEAKER_REAR2LEFT BASS_SPEAKER_SIDELEFT
+#define BASS_SPEAKER_REAR2RIGHT BASS_SPEAKER_SIDERIGHT
+
+#define BASS_ASYNCFILE 0x40000000 // read file asynchronously
+#define BASS_UNICODE 0x80000000 // UTF-16
+
+#define BASS_RECORD_ECHOCANCEL 0x2000
+#define BASS_RECORD_AGC 0x4000
+#define BASS_RECORD_PAUSE 0x8000 // start recording paused
+
+// DX7 voice allocation & management flags
+#define BASS_VAM_HARDWARE 1
+#define BASS_VAM_SOFTWARE 2
+#define BASS_VAM_TERM_TIME 4
+#define BASS_VAM_TERM_DIST 8
+#define BASS_VAM_TERM_PRIO 16
+
+// Channel info structure
+typedef struct {
+ DWORD freq; // default playback rate
+ DWORD chans; // channels
+ DWORD flags;
+ DWORD ctype; // type of channel
+ DWORD origres; // original resolution
+ HPLUGIN plugin;
+ HSAMPLE sample;
+ const char *filename;
+} BASS_CHANNELINFO;
+
+#define BASS_ORIGRES_FLOAT 0x10000
+
+// BASS_CHANNELINFO types
+#define BASS_CTYPE_SAMPLE 1
+#define BASS_CTYPE_RECORD 2
+#define BASS_CTYPE_STREAM 0x10000
+#define BASS_CTYPE_STREAM_VORBIS 0x10002
+#define BASS_CTYPE_STREAM_OGG 0x10002
+#define BASS_CTYPE_STREAM_MP1 0x10003
+#define BASS_CTYPE_STREAM_MP2 0x10004
+#define BASS_CTYPE_STREAM_MP3 0x10005
+#define BASS_CTYPE_STREAM_AIFF 0x10006
+#define BASS_CTYPE_STREAM_CA 0x10007
+#define BASS_CTYPE_STREAM_MF 0x10008
+#define BASS_CTYPE_STREAM_AM 0x10009
+#define BASS_CTYPE_STREAM_SAMPLE 0x1000a
+#define BASS_CTYPE_STREAM_DUMMY 0x18000
+#define BASS_CTYPE_STREAM_DEVICE 0x18001
+#define BASS_CTYPE_STREAM_WAV 0x40000 // WAVE flag (LOWORD=codec)
+#define BASS_CTYPE_STREAM_WAV_PCM 0x50001
+#define BASS_CTYPE_STREAM_WAV_FLOAT 0x50003
+#define BASS_CTYPE_MUSIC_MOD 0x20000
+#define BASS_CTYPE_MUSIC_MTM 0x20001
+#define BASS_CTYPE_MUSIC_S3M 0x20002
+#define BASS_CTYPE_MUSIC_XM 0x20003
+#define BASS_CTYPE_MUSIC_IT 0x20004
+#define BASS_CTYPE_MUSIC_MO3 0x00100 // MO3 flag
+
+// BASS_PluginLoad flags
+#define BASS_PLUGIN_PROC 1
+
+typedef struct {
+ DWORD ctype; // channel type
+#if defined(_WIN32_WCE) || (defined(WINAPI_FAMILY) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+ const wchar_t *name; // format description
+ const wchar_t *exts; // file extension filter (*.ext1;*.ext2;etc...)
+#else
+ const char *name; // format description
+ const char *exts; // file extension filter (*.ext1;*.ext2;etc...)
+#endif
+} BASS_PLUGINFORM;
+
+typedef struct {
+ DWORD version; // version (same form as BASS_GetVersion)
+ DWORD formatc; // number of formats
+ const BASS_PLUGINFORM *formats; // the array of formats
+} BASS_PLUGININFO;
+
+// 3D vector (for 3D positions/velocities/orientations)
+typedef struct BASS_3DVECTOR {
+#ifdef __cplusplus
+ BASS_3DVECTOR() {}
+ BASS_3DVECTOR(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {}
+#endif
+ float x; // +=right, -=left
+ float y; // +=up, -=down
+ float z; // +=front, -=behind
+} BASS_3DVECTOR;
+
+// 3D channel modes
+#define BASS_3DMODE_NORMAL 0 // normal 3D processing
+#define BASS_3DMODE_RELATIVE 1 // position is relative to the listener
+#define BASS_3DMODE_OFF 2 // no 3D processing
+
+// software 3D mixing algorithms (used with BASS_CONFIG_3DALGORITHM)
+#define BASS_3DALG_DEFAULT 0
+#define BASS_3DALG_OFF 1
+#define BASS_3DALG_FULL 2
+#define BASS_3DALG_LIGHT 3
+
+// BASS_SampleGetChannel flags
+#define BASS_SAMCHAN_NEW 1 // get a new playback channel
+#define BASS_SAMCHAN_STREAM 2 // create a stream
+
+typedef DWORD (CALLBACK STREAMPROC)(HSTREAM handle, void *buffer, DWORD length, void *user);
+/* User stream callback function.
+handle : The stream that needs writing
+buffer : Buffer to write the samples in
+length : Number of bytes to write
+user : The 'user' parameter value given when calling BASS_StreamCreate
+RETURN : Number of bytes written. Set the BASS_STREAMPROC_END flag to end the stream. */
+
+#define BASS_STREAMPROC_END 0x80000000 // end of user stream flag
+
+// Special STREAMPROCs
+#define STREAMPROC_DUMMY (STREAMPROC*)0 // "dummy" stream
+#define STREAMPROC_PUSH (STREAMPROC*)-1 // push stream
+#define STREAMPROC_DEVICE (STREAMPROC*)-2 // device mix stream
+#define STREAMPROC_DEVICE_3D (STREAMPROC*)-3 // device 3D mix stream
+
+// BASS_StreamCreateFileUser file systems
+#define STREAMFILE_NOBUFFER 0
+#define STREAMFILE_BUFFER 1
+#define STREAMFILE_BUFFERPUSH 2
+
+// User file stream callback functions
+typedef void (CALLBACK FILECLOSEPROC)(void *user);
+typedef QWORD (CALLBACK FILELENPROC)(void *user);
+typedef DWORD (CALLBACK FILEREADPROC)(void *buffer, DWORD length, void *user);
+typedef BOOL (CALLBACK FILESEEKPROC)(QWORD offset, void *user);
+
+typedef struct {
+ FILECLOSEPROC *close;
+ FILELENPROC *length;
+ FILEREADPROC *read;
+ FILESEEKPROC *seek;
+} BASS_FILEPROCS;
+
+// BASS_StreamPutFileData options
+#define BASS_FILEDATA_END 0 // end & close the file
+
+// BASS_StreamGetFilePosition modes
+#define BASS_FILEPOS_CURRENT 0
+#define BASS_FILEPOS_DECODE BASS_FILEPOS_CURRENT
+#define BASS_FILEPOS_DOWNLOAD 1
+#define BASS_FILEPOS_END 2
+#define BASS_FILEPOS_START 3
+#define BASS_FILEPOS_CONNECTED 4
+#define BASS_FILEPOS_BUFFER 5
+#define BASS_FILEPOS_SOCKET 6
+#define BASS_FILEPOS_ASYNCBUF 7
+#define BASS_FILEPOS_SIZE 8
+#define BASS_FILEPOS_BUFFERING 9
+#define BASS_FILEPOS_AVAILABLE 10
+
+typedef void (CALLBACK DOWNLOADPROC)(const void *buffer, DWORD length, void *user);
+/* Internet stream download callback function.
+buffer : Buffer containing the downloaded data... NULL=end of download
+length : Number of bytes in the buffer
+user : The 'user' parameter value given when calling BASS_StreamCreateURL */
+
+// BASS_ChannelSetSync types
+#define BASS_SYNC_POS 0
+#define BASS_SYNC_END 2
+#define BASS_SYNC_META 4
+#define BASS_SYNC_SLIDE 5
+#define BASS_SYNC_STALL 6
+#define BASS_SYNC_DOWNLOAD 7
+#define BASS_SYNC_FREE 8
+#define BASS_SYNC_SETPOS 11
+#define BASS_SYNC_MUSICPOS 10
+#define BASS_SYNC_MUSICINST 1
+#define BASS_SYNC_MUSICFX 3
+#define BASS_SYNC_OGG_CHANGE 12
+#define BASS_SYNC_DEV_FAIL 14
+#define BASS_SYNC_DEV_FORMAT 15
+#define BASS_SYNC_THREAD 0x20000000 // flag: call sync in other thread
+#define BASS_SYNC_MIXTIME 0x40000000 // flag: sync at mixtime, else at playtime
+#define BASS_SYNC_ONETIME 0x80000000 // flag: sync only once, else continuously
+
+typedef void (CALLBACK SYNCPROC)(HSYNC handle, DWORD channel, DWORD data, void *user);
+/* Sync callback function.
+handle : The sync that has occured
+channel: Channel that the sync occured in
+data : Additional data associated with the sync's occurance
+user : The 'user' parameter given when calling BASS_ChannelSetSync */
+
+typedef void (CALLBACK DSPPROC)(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user);
+/* DSP callback function.
+handle : The DSP handle
+channel: Channel that the DSP is being applied to
+buffer : Buffer to apply the DSP to
+length : Number of bytes in the buffer
+user : The 'user' parameter given when calling BASS_ChannelSetDSP */
+
+typedef BOOL (CALLBACK RECORDPROC)(HRECORD handle, const void *buffer, DWORD length, void *user);
+/* Recording callback function.
+handle : The recording handle
+buffer : Buffer containing the recorded sample data
+length : Number of bytes
+user : The 'user' parameter value given when calling BASS_RecordStart
+RETURN : TRUE = continue recording, FALSE = stop */
+
+// BASS_ChannelIsActive return values
+#define BASS_ACTIVE_STOPPED 0
+#define BASS_ACTIVE_PLAYING 1
+#define BASS_ACTIVE_STALLED 2
+#define BASS_ACTIVE_PAUSED 3
+#define BASS_ACTIVE_PAUSED_DEVICE 4
+
+// Channel attributes
+#define BASS_ATTRIB_FREQ 1
+#define BASS_ATTRIB_VOL 2
+#define BASS_ATTRIB_PAN 3
+#define BASS_ATTRIB_EAXMIX 4
+#define BASS_ATTRIB_NOBUFFER 5
+#define BASS_ATTRIB_VBR 6
+#define BASS_ATTRIB_CPU 7
+#define BASS_ATTRIB_SRC 8
+#define BASS_ATTRIB_NET_RESUME 9
+#define BASS_ATTRIB_SCANINFO 10
+#define BASS_ATTRIB_NORAMP 11
+#define BASS_ATTRIB_BITRATE 12
+#define BASS_ATTRIB_BUFFER 13
+#define BASS_ATTRIB_GRANULE 14
+#define BASS_ATTRIB_USER 15
+#define BASS_ATTRIB_TAIL 16
+#define BASS_ATTRIB_PUSH_LIMIT 17
+#define BASS_ATTRIB_DOWNLOADPROC 18
+#define BASS_ATTRIB_VOLDSP 19
+#define BASS_ATTRIB_VOLDSP_PRIORITY 20
+#define BASS_ATTRIB_MUSIC_AMPLIFY 0x100
+#define BASS_ATTRIB_MUSIC_PANSEP 0x101
+#define BASS_ATTRIB_MUSIC_PSCALER 0x102
+#define BASS_ATTRIB_MUSIC_BPM 0x103
+#define BASS_ATTRIB_MUSIC_SPEED 0x104
+#define BASS_ATTRIB_MUSIC_VOL_GLOBAL 0x105
+#define BASS_ATTRIB_MUSIC_ACTIVE 0x106
+#define BASS_ATTRIB_MUSIC_VOL_CHAN 0x200 // + channel #
+#define BASS_ATTRIB_MUSIC_VOL_INST 0x300 // + instrument #
+
+// BASS_ChannelSlideAttribute flags
+#define BASS_SLIDE_LOG 0x1000000
+
+// BASS_ChannelGetData flags
+#define BASS_DATA_AVAILABLE 0 // query how much data is buffered
+#define BASS_DATA_NOREMOVE 0x10000000 // flag: don't remove data from recording buffer
+#define BASS_DATA_FIXED 0x20000000 // unused
+#define BASS_DATA_FLOAT 0x40000000 // flag: return floating-point sample data
+#define BASS_DATA_FFT256 0x80000000 // 256 sample FFT
+#define BASS_DATA_FFT512 0x80000001 // 512 FFT
+#define BASS_DATA_FFT1024 0x80000002 // 1024 FFT
+#define BASS_DATA_FFT2048 0x80000003 // 2048 FFT
+#define BASS_DATA_FFT4096 0x80000004 // 4096 FFT
+#define BASS_DATA_FFT8192 0x80000005 // 8192 FFT
+#define BASS_DATA_FFT16384 0x80000006 // 16384 FFT
+#define BASS_DATA_FFT32768 0x80000007 // 32768 FFT
+#define BASS_DATA_FFT_INDIVIDUAL 0x10 // FFT flag: FFT for each channel, else all combined
+#define BASS_DATA_FFT_NOWINDOW 0x20 // FFT flag: no Hanning window
+#define BASS_DATA_FFT_REMOVEDC 0x40 // FFT flag: pre-remove DC bias
+#define BASS_DATA_FFT_COMPLEX 0x80 // FFT flag: return complex data
+#define BASS_DATA_FFT_NYQUIST 0x100 // FFT flag: return extra Nyquist value
+
+// BASS_ChannelGetLevelEx flags
+#define BASS_LEVEL_MONO 1 // get mono level
+#define BASS_LEVEL_STEREO 2 // get stereo level
+#define BASS_LEVEL_RMS 4 // get RMS levels
+#define BASS_LEVEL_VOLPAN 8 // apply VOL/PAN attributes to the levels
+#define BASS_LEVEL_NOREMOVE 16 // don't remove data from recording buffer
+
+// BASS_ChannelGetTags types : what's returned
+#define BASS_TAG_ID3 0 // ID3v1 tags : TAG_ID3 structure
+#define BASS_TAG_ID3V2 1 // ID3v2 tags : variable length block
+#define BASS_TAG_OGG 2 // OGG comments : series of null-terminated UTF-8 strings
+#define BASS_TAG_HTTP 3 // HTTP headers : series of null-terminated ASCII strings
+#define BASS_TAG_ICY 4 // ICY headers : series of null-terminated ANSI strings
+#define BASS_TAG_META 5 // ICY metadata : ANSI string
+#define BASS_TAG_APE 6 // APE tags : series of null-terminated UTF-8 strings
+#define BASS_TAG_MP4 7 // MP4/iTunes metadata : series of null-terminated UTF-8 strings
+#define BASS_TAG_WMA 8 // WMA tags : series of null-terminated UTF-8 strings
+#define BASS_TAG_VENDOR 9 // OGG encoder : UTF-8 string
+#define BASS_TAG_LYRICS3 10 // Lyric3v2 tag : ASCII string
+#define BASS_TAG_CA_CODEC 11 // CoreAudio codec info : TAG_CA_CODEC structure
+#define BASS_TAG_MF 13 // Media Foundation tags : series of null-terminated UTF-8 strings
+#define BASS_TAG_WAVEFORMAT 14 // WAVE format : WAVEFORMATEEX structure
+#define BASS_TAG_AM_NAME 16 // Android Media codec name : ASCII string
+#define BASS_TAG_ID3V2_2 17 // ID3v2 tags (2nd block) : variable length block
+#define BASS_TAG_AM_MIME 18 // Android Media MIME type : ASCII string
+#define BASS_TAG_LOCATION 19 // redirected URL : ASCII string
+#define BASS_TAG_RIFF_INFO 0x100 // RIFF "INFO" tags : series of null-terminated ANSI strings
+#define BASS_TAG_RIFF_BEXT 0x101 // RIFF/BWF "bext" tags : TAG_BEXT structure
+#define BASS_TAG_RIFF_CART 0x102 // RIFF/BWF "cart" tags : TAG_CART structure
+#define BASS_TAG_RIFF_DISP 0x103 // RIFF "DISP" text tag : ANSI string
+#define BASS_TAG_RIFF_CUE 0x104 // RIFF "cue " chunk : TAG_CUE structure
+#define BASS_TAG_RIFF_SMPL 0x105 // RIFF "smpl" chunk : TAG_SMPL structure
+#define BASS_TAG_APE_BINARY 0x1000 // + index #, binary APE tag : TAG_APE_BINARY structure
+#define BASS_TAG_MUSIC_NAME 0x10000 // MOD music name : ANSI string
+#define BASS_TAG_MUSIC_MESSAGE 0x10001 // MOD message : ANSI string
+#define BASS_TAG_MUSIC_ORDERS 0x10002 // MOD order list : BYTE array of pattern numbers
+#define BASS_TAG_MUSIC_AUTH 0x10003 // MOD author : UTF-8 string
+#define BASS_TAG_MUSIC_INST 0x10100 // + instrument #, MOD instrument name : ANSI string
+#define BASS_TAG_MUSIC_CHAN 0x10200 // + channel #, MOD channel name : ANSI string
+#define BASS_TAG_MUSIC_SAMPLE 0x10300 // + sample #, MOD sample name : ANSI string
+
+// ID3v1 tag structure
+typedef struct {
+ char id[3];
+ char title[30];
+ char artist[30];
+ char album[30];
+ char year[4];
+ char comment[30];
+ BYTE genre;
+} TAG_ID3;
+
+// Binary APE tag structure
+typedef struct {
+ const char *key;
+ const void *data;
+ DWORD length;
+} TAG_APE_BINARY;
+
+// BWF "bext" tag structure
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4200)
+#endif
+#pragma pack(push,1)
+typedef struct {
+ char Description[256]; // description
+ char Originator[32]; // name of the originator
+ char OriginatorReference[32]; // reference of the originator
+ char OriginationDate[10]; // date of creation (yyyy-mm-dd)
+ char OriginationTime[8]; // time of creation (hh-mm-ss)
+ QWORD TimeReference; // first sample count since midnight (little-endian)
+ WORD Version; // BWF version (little-endian)
+ BYTE UMID[64]; // SMPTE UMID
+ BYTE Reserved[190];
+#if defined(__GNUC__) && __GNUC__<3
+ char CodingHistory[0]; // history
+#elif 1 // change to 0 if compiler fails the following line
+ char CodingHistory[]; // history
+#else
+ char CodingHistory[1]; // history
+#endif
+} TAG_BEXT;
+#pragma pack(pop)
+
+// BWF "cart" tag structures
+typedef struct
+{
+ DWORD dwUsage; // FOURCC timer usage ID
+ DWORD dwValue; // timer value in samples from head
+} TAG_CART_TIMER;
+
+typedef struct
+{
+ char Version[4]; // version of the data structure
+ char Title[64]; // title of cart audio sequence
+ char Artist[64]; // artist or creator name
+ char CutID[64]; // cut number identification
+ char ClientID[64]; // client identification
+ char Category[64]; // category ID, PSA, NEWS, etc
+ char Classification[64]; // classification or auxiliary key
+ char OutCue[64]; // out cue text
+ char StartDate[10]; // yyyy-mm-dd
+ char StartTime[8]; // hh:mm:ss
+ char EndDate[10]; // yyyy-mm-dd
+ char EndTime[8]; // hh:mm:ss
+ char ProducerAppID[64]; // name of vendor or application
+ char ProducerAppVersion[64]; // version of producer application
+ char UserDef[64]; // user defined text
+ DWORD dwLevelReference; // sample value for 0 dB reference
+ TAG_CART_TIMER PostTimer[8]; // 8 time markers after head
+ char Reserved[276];
+ char URL[1024]; // uniform resource locator
+#if defined(__GNUC__) && __GNUC__<3
+ char TagText[0]; // free form text for scripts or tags
+#elif 1 // change to 0 if compiler fails the following line
+ char TagText[]; // free form text for scripts or tags
+#else
+ char TagText[1]; // free form text for scripts or tags
+#endif
+} TAG_CART;
+
+// RIFF "cue " tag structures
+typedef struct
+{
+ DWORD dwName;
+ DWORD dwPosition;
+ DWORD fccChunk;
+ DWORD dwChunkStart;
+ DWORD dwBlockStart;
+ DWORD dwSampleOffset;
+} TAG_CUE_POINT;
+
+typedef struct
+{
+ DWORD dwCuePoints;
+#if defined(__GNUC__) && __GNUC__<3
+ TAG_CUE_POINT CuePoints[0];
+#elif 1 // change to 0 if compiler fails the following line
+ TAG_CUE_POINT CuePoints[];
+#else
+ TAG_CUE_POINT CuePoints[1];
+#endif
+} TAG_CUE;
+
+// RIFF "smpl" tag structures
+typedef struct
+{
+ DWORD dwIdentifier;
+ DWORD dwType;
+ DWORD dwStart;
+ DWORD dwEnd;
+ DWORD dwFraction;
+ DWORD dwPlayCount;
+} TAG_SMPL_LOOP;
+
+typedef struct
+{
+ DWORD dwManufacturer;
+ DWORD dwProduct;
+ DWORD dwSamplePeriod;
+ DWORD dwMIDIUnityNote;
+ DWORD dwMIDIPitchFraction;
+ DWORD dwSMPTEFormat;
+ DWORD dwSMPTEOffset;
+ DWORD cSampleLoops;
+ DWORD cbSamplerData;
+#if defined(__GNUC__) && __GNUC__<3
+ TAG_SMPL_LOOP SampleLoops[0];
+#elif 1 // change to 0 if compiler fails the following line
+ TAG_SMPL_LOOP SampleLoops[];
+#else
+ TAG_SMPL_LOOP SampleLoops[1];
+#endif
+} TAG_SMPL;
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+// CoreAudio codec info structure
+typedef struct {
+ DWORD ftype; // file format
+ DWORD atype; // audio format
+ const char *name; // description
+} TAG_CA_CODEC;
+
+#ifndef _WAVEFORMATEX_
+#define _WAVEFORMATEX_
+#pragma pack(push,1)
+typedef struct tWAVEFORMATEX
+{
+ WORD wFormatTag;
+ WORD nChannels;
+ DWORD nSamplesPerSec;
+ DWORD nAvgBytesPerSec;
+ WORD nBlockAlign;
+ WORD wBitsPerSample;
+ WORD cbSize;
+} WAVEFORMATEX, *PWAVEFORMATEX, *LPWAVEFORMATEX;
+typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
+#pragma pack(pop)
+#endif
+
+// BASS_ChannelGetLength/GetPosition/SetPosition modes
+#define BASS_POS_BYTE 0 // byte position
+#define BASS_POS_MUSIC_ORDER 1 // order.row position, MAKELONG(order,row)
+#define BASS_POS_OGG 3 // OGG bitstream number
+#define BASS_POS_END 0x10 // trimmed end position
+#define BASS_POS_LOOP 0x11 // loop start positiom
+#define BASS_POS_FLUSH 0x1000000 // flag: flush decoder/FX buffers
+#define BASS_POS_RESET 0x2000000 // flag: reset user file buffers
+#define BASS_POS_RELATIVE 0x4000000 // flag: seek relative to the current position
+#define BASS_POS_INEXACT 0x8000000 // flag: allow seeking to inexact position
+#define BASS_POS_DECODE 0x10000000 // flag: get the decoding (not playing) position
+#define BASS_POS_DECODETO 0x20000000 // flag: decode to the position instead of seeking
+#define BASS_POS_SCAN 0x40000000 // flag: scan to the position
+
+// BASS_ChannelSetDevice/GetDevice option
+#define BASS_NODEVICE 0x20000
+
+// BASS_RecordSetInput flags
+#define BASS_INPUT_OFF 0x10000
+#define BASS_INPUT_ON 0x20000
+
+#define BASS_INPUT_TYPE_MASK 0xff000000
+#define BASS_INPUT_TYPE_UNDEF 0x00000000
+#define BASS_INPUT_TYPE_DIGITAL 0x01000000
+#define BASS_INPUT_TYPE_LINE 0x02000000
+#define BASS_INPUT_TYPE_MIC 0x03000000
+#define BASS_INPUT_TYPE_SYNTH 0x04000000
+#define BASS_INPUT_TYPE_CD 0x05000000
+#define BASS_INPUT_TYPE_PHONE 0x06000000
+#define BASS_INPUT_TYPE_SPEAKER 0x07000000
+#define BASS_INPUT_TYPE_WAVE 0x08000000
+#define BASS_INPUT_TYPE_AUX 0x09000000
+#define BASS_INPUT_TYPE_ANALOG 0x0a000000
+
+// BASS_ChannelSetFX effect types
+#define BASS_FX_DX8_CHORUS 0
+#define BASS_FX_DX8_COMPRESSOR 1
+#define BASS_FX_DX8_DISTORTION 2
+#define BASS_FX_DX8_ECHO 3
+#define BASS_FX_DX8_FLANGER 4
+#define BASS_FX_DX8_GARGLE 5
+#define BASS_FX_DX8_I3DL2REVERB 6
+#define BASS_FX_DX8_PARAMEQ 7
+#define BASS_FX_DX8_REVERB 8
+#define BASS_FX_VOLUME 9
+
+typedef struct {
+ float fWetDryMix;
+ float fDepth;
+ float fFeedback;
+ float fFrequency;
+ DWORD lWaveform; // 0=triangle, 1=sine
+ float fDelay;
+ DWORD lPhase; // BASS_DX8_PHASE_xxx
+} BASS_DX8_CHORUS;
+
+typedef struct {
+ float fGain;
+ float fAttack;
+ float fRelease;
+ float fThreshold;
+ float fRatio;
+ float fPredelay;
+} BASS_DX8_COMPRESSOR;
+
+typedef struct {
+ float fGain;
+ float fEdge;
+ float fPostEQCenterFrequency;
+ float fPostEQBandwidth;
+ float fPreLowpassCutoff;
+} BASS_DX8_DISTORTION;
+
+typedef struct {
+ float fWetDryMix;
+ float fFeedback;
+ float fLeftDelay;
+ float fRightDelay;
+ BOOL lPanDelay;
+} BASS_DX8_ECHO;
+
+typedef struct {
+ float fWetDryMix;
+ float fDepth;
+ float fFeedback;
+ float fFrequency;
+ DWORD lWaveform; // 0=triangle, 1=sine
+ float fDelay;
+ DWORD lPhase; // BASS_DX8_PHASE_xxx
+} BASS_DX8_FLANGER;
+
+typedef struct {
+ DWORD dwRateHz; // Rate of modulation in hz
+ DWORD dwWaveShape; // 0=triangle, 1=square
+} BASS_DX8_GARGLE;
+
+typedef struct {
+ int lRoom; // [-10000, 0] default: -1000 mB
+ int lRoomHF; // [-10000, 0] default: 0 mB
+ float flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
+ float flDecayTime; // [0.1, 20.0] default: 1.49s
+ float flDecayHFRatio; // [0.1, 2.0] default: 0.83
+ int lReflections; // [-10000, 1000] default: -2602 mB
+ float flReflectionsDelay; // [0.0, 0.3] default: 0.007 s
+ int lReverb; // [-10000, 2000] default: 200 mB
+ float flReverbDelay; // [0.0, 0.1] default: 0.011 s
+ float flDiffusion; // [0.0, 100.0] default: 100.0 %
+ float flDensity; // [0.0, 100.0] default: 100.0 %
+ float flHFReference; // [20.0, 20000.0] default: 5000.0 Hz
+} BASS_DX8_I3DL2REVERB;
+
+typedef struct {
+ float fCenter;
+ float fBandwidth;
+ float fGain;
+} BASS_DX8_PARAMEQ;
+
+typedef struct {
+ float fInGain; // [-96.0,0.0] default: 0.0 dB
+ float fReverbMix; // [-96.0,0.0] default: 0.0 db
+ float fReverbTime; // [0.001,3000.0] default: 1000.0 ms
+ float fHighFreqRTRatio; // [0.001,0.999] default: 0.001
+} BASS_DX8_REVERB;
+
+#define BASS_DX8_PHASE_NEG_180 0
+#define BASS_DX8_PHASE_NEG_90 1
+#define BASS_DX8_PHASE_ZERO 2
+#define BASS_DX8_PHASE_90 3
+#define BASS_DX8_PHASE_180 4
+
+typedef struct {
+ float fTarget;
+ float fCurrent;
+ float fTime;
+ DWORD lCurve;
+} BASS_FX_VOLUME_PARAM;
+
+typedef void (CALLBACK IOSNOTIFYPROC)(DWORD status);
+/* iOS notification callback function.
+status : The notification (BASS_IOSNOTIFY_xxx) */
+
+#define BASS_IOSNOTIFY_INTERRUPT 1 // interruption started
+#define BASS_IOSNOTIFY_INTERRUPT_END 2 // interruption ended
+
+BOOL BASSDEF(BASS_SetConfig)(DWORD option, DWORD value);
+DWORD BASSDEF(BASS_GetConfig)(DWORD option);
+BOOL BASSDEF(BASS_SetConfigPtr)(DWORD option, const void *value);
+const void *BASSDEF(BASS_GetConfigPtr)(DWORD option);
+DWORD BASSDEF(BASS_GetVersion)(void);
+int BASSDEF(BASS_ErrorGetCode)(void);
+
+BOOL BASSDEF(BASS_GetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info);
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !(defined(WINAPI_FAMILY) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, HWND win, const void *dsguid);
+#else
+BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, void *win, const void *dsguid);
+#endif
+BOOL BASSDEF(BASS_Free)(void);
+BOOL BASSDEF(BASS_SetDevice)(DWORD device);
+DWORD BASSDEF(BASS_GetDevice)(void);
+BOOL BASSDEF(BASS_GetInfo)(BASS_INFO *info);
+BOOL BASSDEF(BASS_Start)(void);
+BOOL BASSDEF(BASS_Stop)(void);
+BOOL BASSDEF(BASS_Pause)(void);
+DWORD BASSDEF(BASS_IsStarted)(void);
+BOOL BASSDEF(BASS_Update)(DWORD length);
+float BASSDEF(BASS_GetCPU)(void);
+BOOL BASSDEF(BASS_SetVolume)(float volume);
+float BASSDEF(BASS_GetVolume)(void);
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !(defined(WINAPI_FAMILY) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+void *BASSDEF(BASS_GetDSoundObject)(DWORD object);
+#endif
+
+BOOL BASSDEF(BASS_Set3DFactors)(float distf, float rollf, float doppf);
+BOOL BASSDEF(BASS_Get3DFactors)(float *distf, float *rollf, float *doppf);
+BOOL BASSDEF(BASS_Set3DPosition)(const BASS_3DVECTOR *pos, const BASS_3DVECTOR *vel, const BASS_3DVECTOR *front, const BASS_3DVECTOR *top);
+BOOL BASSDEF(BASS_Get3DPosition)(BASS_3DVECTOR *pos, BASS_3DVECTOR *vel, BASS_3DVECTOR *front, BASS_3DVECTOR *top);
+void BASSDEF(BASS_Apply3D)(void);
+
+HPLUGIN BASSDEF(BASS_PluginLoad)(const char *file, DWORD flags);
+BOOL BASSDEF(BASS_PluginFree)(HPLUGIN handle);
+BOOL BASSDEF(BASS_PluginEnable)(HPLUGIN handle, BOOL enable);
+const BASS_PLUGININFO *BASSDEF(BASS_PluginGetInfo)(HPLUGIN handle);
+
+HSAMPLE BASSDEF(BASS_SampleLoad)(BOOL mem, const void *file, QWORD offset, DWORD length, DWORD max, DWORD flags);
+HSAMPLE BASSDEF(BASS_SampleCreate)(DWORD length, DWORD freq, DWORD chans, DWORD max, DWORD flags);
+BOOL BASSDEF(BASS_SampleFree)(HSAMPLE handle);
+BOOL BASSDEF(BASS_SampleSetData)(HSAMPLE handle, const void *buffer);
+BOOL BASSDEF(BASS_SampleGetData)(HSAMPLE handle, void *buffer);
+BOOL BASSDEF(BASS_SampleGetInfo)(HSAMPLE handle, BASS_SAMPLE *info);
+BOOL BASSDEF(BASS_SampleSetInfo)(HSAMPLE handle, const BASS_SAMPLE *info);
+DWORD BASSDEF(BASS_SampleGetChannel)(HSAMPLE handle, DWORD flags);
+DWORD BASSDEF(BASS_SampleGetChannels)(HSAMPLE handle, HCHANNEL *channels);
+BOOL BASSDEF(BASS_SampleStop)(HSAMPLE handle);
+
+HSTREAM BASSDEF(BASS_StreamCreate)(DWORD freq, DWORD chans, DWORD flags, STREAMPROC *proc, void *user);
+HSTREAM BASSDEF(BASS_StreamCreateFile)(BOOL mem, const void *file, QWORD offset, QWORD length, DWORD flags);
+HSTREAM BASSDEF(BASS_StreamCreateURL)(const char *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user);
+HSTREAM BASSDEF(BASS_StreamCreateFileUser)(DWORD system, DWORD flags, const BASS_FILEPROCS *proc, void *user);
+BOOL BASSDEF(BASS_StreamFree)(HSTREAM handle);
+QWORD BASSDEF(BASS_StreamGetFilePosition)(HSTREAM handle, DWORD mode);
+DWORD BASSDEF(BASS_StreamPutData)(HSTREAM handle, const void *buffer, DWORD length);
+DWORD BASSDEF(BASS_StreamPutFileData)(HSTREAM handle, const void *buffer, DWORD length);
+
+HMUSIC BASSDEF(BASS_MusicLoad)(BOOL mem, const void *file, QWORD offset, DWORD length, DWORD flags, DWORD freq);
+BOOL BASSDEF(BASS_MusicFree)(HMUSIC handle);
+
+BOOL BASSDEF(BASS_RecordGetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info);
+BOOL BASSDEF(BASS_RecordInit)(int device);
+BOOL BASSDEF(BASS_RecordFree)(void);
+BOOL BASSDEF(BASS_RecordSetDevice)(DWORD device);
+DWORD BASSDEF(BASS_RecordGetDevice)(void);
+BOOL BASSDEF(BASS_RecordGetInfo)(BASS_RECORDINFO *info);
+const char *BASSDEF(BASS_RecordGetInputName)(int input);
+BOOL BASSDEF(BASS_RecordSetInput)(int input, DWORD flags, float volume);
+DWORD BASSDEF(BASS_RecordGetInput)(int input, float *volume);
+HRECORD BASSDEF(BASS_RecordStart)(DWORD freq, DWORD chans, DWORD flags, RECORDPROC *proc, void *user);
+
+double BASSDEF(BASS_ChannelBytes2Seconds)(DWORD handle, QWORD pos);
+QWORD BASSDEF(BASS_ChannelSeconds2Bytes)(DWORD handle, double pos);
+DWORD BASSDEF(BASS_ChannelGetDevice)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelSetDevice)(DWORD handle, DWORD device);
+DWORD BASSDEF(BASS_ChannelIsActive)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelGetInfo)(DWORD handle, BASS_CHANNELINFO *info);
+const char *BASSDEF(BASS_ChannelGetTags)(DWORD handle, DWORD tags);
+DWORD BASSDEF(BASS_ChannelFlags)(DWORD handle, DWORD flags, DWORD mask);
+BOOL BASSDEF(BASS_ChannelLock)(DWORD handle, BOOL lock);
+BOOL BASSDEF(BASS_ChannelFree)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelPlay)(DWORD handle, BOOL restart);
+BOOL BASSDEF(BASS_ChannelStart)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelStop)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelPause)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelUpdate)(DWORD handle, DWORD length);
+BOOL BASSDEF(BASS_ChannelSetAttribute)(DWORD handle, DWORD attrib, float value);
+BOOL BASSDEF(BASS_ChannelGetAttribute)(DWORD handle, DWORD attrib, float *value);
+BOOL BASSDEF(BASS_ChannelSlideAttribute)(DWORD handle, DWORD attrib, float value, DWORD time);
+BOOL BASSDEF(BASS_ChannelIsSliding)(DWORD handle, DWORD attrib);
+BOOL BASSDEF(BASS_ChannelSetAttributeEx)(DWORD handle, DWORD attrib, void *value, DWORD size);
+DWORD BASSDEF(BASS_ChannelGetAttributeEx)(DWORD handle, DWORD attrib, void *value, DWORD size);
+BOOL BASSDEF(BASS_ChannelSet3DAttributes)(DWORD handle, int mode, float min, float max, int iangle, int oangle, float outvol);
+BOOL BASSDEF(BASS_ChannelGet3DAttributes)(DWORD handle, DWORD *mode, float *min, float *max, DWORD *iangle, DWORD *oangle, float *outvol);
+BOOL BASSDEF(BASS_ChannelSet3DPosition)(DWORD handle, const BASS_3DVECTOR *pos, const BASS_3DVECTOR *orient, const BASS_3DVECTOR *vel);
+BOOL BASSDEF(BASS_ChannelGet3DPosition)(DWORD handle, BASS_3DVECTOR *pos, BASS_3DVECTOR *orient, BASS_3DVECTOR *vel);
+QWORD BASSDEF(BASS_ChannelGetLength)(DWORD handle, DWORD mode);
+BOOL BASSDEF(BASS_ChannelSetPosition)(DWORD handle, QWORD pos, DWORD mode);
+QWORD BASSDEF(BASS_ChannelGetPosition)(DWORD handle, DWORD mode);
+DWORD BASSDEF(BASS_ChannelGetLevel)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelGetLevelEx)(DWORD handle, float *levels, float length, DWORD flags);
+DWORD BASSDEF(BASS_ChannelGetData)(DWORD handle, void *buffer, DWORD length);
+HSYNC BASSDEF(BASS_ChannelSetSync)(DWORD handle, DWORD type, QWORD param, SYNCPROC *proc, void *user);
+BOOL BASSDEF(BASS_ChannelRemoveSync)(DWORD handle, HSYNC sync);
+BOOL BASSDEF(BASS_ChannelSetLink)(DWORD handle, DWORD chan);
+BOOL BASSDEF(BASS_ChannelRemoveLink)(DWORD handle, DWORD chan);
+HDSP BASSDEF(BASS_ChannelSetDSP)(DWORD handle, DSPPROC *proc, void *user, int priority);
+BOOL BASSDEF(BASS_ChannelRemoveDSP)(DWORD handle, HDSP dsp);
+HFX BASSDEF(BASS_ChannelSetFX)(DWORD handle, DWORD type, int priority);
+BOOL BASSDEF(BASS_ChannelRemoveFX)(DWORD handle, HFX fx);
+
+BOOL BASSDEF(BASS_FXSetParameters)(HFX handle, const void *params);
+BOOL BASSDEF(BASS_FXGetParameters)(HFX handle, void *params);
+BOOL BASSDEF(BASS_FXSetPriority)(HFX handle, int priority);
+BOOL BASSDEF(BASS_FXReset)(DWORD handle);
+
+#ifdef __cplusplus
+}
+
+#if defined(_WIN32) && !defined(NOBASSOVERLOADS)
+static inline HPLUGIN BASS_PluginLoad(const WCHAR *file, DWORD flags)
+{
+ return BASS_PluginLoad((const char*)file, flags | BASS_UNICODE);
+}
+
+static inline HMUSIC BASS_MusicLoad(BOOL mem, const WCHAR *file, QWORD offset, DWORD length, DWORD flags, DWORD freq)
+{
+ return BASS_MusicLoad(mem, (const void*)file, offset, length, flags | BASS_UNICODE, freq);
+}
+
+static inline HSAMPLE BASS_SampleLoad(BOOL mem, const WCHAR *file, QWORD offset, DWORD length, DWORD max, DWORD flags)
+{
+ return BASS_SampleLoad(mem, (const void*)file, offset, length, max, flags | BASS_UNICODE);
+}
+
+static inline HSTREAM BASS_StreamCreateFile(BOOL mem, const WCHAR *file, QWORD offset, QWORD length, DWORD flags)
+{
+ return BASS_StreamCreateFile(mem, (const void*)file, offset, length, flags | BASS_UNICODE);
+}
+
+static inline HSTREAM BASS_StreamCreateURL(const WCHAR *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user)
+{
+ return BASS_StreamCreateURL((const char*)url, offset, flags | BASS_UNICODE, proc, user);
+}
+
+static inline BOOL BASS_SetConfigPtr(DWORD option, const WCHAR *value)
+{
+ return BASS_SetConfigPtr(option | BASS_UNICODE, (const void*)value);
+}
+#endif
+#endif
+
+#ifdef __OBJC__
+#undef BOOL
+#endif
+
+#endif
diff --git a/bass/inc/bassmidi.h b/bass/inc/bassmidi.h
new file mode 100644
index 0000000..30e5447
--- /dev/null
+++ b/bass/inc/bassmidi.h
@@ -0,0 +1,442 @@
+/*
+ BASSMIDI 2.4 C/C++ header file
+ Copyright (c) 2006-2024 Un4seen Developments Ltd.
+
+ See the BASSMIDI.CHM file for more detailed documentation
+*/
+
+#ifndef BASSMIDI_H
+#define BASSMIDI_H
+
+#include "bass.h"
+
+#if BASSVERSION!=0x204
+#error conflicting BASS and BASSMIDI versions
+#endif
+
+#ifdef __OBJC__
+typedef int BOOL32;
+#define BOOL BOOL32 // override objc's BOOL
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef BASSMIDIDEF
+#define BASSMIDIDEF(f) WINAPI f
+#else
+#define NOBASSMIDIOVERLOADS
+#endif
+
+typedef DWORD HSOUNDFONT; // soundfont handle
+
+// Additional error codes returned by BASS_ErrorGetCode
+#define BASS_ERROR_MIDI_INCLUDE 7000 // SFZ include file could not be opened
+
+// Additional BASS_SetConfig options
+#define BASS_CONFIG_MIDI_COMPACT 0x10400
+#define BASS_CONFIG_MIDI_VOICES 0x10401
+#define BASS_CONFIG_MIDI_AUTOFONT 0x10402
+#define BASS_CONFIG_MIDI_IN_PORTS 0x10404
+#define BASS_CONFIG_MIDI_SAMPLETHREADS 0x10406
+#define BASS_CONFIG_MIDI_SAMPLEMEM 0x10407
+#define BASS_CONFIG_MIDI_SAMPLEREAD 0x10408
+#define BASS_CONFIG_MIDI_SAMPLELOADING 0x1040a
+
+// Additional BASS_SetConfigPtr options
+#define BASS_CONFIG_MIDI_DEFFONT 0x10403
+#define BASS_CONFIG_MIDI_SFZHEAD 0x10409
+
+// Additional sync types
+#define BASS_SYNC_MIDI_MARK 0x10000
+#define BASS_SYNC_MIDI_MARKER 0x10000
+#define BASS_SYNC_MIDI_CUE 0x10001
+#define BASS_SYNC_MIDI_LYRIC 0x10002
+#define BASS_SYNC_MIDI_TEXT 0x10003
+#define BASS_SYNC_MIDI_EVENT 0x10004
+#define BASS_SYNC_MIDI_TICK 0x10005
+#define BASS_SYNC_MIDI_TIMESIG 0x10006
+#define BASS_SYNC_MIDI_KEYSIG 0x10007
+
+// Additional BASS_MIDI_StreamCreateFile/etc flags
+#define BASS_MIDI_NODRUMPARAMUSER 0x200
+#define BASS_MIDI_NODRUMPARAM 0x400
+#define BASS_MIDI_NOSYSRESET 0x800
+#define BASS_MIDI_DECAYEND 0x1000
+#define BASS_MIDI_NOFX 0x2000
+#define BASS_MIDI_DECAYSEEK 0x4000
+#define BASS_MIDI_NOCROP 0x8000
+#define BASS_MIDI_NOTEOFF1 0x10000
+#define BASS_MIDI_ASYNC 0x400000
+#define BASS_MIDI_SINCINTER 0x800000
+
+// BASS_MIDI_FontInit flags
+#define BASS_MIDI_FONT_MEM 0x10000
+#define BASS_MIDI_FONT_MMAP 0x20000
+#define BASS_MIDI_FONT_XGDRUMS 0x40000
+#define BASS_MIDI_FONT_NOFX 0x80000
+#define BASS_MIDI_FONT_LINATTMOD 0x100000
+#define BASS_MIDI_FONT_LINDECVOL 0x200000
+#define BASS_MIDI_FONT_NORAMPIN 0x400000
+#define BASS_MIDI_FONT_NOSBLIMITS 0x800000
+#define BASS_MIDI_FONT_NOLIMITS BASS_MIDI_FONT_NOSBLIMITS
+#define BASS_MIDI_FONT_MINFX 0x1000000
+#define BASS_MIDI_FONT_SBLIMITS 0x2000000
+
+typedef struct {
+ HSOUNDFONT font; // soundfont
+ int preset; // preset number (-1=all)
+ int bank;
+} BASS_MIDI_FONT;
+
+typedef struct {
+ HSOUNDFONT font; // soundfont
+ int spreset; // source preset number
+ int sbank; // source bank number
+ int dpreset; // destination preset/program number
+ int dbank; // destination bank number
+ int dbanklsb; // destination bank number LSB
+} BASS_MIDI_FONTEX;
+
+typedef struct {
+ HSOUNDFONT font; // soundfont
+ int spreset; // source preset number
+ int sbank; // source bank number
+ int dpreset; // destination preset/program number
+ int dbank; // destination bank number
+ int dbanklsb; // destination bank number LSB
+ DWORD minchan; // minimum channel number
+ DWORD numchan; // number of channels from minchan
+} BASS_MIDI_FONTEX2;
+
+// BASS_MIDI_StreamSet/GetFonts flag
+#define BASS_MIDI_FONT_EX 0x1000000 // BASS_MIDI_FONTEX
+#define BASS_MIDI_FONT_EX2 0x2000000 // BASS_MIDI_FONTEX2
+
+typedef struct {
+ const char *name;
+ const char *copyright;
+ const char *comment;
+ DWORD presets; // number of presets/instruments
+ DWORD samsize; // total size (in bytes) of the sample data
+ DWORD samload; // amount of sample data currently loaded
+ DWORD samtype; // sample format (CTYPE) if packed
+} BASS_MIDI_FONTINFO;
+
+typedef struct {
+ DWORD track; // track containing marker
+ DWORD pos; // marker position
+ const char *text; // marker text
+} BASS_MIDI_MARK;
+
+// Marker types
+#define BASS_MIDI_MARK_MARKER 0 // marker
+#define BASS_MIDI_MARK_CUE 1 // cue point
+#define BASS_MIDI_MARK_LYRIC 2 // lyric
+#define BASS_MIDI_MARK_TEXT 3 // text
+#define BASS_MIDI_MARK_TIMESIG 4 // time signature
+#define BASS_MIDI_MARK_KEYSIG 5 // key signature
+#define BASS_MIDI_MARK_COPY 6 // copyright notice
+#define BASS_MIDI_MARK_TRACK 7 // track name
+#define BASS_MIDI_MARK_INST 8 // instrument name
+#define BASS_MIDI_MARK_TRACKSTART 9 // track start (SMF2)
+#define BASS_MIDI_MARK_SEQSPEC 10 // sequencer-specific
+#define BASS_MIDI_MARK_TICK 0x10000 // flag: get position in ticks (otherwise bytes)
+
+// MIDI events
+#define MIDI_EVENT_NOTE 1
+#define MIDI_EVENT_PROGRAM 2
+#define MIDI_EVENT_CHANPRES 3
+#define MIDI_EVENT_PITCH 4
+#define MIDI_EVENT_PITCHRANGE 5
+#define MIDI_EVENT_DRUMS 6
+#define MIDI_EVENT_FINETUNE 7
+#define MIDI_EVENT_COARSETUNE 8
+#define MIDI_EVENT_MASTERVOL 9
+#define MIDI_EVENT_BANK 10
+#define MIDI_EVENT_MODULATION 11
+#define MIDI_EVENT_VOLUME 12
+#define MIDI_EVENT_PAN 13
+#define MIDI_EVENT_EXPRESSION 14
+#define MIDI_EVENT_SUSTAIN 15
+#define MIDI_EVENT_SOUNDOFF 16
+#define MIDI_EVENT_RESET 17
+#define MIDI_EVENT_NOTESOFF 18
+#define MIDI_EVENT_PORTAMENTO 19
+#define MIDI_EVENT_PORTATIME 20
+#define MIDI_EVENT_PORTANOTE 21
+#define MIDI_EVENT_MODE 22
+#define MIDI_EVENT_REVERB 23
+#define MIDI_EVENT_CHORUS 24
+#define MIDI_EVENT_CUTOFF 25
+#define MIDI_EVENT_RESONANCE 26
+#define MIDI_EVENT_RELEASE 27
+#define MIDI_EVENT_ATTACK 28
+#define MIDI_EVENT_DECAY 29
+#define MIDI_EVENT_REVERB_MACRO 30
+#define MIDI_EVENT_CHORUS_MACRO 31
+#define MIDI_EVENT_REVERB_TIME 32
+#define MIDI_EVENT_REVERB_DELAY 33
+#define MIDI_EVENT_REVERB_LOCUTOFF 34
+#define MIDI_EVENT_REVERB_HICUTOFF 35
+#define MIDI_EVENT_REVERB_LEVEL 36
+#define MIDI_EVENT_CHORUS_DELAY 37
+#define MIDI_EVENT_CHORUS_DEPTH 38
+#define MIDI_EVENT_CHORUS_RATE 39
+#define MIDI_EVENT_CHORUS_FEEDBACK 40
+#define MIDI_EVENT_CHORUS_LEVEL 41
+#define MIDI_EVENT_CHORUS_REVERB 42
+#define MIDI_EVENT_USERFX 43
+#define MIDI_EVENT_USERFX_LEVEL 44
+#define MIDI_EVENT_USERFX_REVERB 45
+#define MIDI_EVENT_USERFX_CHORUS 46
+#define MIDI_EVENT_DRUM_FINETUNE 50
+#define MIDI_EVENT_DRUM_COARSETUNE 51
+#define MIDI_EVENT_DRUM_PAN 52
+#define MIDI_EVENT_DRUM_REVERB 53
+#define MIDI_EVENT_DRUM_CHORUS 54
+#define MIDI_EVENT_DRUM_CUTOFF 55
+#define MIDI_EVENT_DRUM_RESONANCE 56
+#define MIDI_EVENT_DRUM_LEVEL 57
+#define MIDI_EVENT_DRUM_USERFX 58
+#define MIDI_EVENT_SOFT 60
+#define MIDI_EVENT_SYSTEM 61
+#define MIDI_EVENT_TEMPO 62
+#define MIDI_EVENT_SCALETUNING 63
+#define MIDI_EVENT_CONTROL 64
+#define MIDI_EVENT_CHANPRES_VIBRATO 65
+#define MIDI_EVENT_CHANPRES_PITCH 66
+#define MIDI_EVENT_CHANPRES_FILTER 67
+#define MIDI_EVENT_CHANPRES_VOLUME 68
+#define MIDI_EVENT_MOD_VIBRATO 69
+#define MIDI_EVENT_MODRANGE 69
+#define MIDI_EVENT_BANK_LSB 70
+#define MIDI_EVENT_KEYPRES 71
+#define MIDI_EVENT_KEYPRES_VIBRATO 72
+#define MIDI_EVENT_KEYPRES_PITCH 73
+#define MIDI_EVENT_KEYPRES_FILTER 74
+#define MIDI_EVENT_KEYPRES_VOLUME 75
+#define MIDI_EVENT_SOSTENUTO 76
+#define MIDI_EVENT_MOD_PITCH 77
+#define MIDI_EVENT_MOD_FILTER 78
+#define MIDI_EVENT_MOD_VOLUME 79
+#define MIDI_EVENT_VIBRATO_RATE 80
+#define MIDI_EVENT_VIBRATO_DEPTH 81
+#define MIDI_EVENT_VIBRATO_DELAY 82
+#define MIDI_EVENT_MASTER_FINETUNE 83
+#define MIDI_EVENT_MASTER_COARSETUNE 84
+#define MIDI_EVENT_MIXLEVEL 0x10000
+#define MIDI_EVENT_TRANSPOSE 0x10001
+#define MIDI_EVENT_SYSTEMEX 0x10002
+#define MIDI_EVENT_SPEED 0x10004
+#define MIDI_EVENT_DEFDRUMS 0x10006
+
+#define MIDI_EVENT_END 0
+#define MIDI_EVENT_END_TRACK 0x10003
+
+#define MIDI_EVENT_NOTES 0x20000
+#define MIDI_EVENT_VOICES 0x20001
+
+#define MIDI_SYSTEM_DEFAULT 0
+#define MIDI_SYSTEM_GM1 1
+#define MIDI_SYSTEM_GM2 2
+#define MIDI_SYSTEM_XG 3
+#define MIDI_SYSTEM_GS 4
+
+typedef struct {
+ DWORD event; // MIDI_EVENT_xxx
+ DWORD param;
+ DWORD chan;
+ DWORD tick; // event position (ticks)
+ DWORD pos; // event position (bytes)
+} BASS_MIDI_EVENT;
+
+// BASS_MIDI_StreamEvents modes
+#define BASS_MIDI_EVENTS_STRUCT 0 // BASS_MIDI_EVENT structures
+#define BASS_MIDI_EVENTS_RAW 0x10000 // raw MIDI event data
+#define BASS_MIDI_EVENTS_SYNC 0x1000000 // flag: trigger event syncs
+#define BASS_MIDI_EVENTS_NORSTATUS 0x2000000 // flag: no running status
+#define BASS_MIDI_EVENTS_CANCEL 0x4000000 // flag: cancel pending events
+#define BASS_MIDI_EVENTS_TIME 0x8000000 // flag: delta-time info is present
+#define BASS_MIDI_EVENTS_ABSTIME 0x10000000 // flag: absolute time info is present
+#define BASS_MIDI_EVENTS_ASYNC 0x20000000 // flag: process asynchronously
+#define BASS_MIDI_EVENTS_FILTER 0x40000000 // flag: apply filtering
+#define BASS_MIDI_EVENTS_FLUSH 0x80000000 // flag: flush async events
+
+// BASS_MIDI_StreamGetChannel special channels
+#define BASS_MIDI_CHAN_CHORUS (DWORD)-1
+#define BASS_MIDI_CHAN_REVERB (DWORD)-2
+#define BASS_MIDI_CHAN_USERFX (DWORD)-3
+
+// BASS_CHANNELINFO type
+#define BASS_CTYPE_STREAM_MIDI 0x10d00
+
+// Additional attributes
+#define BASS_ATTRIB_MIDI_PPQN 0x12000
+#define BASS_ATTRIB_MIDI_CPU 0x12001
+#define BASS_ATTRIB_MIDI_CHANS 0x12002
+#define BASS_ATTRIB_MIDI_VOICES 0x12003
+#define BASS_ATTRIB_MIDI_VOICES_ACTIVE 0x12004
+#define BASS_ATTRIB_MIDI_STATE 0x12005
+#define BASS_ATTRIB_MIDI_SRC 0x12006
+#define BASS_ATTRIB_MIDI_KILL 0x12007
+#define BASS_ATTRIB_MIDI_SPEED 0x12008
+#define BASS_ATTRIB_MIDI_REVERB 0x12009
+#define BASS_ATTRIB_MIDI_VOL 0x1200a
+#define BASS_ATTRIB_MIDI_QUEUE_TICK 0x1200b
+#define BASS_ATTRIB_MIDI_QUEUE_BYTE 0x1200c
+#define BASS_ATTRIB_MIDI_QUEUE_ASYNC 0x1200d
+#define BASS_ATTRIB_MIDI_TRACK_VOL 0x12100 // + track #
+
+// Additional tag type
+#define BASS_TAG_MIDI_TRACK 0x11000 // + track #, track text : array of null-terminated ANSI strings
+
+// BASS_ChannelGetLength/GetPosition/SetPosition mode
+#define BASS_POS_MIDI_TICK 2 // tick position
+
+typedef BOOL (CALLBACK MIDIFILTERPROC)(HSTREAM handle, int track, BASS_MIDI_EVENT *event, BOOL seeking, void *user);
+/* Event filtering callback function.
+handle : MIDI stream handle
+track : Track containing the event
+event : The event
+seeking: TRUE = the event is being processed while seeking, FALSE = it is being played
+user : The 'user' parameter value given when calling BASS_MIDI_StreamSetFilter
+RETURN : TRUE = process the event, FALSE = drop the event */
+
+// BASS_MIDI_FontLoadEx flags
+#define BASS_MIDI_FONTLOAD_NOWAIT 1 // don't want for the samples to load
+#define BASS_MIDI_FONTLOAD_COMPACT 2 // compact samples
+#define BASS_MIDI_FONTLOAD_NOLOAD 4 // don't load (only compact)
+#define BASS_MIDI_FONTLOAD_TIME 8 // length is in milliseconds
+#define BASS_MIDI_FONTLOAD_KEEPDEC 16 // keep decoders
+
+// BASS_MIDI_FontPack flags
+#define BASS_MIDI_PACK_NOHEAD 1 // don't send a WAV header to the encoder
+#define BASS_MIDI_PACK_16BIT 2 // discard low 8 bits of 24-bit sample data
+#define BASS_MIDI_PACK_48KHZ 4 // set encoding rate to 48000 Hz (else 44100 Hz)
+
+typedef struct {
+ const char *name; // description
+ DWORD id;
+ DWORD flags;
+} BASS_MIDI_DEVICEINFO;
+
+typedef void (CALLBACK MIDIINPROC)(DWORD device, double time, const BYTE *buffer, DWORD length, void *user);
+/* MIDI input callback function.
+device : MIDI input device
+time : Timestamp
+buffer : Buffer containing MIDI data
+length : Number of bytes of data
+user : The 'user' parameter value given when calling BASS_MIDI_InInit */
+
+DWORD BASSMIDIDEF(BASS_MIDI_GetVersion)(void);
+
+HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreate)(DWORD channels, DWORD flags, DWORD freq);
+HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreateFile)(BOOL mem, const void *file, QWORD offset, QWORD length, DWORD flags, DWORD freq);
+HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreateURL)(const char *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user, DWORD freq);
+HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreateFileUser)(DWORD system, DWORD flags, const BASS_FILEPROCS *procs, void *user, DWORD freq);
+HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreateEvents)(const BASS_MIDI_EVENT *events, DWORD ppqn, DWORD flags, DWORD freq);
+BOOL BASSMIDIDEF(BASS_MIDI_StreamGetMark)(HSTREAM handle, DWORD type, DWORD index, BASS_MIDI_MARK *mark);
+DWORD BASSMIDIDEF(BASS_MIDI_StreamGetMarks)(HSTREAM handle, int track, DWORD type, BASS_MIDI_MARK *marks);
+BOOL BASSMIDIDEF(BASS_MIDI_StreamSetFonts)(HSTREAM handle, const void *fonts, DWORD count);
+DWORD BASSMIDIDEF(BASS_MIDI_StreamGetFonts)(HSTREAM handle, void *fonts, DWORD count);
+BOOL BASSMIDIDEF(BASS_MIDI_StreamLoadSamples)(HSTREAM handle);
+BOOL BASSMIDIDEF(BASS_MIDI_StreamEvent)(HSTREAM handle, DWORD chan, DWORD event, DWORD param);
+DWORD BASSMIDIDEF(BASS_MIDI_StreamEvents)(HSTREAM handle, DWORD mode, const void *events, DWORD length);
+DWORD BASSMIDIDEF(BASS_MIDI_StreamGetEvent)(HSTREAM handle, DWORD chan, DWORD event);
+DWORD BASSMIDIDEF(BASS_MIDI_StreamGetEvents)(HSTREAM handle, int track, DWORD filter, BASS_MIDI_EVENT *events);
+DWORD BASSMIDIDEF(BASS_MIDI_StreamGetEventsEx)(HSTREAM handle, int track, DWORD filter, BASS_MIDI_EVENT *events, DWORD start, DWORD count);
+BOOL BASSMIDIDEF(BASS_MIDI_StreamGetPreset)(HSTREAM handle, DWORD chan, BASS_MIDI_FONT *font);
+HSTREAM BASSMIDIDEF(BASS_MIDI_StreamGetChannel)(HSTREAM handle, DWORD chan);
+BOOL BASSMIDIDEF(BASS_MIDI_StreamSetFilter)(HSTREAM handle, BOOL seeking, MIDIFILTERPROC *proc, void *user);
+
+HSOUNDFONT BASSMIDIDEF(BASS_MIDI_FontInit)(const void *file, DWORD flags);
+HSOUNDFONT BASSMIDIDEF(BASS_MIDI_FontInitUser)(const BASS_FILEPROCS *procs, void *user, DWORD flags);
+BOOL BASSMIDIDEF(BASS_MIDI_FontFree)(HSOUNDFONT handle);
+BOOL BASSMIDIDEF(BASS_MIDI_FontGetInfo)(HSOUNDFONT handle, BASS_MIDI_FONTINFO *info);
+BOOL BASSMIDIDEF(BASS_MIDI_FontGetPresets)(HSOUNDFONT handle, DWORD *presets);
+const char *BASSMIDIDEF(BASS_MIDI_FontGetPreset)(HSOUNDFONT handle, int preset, int bank);
+BOOL BASSMIDIDEF(BASS_MIDI_FontLoad)(HSOUNDFONT handle, int preset, int bank);
+BOOL BASSMIDIDEF(BASS_MIDI_FontLoadEx)(HSOUNDFONT handle, int preset, int bank, DWORD length, DWORD flags);
+BOOL BASSMIDIDEF(BASS_MIDI_FontUnload)(HSOUNDFONT handle, int preset, int bank);
+BOOL BASSMIDIDEF(BASS_MIDI_FontCompact)(HSOUNDFONT handle);
+BOOL BASSMIDIDEF(BASS_MIDI_FontPack)(HSOUNDFONT handle, const void *outfile, const void *encoder, DWORD flags);
+BOOL BASSMIDIDEF(BASS_MIDI_FontUnpack)(HSOUNDFONT handle, const void *outfile, DWORD flags);
+DWORD BASSMIDIDEF(BASS_MIDI_FontFlags)(HSOUNDFONT handle, DWORD flags, DWORD mask);
+BOOL BASSMIDIDEF(BASS_MIDI_FontSetVolume)(HSOUNDFONT handle, float volume);
+float BASSMIDIDEF(BASS_MIDI_FontGetVolume)(HSOUNDFONT handle);
+
+DWORD BASSMIDIDEF(BASS_MIDI_ConvertEvents)(const BYTE *data, DWORD length, BASS_MIDI_EVENT *events, DWORD count, DWORD flags);
+
+BOOL BASSMIDIDEF(BASS_MIDI_InGetDeviceInfo)(DWORD device, BASS_MIDI_DEVICEINFO *info);
+BOOL BASSMIDIDEF(BASS_MIDI_InInit)(DWORD device, MIDIINPROC *proc, void *user);
+BOOL BASSMIDIDEF(BASS_MIDI_InFree)(DWORD device);
+BOOL BASSMIDIDEF(BASS_MIDI_InStart)(DWORD device);
+BOOL BASSMIDIDEF(BASS_MIDI_InStop)(DWORD device);
+
+#ifdef __cplusplus
+}
+
+#ifndef NOBASSMIDIOVERLOADS
+static inline BOOL BASS_MIDI_StreamSetFonts(HSTREAM handle, const BASS_MIDI_FONTEX *fonts, DWORD count)
+{
+ return BASS_MIDI_StreamSetFonts(handle, (const void*)fonts, count | BASS_MIDI_FONT_EX);
+}
+
+static inline BOOL BASS_MIDI_StreamSetFonts(HSTREAM handle, const BASS_MIDI_FONTEX2 *fonts, DWORD count)
+{
+ return BASS_MIDI_StreamSetFonts(handle, (const void*)fonts, count | BASS_MIDI_FONT_EX2);
+}
+
+static inline DWORD BASS_MIDI_StreamGetFonts(HSTREAM handle, BASS_MIDI_FONTEX *fonts, DWORD count)
+{
+ return BASS_MIDI_StreamGetFonts(handle, (void*)fonts, count | BASS_MIDI_FONT_EX);
+}
+
+static inline DWORD BASS_MIDI_StreamGetFonts(HSTREAM handle, BASS_MIDI_FONTEX2 *fonts, DWORD count)
+{
+ return BASS_MIDI_StreamGetFonts(handle, (void*)fonts, count | BASS_MIDI_FONT_EX2);
+}
+
+#if __cplusplus >= 200707 || _MSC_VER >= 1600
+static inline DWORD BASS_MIDI_StreamGetFonts(HSTREAM handle, decltype(nullptr) fonts, DWORD count)
+{
+ return BASS_MIDI_StreamGetFonts(handle, (void*)fonts, count);
+}
+#endif
+
+#ifdef _WIN32
+static inline HSTREAM BASS_MIDI_StreamCreateFile(BOOL mem, const WCHAR *file, QWORD offset, QWORD length, DWORD flags, DWORD freq)
+{
+ return BASS_MIDI_StreamCreateFile(mem, (const void*)file, offset, length, flags | BASS_UNICODE, freq);
+}
+
+static inline HSTREAM BASS_MIDI_StreamCreateURL(const WCHAR *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user, DWORD freq)
+{
+ return BASS_MIDI_StreamCreateURL((const char*)url, offset, flags | BASS_UNICODE, proc, user, freq);
+}
+
+static inline HSOUNDFONT BASS_MIDI_FontInit(const WCHAR *file, DWORD flags)
+{
+ return BASS_MIDI_FontInit((const void*)file, flags|BASS_UNICODE);
+}
+
+static inline BOOL BASS_MIDI_FontPack(HSOUNDFONT handle, const WCHAR *outfile, const WCHAR *encoder, DWORD flags)
+{
+ return BASS_MIDI_FontPack(handle, (const void*)outfile, (const void*)encoder, flags | BASS_UNICODE);
+}
+
+static inline BOOL BASS_MIDI_FontUnpack(HSOUNDFONT handle, const WCHAR *outfile, DWORD flags)
+{
+ return BASS_MIDI_FontUnpack(handle, (const void*)outfile, flags | BASS_UNICODE);
+}
+#endif
+#endif
+#endif
+
+#ifdef __OBJC__
+#undef BOOL
+#endif
+
+#endif
diff --git a/bass/lib/bass.lib b/bass/lib/bass.lib
new file mode 100644
index 0000000..c69024a
Binary files /dev/null and b/bass/lib/bass.lib differ
diff --git a/bass/lib/bassmidi.lib b/bass/lib/bassmidi.lib
new file mode 100644
index 0000000..9e4947c
Binary files /dev/null and b/bass/lib/bassmidi.lib differ
diff --git a/bass/x64/bass.lib b/bass/x64/bass.lib
new file mode 100644
index 0000000..4e11da3
Binary files /dev/null and b/bass/x64/bass.lib differ
diff --git a/bass/x64/bassmidi.lib b/bass/x64/bassmidi.lib
new file mode 100644
index 0000000..acc16a1
Binary files /dev/null and b/bass/x64/bassmidi.lib differ
diff --git a/src/decblupi.cpp b/src/decblupi.cpp
index b9cbcf6..e76d76d 100644
--- a/src/decblupi.cpp
+++ b/src/decblupi.cpp
@@ -824,7 +824,7 @@ void CDecor::BlupiStep()
}
if (m_keyPress & KEY_DOWN &&
- !(m_keyPress & KEY_JUMP) &&
+ !(m_keyPress & (KEY_JUMP | KEY_LEFT | KEY_RIGHT)) &&
IsBlupiStanding() &&
m_blupiAction != ACTION_DOWN &&
m_blupiAction != ACTION_STOPPOP &&
diff --git a/src/decio.cpp b/src/decio.cpp
index a2add16..d0bb59e 100644
--- a/src/decio.cpp
+++ b/src/decio.cpp
@@ -193,7 +193,7 @@ BOOL CDecor::SomethingMissionPath(int gamer, int mission, BOOL bUser)
return FALSE;
}
-BOOL CDecor::MissionStart(int gamer, int mission, BOOL bUser)
+BOOL CDecor::CurrentWrite(int gamer, int mission, BOOL bUser)
{
char filename[MAX_PATH];
FILE* file = NULL;
@@ -363,7 +363,7 @@ error:
return FALSE;
}
-BOOL CDecor::CurrentWrite(int gamer, int mission, char* param3)
+BOOL CDecor::MissionStart(int gamer, int mission, char* param3)
{
char filename[MAX_PATH];
FILE* file = NULL;
diff --git a/src/decor.cpp b/src/decor.cpp
index 44c3645..ee20b2e 100644
--- a/src/decor.cpp
+++ b/src/decor.cpp
@@ -874,15 +874,15 @@ void CDecor::DrawInfo()
m_pPixmap->QuickIcon(CHELEMENT, 252, POINT( 505, 414 ));
}
- if (m_blupiCle | CLE_RED) {
+ if (m_blupiCle & CLE_RED) {
m_pPixmap->QuickIcon(CHELEMENT, 215, POINT( 520, 418 ));
}
- if (m_blupiCle | CLE_GREEN) {
+ if (m_blupiCle & CLE_GREEN) {
m_pPixmap->QuickIcon(CHELEMENT, 222, POINT( 530, 418 ));
}
- if (m_blupiCle | CLE_BLUE) {
+ if (m_blupiCle & CLE_BLUE) {
m_pPixmap->QuickIcon(CHELEMENT, 229, POINT( 540, 418 ));
}
@@ -908,9 +908,68 @@ void CDecor::DrawInfo()
if (m_blupiPos.x > 788) m_blupiPos.x = 788;
break;
}
- // tutorial text...
+
+ POINT cel = { (m_blupiPos.x + DIMBLUPIX / 2) / DIMOBJX, (m_blupiPos.y + DIMBLUPIY / 2) / DIMOBJY };
+ for (i = 0; table_tutorial[i * 6 + 0] != -1; i++)
+ {
+ if (cel.x >= table_tutorial[i * 6 + 0] &&
+ cel.x <= table_tutorial[i * 6 + 1] &&
+ cel.y >= table_tutorial[i * 6 + 2] &&
+ cel.y <= table_tutorial[i * 6 + 3])
+ {
+ if (table_tutorial[i * 6 + 4] == -1 || table_tutorial[i * 6 + 4] == m_nbTresor)
+ {
+ if (m_bJoystick)
+ {
+ LoadString(table_tutorial[i * 6 + 5] + 100, text, 100);
+ }
+ else
+ {
+ LoadString(table_tutorial[i * 6 + 5], text, 100);
+ }
+ DrawTextCenter(m_pPixmap, POINT(360, 460), text);
+ break;
+ }
+ }
+ }
}
- // more...
+ }
+ if (m_phase == WM_PHASE_BUILD)
+ {
+ if (m_posCelHili.x != -1)
+ {
+ int icon = 0;
+ if (m_2ndPositionCalculationSlot != -1)
+ {
+ icon = 31;
+ }
+ if (m_dimCelHili.x > 0)
+ {
+ pos.x = m_posCelHili.x * DIMOBJX - m_posDecor.x;
+
+ int j = 0;
+ for (i = 0; i < m_dimCelHili.x; i++)
+ {
+ pos.y = m_posCelHili.y * DIMOBJY - m_posDecor.y;
+ for (j = 0; j < m_dimCelHili.y; j++)
+ {
+ m_pPixmap->QuickIcon(CHOBJECT, icon, pos);
+ pos.y += DIMOBJY;
+ }
+ pos.x += DIMOBJX;
+ }
+ }
+ }
+ if (m_phase == WM_PHASE_BUILD) // again???
+ {
+ LoadString(0x66, text, 100);
+ DrawText(m_pPixmap, POINT(200, 460), text, FONTGOLD);
+ }
+ }
+ if (m_phase == WM_PHASE_PLAYTEST)
+ {
+ LoadString(0x67, text, 100);
+ DrawText(m_pPixmap, POINT(200, 460), text, FONTGOLD);
}
}
@@ -1760,9 +1819,9 @@ BOOL CDecor::SearchWorld(int world, POINT *cel, POINT *newBlupiPos)
BOOL CDecor::SearchDoor(int n, POINT *cel)
{
- for (int x = 0; x < MAXCELX; x++)
+ for (int y = MAXCELY - 1; y > 0; y--)
{
- for (int y = 0; y < MAXCELY; y++)
+ for (int x = MAXCELX - 1; x > 0; x--)
{
if (m_decor[x][y].icon == 183)
{
@@ -1816,9 +1875,9 @@ void CDecor::AdaptDoors(BOOL bPrivate, int mission)
}
}
}
- for (int x = 0; x < MAXCELX; x++)
+ for (int x = MAXCELX - 1; x > 0; x--)
{
- for (int y = 0; y < MAXCELY; y++)
+ for (int y = MAXCELY - 1; y > 0; y--)
{
int icon = m_decor[x][y].icon;
if (icon >= Object::World_1 && icon <= Object::World_8 && (!m_doors[icon - Object::World_1 + 1] || m_bCheatDoors))
@@ -1897,12 +1956,12 @@ void CDecor::OpenDoor(POINT cel)
void CDecor::OpenDoorsWin()
{
- m_doors[m_mission + 1] = 1;
+ m_doors[m_mission + 1] = 0;
}
void CDecor::OpenGoldsWin()
{
- m_doors[180 + m_mission / 10] = 1;
+ m_doors[180 + m_mission / 10] = 0;
}
void CDecor::DoorsLost()
diff --git a/src/decor.h b/src/decor.h
index 4f0794f..7c5bce8 100644
--- a/src/decor.h
+++ b/src/decor.h
@@ -399,9 +399,9 @@ public:
BOOL Write(int gamer, int mission, BOOL bUser);
BOOL Read(int gamer, int mission, BOOL bUser);
BOOL SomethingMissionPath(int gamer, int mission, BOOL bUser);
- BOOL MissionStart(int gamer, int mission, BOOL bUser);
+ BOOL CurrentWrite(int gamer, int mission, BOOL bUser=FALSE);
BOOL CurrentRead(int gamer, int mission, BOOL *pbMission, BOOL *pbPrivate);
- BOOL CurrentWrite(int gamer, int mission, char* param3);
+ BOOL MissionStart(int gamer, int mission, char* param3);
BOOL SearchWorld(int world, POINT *cel, POINT *newBlupiPos);
BOOL SearchDoor(int n, POINT *cel);
diff --git a/src/dectables.h b/src/dectables.h
index a07dcf7..e827f30 100644
--- a/src/dectables.h
+++ b/src/dectables.h
@@ -624,4 +624,21 @@ extern int table_blupi[] = {
290, 290, 1, 1, 0
};
+extern int table_tutorial[] = {
+ 0, 2, 0, 7, -1, 0x190,
+ 3, 3, 0, 7, 0, 0x191,
+ 3, 4, 0, 7, -1, 0x192,
+ 6, 8, 0, 7, -1, 0x193,
+ 12, 12, 0, 7, 1, 0x194,
+ 12, 13, 0, 7, -1, 0x195,
+ 14, 15, 0, 7, -1, 0x196,
+ 16, 17, 0, 1, -1, 0x197,
+ 22, 23, 0, 7, -1, 0x198,
+ 29, 30, 0, 7, -1, 0x199,
+ 41, 44, 0, 7, -1, 0x19a,
+ 54, 63, 0, 7, -1, 0x19b,
+ 69, 70, 0, 7, -1, 0x19c,
+ -1
+};
+
#endif
\ No newline at end of file
diff --git a/src/def.h b/src/def.h
index 1911cfc..f226412 100644
--- a/src/def.h
+++ b/src/def.h
@@ -21,6 +21,7 @@
#define _BYE !_EGAMES // if TRUE, show exit image (like _INTRO)
#define _LEGACY FALSE // if TRUE, keep broken/quirky legacy code
#define _DREAM TRUE // if TRUE, allow Dream blocks when loading levels
+#define _BASS TRUE // if TRUE, use BASS audio library instead of DirectMusic (wip)
#define MAXGAMER 8
#define MAXNETPLAYER 4
@@ -33,6 +34,8 @@
#define MAXCHAT 6
#define MAXSAVE 6
#define LIFT_RANGE_Y 30
+#define MAXDEMO 9999
+#define MAXINDEX 20
#define LXIMAGE 640 // dimensions de la fenêtre de jeu
#define LYIMAGE 480
@@ -515,18 +518,17 @@ enum {
#define SPRITE_ARROW 1
#define SPRITE_POINTER 2
-#define SPRITE_MAP 3
-#define SPRITE_ARROWU 4
-#define SPRITE_ARROWD 5
-#define SPRITE_ARROWL 6
-#define SPRITE_ARROWR 7
-#define SPRITE_ARROWUL 8
-#define SPRITE_ARROWUR 9
-#define SPRITE_ARROWDL 10
-#define SPRITE_ARROWDR 11
-#define SPRITE_WAIT 12
-#define SPRITE_EMPTY 13
-#define SPRITE_FILL 14
+#define SPRITE_ARROWU 3
+#define SPRITE_ARROWD 4
+#define SPRITE_ARROWL 5
+#define SPRITE_ARROWR 6
+#define SPRITE_ARROWUL 7
+#define SPRITE_ARROWUR 8
+#define SPRITE_ARROWDL 9
+#define SPRITE_ARROWDR 10
+#define SPRITE_WAIT 11
+#define SPRITE_EMPTY 12
+#define SPRITE_DISABLE 13
// User define message
diff --git a/src/event.cpp b/src/event.cpp
index 607ec8c..231a450 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -21,10 +21,7 @@
#include "misc.h"
#include "network.h"
-#define DEF_TIME_HELP 10000
#define DEF_TIME_DEMO 1000
-#define MAXDEMO 2000
-#define MAXINDEX 20
typedef struct
{
@@ -1769,61 +1766,40 @@ CEvent::CEvent()
m_bFullScreen = TRUE;
m_mouseType = MOUSETYPEGRA;
m_index = -1;
- m_exercice = 0;
- m_mission = 0;
- m_private = 0;
- m_maxMission = 0;
- m_fileIndex = 0;
- m_fileTime[10] = 0;
- m_fileWorld[10] = 0;
+ m_rankCheat = -1;
+ m_nbVies = 3;
+ m_mission = 1;
+ m_private = 1;
+ m_multi = 1;
m_phase = 0;
- m_bSchool = FALSE;
m_bPrivate = FALSE;
+ m_bMulti = FALSE;
m_bBuildOfficialMissions = FALSE;
m_bRunMovie = FALSE;
- m_bBuildModify = FALSE;
- m_bMousePress = FALSE;
m_bMouseDown = FALSE;
+ m_bHili = FALSE;
m_oldMousePos.x = 0;
m_oldMousePos.y = 0;
m_mouseSprite = 0;
- m_bFillMouse = FALSE;
m_bWaitMouse = FALSE;
m_bHideMouse = FALSE;
m_bShowMouse = FALSE;
+ m_bDisableMouse = FALSE;
m_bMouseRelease = FALSE;
- m_tryPhase = 0;
- m_rankCheat = -1;
m_posCheat = 0;
m_speed = 1;
m_bMovie = TRUE;
m_bAllMissions = FALSE;
m_bHiliInfoButton = TRUE;
- m_bSpeed = FALSE;
- m_bHelp = FALSE;
- m_bChangeCheat = FALSE;
- m_scrollSpeed = 1;
- m_bPause = FALSE;
- m_bShift = FALSE;
- m_shiftPhase = 0;
- m_movieToStart[0] = 0;
- m_bInfoHelp = FALSE;
+ m_movieToStart[0] = '\0';
m_bDemoRec = FALSE;
m_bDemoPlay = FALSE;
m_pDemoBuffer = NULL;
- m_bDrawMap = NULL;
- m_choiceIndex = NULL;
- m_saveIndex = NULL;
- m_bMulti = NULL;
- m_phaseAfterMovie = NULL;
- m_choicePageOffset = NULL;
- m_nbChoices = NULL;
- //m_bNamesExist = NULL;
m_demoTime = 0;
- m_bCtrlDown = FALSE;
m_keyPress = 0;
- m_menuIndex = 0;
+
ZeroMemory(m_menuDecor, sizeof(m_menuDecor));
+ m_menuDecor[10] = 1;
}
// Destructor
@@ -1985,14 +1961,14 @@ void CEvent::RestoreGame()
{
if (m_phase == WM_PHASE_PLAY || m_phase == WM_PHASE_PLAYTEST)
{
- HideMouse(FALSE);
- WaitMouse(TRUE);
- WaitMouse(FALSE);
- return;
+ HideMouse(TRUE);
+ }
+ else
+ {
+ WaitMouse(FALSE);
+ DisableMouse(TRUE);
+ DisableMouse(FALSE); // force le changement de sprite !
}
- FillMouse(TRUE);
- return;
-
}
void CEvent::FlushInput()
@@ -2157,7 +2133,7 @@ void CEvent::ReadInput()
// CNetwork function needs to be implemented
-void CEvent::NetSetPause(BOOL bPause, int players)
+void CEvent::NetSetPause(BOOL bPause, BOOL bMulti)
{
BOOL bPause_;
@@ -2174,7 +2150,7 @@ void CEvent::NetSetPause(BOOL bPause, int players)
m_pSound->SuspendMusic();
}
}
- if ((m_bMulti != FALSE) && (players != 0))
+ if ((m_bMulti != FALSE) && (bMulti != 0))
{
m_pNetwork->Send(&bPause, 3, DPSEND_GUARANTEED);
}
@@ -2569,30 +2545,31 @@ BOOL CEvent::DrawButtons()
if (m_phase == WM_PHASE_PLAY || m_phase == WM_PHASE_PLAYTEST)
{
- if (m_pDecor->GetPause() == 0)
+ if (m_pDecor->GetPause())
{
- if (m_bDemoRec != 0)
+ if (m_pDecor->GetTime() % 20 < 15)
{
- LoadString(TX_DEMOREC, res, 100);
- DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
- }
- if (m_bDemoPlay != 0)
- {
- LoadString(TX_DEMOPLAY, res, 100);
- DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
+ DrawTextCenter(TX_PAUSE, LXIMAGE / 2, LYIMAGE / 2, 0);
}
}
else
{
- if (m_pDecor->GetTime() % 20 < 15)
+ if (m_bDemoRec)
{
- DrawTextCenter(TX_PAUSE, 320, 240, 0);
+ LoadString(TX_DEMOREC, res, 100);
+ DrawTextLeft(m_pPixmap, POINT(10, 10), res, FONTGOLD);
+ }
+ if (m_bDemoPlay)
+ {
+ LoadString(TX_DEMOPLAY, res, 100);
+ DrawTextLeft(m_pPixmap, POINT(10, 10), res, FONTGOLD);
}
}
+
if (m_speed > 1)
{
sprintf(res, "x%d", m_speed);
- DrawTextLeft(m_pPixmap, pos, res, FONTWHITE);
+ DrawTextLeft(m_pPixmap, POINT(64, LYIMAGE - DIMTEXTY + 1), res, FONTWHITE);
}
}
if (m_phase == WM_PHASE_STOP)
@@ -3167,20 +3144,25 @@ BOOL CEvent::TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam)
}
if (m_rankCheat == 11)
{
- m_pDecor->SetDrawSecret(!m_pDecor->GetDrawSecret());
- bEnable = m_pDecor->GetDrawSecret();
+ bEnable = !m_pDecor->GetDrawSecret();
+ m_pDecor->SetDrawSecret(bEnable);
+
}
if (m_rankCheat == 19)
{
- // Add NetPacked
+ bEnable = !m_pDecor->GetNetPacked();
+ m_pDecor->SetNetPacked(bEnable);
+
}
if (m_rankCheat == 20)
{
- // Add Net Debug
+ bEnable = !m_pDecor->GetNetDebug();
+ m_pDecor->SetNetDebug(bEnable);
}
if (m_rankCheat == 21)
{
- // Add NetMovePredict
+ bEnable = !m_pDecor->GetNetMovePredict();
+ m_pDecor->SetNetMovePredict(bEnable);
}
if (m_phase != WM_PHASE_PLAY && m_phase != WM_PHASE_PLAYTEST)
{
@@ -3334,29 +3316,31 @@ BOOL CEvent::TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam)
return TRUE;
case WM_PHASE_GREAD:
case WM_PHASE_GREADp:
- /*
- if (m_choiceIndex >= 0 && FUN_21890(m_choiceIndex))
+ if (m_choiceIndex >= 0 && CurrentRead(m_choiceIndex))
{
ChangePhase(WM_PHASE_PLAY);
}
return TRUE;
- */
case WM_PHASE_GWRITE:
- /*
- if (m_choiceIndex >= 0 && FUN_218f0(m_choiceIndex))
+ if (m_choiceIndex >= 0 && CurrentWrite(m_choiceIndex))
{
ChangePhase(WM_PHASE_PLAY);
}
return TRUE;
- */
default:
return TRUE;
}
case VK_SHIFT:
m_keyPress |= KEY_FIRE;
break;
+ case VK_CONTROL:
+ m_keyPress |= KEY_JUMP;
+ break;
+ case VK_PAUSE:
+ NetSetPause((m_pDecor->GetPause()), TRUE);
+ break;
case VK_LEFT:
m_keyPress |= KEY_LEFT;
break;
@@ -3370,7 +3354,7 @@ BOOL CEvent::TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam)
m_keyPress |= KEY_DOWN;
break;
case VK_HOME:
- return TRUE;
+ break;
case VK_SPACE:
if (m_bRunMovie)
{
@@ -3380,14 +3364,30 @@ BOOL CEvent::TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam)
}
m_keyPress |= KEY_FIRE;
break;
- case VK_PAUSE:
- m_bPause = !m_bPause;
- NetSetPause((m_pDecor->GetPause()), m_bPause);
- return TRUE;
- case VK_CONTROL:
- m_keyPress |= KEY_JUMP;
+ case VK_F1:
+ if (this->m_phase == WM_PHASE_PLAY)
+ {
+ ChangePhase(WM_PHASE_HELP);
+ }
+ break;
+ case VK_F2:
+ if (this->m_phase == WM_PHASE_PLAY)
+ {
+ ChangePhase(WM_PHASE_SETUPp);
+ }
+ break;
+ case VK_F3:
+ if (this->m_phase == WM_PHASE_PLAY)
+ {
+ ChangePhase(WM_PHASE_GWRITE);
+ }
+ break;
+ case VK_F4:
+ if (this->m_phase != WM_PHASE_PLAY)
+ {
+ ChangePhase(WM_PHASE_GREADp);
+ }
break;
-
}
if (m_phase != WM_PHASE_PLAY && m_phase != WM_PHASE_PLAYTEST && m_phase != WM_PHASE_BUILD)
@@ -3396,6 +3396,7 @@ BOOL CEvent::TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam)
}
m_pDecor->SetInput(m_keyPress);
+ DemoRecEvent();
return TRUE;
// Unknown Function
@@ -3477,7 +3478,6 @@ BOOL CEvent::TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam)
{
if (!m_bShowMouse)
{
- ShowCursor(TRUE); // montre la souris
m_pPixmap->MouseShow(FALSE); // cache sprite
m_bShowMouse = TRUE;
}
@@ -3921,13 +3921,13 @@ int CEvent::MousePosToSprite(POINT pos)
sprite = SPRITE_POINTER;
- if (m_phase == WM_PHASE_PLAY ||
- m_phase == WM_PHASE_PLAYTEST ||
- m_phase == WM_PHASE_BUILD ||
- m_phase == WM_PHASE_BYE ||
+ if (m_phase != WM_PHASE_PLAY &&
+ m_phase != WM_PHASE_PLAYTEST &&
+ m_phase != WM_PHASE_BUILD &&
+ m_phase != WM_PHASE_BYE &&
!MouseOnButton(pos))
{
- sprite = SPRITE_POINTER;
+ sprite = SPRITE_ARROW;
}
if (m_bWaitMouse)
{
@@ -3937,9 +3937,9 @@ int CEvent::MousePosToSprite(POINT pos)
{
sprite = SPRITE_EMPTY;
}
- if (m_bFillMouse)
+ if (m_bDisableMouse)
{
- sprite = SPRITE_FILL;
+ sprite = SPRITE_DISABLE;
}
return sprite;
@@ -3971,7 +3971,8 @@ void CEvent::WaitMouse(BOOL bWait)
void CEvent::HideMouse(BOOL bHide)
{
- m_bWaitMouse = bHide;
+ m_bHideMouse = bHide;
+ m_bDisableMouse = FALSE;
if ( bHide )
{
@@ -3985,13 +3986,13 @@ void CEvent::HideMouse(BOOL bHide)
ChangeSprite(m_mouseSprite);
}
-void CEvent::FillMouse(int bFill)
+void CEvent::DisableMouse(int bDisable)
{
- m_bFillMouse = bFill;
+ m_bDisableMouse = bDisable;
- if (bFill)
+ if (bDisable)
{
- m_mouseSprite = SPRITE_FILL;
+ m_mouseSprite = SPRITE_DISABLE;
}
else
{
@@ -4152,7 +4153,7 @@ void CEvent::ReadAll()
if ((-1 < m_choiceIndex) && (*(int*)((int)(m_filenameBuffer + -1) + m_choiceIndex * 4 + 216) != 0))
{
- mission = m_pDecor->MissionStart(m_gamer, 999, bUser);
+ mission = m_pDecor->CurrentWrite(m_gamer, 999, bUser);
if (mission != FALSE)
{
@@ -4174,7 +4175,7 @@ BOOL CEvent::SaveState(int rank)
BOOL bUser = FALSE;
char str[100];
- bMission = m_pDecor->MissionStart(m_gamer, rank, bUser);
+ bMission = m_pDecor->CurrentWrite(m_gamer, rank, bUser);
if (bMission == FALSE)
{
@@ -4349,7 +4350,7 @@ BOOL CEvent::ChangePhase(UINT phase)
if (phase == WM_PHASE_GAMER || phase == WM_PHASE_PLAY)
{
- OutputNetDebug("CEvent::ChangePhase_[WriteInfo]\r\n");
+ OutputNetDebug("CEvent::ChangePhase [WriteInfo]\r\n");
WriteInfo(m_gamer);
}
@@ -4895,7 +4896,7 @@ BOOL CEvent::ChangePhase(UINT phase)
WaitMouse(FALSE);
if (m_phase == WM_PHASE_PLAY || m_phase == WM_PHASE_PLAYTEST)
{
- FillMouse(TRUE);
+ DisableMouse(TRUE);
}
m_pDecor->VehicleSoundsPhase(phase);
OutputNetDebug("CEvent::ChangePhase [End]");
@@ -5312,16 +5313,17 @@ void CEvent::DemoStep()
m_demoTime++;
}
-void CEvent::DemoRecEvent(UINT message, UINT input, WPARAM wParam, LPARAM lParam)
+void CEvent::DemoRecEvent()
{
- if (m_demoIndex > 0 &&
- m_pDemoBuffer[m_demoIndex - 1].time == m_demoTime &&
- m_pDemoBuffer[m_demoIndex - 1].input == m_keyPress)
-
- m_demoIndex++;
- if (m_demoIndex >= MAXDEMO)
+ if (m_bDemoRec)
{
- DemoRecStop();
+ m_pDemoBuffer[m_demoIndex].time = m_demoTime;
+ m_pDemoBuffer[m_demoIndex].input == m_keyPress;
+ m_demoIndex++;
+ if (m_demoIndex > MAXDEMO)
+ {
+ DemoRecStop();
+ }
}
}
@@ -5752,14 +5754,14 @@ int CEvent::GameSave(int save)
{
char buffer[100];
- if (m_pDecor->MissionStart(m_gamer, save, TRUE))
+ if (m_pDecor->CurrentWrite(m_gamer, save, TRUE))
{
//LoadString()
m_pDecor->NotifPush(buffer);
m_quicksaveIndex = save;
return 1;
}
- return m_pDecor->MissionStart(m_gamer, save, TRUE);
+ return m_pDecor->CurrentWrite(m_gamer, save, TRUE);
}
BOOL CEvent::CopyMission(char *srcFileName, char *dstFileName)
@@ -5824,4 +5826,33 @@ void CEvent::DrawMap()
void CEvent::NetAdjustLobbyButtons()
{
// TODO
+}
+
+BOOL CEvent::CurrentRead(int rank)
+{
+ char buf[100];
+ int mission;
+ BOOL bPrivate;
+
+ if (m_pDecor->CurrentRead(m_gamer, rank, &mission, &bPrivate))
+ {
+ m_bPrivate = bPrivate;
+ SetMission(mission);
+ m_quicksaveIndex = rank;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+BOOL CEvent::CurrentWrite(int rank)
+{
+ char buf[100];
+ if (m_pDecor->CurrentWrite(m_gamer, rank))
+ {
+ LoadString(0x120u, buf, 100);
+ m_pDecor->NotifPush(buf);
+ m_quicksaveIndex = rank;
+ return TRUE;
+ }
+ return FALSE;
}
\ No newline at end of file
diff --git a/src/event.h b/src/event.h
index 2c684ea..683d567 100644
--- a/src/event.h
+++ b/src/event.h
@@ -98,7 +98,7 @@ public:
void SomethingDecor();
BOOL IsMouseRelease();
- void NetSetPause(BOOL bPause, int players);
+ void NetSetPause(BOOL bPause, BOOL bMulti);
void NetSendLobby();
BOOL DrawButtons();
@@ -107,7 +107,7 @@ public:
void MouseSprite(POINT pos);
void WaitMouse(BOOL bWait);
void HideMouse(BOOL bHide);
- void FillMouse(int bFill);
+ void DisableMouse(int bFill);
POINT GetLastMousePos();
BOOL TreatEvent(UINT message, WPARAM wParam, LPARAM lParam);
BOOL TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam);
@@ -172,7 +172,7 @@ protected:
void DemoRecStop();
BOOL DemoPlayStart();
void DemoPlayStop();
- void DemoRecEvent(UINT message, UINT input, WPARAM wParam, LPARAM lParam);
+ void DemoRecEvent();
// Network Functions
BOOL NetCreate(int session);
@@ -194,6 +194,9 @@ protected:
BOOL CheckWorld1();
void NetAdjustLobbyButtons();
+ BOOL CurrentRead(BOOL bPrivate);
+ BOOL CurrentWrite(int rank);
+
protected:
int m_speed;
@@ -256,7 +259,7 @@ protected:
char m_textToolTips[50];
char m_textToolTips2[50];
int m_mouseSprite;
- BOOL m_bFillMouse;
+ BOOL m_bDisableMouse;
BOOL m_bWaitMouse;
BOOL m_bHideMouse;
BOOL m_bShowMouse;
diff --git a/src/misc.cpp b/src/misc.cpp
index 2874728..9a4af20 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -43,7 +43,6 @@ void ChangeSprite(int sprite)
if ( sprite == SPRITE_ARROW ) hCursor = LoadCursorA(g_hInstance, "IDC_ARROW");
if ( sprite == SPRITE_POINTER ) hCursor = LoadCursorA(g_hInstance, "IDC_POINTER");
- if ( sprite == SPRITE_MAP ) hCursor = LoadCursorA(g_hInstance, "IDC_MAP");
if ( sprite == SPRITE_ARROWU ) hCursor = LoadCursorA(g_hInstance, "IDC_ARROWU");
if ( sprite == SPRITE_ARROWD ) hCursor = LoadCursorA(g_hInstance, "IDC_ARROWD");
if ( sprite == SPRITE_ARROWL ) hCursor = LoadCursorA(g_hInstance, "IDC_ARROWL");
@@ -54,7 +53,6 @@ void ChangeSprite(int sprite)
if ( sprite == SPRITE_ARROWDR ) hCursor = LoadCursorA(g_hInstance, "IDC_ARROWDR");
if ( sprite == SPRITE_WAIT ) hCursor = LoadCursorA(g_hInstance, "IDC_WAIT");
if ( sprite == SPRITE_EMPTY ) hCursor = LoadCursorA(g_hInstance, "IDC_EMPTY");
- if ( sprite == SPRITE_FILL ) hCursor = LoadCursorA(g_hInstance, "IDC_FILL");
SetCursor(hCursor);
g_lastSprite = sprite;
diff --git a/src/pixmap.cpp b/src/pixmap.cpp
index 258dc75..a8c751c 100644
--- a/src/pixmap.cpp
+++ b/src/pixmap.cpp
@@ -1538,6 +1538,7 @@ void CPixmap::SetMousePosSprite(POINT pos, int sprite, BOOL bDemoPlay)
}
}
+/*
// Positionne la souris.
void CPixmap::SetMousePos(POINT pos, BOOL bDemoPlay)
@@ -1552,6 +1553,7 @@ void CPixmap::SetMousePos(POINT pos, BOOL bDemoPlay)
MouseUpdate();
}
}
+*/
// Change le lutin de la souris.
@@ -1584,6 +1586,7 @@ void CPixmap::MouseUpdate()
if ( m_lpDDSurface[CHELEMENT] == NULL ) return;
if ( m_mouseType != MOUSETYPEGRA ) return;
if ( m_mouseSprite == SPRITE_EMPTY ) return;
+ if (m_mouseSprite == SPRITE_DISABLE) return;
if ( !m_bMouseShow ) return;
oldRect.left = m_mouseBackPos.x;
@@ -1661,7 +1664,7 @@ void CPixmap::MouseInvalidate()
void CPixmap::MouseBackClear()
{
- if ( m_mouseType != MOUSETYPEGRA ) return;
+ if ( m_mouseType != MOUSETYPEGRA || m_mouseSprite == SPRITE_DISABLE) return;
MouseBackRestore(); // enl�ve la souris dans m_lpDDSBack
}
@@ -1674,7 +1677,7 @@ void CPixmap::MouseBackDraw()
if ( m_lpDDSurface[CHELEMENT] == NULL ) return;
if ( m_mouseType != MOUSETYPEGRA ) return;
- if ( m_mouseSprite == SPRITE_EMPTY ) return;
+ if ( m_mouseSprite == SPRITE_EMPTY || m_mouseSprite == SPRITE_DISABLE) return;
if ( !m_bMouseShow ) return;
MouseBackSave(); // sauve ce qui sera sous la souris
@@ -1717,7 +1720,7 @@ void CPixmap::MouseBackSave()
if ( m_lpDDSurface[CHELEMENT] == NULL ) return;
if ( m_mouseType != MOUSETYPEGRA ) return;
- if ( m_mouseSprite == SPRITE_EMPTY ) return;
+ if ( m_mouseSprite == SPRITE_EMPTY || m_mouseSprite == SPRITE_DISABLE) return;
if ( !m_bMouseShow ) return;
m_mouseBackPos.x = m_mousePos.x - m_mouseHotSpot.x;
@@ -1870,7 +1873,7 @@ void CPixmap::MouseRectSprite(RECT *rect, POINT *offset)
rank = 37;
if ( m_mouseSprite == SPRITE_POINTER ) rank = 38;
- if ( m_mouseSprite == 11 ) rank = 39;
+ if ( m_mouseSprite == SPRITE_WAIT ) rank = 39;
rect->left = table_icon_element[rank * 6 + 0 + 1];
rect->right = rect->left + table_icon_element[rank * 6 + 4 + 1];
@@ -1888,29 +1891,18 @@ void CPixmap::MouseHotSpot()
{
int rank;
- static int table_mouse_hotspot[14*2] =
+ static int table_mouse_hotspot[4*2] =
{
+ 25, 0,
30, 30, // SPRITE_ARROW
20, 15, // SPRITE_POINTER
- 31, 26, // SPRITE_MAP
- 25, 14, // SPRITE_ARROWU
- 24, 35, // SPRITE_ARROWD
- 15, 24, // SPRITE_ARROWL
- 35, 24, // SPRITE_ARROWR
- 18, 16, // SPRITE_ARROWUL
- 32, 18, // SPRITE_ARROWUR
- 17, 30, // SPRITE_ARROWDL
- 32, 32, // SPRITE_ARROWDR
- 30, 30, // SPRITE_WAIT
30, 30, // SPRITE_EMPTY
- 21, 51, // SPRITE_FILL
};
+ rank = m_mouseSprite;
if ( m_mouseSprite >= SPRITE_ARROW &&
- m_mouseSprite <= SPRITE_FILL )
+ m_mouseSprite <= SPRITE_WAIT )
{
- rank = m_mouseSprite - SPRITE_ARROW; // rank <- 0..n
-
m_mouseHotSpot.x = table_mouse_hotspot[rank*2+0];
m_mouseHotSpot.y = table_mouse_hotspot[rank*2+1];
}
diff --git a/src/sound.cpp b/src/sound.cpp
index 37fee3c..2af6137 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -1,18 +1,46 @@
// sound.cpp
//
+#include "def.h"
+#if _BASS && !_LEGACY
#include
#include
#include "sound.h"
#include "misc.h"
-#include "def.h"
#include "resource.h"
+#include "bass.h"
+#include "bassmidi.h"
/////////////////////////////////////////////////////////////////////////////
// The following macro are used for proper error handling for DirectSound.
#define TRY_DS(exp) { { HRESULT rval = exp; if (rval != DS_OK) { TraceErrorDS(rval, __FILE__, __LINE__); return FALSE; } } }
+static const float table[21] =
+{
+ (float)0x00000000 / 0xFFFFFFFF,
+ (float)0x11111111 / 0xFFFFFFFF,
+ (float)0x22222222 / 0xFFFFFFFF,
+ (float)0x33333333 / 0xFFFFFFFF,
+ (float)0x44444444 / 0xFFFFFFFF,
+ (float)0x55555555 / 0xFFFFFFFF,
+ (float)0x66666666 / 0xFFFFFFFF,
+ (float)0x77777777 / 0xFFFFFFFF,
+ (float)0x88888888 / 0xFFFFFFFF,
+ (float)0x99999999 / 0xFFFFFFFF,
+ (float)0xAAAAAAAA / 0xFFFFFFFF,
+ (float)0xBBBBBBBB / 0xFFFFFFFF,
+ (float)0xCCCCCCCC / 0xFFFFFFFF,
+ (float)0xDDDDDDDD / 0xFFFFFFFF,
+ (float)0xEEEEEEEE / 0xFFFFFFFF,
+ (float)0xF222F222 / 0xFFFFFFFF,
+ (float)0xF555F555 / 0xFFFFFFFF,
+ (float)0xF777F777 / 0xFFFFFFFF,
+ (float)0xFAAAFAAA / 0xFFFFFFFF,
+ (float)0xFDDDFDDD / 0xFFFFFFFF,
+ (float)0xFFFFFFFF / 0xFFFFFFFF,
+};
+
struct WaveHeader
{
@@ -233,55 +261,7 @@ BOOL CSound::PlaySoundDS(DWORD dwSound, DWORD dwFlags)
void InitMidiVolume(int volume)
{
- int nb, i, n;
- MMRESULT result;
- HMIDIOUT hmo = 0;
-
- static int table[21] =
- {
- 0x00000000,
- 0x11111111,
- 0x22222222,
- 0x33333333,
- 0x44444444,
- 0x55555555,
- 0x66666666,
- 0x77777777,
- 0x88888888,
- 0x99999999,
- 0xAAAAAAAA,
- 0xBBBBBBBB,
- 0xCCCCCCCC,
- 0xDDDDDDDD,
- 0xEEEEEEEE,
- 0xF222F222,
- 0xF555F555,
- 0xF777F777,
- 0xFAAAFAAA,
- 0xFDDDFDDD,
- 0xFFFFFFFF,
- };
-
- if (volume < 0) volume = 0;
- if (volume > MAXVOLUME) volume = MAXVOLUME;
-
- nb = midiOutGetNumDevs();
- for (i = 0; i
+#if _BASS && !_LEGACY
+#include "bass.h"
+#include "bassmidi.h"
+#endif
+
///////////////////////////////////////////////////////////////////////////
#define MAXSOUND 100
@@ -62,13 +67,17 @@ protected:
LPDIRECTSOUND m_lpDS;
LPDIRECTSOUNDBUFFER m_lpDSB[MAXSOUND];
short m_channelBlupi[MAXBLUPI];
+#if _BASS && !_LEGACY
+ HSTREAM m_hBassStream;
+#else
UINT m_MidiDeviceID;
+#endif
int m_music;
- char m_MIDIFilename[50];
int m_audioVolume;
int m_midiVolume;
int m_lastMidiVolume;
int m_nbSuspendSkip;
+
};
#endif
\ No newline at end of file
diff --git a/src/soundold.cpp b/src/soundold.cpp
new file mode 100644
index 0000000..02c85af
--- /dev/null
+++ b/src/soundold.cpp
@@ -0,0 +1,760 @@
+// sound.cpp
+//
+
+#include "def.h"
+#if !_BASS || _LEGACY
+#include
+#include
+#include "sound.h"
+#include "misc.h"
+#include "resource.h"
+
+/////////////////////////////////////////////////////////////////////////////
+
+// The following macro are used for proper error handling for DirectSound.
+#define TRY_DS(exp) { { HRESULT rval = exp; if (rval != DS_OK) { TraceErrorDS(rval, __FILE__, __LINE__); return FALSE; } } }
+
+
+struct WaveHeader
+{
+ BYTE RIFF[4]; // "RIFF"
+ DWORD dwSize; // Size of data to follow
+ BYTE WAVE[4]; // "WAVE"
+ BYTE fmt_[4]; // "fmt "
+ DWORD dw16; // 16
+ WORD wOne_0; // 1
+ WORD wChnls; // Number of Channels
+ DWORD dwSRate; // Sample Rate
+ DWORD BytesPerSec; // Sample Rate
+ WORD wBlkAlign; // 1
+ WORD BitsPerSample; // Sample size
+ BYTE DATA[4]; // "DATA"
+ DWORD dwDSize; // Number of Samples
+};
+
+
+
+
+// Creates a DirectSound buffer.
+
+BOOL CSound::CreateSoundBuffer(int dwBuf, DWORD dwBufSize, DWORD dwFreq, DWORD dwBitsPerSample, DWORD dwBlkAlign, BOOL bStereo)
+{
+ PCMWAVEFORMAT pcmwf;
+ DSBUFFERDESC dsbdesc;
+
+ // Set up wave format structure.
+ memset(&pcmwf, 0, sizeof(PCMWAVEFORMAT));
+ pcmwf.wf.wFormatTag = WAVE_FORMAT_PCM;
+ pcmwf.wf.nChannels = bStereo ? 2 : 1;
+ pcmwf.wf.nSamplesPerSec = dwFreq;
+ pcmwf.wf.nBlockAlign = (WORD)dwBlkAlign;
+ pcmwf.wf.nAvgBytesPerSec = pcmwf.wf.nSamplesPerSec * pcmwf.wf.nBlockAlign;
+ pcmwf.wBitsPerSample = (WORD)dwBitsPerSample;
+
+ // Set up DSBUFFERDESC structure.
+ memset(&dsbdesc, 0, sizeof(DSBUFFERDESC)); // Zero it out.
+ dsbdesc.dwSize = sizeof(DSBUFFERDESC);
+ dsbdesc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME;
+ dsbdesc.dwBufferBytes = dwBufSize;
+ dsbdesc.lpwfxFormat = (LPWAVEFORMATEX)&pcmwf;
+
+ TRY_DS(m_lpDS->CreateSoundBuffer(&dsbdesc, &m_lpDSB[dwBuf], NULL), 63)
+ return TRUE;
+}
+
+// I dunno what the fuck this does.
+/*
+BOOL CSound::ErrorSomething()
+{
+if (m_lpDS ||
+m_lpDSB != 0)
+{
+m_lpDS, m_lpDSB->TraceErrorDS;
+return FALSE;
+}
+return TRUE;
+}
+*/
+
+
+// Reads in data from a wave file.
+
+BOOL CSound::ReadData(LPDIRECTSOUNDBUFFER lpDSB, FILE* pFile, DWORD dwSize, DWORD dwPos)
+{
+ // Seek to correct position in file (if necessary)
+ if (dwPos != 0xffffffff)
+ {
+ if (fseek(pFile, dwPos, SEEK_SET) != 0)
+ {
+ return FALSE;
+ }
+ }
+
+ // Lock data in buffer for writing
+ LPVOID pData1;
+ DWORD dwData1Size;
+ LPVOID pData2;
+ DWORD dwData2Size;
+ HRESULT rval;
+
+ rval = lpDSB->Lock(0, dwSize, &pData1, &dwData1Size, &pData2, &dwData2Size, DSBLOCK_FROMWRITECURSOR);
+ if (rval != DS_OK)
+ {
+ return FALSE;
+ }
+
+ // Read in first chunk of data
+ if (dwData1Size > 0)
+ {
+ if (fread(pData1, dwData1Size, 1, pFile) != 1)
+ {
+ char holder[256];
+ wsprintfA(holder, "Data1 : %d, dwdata: %d, pFile: %d", pData1, dwData1Size, pFile);
+ OutputDebug(holder);
+ return FALSE;
+ }
+ }
+
+ // read in second chunk if necessary
+ if (dwData2Size > 0)
+ {
+ if (fread(pData2, dwData2Size, 1, pFile) != 1)
+ {
+ return FALSE;
+ }
+ }
+
+ // Unlock data in buffer
+ rval = lpDSB->Unlock(pData1, dwData1Size, pData2, dwData2Size);
+ if (rval != DS_OK)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+// Creates a DirectSound buffer from a wave file.
+
+BOOL CSound::CreateBufferFromWaveFile(int dwBuf, char *pFileName)
+{
+ // Open the wave file
+ FILE* pFile = fopen(pFileName, "rb");
+ if (pFile == NULL) return FALSE;
+
+ // Read in the wave header
+ WaveHeader wavHdr;
+ if (fread(&wavHdr, sizeof(wavHdr), 1, pFile) != 1)
+ {
+ fclose(pFile);
+ return NULL;
+ }
+
+ // Figure out the size of the data region
+ DWORD dwSize = wavHdr.dwDSize;
+
+ // Is this a stereo or mono file?
+ BOOL bStereo = wavHdr.wChnls > 1 ? TRUE : FALSE;
+
+ // Create the sound buffer for the wave file
+ if (!CreateSoundBuffer(dwBuf, dwSize, wavHdr.dwSRate,
+ wavHdr.BitsPerSample, wavHdr.wBlkAlign, bStereo))
+ {
+ // Close the file
+ fclose(pFile);
+
+ return FALSE;
+ }
+
+ // Read the data for the wave file into the sound buffer
+ if (!ReadData(m_lpDSB[dwBuf], pFile, dwSize, sizeof(wavHdr)))
+ {
+ fclose(pFile);
+ return FALSE;
+ }
+
+ // Close out the wave file
+ fclose(pFile);
+
+ return TRUE;
+}
+
+// Stops all sounds.
+
+BOOL CSound::StopAllSounds()
+{
+ // Make sure we have a valid sound buffer
+ for (int i = 0; i < MAXSOUND; i++)
+ {
+ if (m_lpDSB[i])
+ {
+ DWORD dwStatus;
+ TRY_DS(m_lpDSB[i]->GetStatus(&dwStatus));
+
+ if ((dwStatus & DSBSTATUS_PLAYING) == DSBSTATUS_PLAYING)
+ {
+ TRY_DS(m_lpDSB[i]->Stop())
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+// Plays a sound using direct sound.
+
+BOOL CSound::PlaySoundDS(DWORD dwSound, DWORD dwFlags)
+{
+ // Make sure the sound is valid
+ if (dwSound >= MAXSOUND) return FALSE;
+
+ // Make sure we have a valid sound buffer
+ if (m_lpDSB[dwSound])
+ {
+ DWORD dwStatus;
+ TRY_DS(m_lpDSB[dwSound]->GetStatus(&dwStatus));
+
+ if ((dwStatus & DSBSTATUS_PLAYING) != DSBSTATUS_PLAYING)
+ {
+ // Play the sound
+ TRY_DS(m_lpDSB[dwSound]->Play(0, 0, dwFlags));
+ }
+ }
+
+ return TRUE;
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+// Modifie le volume midi.
+// Le volume est compris entre 0 et 20 !
+
+void InitMidiVolume(int volume)
+{
+ int nb, i, n;
+ MMRESULT result;
+ HMIDIOUT hmo = 0;
+
+ static int table[21] =
+ {
+ 0x00000000,
+ 0x11111111,
+ 0x22222222,
+ 0x33333333,
+ 0x44444444,
+ 0x55555555,
+ 0x66666666,
+ 0x77777777,
+ 0x88888888,
+ 0x99999999,
+ 0xAAAAAAAA,
+ 0xBBBBBBBB,
+ 0xCCCCCCCC,
+ 0xDDDDDDDD,
+ 0xEEEEEEEE,
+ 0xF222F222,
+ 0xF555F555,
+ 0xF777F777,
+ 0xFAAAFAAA,
+ 0xFDDDFDDD,
+ 0xFFFFFFFF,
+ };
+
+ if (volume < 0) volume = 0;
+ if (volume > MAXVOLUME) volume = MAXVOLUME;
+
+ nb = midiOutGetNumDevs();
+ for (i = 0; iRelease();
+ m_lpDSB[i] = NULL;
+ }
+ }
+
+ if (m_lpDS != NULL)
+ {
+ m_lpDS->Release();
+ m_lpDS = NULL;
+ }
+}
+
+
+// Initialisation de DirectSound.
+
+BOOL CSound::Create(HWND hWnd)
+{
+ if (!DirectSoundCreate(NULL, &m_lpDS, NULL) == DS_OK)
+ {
+ OutputDebug("Fatal error: DirectSoundCreate\n");
+ m_bEnable = FALSE;
+ return FALSE;
+ }
+
+ m_lpDS->SetCooperativeLevel(hWnd, DSSCL_NORMAL);
+ m_bEnable = TRUE;
+ m_hWnd = hWnd;
+ return TRUE;
+}
+
+
+// Retourne l'�tat de DirectSound.
+
+BOOL CSound::GetEnable()
+{
+ return m_bEnable;
+}
+
+
+// Enclenche ou d�clenche le son.
+
+void CSound::SetState(BOOL bState)
+{
+ m_bState = bState;
+}
+
+
+// Gestion des volumes audio (.wav) et midi (.mid).
+
+void CSound::SetAudioVolume(int volume)
+{
+ m_audioVolume = volume;
+}
+
+int CSound::GetAudioVolume()
+{
+ if (!m_bEnable) return 0;
+ return m_audioVolume;
+}
+
+void CSound::SetMidiVolume(int volume)
+{
+ m_midiVolume = volume;
+}
+
+int CSound::GetMidiVolume()
+{
+ if (!m_bEnable) return 0;
+ return m_midiVolume;
+}
+
+
+// Cache tous les ficheirs son (.wav).
+
+void CSound::CacheAll()
+{
+ int i;
+ char name[50];
+
+ if (!m_bEnable) return;
+
+ for (i = 0; i= MAXSOUND) return FALSE;
+
+ if (m_lpDSB[channel] != NULL)
+ {
+ Flush(channel);
+ }
+
+ return CreateBufferFromWaveFile(channel, pFilename);
+}
+
+// D�charge un son.
+
+void CSound::Flush(int channel)
+{
+ if (!m_bEnable) return;
+ if (channel < 0 || channel >= MAXSOUND) return;
+
+ if (m_lpDSB[channel] != NULL)
+ {
+ m_lpDSB[channel]->Release();
+ m_lpDSB[channel] = NULL;
+ }
+}
+
+// Fait entendre un son.
+// Le volume est compris entre 0 (max) et -10000 (silence).
+// Le panoramique est compris entre -10000 (gauche), 0 (centre)
+// et +10000 (droite).
+
+BOOL CSound::Play(int channel, int volume, int pan)
+{
+ if (!m_bEnable) return TRUE;
+ if (!m_bState || m_audioVolume == 0) return TRUE;
+
+ volume -= (MAXVOLUME - m_audioVolume)*((10000 / 4) / MAXVOLUME);
+
+ //? if ( volume == -10000 ) return TRUE;
+ if (volume <= -10000 / 4) return TRUE;
+
+ if (channel < 0 || channel >= MAXSOUND) return FALSE;
+ if (m_lpDSB[channel] == NULL) return FALSE;
+
+ m_lpDSB[channel]->SetVolume(volume);
+ m_lpDSB[channel]->SetPan(pan);
+ m_lpDSB[channel]->Play(0, 0, 0);
+
+ return TRUE;
+}
+
+BOOL CSound::StopSound(int channel)
+{
+ if (m_bEnable) return FALSE;
+ if (m_bState || m_audioVolume == 0) return FALSE;
+
+ if (0 < channel || channel < MAXSOUND)
+ {
+ if (m_lpDSB[channel] == NULL)
+ return (BOOL)m_lpDSB[channel];
+ m_lpDSB[channel]->Stop();
+ m_lpDSB[channel]->SetCurrentPosition(0);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// Fait entendre un son dans une image.
+// Si rank != -1, il indique le rang du blupi dont il faudra
+// �ventuellement stopper le dernier son en cours !
+
+BOOL CSound::PlayImage(int channel, POINT pos, int rank)
+{
+ int stopCh, volumex, volumey, volume, pan;
+
+ if (rank >= 0 && rank < MAXBLUPI)
+ {
+ stopCh = m_channelBlupi[rank];
+ if (stopCh >= 0 && m_lpDSB[stopCh] != NULL)
+ {
+ m_lpDSB[stopCh]->Stop(); // stoppe le son pr�c�dent
+ m_lpDSB[stopCh]->SetCurrentPosition(0);
+ }
+
+ m_channelBlupi[rank] = channel;
+ }
+
+ //? pan = (int)(((long)pos.x*20000L)/LXIMAGE)-10000L;
+ //? pan = (int)(((long)pos.x*10000L)/LXIMAGE)-5000L;
+ pan = (int)(((long)pos.x * 5000L) / LXIMAGE) - 2500L;
+
+ volumex = 0; // volume maximum
+ if (pos.x < 0)
+ {
+ volumex = (pos.x * 2500) / LXIMAGE;
+ }
+ if (pos.x > LXIMAGE)
+ {
+ pos.x -= LXIMAGE;
+ volumex = (-pos.x * 2500) / LXIMAGE;
+ }
+ if (volumex < -10000) volumex = -10000;
+
+ volumey = 0; // volume maximum
+ if (pos.y < 0)
+ {
+ volumey = (pos.y * 2500) / LYIMAGE;
+ }
+ if (pos.y > LYIMAGE)
+ {
+ pos.y -= LYIMAGE;
+ volumey = (-pos.y * 2500) / LYIMAGE;
+ }
+ if (volumey < -10000) volumey = -10000;
+
+ if (volumex < volumey) volume = volumex;
+ else volume = volumey;
+
+ return Play(channel, volume, pan);
+}
+
+
+// Uses MCI to play a MIDI file. The window procedure
+// is notified when playback is complete.
+
+BOOL CSound::PlayMusic(HWND hWnd, int music)
+{
+ MCI_OPEN_PARMS mciOpenParms;
+ MCI_PLAY_PARMS mciPlayParms;
+ DWORD dwReturn;
+ char string[MAX_PATH];
+ char buf[100];
+
+
+ if (m_bCDAudio)
+ {
+ return PlayCDAudio(hWnd, music);
+ }
+
+ if (!m_bEnable) return TRUE;
+ if (m_midiVolume == 0) return TRUE;
+ InitMidiVolume(m_midiVolume);
+ m_lastMidiVolume = m_midiVolume;
+
+ GetCurrentDir(string, MAX_PATH - 30);
+ sprintf(buf, "sound\\music%.3d.blp", music - 1);
+ strcat(string, buf);
+
+ // Open the device by specifying the device and filename.
+ // MCI will attempt to choose the MIDI mapper as the output port.
+ mciOpenParms.dwCallback = 0;
+ mciOpenParms.wDeviceID = 0;
+ mciOpenParms.lpstrDeviceType = "sequencer";
+ mciOpenParms.lpstrElementName = string;
+ dwReturn = mciSendCommand(NULL,
+ MCI_OPEN,
+ MCI_OPEN_TYPE | MCI_OPEN_ELEMENT,
+ (DWORD)(LPVOID)&mciOpenParms);
+ if (dwReturn != 0)
+ {
+ OutputDebug("PlayMusic-1\n");
+ mciGetErrorStringA(dwReturn, string, 128);
+ OutputDebug(string);
+ // Failed to open device. Don't close it; just return error.
+ return FALSE;
+ }
+
+ // The device opened successfully; get the device ID.
+ m_MidiDeviceID = mciOpenParms.wDeviceID;
+
+ // Begin playback.
+ mciPlayParms.dwFrom = 0;
+ mciPlayParms.dwTo = 0;
+ mciPlayParms.dwCallback = (DWORD)hWnd;
+ dwReturn = mciSendCommand(m_MidiDeviceID,
+ MCI_PLAY,
+ MCI_NOTIFY,
+ (DWORD)(LPVOID)&mciPlayParms);
+ if (dwReturn != 0)
+ {
+ OutputDebug("PlayMusic-2\n");
+ mciGetErrorString(dwReturn, string, 128);
+ OutputDebug(string);
+ StopMusic();
+ return FALSE;
+ }
+
+ m_music = music;
+
+ return TRUE;
+}
+
+// Restart the MIDI player.
+
+BOOL CSound::RestartMusic()
+{
+ OutputDebug("RestartMusic\n");
+ if (!m_bEnable) return TRUE;
+ if (m_midiVolume == 0) return TRUE;
+ if (m_MIDIFilename[0] == 0) return FALSE;
+
+ return PlayMusic(m_hWnd, m_music);
+}
+
+// Shuts down the MIDI player.
+
+void CSound::SuspendMusic()
+{
+ if (!m_bEnable) return;
+
+ if (m_nbSuspendSkip != 0)
+ {
+ m_nbSuspendSkip--;
+ return;
+ }
+
+ if (m_MidiDeviceID && m_midiVolume != 0)
+ {
+ mciSendCommand(m_MidiDeviceID, MCI_CLOSE, 0, NULL);
+ }
+ m_MidiDeviceID = 0;
+}
+
+// Shuts down the MIDI player.
+
+void CSound::StopMusic()
+{
+ SuspendMusic();
+ m_MIDIFilename[0] = 0;
+}
+
+// Retourne TRUE si une musique est en cours.
+
+BOOL CSound::IsPlayingMusic()
+{
+ return (m_MIDIFilename[0] != 0);
+}
+
+// Adapte le volume de la musique en cours, si n�cessaire.
+
+void CSound::AdaptVolumeMusic()
+{
+ if (m_midiVolume != m_lastMidiVolume)
+ {
+ InitMidiVolume(m_midiVolume);
+ m_lastMidiVolume = m_midiVolume;
+ RestartMusic();
+ }
+}
+
+// Indique le nombre de suspend � sauter.
+
+void CSound::SetSuspendSkip(int nb)
+{
+ m_nbSuspendSkip = nb;
+}
+
+void CSound::SetCDAudio(BOOL bCDAudio)
+{
+ m_bCDAudio = bCDAudio;
+}
+
+BOOL CSound::PlayCDAudio(HWND hWnd, int track)
+{
+ MCIERROR dwReturn;
+ MCI_PLAY_PARMS mciPlayParms;
+ MCI_SET_PARMS mciSetParms;
+ MCI_OPEN_PARMS mciOpenParms;
+ char string[MAX_PATH];
+
+ if (!m_bEnable) return TRUE;
+ if (m_midiVolume == 0) return TRUE;
+ InitMidiVolume(m_midiVolume);
+ m_lastMidiVolume = m_midiVolume;
+ mciOpenParms.dwCallback = 0;
+ mciOpenParms.wDeviceID = 0;
+ mciOpenParms.lpstrAlias = NULL;
+ mciOpenParms.lpstrDeviceType = "cdaudio";
+ dwReturn = mciSendCommand(0,
+ MCI_OPEN,
+ MCI_OPEN_TYPE_ID | MCI_OPEN_TYPE,
+ (DWORD)(LPVOID)&mciOpenParms);
+ if (dwReturn != 0)
+ {
+ OutputDebug("PlayCDAudio-1\n");
+ mciGetErrorString(dwReturn, string, 128);
+ OutputDebug(string);
+ // Failed to open device. Don't close it; just return error.
+ return FALSE;
+ }
+
+ // The device opened successfully; get the device ID.
+ m_MidiDeviceID = mciOpenParms.wDeviceID;
+
+ mciSetParms.dwCallback = 0;
+ mciSetParms.dwAudio = 0;
+ mciSetParms.dwTimeFormat = MCI_FORMAT_TMSF;
+
+ dwReturn = mciSendCommand(mciOpenParms.wDeviceID,
+ MCI_SET,
+ MCI_SET_TIME_FORMAT,
+ (DWORD)(LPVOID)&mciSetParms);
+
+ if (dwReturn != 0)
+ {
+ OutputDebug("PlayCDAudio-2\n");
+ mciGetErrorString(dwReturn, string, 128);
+ OutputDebug(string);
+ StopMusic();
+ return FALSE;
+ }
+
+ mciPlayParms.dwCallback = (DWORD)(LPVOID)hWnd;
+ mciPlayParms.dwFrom = track;
+ mciPlayParms.dwTo = track + 1;
+ dwReturn = mciSendCommand(m_MidiDeviceID,
+ MCI_PLAY,
+ MCI_TRACK | MCI_NOTIFY | MCI_WAIT,
+ (DWORD)(LPVOID)&mciPlayParms);
+
+ if (dwReturn != 0)
+ {
+ OutputDebug("PlayCDAudio-3\n");
+ mciGetErrorString(dwReturn, string, 128);
+ OutputDebug(string);
+ StopMusic();
+ return FALSE;
+ }
+
+ m_music = track;
+
+ return TRUE;
+}
+
+#endif
\ No newline at end of file