diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-10 10:37:22 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-10 10:37:22 +0000 |
commit | 8af89b5940bd15b013e3f48536888e352eb1c43b (patch) | |
tree | 719494bd328bff489b8e566ab620850b65ae1769 /Game | |
parent | b122ec521106f9424ead8058cb3b4ab5cc7ac8a3 (diff) | |
download | usdx-8af89b5940bd15b013e3f48536888e352eb1c43b.tar.gz usdx-8af89b5940bd15b013e3f48536888e352eb1c43b.tar.xz usdx-8af89b5940bd15b013e3f48536888e352eb1c43b.zip |
Update to Bass 2.4. Do not forget to replace the old with the new dll.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1080 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r-- | Game/Code/Classes/UAudioCore_Bass.pas | 46 | ||||
-rw-r--r-- | Game/Code/Classes/UAudioCore_Portaudio.pas | 5 | ||||
-rw-r--r-- | Game/Code/Classes/UAudioInput_Bass.pas | 90 | ||||
-rw-r--r-- | Game/Code/Classes/UAudioPlayback_Bass.pas | 118 | ||||
-rw-r--r-- | Game/Code/Classes/UCommon.pas | 19 | ||||
-rwxr-xr-x | Game/Code/lib/bass/MacOSX/Bass.pas | 988 | ||||
-rw-r--r-- | Game/Code/lib/bass/bass.chm | bin | 200682 -> 210668 bytes | |||
-rw-r--r-- | Game/Code/lib/bass/bass.dll | bin | 93240 -> 97336 bytes | |||
-rw-r--r-- | Game/Code/lib/bass/bass.txt | 264 | ||||
-rw-r--r-- | Game/Code/lib/bass/delphi/bass-macosx.patch | 368 | ||||
-rw-r--r-- | Game/Code/lib/bass/delphi/bass.bpg | 64 | ||||
-rw-r--r-- | Game/Code/lib/bass/delphi/bass.pas | 830 | ||||
-rw-r--r-- | Game/Code/lib/bass/lazarustest.lpi | 192 | ||||
-rw-r--r-- | Game/Code/lib/bass/lazarustest.lpr | 51 | ||||
-rwxr-xr-x | Game/Code/lib/bass/libbass.dylib | bin | 408684 -> 440460 bytes |
15 files changed, 1087 insertions, 1948 deletions
diff --git a/Game/Code/Classes/UAudioCore_Bass.pas b/Game/Code/Classes/UAudioCore_Bass.pas index 442c999b..1d045b88 100644 --- a/Game/Code/Classes/UAudioCore_Bass.pas +++ b/Game/Code/Classes/UAudioCore_Bass.pas @@ -9,36 +9,50 @@ interface {$I switches.inc}
uses
- {$IFDEF MSWINDOWS}
- Windows,
- {$ENDIF}
Classes,
SysUtils,
- UMusic;
+ UMusic,
+ bass; // (Note: DWORD is defined here)
type
TAudioCore_Bass = class
private
+ constructor Create(); public
- class function ErrorGetString(): string; overload;
- class function ErrorGetString(errCode: integer): string; overload;
- class function ConvertAudioFormatToBASSFlags(Format: TAudioSampleFormat; out Flags: DWORD): boolean;
+ class function GetInstance(): TAudioCore_Bass;
+ function ErrorGetString(): string; overload;
+ function ErrorGetString(errCode: integer): string; overload;
+ function ConvertAudioFormatToBASSFlags(Format: TAudioSampleFormat; out Flags: DWORD): boolean;
end;
-
+
implementation
uses
UMain,
- ULog,
- bass;
+ ULog;
+
+var
+ Instance: TAudioCore_Bass;
+
+constructor TAudioCore_Bass.Create();
+begin + inherited; +end; +
+class function TAudioCore_Bass.GetInstance(): TAudioCore_Bass;
+begin + if not assigned(Instance) then + Instance := TAudioCore_Bass.Create(); + Result := Instance; +end; -class function TAudioCore_Bass.ErrorGetString(): string;
+function TAudioCore_Bass.ErrorGetString(): string;
begin
Result := ErrorGetString(BASS_ErrorGetCode());
end;
-class function TAudioCore_Bass.ErrorGetString(errCode: integer): string;
+function TAudioCore_Bass.ErrorGetString(errCode: integer): string;
begin
case errCode of
BASS_OK:
@@ -63,8 +77,6 @@ begin result := 'Paused/stopped';
BASS_ERROR_ALREADY:
result := 'Already created/used';
- BASS_ERROR_NOPAUSE:
- result := 'No pause';
BASS_ERROR_NOCHAN:
result := 'No free channels';
BASS_ERROR_ILLTYPE:
@@ -93,8 +105,6 @@ begin result := 'Creation error';
BASS_ERROR_NOFX:
result := 'DX8 effects unavailable';
- BASS_ERROR_PLAYING:
- result := 'Channel is playing';
BASS_ERROR_NOTAVAIL:
result := 'Not available';
BASS_ERROR_DECODE:
@@ -111,6 +121,8 @@ begin result := 'Version error';
BASS_ERROR_CODEC:
result := 'Codec not available/supported';
+ BASS_ERROR_ENDED:
+ result := 'The channel/file has ended';
BASS_ERROR_UNKNOWN:
result := 'Unknown error';
else
@@ -118,7 +130,7 @@ begin end;
end;
-class function TAudioCore_Bass.ConvertAudioFormatToBASSFlags(Format: TAudioSampleFormat; out Flags: DWORD): boolean;
+function TAudioCore_Bass.ConvertAudioFormatToBASSFlags(Format: TAudioSampleFormat; out Flags: DWORD): boolean;
begin
case Format of
asfS16:
diff --git a/Game/Code/Classes/UAudioCore_Portaudio.pas b/Game/Code/Classes/UAudioCore_Portaudio.pas index cd228982..90395cb8 100644 --- a/Game/Code/Classes/UAudioCore_Portaudio.pas +++ b/Game/Code/Classes/UAudioCore_Portaudio.pas @@ -60,11 +60,12 @@ const array[0..0] of TPaHostApiTypeId = ( paDefaultApi ); {$IFEND} -var - Instance: TAudioCore_Portaudio; { TAudioInput_Portaudio } +var + Instance: TAudioCore_Portaudio; + constructor TAudioCore_Portaudio.Create(); begin inherited; diff --git a/Game/Code/Classes/UAudioInput_Bass.pas b/Game/Code/Classes/UAudioInput_Bass.pas index db49749e..b4d0e52b 100644 --- a/Game/Code/Classes/UAudioInput_Bass.pas +++ b/Game/Code/Classes/UAudioInput_Bass.pas @@ -22,8 +22,11 @@ uses UIni, ULog, UAudioCore_Bass, - Windows, - bass; + UCommon, // (Note: for MakeLong on non-windows platforms) + {$IFDEF MSWINDOWS} + Windows, // (Note: for MakeLong) + {$ENDIF} + bass; // (Note: DWORD is redefined here -> insert after Windows-unit) type TAudioInput_Bass = class(TAudioInputBase) @@ -41,8 +44,6 @@ type BassDeviceID: DWORD; // DeviceID used by BASS SingleIn: boolean; - DeviceIndex: integer; // index in TAudioInputProcessor.Device[] - function SetInputSource(SourceIndex: integer): boolean; function GetInputSource(): integer; public @@ -56,6 +57,7 @@ type end; var + AudioCore: TAudioCore_Bass; singleton_AudioInputBass : IAudioInput; @@ -70,10 +72,9 @@ var * user - players associated with left/right channels *} function MicrophoneCallback(stream: HSTREAM; buffer: Pointer; - len: Cardinal; Card: Cardinal): boolean; stdcall; + len: Cardinal; inputDevice: Pointer): boolean; {$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF} begin - AudioInputProcessor.HandleMicrophoneData(buffer, len, - AudioInputProcessor.DeviceList[Card]); + AudioInputProcessor.HandleMicrophoneData(buffer, len, inputDevice); Result := true; end; @@ -84,6 +85,7 @@ function TBassInputDevice.GetInputSource(): integer; var SourceCnt: integer; i: integer; + flags: DWORD; begin // get input-source config (subtract virtual device to get BASS indices) SourceCnt := Length(Source)-1; @@ -92,8 +94,16 @@ begin Result := -1; for i := 0 to SourceCnt-1 do begin + // get input settings + flags := BASS_RecordGetInput(i, PSingle(nil)^); + if (flags = -1) then + begin + Log.LogError('BASS_RecordGetInput: ' + AudioCore.ErrorGetString(), 'TBassInputDevice.GetInputSource'); + Exit; + end; + // check if current source is selected - if ((BASS_RecordGetInput(i) and BASS_INPUT_OFF) = 0) then + if ((flags and BASS_INPUT_OFF) = 0) then begin // selected source found Result := i; @@ -106,6 +116,7 @@ function TBassInputDevice.SetInputSource(SourceIndex: integer): boolean; var SourceCnt: integer; i: integer; + flags: DWORD; begin Result := false; @@ -117,9 +128,9 @@ begin SourceCnt := Length(Source)-1; // turn on selected source (turns off the others for single-in devices) - if (not BASS_RecordSetInput(SourceIndex, BASS_INPUT_ON)) then + if (not BASS_RecordSetInput(SourceIndex, BASS_INPUT_ON, -1)) then begin - Log.LogError('BASS_RecordSetInput: ' + TAudioCore_Bass.ErrorGetString(), 'TBassInputDevice.Start'); + Log.LogError('BASS_RecordSetInput: ' + AudioCore.ErrorGetString(), 'TBassInputDevice.Start'); Exit; end; @@ -130,9 +141,16 @@ begin begin if (i = SourceIndex) then continue; + // get input settings + flags := BASS_RecordGetInput(i, PSingle(nil)^); + if (flags = -1) then + begin + Log.LogError('BASS_RecordGetInput: ' + AudioCore.ErrorGetString(), 'TBassInputDevice.GetInputSource'); + Exit; + end; // deselect source if selected - if ((BASS_RecordGetInput(i) and BASS_INPUT_OFF) = 0) then - BASS_RecordSetInput(i, BASS_INPUT_OFF); + if ((flags and BASS_INPUT_OFF) = 0) then + BASS_RecordSetInput(i, BASS_INPUT_OFF, -1); end; end; @@ -148,14 +166,14 @@ const begin Result := false; - if not BASS_RecordInit(BassDeviceID) then + if (not BASS_RecordInit(BassDeviceID)) then begin - Log.LogError('BASS_RecordInit[device:'+IntToStr(DeviceIndex)+']: ' + - TAudioCore_Bass.ErrorGetString(), 'TBassInputDevice.Open'); + Log.LogError('BASS_RecordInit['+Name+']: ' + + AudioCore.ErrorGetString(), 'TBassInputDevice.Open'); Exit; end; - if (not TAudioCore_Bass.ConvertAudioFormatToBASSFlags(AudioFormat.Format, FormatFlags)) then + if (not AudioCore.ConvertAudioFormatToBASSFlags(AudioFormat.Format, FormatFlags)) then begin Log.LogError('Unhandled sample-format', 'TBassInputDevice.Open'); Exit; @@ -164,10 +182,10 @@ begin // start capturing in paused state RecordStream := BASS_RecordStart(Round(AudioFormat.SampleRate), AudioFormat.Channels, MakeLong(FormatFlags or BASS_RECORD_PAUSE, latency), - @MicrophoneCallback, DeviceIndex); + @MicrophoneCallback, Self); if (RecordStream = 0) then begin - Log.LogError('BASS_RecordStart: ' + TAudioCore_Bass.ErrorGetString(), 'TBassInputDevice.Open'); + Log.LogError('BASS_RecordStart: ' + AudioCore.ErrorGetString(), 'TBassInputDevice.Open'); BASS_RecordFree; Exit; end; @@ -204,7 +222,7 @@ begin if (not BASS_ChannelPlay(RecordStream, true)) then begin - Log.LogError('BASS_ChannelPlay: ' + TAudioCore_Bass.ErrorGetString(), 'TBassInputDevice.Start'); + Log.LogError('BASS_ChannelPlay: ' + AudioCore.ErrorGetString(), 'TBassInputDevice.Start'); Exit; end; @@ -223,7 +241,7 @@ begin if (not BASS_ChannelStop(RecordStream)) then begin - Log.LogError('BASS_ChannelStop: ' + TAudioCore_Bass.ErrorGetString(), 'TBassInputDevice.Stop'); + Log.LogError('BASS_ChannelStop: ' + AudioCore.ErrorGetString(), 'TBassInputDevice.Stop'); end; // TODO: Do not close the device here (takes too much time). @@ -241,7 +259,7 @@ begin // free data if (not BASS_RecordFree()) then begin - Log.LogError('BASS_RecordFree: ' + TAudioCore_Bass.ErrorGetString(), 'TBassInputDevice.Close'); + Log.LogError('BASS_RecordFree: ' + AudioCore.ErrorGetString(), 'TBassInputDevice.Close'); Result := false; end else @@ -255,20 +273,25 @@ end; function TBassInputDevice.GetVolume(): integer; var SourceIndex: integer; + lVolume: Single; begin + Result := 0; + SourceIndex := Ini.InputDeviceConfig[CfgIndex].Input-1; if (SourceIndex = -1) then begin // if default source used find selected source SourceIndex := GetInputSource(); if (SourceIndex = -1) then - begin - Result := 0; Exit; - end; end; - Result := LOWORD(BASS_RecordGetInput(SourceIndex)); + if (BASS_RecordGetInput(SourceIndex, lVolume) = -1) then + begin + Log.LogError('BASS_RecordGetInput: ' + AudioCore.ErrorGetString() , 'TBassInputDevice.GetVolume'); + Exit; + end; + Result := Round(lVolume * 100); end; procedure TBassInputDevice.SetVolume(Volume: integer); @@ -290,7 +313,10 @@ begin else if (Volume < 0) then Volume := 0; - BASS_RecordSetInput(SourceIndex, BASS_INPUT_LEVEL or Volume); + if (not BASS_RecordSetInput(SourceIndex, 0, Volume/100)) then + begin + Log.LogError('BASS_RecordSetInput: ' + AudioCore.ErrorGetString() , 'TBassInputDevice.SetVolume'); + end; end; @@ -309,6 +335,7 @@ var BassDeviceID: integer; BassDevice: TBassInputDevice; DeviceIndex: integer; + DeviceInfo: BASS_DEVICEINFO; SourceIndex: integer; RecordInfo: BASS_RECORDINFO; SelectedSourceIndex: integer; @@ -322,8 +349,7 @@ begin // checks for recording devices and puts them into an array while true do begin - Descr := BASS_RecordGetDeviceDescription(BassDeviceID); - if (Descr = nil) then + if (not BASS_RecordGetDeviceInfo(BassDeviceID, DeviceInfo)) then break; // try to initialize the device @@ -340,10 +366,13 @@ begin BassDevice := TBassInputDevice.Create(); AudioInputProcessor.DeviceList[DeviceIndex] := BassDevice; - BassDevice.DeviceIndex := DeviceIndex; + Descr := DeviceInfo.name; + BassDevice.BassDeviceID := BassDeviceID; BassDevice.Name := UnifyDeviceName(Descr, DeviceIndex); + // zero info-struct as some fields might not be set (e.g. freq is just set on Vista and MacOSX) + FillChar(RecordInfo, SizeOf(RecordInfo), 0); // retrieve recording device info BASS_RecordGetInfo(RecordInfo); @@ -410,7 +439,7 @@ begin BassDevice.Source[SourceIndex].Name := SourceName; // get input-source info - Flags := BASS_RecordGetInput(SourceIndex); + Flags := BASS_RecordGetInput(SourceIndex, PSingle(nil)^); if (Flags <> -1) then begin // is the current source a mic-source? @@ -436,6 +465,7 @@ end; function TAudioInput_Bass.InitializeRecord(): boolean; begin + AudioCore := TAudioCore_Bass.GetInstance(); Result := EnumDevices(); end; diff --git a/Game/Code/Classes/UAudioPlayback_Bass.pas b/Game/Code/Classes/UAudioPlayback_Bass.pas index 0fca9c72..2667bf6f 100644 --- a/Game/Code/Classes/UAudioPlayback_Bass.pas +++ b/Game/Code/Classes/UAudioPlayback_Bass.pas @@ -92,6 +92,7 @@ type end; var + AudioCore: TAudioCore_Bass; singleton_AudioPlaybackBass : IAudioPlayback; @@ -137,7 +138,7 @@ begin BASS_ChannelPlay(Handle, true); // start fade-in: slide from fadeStart- to fadeEnd-volume in FadeInTime - BASS_ChannelSlideAttributes(Handle, -1, TargetVolume, -101, Trunc(Time * 1000)); + BASS_ChannelSlideAttribute(Handle, BASS_ATTRIB_VOL, TargetVolume/100, Trunc(Time * 1000)); end; procedure TBassPlaybackStream.Pause(); @@ -157,10 +158,16 @@ end; function TBassPlaybackStream.GetVolume(): integer; var - volume: cardinal; + lVolume: single; begin - BASS_ChannelGetAttributes(Handle, PCardinal(nil)^, volume, PInteger(nil)^); - Result := volume; + if (not BASS_ChannelGetAttribute(Handle, BASS_ATTRIB_VOL, lVolume)) then + begin + Log.LogError('BASS_ChannelGetAttribute: ' + AudioCore.ErrorGetString(), + 'TBassPlaybackStream.GetVolume'); + Result := 0; + Exit; + end; + Result := Round(lVolume * 100); end; procedure TBassPlaybackStream.SetVolume(volume: integer); @@ -171,30 +178,30 @@ begin if volume > 100 then volume := 100; // set volume - BASS_ChannelSetAttributes(Handle, -1, volume, -101); + BASS_ChannelSetAttribute(Handle, BASS_ATTRIB_VOL, volume/100); end; function TBassPlaybackStream.GetPosition: real; var - bytes: integer; + bytes: QWORD; begin - bytes := BASS_ChannelGetPosition(Handle); + bytes := BASS_ChannelGetPosition(Handle, BASS_POS_BYTE); Result := BASS_ChannelBytes2Seconds(Handle, bytes); end; procedure TBassPlaybackStream.SetPosition(Time: real); var - bytes: integer; + bytes: QWORD; begin bytes := BASS_ChannelSeconds2Bytes(Handle, Time); - BASS_ChannelSetPosition(Handle, bytes); + BASS_ChannelSetPosition(Handle, bytes, BASS_POS_BYTE); end; function TBassPlaybackStream.GetLength(): real; var - bytes: integer; + bytes: QWORD; begin - bytes := BASS_ChannelGetLength(Handle); + bytes := BASS_ChannelGetLength(Handle, BASS_POS_BYTE); Result := BASS_ChannelBytes2Seconds(Handle, bytes); end; @@ -219,43 +226,38 @@ end; function TBassPlaybackStream.GetLoop(): boolean; var - info: BASS_CHANNELINFO; + flags: DWORD; begin - if not BASS_ChannelGetInfo(Handle, info) then + // retrieve channel flags + flags := BASS_ChannelFlags(Handle, 0, 0); + if (flags = -1) then begin - Log.LogError('BASS_ChannelGetInfo: ' + TAudioCore_Bass.ErrorGetString(), 'TBassPlaybackStream.GetLoop'); + Log.LogError('BASS_ChannelFlags: ' + AudioCore.ErrorGetString(), 'TBassPlaybackStream.GetLoop'); Result := false; Exit; end; - Result := (info.flags and BASS_SAMPLE_LOOP) <> 0; + Result := (flags and BASS_SAMPLE_LOOP) <> 0; end; procedure TBassPlaybackStream.SetLoop(Enabled: boolean); var - info: BASS_CHANNELINFO; + flags: DWORD; begin - // retrieve old flag-bits - if not BASS_ChannelGetInfo(Handle, info) then - begin - Log.LogError('BASS_ChannelGetInfo:' + TAudioCore_Bass.ErrorGetString(), 'TBassPlaybackStream.SetLoop'); - Exit; - end; - // set/unset loop-flag if (Enabled) then - info.flags := info.flags or BASS_SAMPLE_LOOP + flags := BASS_SAMPLE_LOOP else - info.flags := info.flags and not BASS_SAMPLE_LOOP; + flags := 0; // set new flag-bits - if not BASS_ChannelSetFlags(Handle, info.flags) then + if (BASS_ChannelFlags(Handle, flags, BASS_SAMPLE_LOOP) = -1) then begin - Log.LogError('BASS_ChannelSetFlags: ' + TAudioCore_Bass.ErrorGetString(), 'TBassPlaybackStream.SetLoop'); + Log.LogError('BASS_ChannelFlags: ' + AudioCore.ErrorGetString(), 'TBassPlaybackStream.SetLoop'); Exit; end; end; -procedure DSPProcHandler(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: DWORD); stdcall; +procedure DSPProcHandler(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: Pointer); {$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF} var effect: TSoundEffect; begin @@ -274,11 +276,10 @@ begin Exit; end; - // FIXME: casting of a pointer to Uint32 will fail on 64bit systems - dspHandle := BASS_ChannelSetDSP(Handle, @DSPProcHandler, DWORD(effect), 0); + dspHandle := BASS_ChannelSetDSP(Handle, @DSPProcHandler, effect, 0); if (dspHandle = 0) then begin - Log.LogError(TAudioCore_Bass.ErrorGetString(), 'TBassPlaybackStream.AddSoundEffect'); + Log.LogError(AudioCore.ErrorGetString(), 'TBassPlaybackStream.AddSoundEffect'); Exit; end; @@ -296,7 +297,7 @@ begin if not BASS_ChannelRemoveDSP(Handle, PHDSP(effect.EngineData)^) then begin - Log.LogError(TAudioCore_Bass.ErrorGetString(), 'TBassPlaybackStream.RemoveSoundEffect'); + Log.LogError(AudioCore.ErrorGetString(), 'TBassPlaybackStream.RemoveSoundEffect'); Exit; end; @@ -321,11 +322,10 @@ var begin Result := 0; - // Get Channel Data Mono and 256 Values - BASS_ChannelGetInfo(Handle, info); FillChar(data, sizeof(TPCMData), 0); // no support for non-stereo files at the moment + BASS_ChannelGetInfo(Handle, info); if (info.chans <> 2) then Exit; @@ -406,7 +406,7 @@ var BassDeviceID: DWORD; DeviceIndex: integer; Device: TBassOutputDevice; - Description: PChar; + DeviceInfo: BASS_DEVICEINFO; begin ClearOutputDeviceList(); @@ -416,13 +416,12 @@ begin while true do begin // Check for device - Description := BASS_GetDeviceDescription(BassDeviceID); - if (Description = nil) then + if (not BASS_GetDeviceInfo(BassDeviceID, DeviceInfo)) then break; // Set device info Device := TBassOutputDevice.Create(); - Device.Name := Description; + Device.Name := DeviceInfo.name; Device.BassDeviceID := BassDeviceID; // Add device to list @@ -440,14 +439,16 @@ var begin result := false; + AudioCore := TAudioCore_Bass.GetInstance(); + EnumDevices(); //Log.BenchmarkStart(4); //Log.LogStatus('Initializing Playback Subsystem', 'Music Initialize'); - if not BASS_Init(1, 44100, 0, 0, nil) then + if not BASS_Init(-1, 44100, 0, 0, nil) then begin - Log.LogError('Could not initialize BASS', 'Error'); + Log.LogError('Could not initialize BASS', 'TAudioPlayback_Bass.InitializePlayback'); Exit; end; @@ -460,7 +461,15 @@ begin result := true; end; -function DecodeStreamHandler(handle: HSTREAM; buffer: Pointer; length: DWORD; user: DWORD): DWORD; stdcall; +function TAudioPlayback_Bass.FinalizePlayback(): boolean; +begin + Close; + BASS_Free; + inherited FinalizePlayback(); + Result := true; +end; + +function DecodeStreamHandler(handle: HSTREAM; buffer: Pointer; length: DWORD; user: Pointer): DWORD; {$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF} var decodeStream: TAudioDecodeStream; bytes: integer; @@ -477,17 +486,8 @@ begin Result := bytes; end; -function TAudioPlayback_Bass.FinalizePlayback(): boolean; -begin - Close; - BASS_Free; - inherited FinalizePlayback(); - Result := true; -end; - function TAudioPlayback_Bass.OpenStream(const Filename: string): TAudioPlaybackStream; var - L: Integer; stream: HSTREAM; playbackStream: TBassExtDecoderPlaybackStream; decodeStream: TAudioDecodeStream; @@ -499,6 +499,8 @@ begin Result := nil; //Log.LogStatus('Loading Sound: "' + Filename + '"', 'LoadSoundFromFile'); + // TODO: use BASS_STREAM_PRESCAN for accurate seeking in VBR-files? + // disadvantage: seeking will slow down. stream := BASS_StreamCreateFile(False, PChar(Filename), 0, 0, 0); // check if BASS opened some erroneously recognized file-formats @@ -507,7 +509,8 @@ begin if BASS_ChannelGetInfo(stream, channelInfo) then begin fileExt := ExtractFileExt(Filename); - // BASS opens FLV-files although it cannot handle them + // BASS opens FLV-files (maybe others too) although it cannot handle them. + // Setting BASS_CONFIG_VERIFY to the max. value (100000) does not help. if ((fileExt = '.flv') and (channelInfo.ctype = BASS_CTYPE_STREAM_MP1)) then begin BASS_StreamFree(stream); @@ -526,7 +529,7 @@ begin if (AudioDecoder = nil) then begin Log.LogError('Failed to open "' + Filename + '", ' + - TAudioCore_Bass.ErrorGetString(BASS_ErrorGetCode()), 'TAudioPlayback_Bass.Load'); + AudioCore.ErrorGetString(), 'TAudioPlayback_Bass.Load'); Exit; end; @@ -538,20 +541,19 @@ begin end; formatInfo := decodeStream.GetAudioFormatInfo(); - if (not TAudioCore_Bass.ConvertAudioFormatToBASSFlags(formatInfo.Format, formatFlags)) then + if (not AudioCore.ConvertAudioFormatToBASSFlags(formatInfo.Format, formatFlags)) then begin Log.LogError('Unhandled sample-format in "' + Filename + '"', 'TAudioPlayback_Bass.Load'); FreeAndNil(decodeStream); Exit; end; - // FIXME: casting of a pointer to Uint32 will fail on 64bit systems stream := BASS_StreamCreate(Round(formatInfo.SampleRate), formatInfo.Channels, formatFlags, - @DecodeStreamHandler, DWORD(decodeStream)); + @DecodeStreamHandler, decodeStream); if (stream = 0) then begin Log.LogError('Failed to open "' + Filename + '", ' + - TAudioCore_Bass.ErrorGetString(BASS_ErrorGetCode()), 'TAudioPlayback_Bass.Load'); + AudioCore.ErrorGetString(BASS_ErrorGetCode()), 'TAudioPlayback_Bass.Load'); FreeAndNil(decodeStream); Exit; end; @@ -576,8 +578,8 @@ end; procedure TAudioPlayback_Bass.SetAppVolume(Volume: integer); begin - // Sets Volume only for this Application - BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, Volume); + // Sets Volume only for this Application (now ranges from 0..10000) + BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, Volume*100); end; diff --git a/Game/Code/Classes/UCommon.pas b/Game/Code/Classes/UCommon.pas index 026c2850..94f43d06 100644 --- a/Game/Code/Classes/UCommon.pas +++ b/Game/Code/Classes/UCommon.pas @@ -53,8 +53,16 @@ procedure DisableFloatingPointExceptions(); procedure SetDefaultNumericLocale();
procedure RestoreNumericLocale();
-{$IFNDEF win32}
+{$IFNDEF MSWINDOWS}
procedure ZeroMemory( Destination: Pointer; Length: DWORD );
+ function MakeLong(a, b: Word): Longint;
+ (*
+ #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))
+ *)
{$ENDIF}
function FileExistsInsensitive(var FileName: string): boolean;
@@ -233,7 +241,12 @@ end; procedure ZeroMemory( Destination: Pointer; Length: DWORD );
begin
FillChar( Destination^, Length, 0 );
-end; //ZeroMemory
+end;
+
+function MakeLong(A, B: Word): Longint;
+begin + Result := (LongInt(B) shl 16) + A; +end; (*
function QueryPerformanceCounter(lpPerformanceCount:TLARGEINTEGER):Bool;
@@ -755,7 +768,7 @@ end; * be ordered by title. In contrast to this an unstable algorithm (like QuickSort)
* may destroy an existing order, so the songs of an artist will not be ordered
* by title anymore after sorting by artist in the previous example.
- * If you do not need a stable algorithm, use TList.Sort() instead.
+ * If you do not need a stable algorithm, use TList.Sort() instead.
*)
procedure MergeSort(List: TList; CompareFunc: TListSortCompare);
var
diff --git a/Game/Code/lib/bass/MacOSX/Bass.pas b/Game/Code/lib/bass/MacOSX/Bass.pas deleted file mode 100755 index 284004d3..00000000 --- a/Game/Code/lib/bass/MacOSX/Bass.pas +++ /dev/null @@ -1,988 +0,0 @@ -{ - BASS 2.3 Audio Library, (c) 1999-2007 Ian Luck. - Please report bugs/suggestions/etc... to bass@un4seen.com - - See the BASS.CHM file for more complete documentation - - - How to install - ---------------- - Copy BASS.PAS to the \LIB subdirectory of your Delphi path or your project dir -} -unit Bass; - -{$I switches.inc} - -{$IFDEF DARWIN} - {$DEFINE DLL_CDECL} -{$ENDIF} - -interface - -uses - Windows; - -const - BASSVERSION = $203; // API version - - // Use these to test for error from functions that return a DWORD or QWORD - DW_ERROR = Cardinal(-1); // -1 (DWORD) - QW_ERROR = Int64(-1); // -1 (QWORD) - - // Error codes returned by BASS_GetErrorCode() - BASS_OK = 0; // all is OK - BASS_ERROR_MEM = 1; // memory error - BASS_ERROR_FILEOPEN = 2; // can't open the file - BASS_ERROR_DRIVER = 3; // can't find a free sound driver - BASS_ERROR_BUFLOST = 4; // the sample buffer was lost - please report this! - BASS_ERROR_HANDLE = 5; // invalid handle - BASS_ERROR_FORMAT = 6; // unsupported sample format - BASS_ERROR_POSITION = 7; // invalid playback position - BASS_ERROR_INIT = 8; // BASS_Init has not been successfully called - BASS_ERROR_START = 9; // BASS_Start has not been successfully called - BASS_ERROR_ALREADY = 14; // already initialized/paused/whatever - BASS_ERROR_NOPAUSE = 16; // not paused - BASS_ERROR_NOCHAN = 18; // can't get a free channel - BASS_ERROR_ILLTYPE = 19; // an illegal type was specified - BASS_ERROR_ILLPARAM = 20; // an illegal parameter was specified - BASS_ERROR_NO3D = 21; // no 3D support - BASS_ERROR_NOEAX = 22; // no EAX support - BASS_ERROR_DEVICE = 23; // illegal device number - BASS_ERROR_NOPLAY = 24; // not playing - BASS_ERROR_FREQ = 25; // illegal sample rate - BASS_ERROR_NOTFILE = 27; // the stream is not a file stream - BASS_ERROR_NOHW = 29; // no hardware voices available - BASS_ERROR_EMPTY = 31; // the MOD music has no sequence data - BASS_ERROR_NONET = 32; // no internet connection could be opened - BASS_ERROR_CREATE = 33; // couldn't create the file - BASS_ERROR_NOFX = 34; // effects are not enabled - BASS_ERROR_PLAYING = 35; // the channel is playing - BASS_ERROR_NOTAVAIL = 37; // requested data is not available - BASS_ERROR_DECODE = 38; // the channel is a "decoding channel" - BASS_ERROR_DX = 39; // a sufficient DirectX version is not installed - BASS_ERROR_TIMEOUT = 40; // connection timedout - BASS_ERROR_FILEFORM = 41; // unsupported file format - BASS_ERROR_SPEAKER = 42; // unavailable speaker - BASS_ERROR_VERSION = 43; // invalid BASS version (used by add-ons) - BASS_ERROR_CODEC = 44; // codec is not available/supported - BASS_ERROR_UNKNOWN = -1; // some other mystery error - - // Initialization flags - BASS_DEVICE_8BITS = 1; // use 8 bit resolution, else 16 bit - BASS_DEVICE_MONO = 2; // use mono, else stereo - BASS_DEVICE_3D = 4; // enable 3D functionality - { - If the BASS_DEVICE_3D flag is not specified when - initilizing BASS, then the 3D flags (BASS_SAMPLE_3D - and BASS_MUSIC_3D) are ignored when loading/creating - a sample/stream/music. - } - BASS_DEVICE_LATENCY = 256; // calculate device latency (BASS_INFO struct) - BASS_DEVICE_SPEAKERS = 2048; // force enabling of speaker assignment - BASS_DEVICE_NOSPEAKER = 4096; // ignore speaker arrangement - - // DirectSound interfaces (for use with BASS_GetDSoundObject) - BASS_OBJECT_DS = 1; // IDirectSound - BASS_OBJECT_DS3DL = 2; // IDirectSound3DListener - - // BASS_INFO flags (from DSOUND.H) - DSCAPS_CONTINUOUSRATE = $00000010; - { supports all sample rates between min/maxrate } - DSCAPS_EMULDRIVER = $00000020; - { device does NOT have hardware DirectSound support } - DSCAPS_CERTIFIED = $00000040; - { device driver has been certified by Microsoft } - { - The following flags tell what type of samples are - supported by HARDWARE mixing, all these formats are - supported by SOFTWARE mixing - } - DSCAPS_SECONDARYMONO = $00000100; // mono - DSCAPS_SECONDARYSTEREO = $00000200; // stereo - DSCAPS_SECONDARY8BIT = $00000400; // 8 bit - DSCAPS_SECONDARY16BIT = $00000800; // 16 bit - - // BASS_RECORDINFO flags (from DSOUND.H) - DSCCAPS_EMULDRIVER = DSCAPS_EMULDRIVER; - { device does NOT have hardware DirectSound recording support } - DSCCAPS_CERTIFIED = DSCAPS_CERTIFIED; - { device driver has been certified by Microsoft } - - // defines for formats field of BASS_RECORDINFO (from MMSYSTEM.H) - WAVE_FORMAT_1M08 = $00000001; // 11.025 kHz, Mono, 8-bit - WAVE_FORMAT_1S08 = $00000002; // 11.025 kHz, Stereo, 8-bit - WAVE_FORMAT_1M16 = $00000004; // 11.025 kHz, Mono, 16-bit - WAVE_FORMAT_1S16 = $00000008; // 11.025 kHz, Stereo, 16-bit - WAVE_FORMAT_2M08 = $00000010; // 22.05 kHz, Mono, 8-bit - WAVE_FORMAT_2S08 = $00000020; // 22.05 kHz, Stereo, 8-bit - WAVE_FORMAT_2M16 = $00000040; // 22.05 kHz, Mono, 16-bit - WAVE_FORMAT_2S16 = $00000080; // 22.05 kHz, Stereo, 16-bit - WAVE_FORMAT_4M08 = $00000100; // 44.1 kHz, Mono, 8-bit - WAVE_FORMAT_4S08 = $00000200; // 44.1 kHz, Stereo, 8-bit - WAVE_FORMAT_4M16 = $00000400; // 44.1 kHz, Mono, 16-bit - WAVE_FORMAT_4S16 = $00000800; // 44.1 kHz, Stereo, 16-bit - - // Sample info flags - BASS_SAMPLE_8BITS = 1; // 8 bit - BASS_SAMPLE_FLOAT = 256; // 32-bit floating-point - BASS_SAMPLE_MONO = 2; // mono, else stereo - BASS_SAMPLE_LOOP = 4; // looped - BASS_SAMPLE_3D = 8; // 3D functionality enabled - BASS_SAMPLE_SOFTWARE = 16; // it's NOT using hardware mixing - BASS_SAMPLE_MUTEMAX = 32; // muted at max distance (3D only) - BASS_SAMPLE_VAM = 64; // uses the DX7 voice allocation & management - BASS_SAMPLE_FX = 128; // old implementation of DX8 effects are enabled - BASS_SAMPLE_OVER_VOL = $10000; // override lowest volume - BASS_SAMPLE_OVER_POS = $20000; // override longest playing - BASS_SAMPLE_OVER_DIST = $30000; // override furthest from listener (3D only) - - BASS_STREAM_PRESCAN = $20000; // enable pin-point seeking (MP3/MP2/MP1) - BASS_MP3_SETPOS = BASS_STREAM_PRESCAN; - BASS_STREAM_AUTOFREE = $40000; // automatically free the stream when it stop/ends - BASS_STREAM_RESTRATE = $80000; // restrict the download rate of internet file streams - BASS_STREAM_BLOCK = $100000;// download/play internet file stream in small blocks - BASS_STREAM_DECODE = $200000;// don't play the stream, only decode (BASS_ChannelGetData) - BASS_STREAM_STATUS = $800000;// give server status info (HTTP/ICY tags) in DOWNLOADPROC - - BASS_MUSIC_FLOAT = BASS_SAMPLE_FLOAT; // 32-bit floating-point - BASS_MUSIC_MONO = BASS_SAMPLE_MONO; // force mono mixing (less CPU usage) - BASS_MUSIC_LOOP = BASS_SAMPLE_LOOP; // loop music - BASS_MUSIC_3D = BASS_SAMPLE_3D; // enable 3D functionality - BASS_MUSIC_FX = BASS_SAMPLE_FX; // enable old implementation of DX8 effects - BASS_MUSIC_AUTOFREE = BASS_STREAM_AUTOFREE; // automatically free the music when it stop/ends - BASS_MUSIC_DECODE = BASS_STREAM_DECODE; // don't play the music, only decode (BASS_ChannelGetData) - BASS_MUSIC_PRESCAN = BASS_STREAM_PRESCAN; // calculate playback length - BASS_MUSIC_CALCLEN = BASS_MUSIC_PRESCAN; - BASS_MUSIC_RAMP = $200; // normal ramping - BASS_MUSIC_RAMPS = $400; // sensitive ramping - BASS_MUSIC_SURROUND = $800; // surround sound - BASS_MUSIC_SURROUND2 = $1000; // surround sound (mode 2) - BASS_MUSIC_FT2MOD = $2000; // play .MOD as FastTracker 2 does - BASS_MUSIC_PT1MOD = $4000; // play .MOD as ProTracker 1 does - BASS_MUSIC_NONINTER = $10000; // non-interpolated mixing - BASS_MUSIC_POSRESET = $8000; // stop all notes when moving position - BASS_MUSIC_POSRESETEX = $400000; // stop all notes and reset bmp/etc when moving position - BASS_MUSIC_STOPBACK = $80000; // stop the music on a backwards jump effect - BASS_MUSIC_NOSAMPLE = $100000; // don't load the samples - - // Speaker assignment flags - BASS_SPEAKER_FRONT = $1000000; // front speakers - BASS_SPEAKER_REAR = $2000000; // rear/side speakers - BASS_SPEAKER_CENLFE = $3000000; // center & LFE speakers (5.1) - BASS_SPEAKER_REAR2 = $4000000; // rear center speakers (7.1) - BASS_SPEAKER_LEFT = $10000000; // modifier: left - BASS_SPEAKER_RIGHT = $20000000; // modifier: right - BASS_SPEAKER_FRONTLEFT = BASS_SPEAKER_FRONT or BASS_SPEAKER_LEFT; - BASS_SPEAKER_FRONTRIGHT = BASS_SPEAKER_FRONT or BASS_SPEAKER_RIGHT; - BASS_SPEAKER_REARLEFT = BASS_SPEAKER_REAR or BASS_SPEAKER_LEFT; - BASS_SPEAKER_REARRIGHT = BASS_SPEAKER_REAR or BASS_SPEAKER_RIGHT; - BASS_SPEAKER_CENTER = BASS_SPEAKER_CENLFE or BASS_SPEAKER_LEFT; - BASS_SPEAKER_LFE = BASS_SPEAKER_CENLFE or BASS_SPEAKER_RIGHT; - BASS_SPEAKER_REAR2LEFT = BASS_SPEAKER_REAR2 or BASS_SPEAKER_LEFT; - BASS_SPEAKER_REAR2RIGHT = BASS_SPEAKER_REAR2 or BASS_SPEAKER_RIGHT; - - BASS_UNICODE = $80000000; - - BASS_RECORD_PAUSE = $8000; // start recording paused - - // DX7 voice allocation flags - BASS_VAM_HARDWARE = 1; - { - Play the sample in hardware. If no hardware voices are available then - the "play" call will fail - } - BASS_VAM_SOFTWARE = 2; - { - Play the sample in software (ie. non-accelerated). No other VAM flags - may be used together with this flag. - } - - // DX7 voice management flags - { - These flags enable hardware resource stealing... if the hardware has no - available voices, a currently playing buffer will be stopped to make room - for the new buffer. NOTE: only samples loaded/created with the - BASS_SAMPLE_VAM flag are considered for termination by the DX7 voice - management. - } - BASS_VAM_TERM_TIME = 4; - { - If there are no free hardware voices, the buffer to be terminated will be - the one with the least time left to play. - } - BASS_VAM_TERM_DIST = 8; - { - If there are no free hardware voices, the buffer to be terminated will be - one that was loaded/created with the BASS_SAMPLE_MUTEMAX flag and is - beyond - it's max distance. If there are no buffers that match this criteria, then - the "play" call will fail. - } - BASS_VAM_TERM_PRIO = 16; - { - If there are no free hardware voices, the buffer to be terminated will be - the one with the lowest priority. - } - - // BASS_CHANNELINFO types - BASS_CTYPE_SAMPLE = 1; - BASS_CTYPE_RECORD = 2; - BASS_CTYPE_STREAM = $10000; - BASS_CTYPE_STREAM_OGG = $10002; - BASS_CTYPE_STREAM_MP1 = $10003; - BASS_CTYPE_STREAM_MP2 = $10004; - BASS_CTYPE_STREAM_MP3 = $10005; - BASS_CTYPE_STREAM_AIFF = $10006; - BASS_CTYPE_STREAM_WAV = $40000; // WAVE flag, LOWORD=codec - BASS_CTYPE_STREAM_WAV_PCM = $50001; - BASS_CTYPE_STREAM_WAV_FLOAT = $50003; - BASS_CTYPE_MUSIC_MOD = $20000; - BASS_CTYPE_MUSIC_MTM = $20001; - BASS_CTYPE_MUSIC_S3M = $20002; - BASS_CTYPE_MUSIC_XM = $20003; - BASS_CTYPE_MUSIC_IT = $20004; - BASS_CTYPE_MUSIC_MO3 = $00100; // MO3 flag - - // 3D channel modes - BASS_3DMODE_NORMAL = 0; - { normal 3D processing } - BASS_3DMODE_RELATIVE = 1; - { - The channel's 3D position (position/velocity/ - orientation) are relative to the listener. When the - listener's position/velocity/orientation is changed - with BASS_Set3DPosition, the channel's position - relative to the listener does not change. - } - BASS_3DMODE_OFF = 2; - { - Turn off 3D processing on the channel, the sound will - be played in the center. - } - - // EAX environments, use with BASS_SetEAXParameters - EAX_ENVIRONMENT_GENERIC = 0; - EAX_ENVIRONMENT_PADDEDCELL = 1; - EAX_ENVIRONMENT_ROOM = 2; - EAX_ENVIRONMENT_BATHROOM = 3; - EAX_ENVIRONMENT_LIVINGROOM = 4; - EAX_ENVIRONMENT_STONEROOM = 5; - EAX_ENVIRONMENT_AUDITORIUM = 6; - EAX_ENVIRONMENT_CONCERTHALL = 7; - EAX_ENVIRONMENT_CAVE = 8; - EAX_ENVIRONMENT_ARENA = 9; - EAX_ENVIRONMENT_HANGAR = 10; - EAX_ENVIRONMENT_CARPETEDHALLWAY = 11; - EAX_ENVIRONMENT_HALLWAY = 12; - EAX_ENVIRONMENT_STONECORRIDOR = 13; - EAX_ENVIRONMENT_ALLEY = 14; - EAX_ENVIRONMENT_FOREST = 15; - EAX_ENVIRONMENT_CITY = 16; - EAX_ENVIRONMENT_MOUNTAINS = 17; - EAX_ENVIRONMENT_QUARRY = 18; - EAX_ENVIRONMENT_PLAIN = 19; - EAX_ENVIRONMENT_PARKINGLOT = 20; - EAX_ENVIRONMENT_SEWERPIPE = 21; - EAX_ENVIRONMENT_UNDERWATER = 22; - EAX_ENVIRONMENT_DRUGGED = 23; - EAX_ENVIRONMENT_DIZZY = 24; - EAX_ENVIRONMENT_PSYCHOTIC = 25; - // total number of environments - EAX_ENVIRONMENT_COUNT = 26; - - // software 3D mixing algorithm modes (used with BASS_Set3DAlgorithm) - BASS_3DALG_DEFAULT = 0; - { - default algorithm (currently translates to BASS_3DALG_OFF) - } - BASS_3DALG_OFF = 1; - { - Uses normal left and right panning. The vertical axis is ignored except - for scaling of volume due to distance. Doppler shift and volume scaling - are still applied, but the 3D filtering is not performed. This is the - most CPU efficient software implementation, but provides no virtual 3D - audio effect. Head Related Transfer Function processing will not be done. - Since only normal stereo panning is used, a channel using this algorithm - may be accelerated by a 2D hardware voice if no free 3D hardware voices - are available. - } - BASS_3DALG_FULL = 2; - { - This algorithm gives the highest quality 3D audio effect, but uses more - CPU. Requires Windows 98 2nd Edition or Windows 2000 that uses WDM - drivers, if this mode is not available then BASS_3DALG_OFF will be used - instead. - } - BASS_3DALG_LIGHT = 3; - { - This algorithm gives a good 3D audio effect, and uses less CPU than the - FULL mode. Requires Windows 98 2nd Edition or Windows 2000 that uses WDM - drivers, if this mode is not available then BASS_3DALG_OFF will be used - instead. - } - - { - Sync types (with BASS_ChannelSetSync() "param" and - SYNCPROC "data" definitions) & flags. - } - BASS_SYNC_POS = 0; - { - Sync when a channel reaches a position. - param: position in bytes - data : not used - } - BASS_SYNC_END = 2; - { - Sync when a channel reaches the end. - param: not used - data : not used - } - BASS_SYNC_META = 4; - { - Sync when metadata is received in a stream. - param: not used - data : pointer to the metadata - } - BASS_SYNC_SLIDE = 5; - { - Sync when an attribute slide is completed. - param: not used - data : the type of slide completed (one of the BASS_SLIDE_xxx values) - } - BASS_SYNC_STALL = 6; - { - Sync when playback has stalled. - param: not used - data : 0=stalled, 1=resumed - } - BASS_SYNC_DOWNLOAD = 7; - { - Sync when downloading of an internet (or "buffered" user file) stream has ended. - param: not used - data : not used - } - BASS_SYNC_FREE = 8; - { - Sync when a channel is freed. - param: not used - data : not used - } - BASS_SYNC_SETPOS = 11; - { - Sync when a channel's position is set. - param: not used - data : 0 = playback buffer not flushed, 1 = playback buffer flushed - } - BASS_SYNC_MUSICPOS = 10; - { - Sync when a MOD music reaches an order:row position. - param: LOWORD=order (0=first, -1=all) HIWORD=row (0=first, -1=all) - data : LOWORD=order HIWORD=row - } - BASS_SYNC_MUSICINST = 1; - { - Sync when an instrument (sample for the non-instrument based formats) - is played in a MOD music (not including retrigs). - param: LOWORD=instrument (1=first) HIWORD=note (0=c0...119=b9, -1=all) - data : LOWORD=note HIWORD=volume (0-64) - } - BASS_SYNC_MUSICFX = 3; - { - Sync when the "sync" effect (XM/MTM/MOD: E8x/Wxx, IT/S3M: S2x) is used. - param: 0:data=pos, 1:data="x" value - data : param=0: LOWORD=order HIWORD=row, param=1: "x" value - } - BASS_SYNC_MESSAGE = $20000000; - { FLAG: post a Windows message (instead of callback) - When using a window message "callback", the message to post is given in the "proc" - parameter of BASS_ChannelSetSync, and is posted to the window specified in the BASS_Init - call. The message parameters are: WPARAM = data, LPARAM = user. - } - BASS_SYNC_MIXTIME = $40000000; - { FLAG: sync at mixtime, else at playtime } - BASS_SYNC_ONETIME = $80000000; - { FLAG: sync only once, else continuously } - - // BASS_ChannelIsActive return values - BASS_ACTIVE_STOPPED = 0; - BASS_ACTIVE_PLAYING = 1; - BASS_ACTIVE_STALLED = 2; - BASS_ACTIVE_PAUSED = 3; - - // BASS_ChannelIsSliding return flags - BASS_SLIDE_FREQ = 1; - BASS_SLIDE_VOL = 2; - BASS_SLIDE_PAN = 4; - - // BASS_ChannelGetData flags - BASS_DATA_AVAILABLE = 0; // query how much data is buffered - BASS_DATA_FLOAT = $40000000; // flag: return floating-point sample data - BASS_DATA_FFT512 = $80000000; // 512 sample FFT - BASS_DATA_FFT1024 = $80000001; // 1024 FFT - BASS_DATA_FFT2048 = $80000002; // 2048 FFT - BASS_DATA_FFT4096 = $80000003; // 4096 FFT - BASS_DATA_FFT8192 = $80000004; // 8192 FFT - BASS_DATA_FFT_INDIVIDUAL = $10; // FFT flag: FFT for each channel, else all combined - BASS_DATA_FFT_NOWINDOW = $20; // FFT flag: no Hanning window - - // BASS_ChannelGetTags types : what's returned - BASS_TAG_ID3 = 0; // ID3v1 tags : 128 byte block - BASS_TAG_ID3V2 = 1; // ID3v2 tags : variable length block - BASS_TAG_OGG = 2; // OGG comments : array of null-terminated strings - BASS_TAG_HTTP = 3; // HTTP headers : array of null-terminated strings - BASS_TAG_ICY = 4; // ICY headers : array of null-terminated strings - BASS_TAG_META = 5; // ICY metadata : null-terminated string - BASS_TAG_VENDOR = 9; // OGG encoder : null-terminated string - BASS_TAG_LYRICS3 = 10; // Lyric3v2 tag : ASCII string - BASS_TAG_RIFF_INFO = $100; // RIFF/WAVE tags : array of null-terminated ANSI strings - BASS_TAG_MUSIC_NAME = $10000; // MOD music name : ANSI string - BASS_TAG_MUSIC_MESSAGE = $10001; // MOD message : ANSI string - BASS_TAG_MUSIC_INST = $10100; // + instrument #, MOD instrument name : ANSI string - BASS_TAG_MUSIC_SAMPLE = $10300; // + sample #, MOD sample name : ANSI string - - BASS_FX_CHORUS = 0; // GUID_DSFX_STANDARD_CHORUS - BASS_FX_COMPRESSOR = 1; // GUID_DSFX_STANDARD_COMPRESSOR - BASS_FX_DISTORTION = 2; // GUID_DSFX_STANDARD_DISTORTION - BASS_FX_ECHO = 3; // GUID_DSFX_STANDARD_ECHO - BASS_FX_FLANGER = 4; // GUID_DSFX_STANDARD_FLANGER - BASS_FX_GARGLE = 5; // GUID_DSFX_STANDARD_GARGLE - BASS_FX_I3DL2REVERB = 6; // GUID_DSFX_STANDARD_I3DL2REVERB - BASS_FX_PARAMEQ = 7; // GUID_DSFX_STANDARD_PARAMEQ - BASS_FX_REVERB = 8; // GUID_DSFX_WAVES_REVERB - - BASS_FX_PHASE_NEG_180 = 0; - BASS_FX_PHASE_NEG_90 = 1; - BASS_FX_PHASE_ZERO = 2; - BASS_FX_PHASE_90 = 3; - BASS_FX_PHASE_180 = 4; - - // BASS_RecordSetInput flags - BASS_INPUT_OFF = $10000; - BASS_INPUT_ON = $20000; - BASS_INPUT_LEVEL = $40000; - - BASS_INPUT_TYPE_MASK = $ff000000; - BASS_INPUT_TYPE_UNDEF = $00000000; - BASS_INPUT_TYPE_DIGITAL = $01000000; - BASS_INPUT_TYPE_LINE = $02000000; - BASS_INPUT_TYPE_MIC = $03000000; - BASS_INPUT_TYPE_SYNTH = $04000000; - BASS_INPUT_TYPE_CD = $05000000; - BASS_INPUT_TYPE_PHONE = $06000000; - BASS_INPUT_TYPE_SPEAKER = $07000000; - BASS_INPUT_TYPE_WAVE = $08000000; - BASS_INPUT_TYPE_AUX = $09000000; - BASS_INPUT_TYPE_ANALOG = $0a000000; - - // BASS_SetNetConfig flags - BASS_NET_TIMEOUT = 0; - BASS_NET_BUFFER = 1; - - // BASS_StreamGetFilePosition modes - BASS_FILEPOS_CURRENT = 0; - BASS_FILEPOS_DECODE = BASS_FILEPOS_CURRENT; - BASS_FILEPOS_DOWNLOAD = 1; - BASS_FILEPOS_END = 2; - BASS_FILEPOS_START = 3; - BASS_FILEPOS_CONNECTED = 4; - - // STREAMFILEPROC actions - BASS_FILE_CLOSE = 0; - BASS_FILE_READ = 1; - BASS_FILE_LEN = 3; - BASS_FILE_SEEK = 4; - - BASS_STREAMPROC_END = $80000000; // end of user stream flag - - // BASS_MusicSet/GetAttribute options - BASS_MUSIC_ATTRIB_AMPLIFY = 0; - BASS_MUSIC_ATTRIB_PANSEP = 1; - BASS_MUSIC_ATTRIB_PSCALER = 2; - BASS_MUSIC_ATTRIB_BPM = 3; - BASS_MUSIC_ATTRIB_SPEED = 4; - BASS_MUSIC_ATTRIB_VOL_GLOBAL = 5; - BASS_MUSIC_ATTRIB_VOL_CHAN = $100; // + channel # - BASS_MUSIC_ATTRIB_VOL_INST = $200; // + instrument # - - // BASS_Set/GetConfig options - BASS_CONFIG_BUFFER = 0; - BASS_CONFIG_UPDATEPERIOD = 1; - BASS_CONFIG_MAXVOL = 3; - BASS_CONFIG_GVOL_SAMPLE = 4; - BASS_CONFIG_GVOL_STREAM = 5; - BASS_CONFIG_GVOL_MUSIC = 6; - BASS_CONFIG_CURVE_VOL = 7; - BASS_CONFIG_CURVE_PAN = 8; - BASS_CONFIG_FLOATDSP = 9; - BASS_CONFIG_3DALGORITHM = 10; - BASS_CONFIG_NET_TIMEOUT = 11; - BASS_CONFIG_NET_BUFFER = 12; - BASS_CONFIG_PAUSE_NOPLAY = 13; - BASS_CONFIG_NET_PREBUF = 15; - BASS_CONFIG_NET_AGENT = 16; - BASS_CONFIG_NET_PROXY = 17; - BASS_CONFIG_NET_PASSIVE = 18; - BASS_CONFIG_REC_BUFFER = 19; - BASS_CONFIG_NET_PLAYLIST = 21; - BASS_CONFIG_MUSIC_VIRTUAL = 22; - -type - DWORD = cardinal; - BOOL = LongBool; - FLOAT = Single; - QWORD = int64; // 64-bit (replace "int64" with "comp" if using Delphi 3) - - HMUSIC = DWORD; // MOD music handle - HSAMPLE = DWORD; // sample handle - HCHANNEL = DWORD; // playing sample's channel handle - HSTREAM = DWORD; // sample stream handle - HRECORD = DWORD; // recording handle - HSYNC = DWORD; // synchronizer handle - HDSP = DWORD; // DSP handle - HFX = DWORD; // DX8 effect handle - HPLUGIN = DWORD; // Plugin handle - - BASS_INFO = record - flags: DWORD; // device capabilities (DSCAPS_xxx flags) - hwsize: DWORD; // size of total device hardware memory - hwfree: DWORD; // size of free device hardware memory - freesam: DWORD; // number of free sample slots in the hardware - free3d: DWORD; // number of free 3D sample slots in the hardware - minrate: DWORD; // min sample rate supported by the hardware - maxrate: DWORD; // max sample rate supported by the hardware - eax: BOOL; // device supports EAX? (always FALSE if BASS_DEVICE_3D was not used) - minbuf: DWORD; // recommended minimum buffer length in ms (requires BASS_DEVICE_LATENCY) - dsver: DWORD; // DirectSound version - latency: DWORD; // delay (in ms) before start of playback (requires BASS_DEVICE_LATENCY) - initflags: DWORD; // "flags" parameter of BASS_Init call - speakers: DWORD; // number of speakers available - driver: PChar; // driver - freq: DWORD; // current output rate (OSX only) - end; - - BASS_RECORDINFO = record - flags: DWORD; // device capabilities (DSCCAPS_xxx flags) - formats: DWORD; // supported standard formats (WAVE_FORMAT_xxx flags) - inputs: DWORD; // number of inputs - singlein: BOOL; // only 1 input can be set at a time - driver: PChar; // driver - freq: DWORD; // current input rate (OSX only) - end; - - BASS_CHANNELINFO = record - freq: DWORD; // default playback rate - chans: DWORD; // channels - flags: DWORD; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags - ctype: DWORD; // type of channel - origres: DWORD; // original resolution - plugin: HPLUGIN; // plugin - end; - - BASS_PLUGINFORM = record - ctype: DWORD; // channel type - name: PChar; // format description - exts: PChar; // file extension filter ( *.ext1;*.ext2;etc...) - end; - PBASS_PLUGINFORMS = ^TBASS_PLUGINFORMS; - TBASS_PLUGINFORMS = array[0..maxInt div sizeOf(BASS_PLUGINFORM) - 1] of BASS_PLUGINFORM; - - BASS_PLUGININFO = record - version: DWORD; // version (same form as BASS_GetVersion) - formatc: DWORD; // number of formats - formats: PBASS_PLUGINFORMS; // the array of formats - end; - PBASS_PLUGININFO = ^BASS_PLUGININFO; - - // Sample info structure - BASS_SAMPLE = record - freq: DWORD; // default playback rate - volume: DWORD; // default volume (0-100) - pan: Integer; // default pan (-100=left, 0=middle, 100=right) - flags: DWORD; // BASS_SAMPLE_xxx flags - length: DWORD; // length (in samples, not bytes) - max: DWORD; // maximum simultaneous playbacks - origres: DWORD; // original resolution - chans: DWORD; // number of channels - mingap: DWORD; // minimum gap (ms) between creating channels - { - The following are the samples default 3D attributes - (if the sample is 3D, BASS_SAMPLE_3D is in flags) - see BASS_ChannelSet3DAttributes - } - mode3d: DWORD; // BASS_3DMODE_xxx mode - mindist: FLOAT; // minimum distance - maxdist: FLOAT; // maximum distance - iangle: DWORD; // angle of inside projection cone - oangle: DWORD; // angle of outside projection cone - outvol: DWORD; // delta-volume outside the projection cone - { - The following are the defaults used if the sample uses the DirectX 7 - voice allocation/management features. - } - vam: DWORD; // voice allocation/management flags (BASS_VAM_xxx) - priority: DWORD; // priority (0=lowest, $ffffffff=highest) - end; - - // 3D vector (for 3D positions/velocities/orientations) - BASS_3DVECTOR = record - x: FLOAT; // +=right, -=left - y: FLOAT; // +=up, -=down - z: FLOAT; // +=front, -=behind - end; - - BASS_FXCHORUS = record - fWetDryMix: FLOAT; - fDepth: FLOAT; - fFeedback: FLOAT; - fFrequency: FLOAT; - lWaveform: DWORD; // 0=triangle, 1=sine - fDelay: FLOAT; - lPhase: DWORD; // BASS_FX_PHASE_xxx - end; - - BASS_FXCOMPRESSOR = record - fGain: FLOAT; - fAttack: FLOAT; - fRelease: FLOAT; - fThreshold: FLOAT; - fRatio: FLOAT; - fPredelay: FLOAT; - end; - - BASS_FXDISTORTION = record - fGain: FLOAT; - fEdge: FLOAT; - fPostEQCenterFrequency: FLOAT; - fPostEQBandwidth: FLOAT; - fPreLowpassCutoff: FLOAT; - end; - - BASS_FXECHO = record - fWetDryMix: FLOAT; - fFeedback: FLOAT; - fLeftDelay: FLOAT; - fRightDelay: FLOAT; - lPanDelay: BOOL; - end; - - BASS_FXFLANGER = record - fWetDryMix: FLOAT; - fDepth: FLOAT; - fFeedback: FLOAT; - fFrequency: FLOAT; - lWaveform: DWORD; // 0=triangle, 1=sine - fDelay: FLOAT; - lPhase: DWORD; // BASS_FX_PHASE_xxx - end; - - BASS_FXGARGLE = record - dwRateHz: DWORD; // Rate of modulation in hz - dwWaveShape: DWORD; // 0=triangle, 1=square - end; - - BASS_FXI3DL2REVERB = record - lRoom: Longint; // [-10000, 0] default: -1000 mB - lRoomHF: Longint; // [-10000, 0] default: 0 mB - flRoomRolloffFactor: FLOAT; // [0.0, 10.0] default: 0.0 - flDecayTime: FLOAT; // [0.1, 20.0] default: 1.49s - flDecayHFRatio: FLOAT; // [0.1, 2.0] default: 0.83 - lReflections: Longint; // [-10000, 1000] default: -2602 mB - flReflectionsDelay: FLOAT; // [0.0, 0.3] default: 0.007 s - lReverb: Longint; // [-10000, 2000] default: 200 mB - flReverbDelay: FLOAT; // [0.0, 0.1] default: 0.011 s - flDiffusion: FLOAT; // [0.0, 100.0] default: 100.0 % - flDensity: FLOAT; // [0.0, 100.0] default: 100.0 % - flHFReference: FLOAT; // [20.0, 20000.0] default: 5000.0 Hz - end; - - BASS_FXPARAMEQ = record - fCenter: FLOAT; - fBandwidth: FLOAT; - fGain: FLOAT; - end; - - BASS_FXREVERB = record - fInGain: FLOAT; // [-96.0,0.0] default: 0.0 dB - fReverbMix: FLOAT; // [-96.0,0.0] default: 0.0 db - fReverbTime: FLOAT; // [0.001,3000.0] default: 1000.0 ms - fHighFreqRTRatio: FLOAT; // [0.001,0.999] default: 0.001 - end; - - // callback function types - STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} - { - User stream callback function. NOTE: A stream function should obviously be as - quick as possible, other streams (and MOD musics) can't be mixed until - it's finished. - 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. - } - - STREAMFILEPROC = function(action, param1, param2, user: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} - { - User file stream callback function. - action : The action to perform, one of BASS_FILE_xxx values. - param1 : Depends on "action" - param2 : Depends on "action" - user : The 'user' parameter value given when calling BASS_StreamCreate - RETURN : Depends on "action" - } - - DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: DWORD); {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} - { - 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 - } - - SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: DWORD); {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} - { - Sync callback function. NOTE: a sync callback function should be very - quick as other syncs cannot be processed until it has finished. If the - sync is a "mixtime" sync, then other streams and MOD musics can not be - mixed until it's finished either. - 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 - } - - DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: DWORD); {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} - { - DSP callback function. NOTE: A DSP function should obviously be as quick - as possible... other DSP functions, streams and MOD musics can not be - processed until it's finished. - 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 - } - - RECORDPROC = function(handle: HRECORD; const buffer: Pointer; length: DWORD; user: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} - { - 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 - } - - -// Functions -const - -{$IFDEF MSWINDOWS} - bassdll = 'bass.dll'; -{$ENDIF} -{$IFDEF DARWIN} - bassdll = 'libbass.dylib'; -{$ENDIF} - -function BASS_SetConfig(option, value: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetConfig(option: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetVersion: DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetDeviceDescription(device: DWORD): PChar; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ErrorGetCode: Integer; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Init(device: Integer; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SetDevice(device: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetDevice: DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Free: BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetDSoundObject(obj: DWORD): Pointer; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetInfo(var info: BASS_INFO): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Update: BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetCPU: FLOAT; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Start: BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Stop: BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Pause: BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SetVolume(volume: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetVolume: Integer; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; - -function BASS_PluginLoad(filename: PChar; flags: DWORD): HPLUGIN; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_PluginFree(handle: HPLUGIN): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_PluginGetInfo(handle: HPLUGIN): PBASS_PLUGININFO; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; - -function BASS_Set3DFactors(distf, rollf, doppf: FLOAT): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Get3DFactors(var distf, rollf, doppf: FLOAT): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Set3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_Get3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -procedure BASS_Apply3D; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -{$IFDEF MSWINDOWS} -function BASS_SetEAXParameters(env: Integer; vol, decay, damp: FLOAT): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_GetEAXParameters(var env: DWORD; var vol, decay, damp: FLOAT): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -{$ENDIF} - -function BASS_MusicLoad(mem: BOOL; f: Pointer; offset, length, flags, freq: DWORD): HMUSIC; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_MusicFree(handle: HMUSIC): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_MusicSetAttribute(handle: HMUSIC; attrib,value: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_MusicGetAttribute(handle: HMUSIC; attrib: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_MusicGetOrders(handle: HMUSIC): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_MusicGetOrderPosition(handle: HMUSIC): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; - -function BASS_SampleLoad(mem: BOOL; f: Pointer; offset, length, max, flags: DWORD): HSAMPLE; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SampleCreate(length, freq, chans, max, flags: DWORD): Pointer; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SampleCreateDone: HSAMPLE; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SampleFree(handle: HSAMPLE): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SampleGetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SampleSetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SampleGetChannel(handle: HSAMPLE; onlynew: BOOL): HCHANNEL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SampleGetChannels(handle: HSAMPLE; channels: Pointer): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_SampleStop(handle: HSAMPLE): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; - -function BASS_StreamCreate(freq, chans, flags: DWORD; proc: Pointer; user: DWORD): HSTREAM; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_StreamCreateFile(mem: BOOL; f: Pointer; offset, length, flags: DWORD): HSTREAM; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_StreamCreateURL(url: PChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: DWORD):HSTREAM; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_StreamCreateFileUser(buffered: BOOL; flags: DWORD; proc: STREAMFILEPROC; user: DWORD): HSTREAM; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_StreamFree(handle: HSTREAM): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_StreamGetFilePosition(handle:HSTREAM; mode:DWORD) : DWORD;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_StreamGetLength(handle: DWORD): QWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll name 'BASS_ChannelGetLength'; - -function BASS_RecordGetDeviceDescription(devnum: DWORD):PChar;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_RecordInit(device: Integer):BOOL;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_RecordSetDevice(device: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_RecordGetDevice: DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_RecordFree:BOOL;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_RecordGetInfo(var info:BASS_RECORDINFO):BOOL;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_RecordGetInputName(input:Integer):PChar;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_RecordSetInput(input:Integer; setting:DWORD):BOOL;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_RecordGetInput(input:Integer):DWORD;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_RecordStart(freq,chans,flags:DWORD; proc:RECORDPROC; user:DWORD):HRECORD;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; - -function BASS_ChannelBytes2Seconds(handle: DWORD; pos: QWORD): FLOAT; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_ChannelSeconds2Bytes(handle: DWORD; pos: FLOAT): QWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_ChannelGetDevice(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSetDevice(handle, device: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelIsActive(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_ChannelGetInfo(handle: DWORD; var info:BASS_CHANNELINFO):BOOL;{$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_ChannelGetTags(handle: HSTREAM; tags : DWORD): PChar; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSetFlags(handle, flags: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelPreBuf(handle, length: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelStop(handle: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelPause(handle: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSetAttributes(handle: DWORD; freq, volume, pan: Integer): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelGetAttributes(handle: DWORD; var freq, volume: DWORD; var pan: Integer): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSlideAttributes(handle: DWORD; freq, volume, pan: Integer; time: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelIsSliding(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF}external bassdll; -function BASS_ChannelSet3DAttributes(handle: DWORD; mode: Integer; min, max: FLOAT; iangle, oangle, outvol: Integer): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelGet3DAttributes(handle: DWORD; var mode: DWORD; var min, max: FLOAT; var iangle, oangle, outvol: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelGet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelGetLength(handle: DWORD): QWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSetPosition(handle: DWORD; pos: QWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelGetPosition(handle: DWORD): QWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelGetLevel(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelGetData(handle: DWORD; buffer: Pointer; length: DWORD): DWORD; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSetSync(handle: DWORD; stype: DWORD; param: QWORD; proc: SYNCPROC; user: DWORD): HSYNC; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelRemoveSync(handle: DWORD; sync: HSYNC): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSetDSP(handle: DWORD; proc: DSPPROC; user: DWORD; priority: Integer): HDSP; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelRemoveDSP(handle: DWORD; dsp: HDSP): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -{$IFDEF MSWINDOWS} -function BASS_ChannelSetEAXMix(handle: DWORD; mix: FLOAT): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelGetEAXMix(handle: DWORD; var mix: FLOAT): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -{$ENDIF} -function BASS_ChannelSetLink(handle, chan: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelRemoveLink(handle, chan: DWORD): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelSetFX(handle, etype: DWORD; priority: Integer): HFX; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_ChannelRemoveFX(handle: DWORD; fx: HFX): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; - -function BASS_FXSetParameters(handle: HFX; par: Pointer): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_FXGetParameters(handle: HFX; par: Pointer): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; -function BASS_FXReset(handle: HFX): BOOL; {$IFDEF DLL_STDCALL} stdcall; {$ENDIF} {$IFDEF DLL_CDECL} cdecl; {$ENDIF} external bassdll; - - -function BASS_SPEAKER_N(n: DWORD): DWORD; -function MAKEMUSICPOS(order,row: DWORD): DWORD; -{$IFDEF MSWINDOWS} -function BASS_SetEAXPreset(env: Integer): BOOL; -{ - This function is defined in the implementation part of this unit. - It is not part of BASS.DLL but an extra function which makes it easier - to set the predefined EAX environments. - env : a EAX_ENVIRONMENT_xxx constant -} -{$ENDIF} - -implementation - -function BASS_SPEAKER_N(n: DWORD): DWORD; -begin - Result := n shl 24; -end; - -function MAKEMUSICPOS(order,row: DWORD): DWORD; -begin - Result := $80000000 or DWORD(MAKELONG(order,row)); -end; - -{$IFDEF MSWINDOWS} -function BASS_SetEAXPreset(env: Integer): BOOL; -begin - case (env) of - EAX_ENVIRONMENT_GENERIC: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_GENERIC, 0.5, 1.493, 0.5); - EAX_ENVIRONMENT_PADDEDCELL: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_PADDEDCELL, 0.25, 0.1, 0); - EAX_ENVIRONMENT_ROOM: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_ROOM, 0.417, 0.4, 0.666); - EAX_ENVIRONMENT_BATHROOM: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_BATHROOM, 0.653, 1.499, 0.166); - EAX_ENVIRONMENT_LIVINGROOM: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_LIVINGROOM, 0.208, 0.478, 0); - EAX_ENVIRONMENT_STONEROOM: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_STONEROOM, 0.5, 2.309, 0.888); - EAX_ENVIRONMENT_AUDITORIUM: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_AUDITORIUM, 0.403, 4.279, 0.5); - EAX_ENVIRONMENT_CONCERTHALL: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_CONCERTHALL, 0.5, 3.961, 0.5); - EAX_ENVIRONMENT_CAVE: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_CAVE, 0.5, 2.886, 1.304); - EAX_ENVIRONMENT_ARENA: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_ARENA, 0.361, 7.284, 0.332); - EAX_ENVIRONMENT_HANGAR: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_HANGAR, 0.5, 10.0, 0.3); - EAX_ENVIRONMENT_CARPETEDHALLWAY: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_CARPETEDHALLWAY, 0.153, 0.259, 2.0); - EAX_ENVIRONMENT_HALLWAY: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_HALLWAY, 0.361, 1.493, 0); - EAX_ENVIRONMENT_STONECORRIDOR: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_STONECORRIDOR, 0.444, 2.697, 0.638); - EAX_ENVIRONMENT_ALLEY: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_ALLEY, 0.25, 1.752, 0.776); - EAX_ENVIRONMENT_FOREST: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_FOREST, 0.111, 3.145, 0.472); - EAX_ENVIRONMENT_CITY: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_CITY, 0.111, 2.767, 0.224); - EAX_ENVIRONMENT_MOUNTAINS: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_MOUNTAINS, 0.194, 7.841, 0.472); - EAX_ENVIRONMENT_QUARRY: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_QUARRY, 1, 1.499, 0.5); - EAX_ENVIRONMENT_PLAIN: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_PLAIN, 0.097, 2.767, 0.224); - EAX_ENVIRONMENT_PARKINGLOT: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_PARKINGLOT, 0.208, 1.652, 1.5); - EAX_ENVIRONMENT_SEWERPIPE: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_SEWERPIPE, 0.652, 2.886, 0.25); - EAX_ENVIRONMENT_UNDERWATER: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_UNDERWATER, 1, 1.499, 0); - EAX_ENVIRONMENT_DRUGGED: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_DRUGGED, 0.875, 8.392, 1.388); - EAX_ENVIRONMENT_DIZZY: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_DIZZY, 0.139, 17.234, 0.666); - EAX_ENVIRONMENT_PSYCHOTIC: - Result := BASS_SetEAXParameters(EAX_ENVIRONMENT_PSYCHOTIC, 0.486, 7.563, 0.806); - else - Result := FALSE; - end; -end; -{$ENDIF} - -end. -// END OF FILE ///////////////////////////////////////////////////////////////// - diff --git a/Game/Code/lib/bass/bass.chm b/Game/Code/lib/bass/bass.chm Binary files differindex 1e8c5076..79ab64a2 100644 --- a/Game/Code/lib/bass/bass.chm +++ b/Game/Code/lib/bass/bass.chm diff --git a/Game/Code/lib/bass/bass.dll b/Game/Code/lib/bass/bass.dll Binary files differindex 964d8996..9270599c 100644 --- a/Game/Code/lib/bass/bass.dll +++ b/Game/Code/lib/bass/bass.dll diff --git a/Game/Code/lib/bass/bass.txt b/Game/Code/lib/bass/bass.txt index c60b6594..d7c5aecf 100644 --- a/Game/Code/lib/bass/bass.txt +++ b/Game/Code/lib/bass/bass.txt @@ -1,7 +1,8 @@ -BASS 2.3 - Copyright (c) 1999-2007 Ian Luck. All rights reserved.
+BASS 2.4
+Copyright (c) 1999-2008 Un4seen Developments Ltd. All rights reserved.
-Files that you should have found in the BASS "package"
-======================================================
+Files that you should have found in the BASS package
+====================================================
Win32 version
-------------
BASS.TXT This file
@@ -9,7 +10,7 @@ BASS.DLL The BASS module BASS.CHM BASS documentation
MP3-FREE
BASS.DLL BASS module using the Windows MP3 decoder
-C\ C/C++ API and samples...
+C\ C/C++ API and examples...
BASS.H BASS C/C++ header file
BASS.LIB BASS import library
BASS.DSW Visual C++ workspace for examples
@@ -23,7 +24,6 @@ C\ C/C++ API and samples... BASSTEST\ Simple playback example
BASSTEST.C
BASSTEST.RC
- BASSTEST.H
BASSTEST.DSP
MAKEFILE
CONTEST\ Console example
@@ -53,11 +53,6 @@ C\ C/C++ API and samples... LIVESPEC.C
LIVESPEC.DSP
MAKEFILE
- LOADNGET\ LoadLibrary/GetProcAddress example
- LOADNGET.C
- LOADNGET.RC
- LOADNGET.DSP
- MAKEFILE
MULTI\ Multiple device example
MULTI.C
MULTI.RC
@@ -104,7 +99,6 @@ C\ C/C++ API and samples... FXTEST.EXE
LIVEFX.EXE
LIVESPEC.EXE
- LOADNGET.EXE
MULTI.EXE
NETRADIO.EXE
RECTEST.EXE
@@ -112,8 +106,8 @@ C\ C/C++ API and samples... SPECTRUM.EXE
SYNTH.EXE
WRITEWAV.EXE
-VB\ Visual Basic API and samples...
- BASS.BAS BASS Visual Basic module file
+VB\ Visual Basic API and examples...
+ BASS.BAS BASS Visual Basic module
3DTEST\ 3D/EAX example
PRJ3DTEST.VBP
PRJ3DTEST.FRM
@@ -175,7 +169,7 @@ VB\ Visual Basic API and samples... FRMMEMORY.FRM
SYNCTEST.BAS
CBASS_TIME.CLS
-DELPHI\ Delphi API and samples...
+DELPHI\ Delphi API and examples...
BASS.PAS BASS Delphi unit
3DTEST\ 3D/EAX example
D3TEST.DPR
@@ -245,7 +239,7 @@ DELPHI\ Delphi API and samples... UNITMAIN.DFM
DYNAMIC\ Dynamic-loading Delphi API
DYNAMIC_BASS.PAS Dynamic-loading Delphi unit
-MASM\ MASM API and samples...
+MASM\ MASM API and examples...
BASS.INC BASS MASM include file
PLAYER\ Example MOD player
PLAYER.EXE
@@ -254,8 +248,8 @@ MASM\ MASM API and samples... TOOLBAR.BMP
COMPILE.BAT
-NOTE: To run the sample EXEs, first you'll have to copy BASS.DLL into the
- same directory as the EXEs.
+NOTE: To run the example EXEs, first you will have to copy BASS.DLL into the
+ same directory as them.
NOTE: To avoid unnecessary bloatage, the BASS DLLs are not digitally signed.
Signed versions are available on request (email: bass@un4seen.com).
@@ -352,64 +346,61 @@ Intel Macs. Main Features
=============
* Samples
-- supports WAV/AIFF/MP3/MP2/MP1/OGG and custom generated samples
+ supports WAV/AIFF/MP3/MP2/MP1/OGG and custom generated samples
* Sample streams
-- stream any sample data in 8/16/32 bit
+ 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
+ MP3/MP2/MP1/OGG/WAV/AIFF file streaming
* Internet file streaming
-- stream MP3/MP2/MP1/OGG/WAV/AIFF files from the internet (inc. Shout/Icecast)
+ stream files from the internet, including Shout/Icecast
* User file streaming
-- stream MP3/MP2/MP1/OGG/WAV/AIFF files from anywhere using any delivery method
+ stream files from anywhere using any delivery method
* Multi-channel streaming
-- support for more than plain stereo, including multi-channel OGG/WAV/AIFF files
+ 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
+ uses the same engine as XMPlay = best accuracy, speed, and quality
* MO3 music
-- MP3/OGG compressed MOD music
+ MP3/OGG compressed MOD music
* Add-on system
-- support for more formats is available via add-ons (aka plugins)
+ support for more formats is available via add-ons (aka plugins)
* Multiple outputs
-- simultaneously use multiple soundcards, and move channels between them
+ simultaneously use multiple soundcards, and move channels between them
* Recording
-- flexible recording system, with support for multiple devices
+ flexible recording system, with support for multiple devices
* Decode without playback
-- streams and musics can be outputted in any way you want
+ streams and MOD musics can be outputted in any way you want
* Speaker assignment
-- assign streams and musics to specific speakers
+ assign streams and MOD musics to specific speakers
* High precision synchronization
-- synchronize events in your software to the music
+ synchronize events in your software to the streams and MOD musics
* DirectX 8 effects
-- chorus/compressor/distortion/echo/flanger/gargle/parameq/reverb
+ chorus/compressor/distortion/echo/flanger/gargle/parameq/reverb
* User defined DSP functions
-- custom effects may be applied to musics and streams
+ custom effects may be applied to musics and streams
* 32 bit floating-point decoding and processing
-- floating-point stream/music decoding, DSP, FX, and recording
+ floating-point stream/music decoding, DSP, FX, and recording
* 3D sound
-- play samples/streams/musics in any 3D position, with EAX support
-
-* Expandable
-- underlying DirectSound object interfaces are accessible
+ play samples/streams/musics in any 3D position, with EAX support
* Small
-- BASS is under 100KB (on Windows), so won't bloat your distribution
+ BASS is under 100KB (on Windows), so won't bloat your distribution
Using BASS
@@ -431,12 +422,6 @@ C/C++, Visual Basic, Delphi and MASM APIs are provided, to use BASS with another language you'll first have to convert the header file. Or, as a
last resort, you could use LoadLibrary and GetProcAddress.
-One benefit of the LoadLibrary method is that it allows you to look for
-the correct BASS version, because you can load and unload BASS.DLL at
-any time. This also allows those who'd prefer not to have a separate
-DLL to store it with the program (eg. in a resource), write it to disk,
-load it, use it, free it and delete it.
-
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
@@ -449,8 +434,6 @@ 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
-See the LOADNGET.C file for a more complete example.
-
To use BASS with Borland C++ Builder, you'll 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:
@@ -496,36 +479,36 @@ The latest version of BASS can always be found at the BASS website: www.un4seen.com
-Copyright, disclaimer, and all that other jazz
-==============================================
-The BASS library is free for non-commercial use. If you are a non-
-commercial entity (eg. an individual) and are not charging for your
-product, and the product has no other commercial purpose, 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.
+Licence
+=======
+BASS is free for non-commercial use. If you are a non-commercial entity
+(eg. an individual) and you are not charging for your product, and the
+product has no other commercial purpose, 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. BASICALLY,
-YOU USE BASS ENTIRELY AT YOUR OWN RISK.
+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.
-
-BASS in commercial products?
-============================
+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 products, which must sell for no more than 40 Euros each.
-If you're an individual making and selling your own software (and
-its price is within the limit), this is the licence for you.
+If you are an individual (not a corporation) making and selling your
+own software (and its price is within the limit), this is the licence
+for you.
SINGLE COMMERCIAL: Allows the usage of BASS in a single commercial
product.
@@ -538,7 +521,7 @@ 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
+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.
@@ -549,7 +532,7 @@ licence covers one person or entity and is not transferable. 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
+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
@@ -559,9 +542,8 @@ Visit the BASS website for the latest pricing: www.un4seen.com
-
MP3
-===
+---
MP3 technology is patented, and Thomson license the use of their and
Fraunhofer's patents. The inclusion of an MP3 decoder (eg. BASS) in a
commercial product requires an MP3 patent licence. Contact Thomson for
@@ -569,7 +551,7 @@ details: www.mp3licensing.com
-Alternatively, the "MP3-FREE" BASS version doesn't include its own MP3
+Alternatively, the "MP3-FREE" BASS version does not include its own MP3
decoder but instead makes use of the operating system's already licensed
decoder.
@@ -585,6 +567,131 @@ There are of course bug fixes and other little improvements made along the way too! To make upgrading simpler, all functions affected by a
change to the BASS interface are listed.
+2.4 - 2/4/2008
+--------------
+* "Push" streaming
+ STREAMPROC_PUSH (BASS_StreamCreate "proc")
+ 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 v2.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
+ 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_ChannelGetDat 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
@@ -1526,21 +1633,26 @@ change to the BASS interface are listed. * First public release
-Credits - API/Sample Contributors
-=================================
-Visual Basic - Adam Hoult, Hendrik Knaepen, Arthur Aminov,
- Peter Hebels
-Delphi - Titus Miloi, Rogier Timmermans, Alessandro Cappellozza,
- Jesse Naranjo, Chris Troesken
-MASM - Octavian Chis
+Credits
+=======
+Ogg Vorbis decoding is based on libogg/vorbis,
+Copyright (c) 2002-2004 Xiph.org Foundation
+
+CHMOX is (c) 2004 Stéphane Boisson, http://chmox.sourceforge.net/
-CHMOX is (c)2004 Stéphane Boisson, http://chmox.sourceforge.net/
+API/Sample contributors
+-----------------------
+Visual Basic: Adam Hoult, Hendrik Knaepen, Arthur Aminov,
+ Peter Hebels
+Delphi: Titus Miloi, Rogier Timmermans, Alessandro Cappellozza,
+ Jesse Naranjo, Chris Troesken
+MASM: Octavian Chis
Bug reports, Suggestions, Comments, Enquiries, etc...
=====================================================
-If you have any of the aforementioned please see the BASS forum (at
-the website). If you can't find an answer there, you can email:
+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/Game/Code/lib/bass/delphi/bass-macosx.patch b/Game/Code/lib/bass/delphi/bass-macosx.patch new file mode 100644 index 00000000..f79b3925 --- /dev/null +++ b/Game/Code/lib/bass/delphi/bass-macosx.patch @@ -0,0 +1,368 @@ +--- D:/daten/bass.pas Sun Mar 23 18:58:56 2008
++++ D:/daten/Projekte/UltraStarDX/Kopie von trunk/Game/Code/lib/bass/delphi/bass.pas Sat May 03 03:52:56 2008
+@@ -13,8 +13,20 @@
+
+ interface
+
++{$IFDEF FPC}
++ {$PACKRECORDS C}
++{$ENDIF}
++
++{$IFDEF MSWINDOWS}
++ {$DEFINE DLL_STDCALL}
++{$ELSE}
++ {$DEFINE DLL_CDECL}
++{$ENDIF}
++
++{$IFDEF MSWINDOWS}
+ uses
+ Windows;
++{$ENDIF}
+
+ const
+ BASSVERSION = $204; // API version
+@@ -231,6 +243,7 @@
+ BASS_3DALG_FULL = 2;
+ BASS_3DALG_LIGHT = 3;
+
++{$IFDEF MSWINDOWS}
+ // EAX environments, use with BASS_SetEAXParameters
+ EAX_ENVIRONMENT_GENERIC = 0;
+ EAX_ENVIRONMENT_PADDEDCELL = 1;
+@@ -260,6 +273,7 @@
+ EAX_ENVIRONMENT_PSYCHOTIC = 25;
+ // total number of environments
+ EAX_ENVIRONMENT_COUNT = 26;
++{$ENDIF}
+
+ BASS_STREAMPROC_END = $80000000; // end of user stream flag
+
+@@ -487,10 +501,10 @@
+ end;
+
+ // User file stream callback functions
+- FILECLOSEPROC = procedure(user: Pointer); stdcall;
+- FILELENPROC = function(user: Pointer): QWORD; stdcall;
+- FILEREADPROC = function(buffer: Pointer; length: DWORD; user: Pointer): DWORD; stdcall;
+- FILESEEKPROC = function(offset: QWORD; user: Pointer): BOOL; stdcall;
++ FILECLOSEPROC = procedure(user: Pointer); {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
++ FILELENPROC = function(user: Pointer): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
++ FILEREADPROC = function(buffer: Pointer; length: DWORD; user: Pointer): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
++ FILESEEKPROC = function(offset: QWORD; user: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+
+ BASS_FILEPROCS = record
+ close: FILECLOSEPROC;
+@@ -578,7 +592,7 @@
+ end;
+
+ // callback function types
+- STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: Pointer): DWORD; stdcall;
++ STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: Pointer): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+ {
+ User stream callback function. NOTE: A stream function should obviously be as
+ quick as possible, other streams (and MOD musics) can't be mixed until
+@@ -593,12 +607,12 @@
+
+ const
+ // special STREAMPROCs
+- STREAMPROC_DUMMY : STREAMPROC = STREAMPROC(0); // "dummy" stream
+- STREAMPROC_PUSH : STREAMPROC = STREAMPROC(-1); // push stream
++ STREAMPROC_DUMMY {: STREAMPROC} = Pointer(0); // "dummy" stream
++ STREAMPROC_PUSH {: STREAMPROC} = Pointer(-1); // push stream
+
+ type
+
+- DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: Pointer); stdcall;
++ DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: Pointer); {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+ {
+ Internet stream download callback function.
+ buffer : Buffer containing the downloaded data... NULL=end of download
+@@ -606,7 +620,7 @@
+ user : The 'user' parameter value given when calling BASS_StreamCreateURL
+ }
+
+- SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: Pointer); stdcall;
++ SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: Pointer); {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+ {
+ Sync callback function. NOTE: a sync callback function should be very
+ quick as other syncs cannot be processed until it has finished. If the
+@@ -618,7 +632,7 @@
+ user : The 'user' parameter given when calling BASS_ChannelSetSync
+ }
+
+- DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: Pointer); stdcall;
++ DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: Pointer); {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+ {
+ DSP callback function. NOTE: A DSP function should obviously be as quick
+ as possible... other DSP functions, streams and MOD musics can not be
+@@ -630,7 +644,7 @@
+ user : The 'user' parameter given when calling BASS_ChannelSetDSP
+ }
+
+- RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: Pointer): BOOL; stdcall;
++ RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+ {
+ Recording callback function.
+ handle : The recording handle
+@@ -643,116 +657,130 @@
+
+ // Functions
+ const
++{$IFDEF MSWINDOWS}
+ bassdll = 'bass.dll';
+-
+-function BASS_SetConfig(option, value: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_GetConfig(option: DWORD): DWORD; stdcall; external bassdll;
+-function BASS_SetConfigPtr(option: DWORD; value: Pointer): BOOL; stdcall; external bassdll;
+-function BASS_GetConfigPtr(option: DWORD): Pointer; stdcall; external bassdll;
+-function BASS_GetVersion: DWORD; stdcall; external bassdll;
+-function BASS_ErrorGetCode: Integer; stdcall; external bassdll;
+-function BASS_GetDeviceInfo(device: DWORD; var info: BASS_DEVICEINFO): BOOL; stdcall; external bassdll;
+-function BASS_Init(device: Integer; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; stdcall; external bassdll;
+-function BASS_SetDevice(device: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_GetDevice: DWORD; stdcall; external bassdll;
+-function BASS_Free: BOOL; stdcall; external bassdll;
+-function BASS_GetDSoundObject(obj: DWORD): Pointer; stdcall; external bassdll;
+-function BASS_GetInfo(var info: BASS_INFO): BOOL; stdcall; external bassdll;
+-function BASS_Update(length: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_GetCPU: FLOAT; stdcall; external bassdll;
+-function BASS_Start: BOOL; stdcall; external bassdll;
+-function BASS_Stop: BOOL; stdcall; external bassdll;
+-function BASS_Pause: BOOL; stdcall; external bassdll;
+-function BASS_SetVolume(volume: FLOAT): BOOL; stdcall; external bassdll;
+-function BASS_GetVolume: FLOAT; stdcall; external bassdll;
+-
+-function BASS_PluginLoad(filename: PChar; flags: DWORD): HPLUGIN; stdcall; external bassdll;
+-function BASS_PluginFree(handle: HPLUGIN): BOOL; stdcall; external bassdll;
+-function BASS_PluginGetInfo(handle: HPLUGIN): PBASS_PLUGININFO; stdcall; external bassdll;
+-
+-function BASS_Set3DFactors(distf, rollf, doppf: FLOAT): BOOL; stdcall; external bassdll;
+-function BASS_Get3DFactors(var distf, rollf, doppf: FLOAT): BOOL; stdcall; external bassdll;
+-function BASS_Set3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
+-function BASS_Get3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
+-procedure BASS_Apply3D; stdcall; external bassdll;
+-function BASS_SetEAXParameters(env: Integer; vol, decay, damp: FLOAT): BOOL; stdcall; external bassdll;
+-function BASS_GetEAXParameters(var env: DWORD; var vol, decay, damp: FLOAT): BOOL; stdcall; external bassdll;
+-
+-function BASS_MusicLoad(mem: BOOL; f: Pointer; offset: QWORD; length, flags, freq: DWORD): HMUSIC; stdcall; external bassdll;
+-function BASS_MusicFree(handle: HMUSIC): BOOL; stdcall; external bassdll;
+-
+-function BASS_SampleLoad(mem: BOOL; f: Pointer; offset: QWORD; length, max, flags: DWORD): HSAMPLE; stdcall; external bassdll;
+-function BASS_SampleCreate(length, freq, chans, max, flags: DWORD): HSAMPLE; stdcall; external bassdll;
+-function BASS_SampleFree(handle: HSAMPLE): BOOL; stdcall; external bassdll;
+-function BASS_SampleSetData(handle: HSAMPLE; buffer: Pointer): BOOL; stdcall; external bassdll;
+-function BASS_SampleGetData(handle: HSAMPLE; buffer: Pointer): BOOL; stdcall; external bassdll;
+-function BASS_SampleGetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall; external bassdll;
+-function BASS_SampleSetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall; external bassdll;
+-function BASS_SampleGetChannel(handle: HSAMPLE; onlynew: BOOL): HCHANNEL; stdcall; external bassdll;
+-function BASS_SampleGetChannels(handle: HSAMPLE; channels: Pointer): DWORD; stdcall; external bassdll;
+-function BASS_SampleStop(handle: HSAMPLE): BOOL; stdcall; external bassdll;
+-
+-function BASS_StreamCreate(freq, chans, flags: DWORD; proc: STREAMPROC; user: Pointer): HSTREAM; stdcall; external bassdll;
+-function BASS_StreamCreateFile(mem: BOOL; f: Pointer; offset, length: QWORD; flags: DWORD): HSTREAM; stdcall; external bassdll;
+-function BASS_StreamCreateURL(url: PChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: Pointer):HSTREAM; stdcall; external bassdll;
+-function BASS_StreamCreateFileUser(system, flags: DWORD; var procs: BASS_FILEPROCS; user: Pointer): HSTREAM; stdcall; external bassdll;
+-function BASS_StreamFree(handle: HSTREAM): BOOL; stdcall; external bassdll;
+-function BASS_StreamGetFilePosition(handle: HSTREAM; mode: DWORD): QWORD; stdcall; external bassdll;
+-function BASS_StreamPutData(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; stdcall; external bassdll;
+-function BASS_StreamPutFileData(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; stdcall; external bassdll;
+-
+-function BASS_RecordGetDeviceInfo(device: DWORD; var info: BASS_DEVICEINFO): BOOL; stdcall; external bassdll;
+-function BASS_RecordInit(device: Integer):BOOL; stdcall; external bassdll;
+-function BASS_RecordSetDevice(device: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_RecordGetDevice: DWORD; stdcall; external bassdll;
+-function BASS_RecordFree: BOOL; stdcall; external bassdll;
+-function BASS_RecordGetInfo(var info: BASS_RECORDINFO): BOOL; stdcall; external bassdll;
+-function BASS_RecordGetInputName(input: Integer): PChar; stdcall; external bassdll;
+-function BASS_RecordSetInput(input: Integer; flags: DWORD; volume: FLOAT): BOOL; stdcall; external bassdll;
+-function BASS_RecordGetInput(input: Integer; var volume: FLOAT): DWORD; stdcall; external bassdll;
+-function BASS_RecordStart(freq, chans, flags: DWORD; proc: RECORDPROC; user: Pointer): HRECORD; stdcall; external bassdll;
+-
+-function BASS_ChannelBytes2Seconds(handle: DWORD; pos: QWORD): Double; stdcall;external bassdll;
+-function BASS_ChannelSeconds2Bytes(handle: DWORD; pos: Double): QWORD; stdcall;external bassdll;
+-function BASS_ChannelGetDevice(handle: DWORD): DWORD; stdcall; external bassdll;
+-function BASS_ChannelSetDevice(handle, device: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelIsActive(handle: DWORD): DWORD; stdcall;external bassdll;
+-function BASS_ChannelGetInfo(handle: DWORD; var info: BASS_CHANNELINFO):BOOL;stdcall;external bassdll;
+-function BASS_ChannelGetTags(handle: HSTREAM; tags: DWORD): PChar; stdcall; external bassdll;
+-function BASS_ChannelFlags(handle, flags, mask: DWORD): DWORD; stdcall; external bassdll;
+-function BASS_ChannelUpdate(handle, length: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelLock(handle: DWORD; lock: BOOL): BOOL; stdcall; external bassdll;
+-function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; stdcall; external bassdll;
+-function BASS_ChannelStop(handle: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelPause(handle: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelSetAttribute(handle, attrib: DWORD; value: FLOAT): BOOL; stdcall; external bassdll;
+-function BASS_ChannelGetAttribute(handle, attrib: DWORD; var value: FLOAT): BOOL; stdcall; external bassdll;
+-function BASS_ChannelSlideAttribute(handle, attrib: DWORD; value: FLOAT; time: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelIsSliding(handle, attrib: DWORD): BOOL; stdcall;external bassdll;
+-function BASS_ChannelSet3DAttributes(handle: DWORD; mode: Integer; min, max: FLOAT; iangle, oangle, outvol: Integer): BOOL; stdcall; external bassdll;
+-function BASS_ChannelGet3DAttributes(handle: DWORD; var mode: DWORD; var min, max: FLOAT; var iangle, oangle, outvol: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelSet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
+-function BASS_ChannelGet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
+-function BASS_ChannelGetLength(handle, mode: DWORD): QWORD; stdcall; external bassdll;
+-function BASS_ChannelSetPosition(handle: DWORD; pos: QWORD; mode: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelGetPosition(handle, mode: DWORD): QWORD; stdcall; external bassdll;
+-function BASS_ChannelGetLevel(handle: DWORD): DWORD; stdcall; external bassdll;
+-function BASS_ChannelGetData(handle: DWORD; buffer: Pointer; length: DWORD): DWORD; stdcall; external bassdll;
+-function BASS_ChannelSetSync(handle: DWORD; type_: DWORD; param: QWORD; proc: SYNCPROC; user: Pointer): HSYNC; stdcall; external bassdll;
+-function BASS_ChannelRemoveSync(handle: DWORD; sync: HSYNC): BOOL; stdcall; external bassdll;
+-function BASS_ChannelSetDSP(handle: DWORD; proc: DSPPROC; user: Pointer; priority: Integer): HDSP; stdcall; external bassdll;
+-function BASS_ChannelRemoveDSP(handle: DWORD; dsp: HDSP): BOOL; stdcall; external bassdll;
+-function BASS_ChannelSetLink(handle, chan: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelRemoveLink(handle, chan: DWORD): BOOL; stdcall; external bassdll;
+-function BASS_ChannelSetFX(handle, type_: DWORD; priority: Integer): HFX; stdcall; external bassdll;
+-function BASS_ChannelRemoveFX(handle: DWORD; fx: HFX): BOOL; stdcall; external bassdll;
+-
+-function BASS_FXSetParameters(handle: HFX; par: Pointer): BOOL; stdcall; external bassdll;
+-function BASS_FXGetParameters(handle: HFX; par: Pointer): BOOL; stdcall; external bassdll;
+-function BASS_FXReset(handle: HFX): BOOL; stdcall; external bassdll;
++{$ENDIF}
++{$IFDEF DARWIN}
++ bassdll = 'libbass.dylib';
++{$ENDIF}
++
++function BASS_SetConfig(option, value: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_GetConfig(option: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SetConfigPtr(option: DWORD; value: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_GetConfigPtr(option: DWORD): Pointer; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_GetVersion: DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ErrorGetCode: Integer; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_GetDeviceInfo(device: DWORD; var info: BASS_DEVICEINFO): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++{$IFDEF MSWINDOWS}
++function BASS_Init(device: Integer; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++{$ELSE}
++function BASS_Init(device: Integer; freq, flags: DWORD; win: Pointer; clsid: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++{$ENDIF}
++function BASS_SetDevice(device: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_GetDevice: DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_Free: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++{$IFDEF MSWINDOWS}
++function BASS_GetDSoundObject(obj: DWORD): Pointer; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++{$ENDIF}
++function BASS_GetInfo(var info: BASS_INFO): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_Update(length: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_GetCPU: FLOAT; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_Start: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_Stop: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_Pause: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SetVolume(volume: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_GetVolume: FLOAT; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++
++function BASS_PluginLoad(filename: PChar; flags: DWORD): HPLUGIN; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_PluginFree(handle: HPLUGIN): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_PluginGetInfo(handle: HPLUGIN): PBASS_PLUGININFO; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++
++function BASS_Set3DFactors(distf, rollf, doppf: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_Get3DFactors(var distf, rollf, doppf: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_Set3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_Get3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++procedure BASS_Apply3D; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++{$IFDEF MSWINDOWS}
++function BASS_SetEAXParameters(env: Integer; vol, decay, damp: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_GetEAXParameters(var env: DWORD; var vol, decay, damp: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++{$ENDIF}
++
++function BASS_MusicLoad(mem: BOOL; f: Pointer; offset: QWORD; length, flags, freq: DWORD): HMUSIC; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_MusicFree(handle: HMUSIC): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++
++function BASS_SampleLoad(mem: BOOL; f: Pointer; offset: QWORD; length, max, flags: DWORD): HSAMPLE; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleCreate(length, freq, chans, max, flags: DWORD): HSAMPLE; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleFree(handle: HSAMPLE): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleSetData(handle: HSAMPLE; buffer: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleGetData(handle: HSAMPLE; buffer: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleGetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleSetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleGetChannel(handle: HSAMPLE; onlynew: BOOL): HCHANNEL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleGetChannels(handle: HSAMPLE; channels: Pointer): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_SampleStop(handle: HSAMPLE): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++
++function BASS_StreamCreate(freq, chans, flags: DWORD; proc: STREAMPROC; user: Pointer): HSTREAM; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_StreamCreateFile(mem: BOOL; f: Pointer; offset, length: QWORD; flags: DWORD): HSTREAM; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_StreamCreateURL(url: PChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: Pointer):HSTREAM; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_StreamCreateFileUser(system, flags: DWORD; var procs: BASS_FILEPROCS; user: Pointer): HSTREAM; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_StreamFree(handle: HSTREAM): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_StreamGetFilePosition(handle: HSTREAM; mode: DWORD): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_StreamPutData(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_StreamPutFileData(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++
++function BASS_RecordGetDeviceInfo(device: DWORD; var info: BASS_DEVICEINFO): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordInit(device: Integer):BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordSetDevice(device: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordGetDevice: DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordFree: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordGetInfo(var info: BASS_RECORDINFO): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordGetInputName(input: Integer): PChar; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordSetInput(input: Integer; flags: DWORD; volume: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordGetInput(input: Integer; var volume: FLOAT): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_RecordStart(freq, chans, flags: DWORD; proc: RECORDPROC; user: Pointer): HRECORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++
++function BASS_ChannelBytes2Seconds(handle: DWORD; pos: QWORD): Double; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
++function BASS_ChannelSeconds2Bytes(handle: DWORD; pos: Double): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
++function BASS_ChannelGetDevice(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSetDevice(handle, device: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelIsActive(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
++function BASS_ChannelGetInfo(handle: DWORD; var info: BASS_CHANNELINFO):BOOL;{$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
++function BASS_ChannelGetTags(handle: HSTREAM; tags: DWORD): PChar; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelFlags(handle, flags, mask: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelUpdate(handle, length: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelLock(handle: DWORD; lock: BOOL): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelStop(handle: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelPause(handle: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSetAttribute(handle, attrib: DWORD; value: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelGetAttribute(handle, attrib: DWORD; var value: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSlideAttribute(handle, attrib: DWORD; value: FLOAT; time: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelIsSliding(handle, attrib: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
++function BASS_ChannelSet3DAttributes(handle: DWORD; mode: Integer; min, max: FLOAT; iangle, oangle, outvol: Integer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelGet3DAttributes(handle: DWORD; var mode: DWORD; var min, max: FLOAT; var iangle, oangle, outvol: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelGet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelGetLength(handle, mode: DWORD): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSetPosition(handle: DWORD; pos: QWORD; mode: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelGetPosition(handle, mode: DWORD): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelGetLevel(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelGetData(handle: DWORD; buffer: Pointer; length: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSetSync(handle: DWORD; type_: DWORD; param: QWORD; proc: SYNCPROC; user: Pointer): HSYNC; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelRemoveSync(handle: DWORD; sync: HSYNC): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSetDSP(handle: DWORD; proc: DSPPROC; user: Pointer; priority: Integer): HDSP; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelRemoveDSP(handle: DWORD; dsp: HDSP): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSetLink(handle, chan: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelRemoveLink(handle, chan: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelSetFX(handle, type_: DWORD; priority: Integer): HFX; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_ChannelRemoveFX(handle: DWORD; fx: HFX): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++
++function BASS_FXSetParameters(handle: HFX; par: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_FXGetParameters(handle: HFX; par: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
++function BASS_FXReset(handle: HFX): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+
+
+ function BASS_SPEAKER_N(n: DWORD): DWORD;
++{$IFDEF MSWINDOWS}
+ function BASS_SetEAXPreset(env: Integer): BOOL;
+ {
+ This function is defined in the implementation part of this unit.
+@@ -760,7 +788,7 @@
+ to set the predefined EAX environments.
+ env : a EAX_ENVIRONMENT_xxx constant
+ }
+-
++{$ENDIF}
+
+ implementation
+
+@@ -769,6 +797,7 @@
+ Result := n shl 24;
+ end;
+
++{$IFDEF MSWINDOWS}
+ function BASS_SetEAXPreset(env: Integer): BOOL;
+ begin
+ case (env) of
+@@ -828,6 +857,7 @@
+ Result := FALSE;
+ end;
+ end;
++{$ENDIF}
+
+ end.
+ // END OF FILE /////////////////////////////////////////////////////////////////
diff --git a/Game/Code/lib/bass/delphi/bass.bpg b/Game/Code/lib/bass/delphi/bass.bpg deleted file mode 100644 index 55c2e004..00000000 --- a/Game/Code/lib/bass/delphi/bass.bpg +++ /dev/null @@ -1,64 +0,0 @@ -#------------------------------------------------------------------------------
-VERSION = BWS.01
-#------------------------------------------------------------------------------
-!ifndef ROOT
-ROOT = $(MAKEDIR)\..
-!endif
-#------------------------------------------------------------------------------
-MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
-DCC = $(ROOT)\bin\dcc32.exe $**
-BRCC = $(ROOT)\bin\brcc32.exe $**
-#------------------------------------------------------------------------------
-PROJECTS = D3Test.exe BassTest.exe ConTest.exe custloop.exe DspTest.exe \
- FXtest.exe livefx.exe Multi.exe netradio.exe plugins.exe RecordTest.exe \
- samplevis.exe Speakers.exe StreamTest.exe writewav.exe
-#------------------------------------------------------------------------------
-default: $(PROJECTS)
-#------------------------------------------------------------------------------
-
-D3Test.exe: 3dTest\D3Test.dpr
- $(DCC)
-
-BassTest.exe: BassTest\BassTest.dpr
- $(DCC)
-
-ConTest.exe: ConTest\ConTest.dpr
- $(DCC)
-
-custloop.exe: custloop\custloop.dpr
- $(DCC)
-
-DspTest.exe: DspTest\DspTest.dpr
- $(DCC)
-
-FXtest.exe: fxtest\FXtest.dpr
- $(DCC)
-
-livefx.exe: livefx\livefx.dpr
- $(DCC)
-
-Multi.exe: multi\Multi.dpr
- $(DCC)
-
-netradio.exe: netradio\netradio.dpr
- $(DCC)
-
-plugins.exe: plugins\plugins.dpr
- $(DCC)
-
-RecordTest.exe: RecordTest\RecordTest.dpr
- $(DCC)
-
-samplevis.exe: SampleVis\samplevis.dpr
- $(DCC)
-
-Speakers.exe: Speakers\Speakers.dpr
- $(DCC)
-
-StreamTest.exe: StreamTest\StreamTest.dpr
- $(DCC)
-
-writewav.exe: writewav\writewav.dpr
- $(DCC)
-
-
diff --git a/Game/Code/lib/bass/delphi/bass.pas b/Game/Code/lib/bass/delphi/bass.pas index ba661699..1121b2f7 100644 --- a/Game/Code/lib/bass/delphi/bass.pas +++ b/Game/Code/lib/bass/delphi/bass.pas @@ -1,41 +1,53 @@ {
- BASS 2.3 Audio Library, (c) 1999-2007 Ian Luck.
- Please report bugs/suggestions/etc... to bass@un4seen.com
-
- See the BASS.CHM file for more complete documentation
+ BASS 2.4 Delphi unit
+ Copyright (c) 1999-2008 Un4seen Developments Ltd.
+ See the BASS.CHM file for more detailed documentation
How to install
- ----------------
+ --------------
Copy BASS.PAS to the \LIB subdirectory of your Delphi path or your project dir
}
+
unit Bass;
interface
+{$IFDEF FPC}
+ {$PACKRECORDS C} +{$ENDIF} +
+{$IFDEF MSWINDOWS}
+ {$DEFINE DLL_STDCALL}
+{$ELSE}
+ {$DEFINE DLL_CDECL}
+{$ENDIF}
+
+{$IFDEF MSWINDOWS}
uses
Windows;
+{$ENDIF}
const
- BASSVERSION = $203; // API version
+ BASSVERSION = $204; // API version
+ BASSVERSIONTEXT = '2.4';
// Use these to test for error from functions that return a DWORD or QWORD
DW_ERROR = Cardinal(-1); // -1 (DWORD)
QW_ERROR = Int64(-1); // -1 (QWORD)
- // Error codes returned by BASS_GetErrorCode()
+ // Error codes returned by BASS_ErrorGetCode()
BASS_OK = 0; // all is OK
BASS_ERROR_MEM = 1; // memory error
BASS_ERROR_FILEOPEN = 2; // can't open the file
BASS_ERROR_DRIVER = 3; // can't find a free sound driver
- BASS_ERROR_BUFLOST = 4; // the sample buffer was lost - please report this!
+ BASS_ERROR_BUFLOST = 4; // the sample buffer was lost
BASS_ERROR_HANDLE = 5; // invalid handle
BASS_ERROR_FORMAT = 6; // unsupported sample format
- BASS_ERROR_POSITION = 7; // invalid playback position
+ BASS_ERROR_POSITION = 7; // invalid position
BASS_ERROR_INIT = 8; // BASS_Init has not been successfully called
BASS_ERROR_START = 9; // BASS_Start has not been successfully called
BASS_ERROR_ALREADY = 14; // already initialized/paused/whatever
- BASS_ERROR_NOPAUSE = 16; // not paused
BASS_ERROR_NOCHAN = 18; // can't get a free channel
BASS_ERROR_ILLTYPE = 19; // an illegal type was specified
BASS_ERROR_ILLPARAM = 20; // an illegal parameter was specified
@@ -50,7 +62,6 @@ const BASS_ERROR_NONET = 32; // no internet connection could be opened
BASS_ERROR_CREATE = 33; // couldn't create the file
BASS_ERROR_NOFX = 34; // effects are not enabled
- BASS_ERROR_PLAYING = 35; // the channel is playing
BASS_ERROR_NOTAVAIL = 37; // requested data is not available
BASS_ERROR_DECODE = 38; // the channel is a "decoding channel"
BASS_ERROR_DX = 39; // a sufficient DirectX version is not installed
@@ -59,19 +70,40 @@ const BASS_ERROR_SPEAKER = 42; // unavailable speaker
BASS_ERROR_VERSION = 43; // invalid BASS version (used by add-ons)
BASS_ERROR_CODEC = 44; // codec is not available/supported
- BASS_ERROR_UNKNOWN = -1; // some other mystery error
+ BASS_ERROR_ENDED = 45; // the channel/file has ended
+ BASS_ERROR_UNKNOWN = -1; // some other mystery problem
+
+ // BASS_SetConfig options
+ BASS_CONFIG_BUFFER = 0;
+ BASS_CONFIG_UPDATEPERIOD = 1;
+ BASS_CONFIG_GVOL_SAMPLE = 4;
+ BASS_CONFIG_GVOL_STREAM = 5;
+ BASS_CONFIG_GVOL_MUSIC = 6;
+ BASS_CONFIG_CURVE_VOL = 7;
+ BASS_CONFIG_CURVE_PAN = 8;
+ BASS_CONFIG_FLOATDSP = 9;
+ BASS_CONFIG_3DALGORITHM = 10;
+ BASS_CONFIG_NET_TIMEOUT = 11;
+ BASS_CONFIG_NET_BUFFER = 12;
+ BASS_CONFIG_PAUSE_NOPLAY = 13;
+ BASS_CONFIG_NET_PREBUF = 15;
+ BASS_CONFIG_NET_PASSIVE = 18;
+ BASS_CONFIG_REC_BUFFER = 19;
+ BASS_CONFIG_NET_PLAYLIST = 21;
+ BASS_CONFIG_MUSIC_VIRTUAL = 22;
+ BASS_CONFIG_VERIFY = 23;
+ BASS_CONFIG_UPDATETHREADS = 24;
+
+ // BASS_SetConfigPtr options
+ BASS_CONFIG_NET_AGENT = 16;
+ BASS_CONFIG_NET_PROXY = 17;
// Initialization flags
BASS_DEVICE_8BITS = 1; // use 8 bit resolution, else 16 bit
BASS_DEVICE_MONO = 2; // use mono, else stereo
BASS_DEVICE_3D = 4; // enable 3D functionality
- {
- If the BASS_DEVICE_3D flag is not specified when
- initilizing BASS, then the 3D flags (BASS_SAMPLE_3D
- and BASS_MUSIC_3D) are ignored when loading/creating
- a sample/stream/music.
- }
BASS_DEVICE_LATENCY = 256; // calculate device latency (BASS_INFO struct)
+ BASS_DEVICE_CPSPEAKERS = 1024; // detect speakers via Windows control panel
BASS_DEVICE_SPEAKERS = 2048; // force enabling of speaker assignment
BASS_DEVICE_NOSPEAKER = 4096; // ignore speaker arrangement
@@ -79,28 +111,23 @@ const BASS_OBJECT_DS = 1; // IDirectSound
BASS_OBJECT_DS3DL = 2; // IDirectSound3DListener
+ // BASS_DEVICEINFO flags
+ BASS_DEVICE_ENABLED = 1;
+ BASS_DEVICE_DEFAULT = 2;
+ BASS_DEVICE_INIT = 4;
+
// BASS_INFO flags (from DSOUND.H)
- DSCAPS_CONTINUOUSRATE = $00000010;
- { supports all sample rates between min/maxrate }
- DSCAPS_EMULDRIVER = $00000020;
- { device does NOT have hardware DirectSound support }
- DSCAPS_CERTIFIED = $00000040;
- { device driver has been certified by Microsoft }
- {
- The following flags tell what type of samples are
- supported by HARDWARE mixing, all these formats are
- supported by SOFTWARE mixing
- }
+ DSCAPS_CONTINUOUSRATE = $00000010; // supports all sample rates between min/maxrate
+ DSCAPS_EMULDRIVER = $00000020; // device does NOT have hardware DirectSound support
+ DSCAPS_CERTIFIED = $00000040; // device driver has been certified by Microsoft
DSCAPS_SECONDARYMONO = $00000100; // mono
DSCAPS_SECONDARYSTEREO = $00000200; // stereo
DSCAPS_SECONDARY8BIT = $00000400; // 8 bit
DSCAPS_SECONDARY16BIT = $00000800; // 16 bit
// BASS_RECORDINFO flags (from DSOUND.H)
- DSCCAPS_EMULDRIVER = DSCAPS_EMULDRIVER;
- { device does NOT have hardware DirectSound recording support }
- DSCCAPS_CERTIFIED = DSCAPS_CERTIFIED;
- { device driver has been certified by Microsoft }
+ DSCCAPS_EMULDRIVER = DSCAPS_EMULDRIVER; // device does NOT have hardware DirectSound recording support
+ DSCCAPS_CERTIFIED = DSCAPS_CERTIFIED; // device driver has been certified by Microsoft
// defines for formats field of BASS_RECORDINFO (from MMSYSTEM.H)
WAVE_FORMAT_1M08 = $00000001; // 11.025 kHz, Mono, 8-bit
@@ -116,21 +143,20 @@ const WAVE_FORMAT_4M16 = $00000400; // 44.1 kHz, Mono, 16-bit
WAVE_FORMAT_4S16 = $00000800; // 44.1 kHz, Stereo, 16-bit
- // Sample info flags
BASS_SAMPLE_8BITS = 1; // 8 bit
BASS_SAMPLE_FLOAT = 256; // 32-bit floating-point
- BASS_SAMPLE_MONO = 2; // mono, else stereo
+ BASS_SAMPLE_MONO = 2; // mono
BASS_SAMPLE_LOOP = 4; // looped
- BASS_SAMPLE_3D = 8; // 3D functionality enabled
- BASS_SAMPLE_SOFTWARE = 16; // it's NOT using hardware mixing
- BASS_SAMPLE_MUTEMAX = 32; // muted at max distance (3D only)
- BASS_SAMPLE_VAM = 64; // uses the DX7 voice allocation & management
- BASS_SAMPLE_FX = 128; // old implementation of DX8 effects are enabled
+ BASS_SAMPLE_3D = 8; // 3D functionality
+ BASS_SAMPLE_SOFTWARE = 16; // not using hardware mixing
+ BASS_SAMPLE_MUTEMAX = 32; // mute at max distance (3D only)
+ BASS_SAMPLE_VAM = 64; // DX7 voice allocation & management
+ BASS_SAMPLE_FX = 128; // old implementation of DX8 effects
BASS_SAMPLE_OVER_VOL = $10000; // override lowest volume
BASS_SAMPLE_OVER_POS = $20000; // override longest playing
BASS_SAMPLE_OVER_DIST = $30000; // override furthest from listener (3D only)
- BASS_STREAM_PRESCAN = $20000; // enable pin-point seeking (MP3/MP2/MP1)
+ BASS_STREAM_PRESCAN = $20000; // enable pin-point seeking/length (MP3/MP2/MP1)
BASS_MP3_SETPOS = BASS_STREAM_PRESCAN;
BASS_STREAM_AUTOFREE = $40000; // automatically free the stream when it stop/ends
BASS_STREAM_RESTRATE = $80000; // restrict the download rate of internet file streams
@@ -138,13 +164,13 @@ const BASS_STREAM_DECODE = $200000;// don't play the stream, only decode (BASS_ChannelGetData)
BASS_STREAM_STATUS = $800000;// give server status info (HTTP/ICY tags) in DOWNLOADPROC
- BASS_MUSIC_FLOAT = BASS_SAMPLE_FLOAT; // 32-bit floating-point
- BASS_MUSIC_MONO = BASS_SAMPLE_MONO; // force mono mixing (less CPU usage)
- BASS_MUSIC_LOOP = BASS_SAMPLE_LOOP; // loop music
- BASS_MUSIC_3D = BASS_SAMPLE_3D; // enable 3D functionality
- BASS_MUSIC_FX = BASS_SAMPLE_FX; // enable old implementation of DX8 effects
- BASS_MUSIC_AUTOFREE = BASS_STREAM_AUTOFREE; // automatically free the music when it stop/ends
- BASS_MUSIC_DECODE = BASS_STREAM_DECODE; // don't play the music, only decode (BASS_ChannelGetData)
+ BASS_MUSIC_FLOAT = BASS_SAMPLE_FLOAT;
+ BASS_MUSIC_MONO = BASS_SAMPLE_MONO;
+ BASS_MUSIC_LOOP = BASS_SAMPLE_LOOP;
+ BASS_MUSIC_3D = BASS_SAMPLE_3D;
+ BASS_MUSIC_FX = BASS_SAMPLE_FX;
+ BASS_MUSIC_AUTOFREE = BASS_STREAM_AUTOFREE;
+ BASS_MUSIC_DECODE = BASS_STREAM_DECODE;
BASS_MUSIC_PRESCAN = BASS_STREAM_PRESCAN; // calculate playback length
BASS_MUSIC_CALCLEN = BASS_MUSIC_PRESCAN;
BASS_MUSIC_RAMP = $200; // normal ramping
@@ -153,7 +179,8 @@ const BASS_MUSIC_SURROUND2 = $1000; // surround sound (mode 2)
BASS_MUSIC_FT2MOD = $2000; // play .MOD as FastTracker 2 does
BASS_MUSIC_PT1MOD = $4000; // play .MOD as ProTracker 1 does
- BASS_MUSIC_NONINTER = $10000; // non-interpolated mixing
+ BASS_MUSIC_NONINTER = $10000; // non-interpolated sample mixing
+ BASS_MUSIC_SINCINTER = $800000; // sinc interpolated sample mixing
BASS_MUSIC_POSRESET = $8000; // stop all notes when moving position
BASS_MUSIC_POSRESETEX = $400000; // stop all notes and reset bmp/etc when moving position
BASS_MUSIC_STOPBACK = $80000; // stop the music on a backwards jump effect
@@ -179,44 +206,12 @@ const BASS_RECORD_PAUSE = $8000; // start recording paused
- // DX7 voice allocation flags
+ // DX7 voice allocation & management flags
BASS_VAM_HARDWARE = 1;
- {
- Play the sample in hardware. If no hardware voices are available then
- the "play" call will fail
- }
BASS_VAM_SOFTWARE = 2;
- {
- Play the sample in software (ie. non-accelerated). No other VAM flags
- may be used together with this flag.
- }
-
- // DX7 voice management flags
- {
- These flags enable hardware resource stealing... if the hardware has no
- available voices, a currently playing buffer will be stopped to make room
- for the new buffer. NOTE: only samples loaded/created with the
- BASS_SAMPLE_VAM flag are considered for termination by the DX7 voice
- management.
- }
BASS_VAM_TERM_TIME = 4;
- {
- If there are no free hardware voices, the buffer to be terminated will be
- the one with the least time left to play.
- }
BASS_VAM_TERM_DIST = 8;
- {
- If there are no free hardware voices, the buffer to be terminated will be
- one that was loaded/created with the BASS_SAMPLE_MUTEMAX flag and is
- beyond
- it's max distance. If there are no buffers that match this criteria, then
- the "play" call will fail.
- }
BASS_VAM_TERM_PRIO = 16;
- {
- If there are no free hardware voices, the buffer to be terminated will be
- the one with the lowest priority.
- }
// BASS_CHANNELINFO types
BASS_CTYPE_SAMPLE = 1;
@@ -238,22 +233,17 @@ const BASS_CTYPE_MUSIC_MO3 = $00100; // MO3 flag
// 3D channel modes
- BASS_3DMODE_NORMAL = 0;
- { normal 3D processing }
- BASS_3DMODE_RELATIVE = 1;
- {
- The channel's 3D position (position/velocity/
- orientation) are relative to the listener. When the
- listener's position/velocity/orientation is changed
- with BASS_Set3DPosition, the channel's position
- relative to the listener does not change.
- }
- BASS_3DMODE_OFF = 2;
- {
- Turn off 3D processing on the channel, the sound will
- be played in the center.
- }
+ BASS_3DMODE_NORMAL = 0; // normal 3D processing
+ BASS_3DMODE_RELATIVE = 1; // position is relative to the listener
+ BASS_3DMODE_OFF = 2; // no 3D processing
+
+ // software 3D mixing algorithms (used with BASS_CONFIG_3DALGORITHM)
+ BASS_3DALG_DEFAULT = 0;
+ BASS_3DALG_OFF = 1;
+ BASS_3DALG_FULL = 2;
+ BASS_3DALG_LIGHT = 3;
+{$IFDEF MSWINDOWS}
// EAX environments, use with BASS_SetEAXParameters
EAX_ENVIRONMENT_GENERIC = 0;
EAX_ENVIRONMENT_PADDEDCELL = 1;
@@ -283,119 +273,43 @@ const EAX_ENVIRONMENT_PSYCHOTIC = 25;
// total number of environments
EAX_ENVIRONMENT_COUNT = 26;
+{$ENDIF}
- // software 3D mixing algorithm modes (used with BASS_Set3DAlgorithm)
- BASS_3DALG_DEFAULT = 0;
- {
- default algorithm (currently translates to BASS_3DALG_OFF)
- }
- BASS_3DALG_OFF = 1;
- {
- Uses normal left and right panning. The vertical axis is ignored except
- for scaling of volume due to distance. Doppler shift and volume scaling
- are still applied, but the 3D filtering is not performed. This is the
- most CPU efficient software implementation, but provides no virtual 3D
- audio effect. Head Related Transfer Function processing will not be done.
- Since only normal stereo panning is used, a channel using this algorithm
- may be accelerated by a 2D hardware voice if no free 3D hardware voices
- are available.
- }
- BASS_3DALG_FULL = 2;
- {
- This algorithm gives the highest quality 3D audio effect, but uses more
- CPU. Requires Windows 98 2nd Edition or Windows 2000 that uses WDM
- drivers, if this mode is not available then BASS_3DALG_OFF will be used
- instead.
- }
- BASS_3DALG_LIGHT = 3;
- {
- This algorithm gives a good 3D audio effect, and uses less CPU than the
- FULL mode. Requires Windows 98 2nd Edition or Windows 2000 that uses WDM
- drivers, if this mode is not available then BASS_3DALG_OFF will be used
- instead.
- }
+ BASS_STREAMPROC_END = $80000000; // end of user stream flag
- {
- Sync types (with BASS_ChannelSetSync() "param" and
- SYNCPROC "data" definitions) & flags.
- }
- BASS_SYNC_POS = 0;
- {
- Sync when a channel reaches a position.
- param: position in bytes
- data : not used
- }
- BASS_SYNC_END = 2;
- {
- Sync when a channel reaches the end.
- param: not used
- data : not used
- }
- BASS_SYNC_META = 4;
- {
- Sync when metadata is received in a stream.
- param: not used
- data : pointer to the metadata
- }
- BASS_SYNC_SLIDE = 5;
- {
- Sync when an attribute slide is completed.
- param: not used
- data : the type of slide completed (one of the BASS_SLIDE_xxx values)
- }
- BASS_SYNC_STALL = 6;
- {
- Sync when playback has stalled.
- param: not used
- data : 0=stalled, 1=resumed
- }
- BASS_SYNC_DOWNLOAD = 7;
- {
- Sync when downloading of an internet (or "buffered" user file) stream has ended.
- param: not used
- data : not used
- }
- BASS_SYNC_FREE = 8;
- {
- Sync when a channel is freed.
- param: not used
- data : not used
- }
- BASS_SYNC_SETPOS = 11;
- {
- Sync when a channel's position is set.
- param: not used
- data : 0 = playback buffer not flushed, 1 = playback buffer flushed
- }
- BASS_SYNC_MUSICPOS = 10;
- {
- Sync when a MOD music reaches an order:row position.
- param: LOWORD=order (0=first, -1=all) HIWORD=row (0=first, -1=all)
- data : LOWORD=order HIWORD=row
- }
- BASS_SYNC_MUSICINST = 1;
- {
- Sync when an instrument (sample for the non-instrument based formats)
- is played in a MOD music (not including retrigs).
- param: LOWORD=instrument (1=first) HIWORD=note (0=c0...119=b9, -1=all)
- data : LOWORD=note HIWORD=volume (0-64)
- }
- BASS_SYNC_MUSICFX = 3;
- {
- Sync when the "sync" effect (XM/MTM/MOD: E8x/Wxx, IT/S3M: S2x) is used.
- param: 0:data=pos, 1:data="x" value
- data : param=0: LOWORD=order HIWORD=row, param=1: "x" value
- }
- BASS_SYNC_MESSAGE = $20000000;
- { FLAG: post a Windows message (instead of callback)
- When using a window message "callback", the message to post is given in the "proc"
- parameter of BASS_ChannelSetSync, and is posted to the window specified in the BASS_Init
- call. The message parameters are: WPARAM = data, LPARAM = user.
- }
- BASS_SYNC_MIXTIME = $40000000;
- { FLAG: sync at mixtime, else at playtime }
- BASS_SYNC_ONETIME = $80000000;
- { FLAG: sync only once, else continuously }
+
+ // BASS_StreamCreateFileUser file systems
+ STREAMFILE_NOBUFFER = 0;
+ STREAMFILE_BUFFER = 1;
+ STREAMFILE_BUFFERPUSH = 2;
+
+ // BASS_StreamPutFileData options
+ BASS_FILEDATA_END = 0; // end & close the file
+
+ // BASS_StreamGetFilePosition modes
+ BASS_FILEPOS_CURRENT = 0;
+ BASS_FILEPOS_DECODE = BASS_FILEPOS_CURRENT;
+ BASS_FILEPOS_DOWNLOAD = 1;
+ BASS_FILEPOS_END = 2;
+ BASS_FILEPOS_START = 3;
+ BASS_FILEPOS_CONNECTED = 4;
+ BASS_FILEPOS_BUFFER = 5;
+
+ // BASS_ChannelSetSync types
+ BASS_SYNC_POS = 0;
+ BASS_SYNC_END = 2;
+ BASS_SYNC_META = 4;
+ BASS_SYNC_SLIDE = 5;
+ BASS_SYNC_STALL = 6;
+ BASS_SYNC_DOWNLOAD = 7;
+ BASS_SYNC_FREE = 8;
+ BASS_SYNC_SETPOS = 11;
+ BASS_SYNC_MUSICPOS = 10;
+ BASS_SYNC_MUSICINST = 1;
+ BASS_SYNC_MUSICFX = 3;
+ BASS_SYNC_OGG_CHANGE = 12;
+ BASS_SYNC_MIXTIME = $40000000; // FLAG: sync at mixtime, else at playtime
+ BASS_SYNC_ONETIME = $80000000; // FLAG: sync only once, else continuously
// BASS_ChannelIsActive return values
BASS_ACTIVE_STOPPED = 0;
@@ -403,59 +317,56 @@ const BASS_ACTIVE_STALLED = 2;
BASS_ACTIVE_PAUSED = 3;
- // BASS_ChannelIsSliding return flags
- BASS_SLIDE_FREQ = 1;
- BASS_SLIDE_VOL = 2;
- BASS_SLIDE_PAN = 4;
+ // Channel attributes
+ BASS_ATTRIB_FREQ = 1;
+ BASS_ATTRIB_VOL = 2;
+ BASS_ATTRIB_PAN = 3;
+ BASS_ATTRIB_EAXMIX = 4;
+ BASS_ATTRIB_MUSIC_AMPLIFY = $100;
+ BASS_ATTRIB_MUSIC_PANSEP = $101;
+ BASS_ATTRIB_MUSIC_PSCALER = $102;
+ BASS_ATTRIB_MUSIC_BPM = $103;
+ BASS_ATTRIB_MUSIC_SPEED = $104;
+ BASS_ATTRIB_MUSIC_VOL_GLOBAL = $105;
+ BASS_ATTRIB_MUSIC_VOL_CHAN = $200; // + channel #
+ BASS_ATTRIB_MUSIC_VOL_INST = $300; // + instrument #
// BASS_ChannelGetData flags
BASS_DATA_AVAILABLE = 0; // query how much data is buffered
BASS_DATA_FLOAT = $40000000; // flag: return floating-point sample data
- BASS_DATA_FFT512 = $80000000; // 512 sample FFT
- BASS_DATA_FFT1024 = $80000001; // 1024 FFT
- BASS_DATA_FFT2048 = $80000002; // 2048 FFT
- BASS_DATA_FFT4096 = $80000003; // 4096 FFT
- BASS_DATA_FFT8192 = $80000004; // 8192 FFT
+ BASS_DATA_FFT256 = $80000000; // 256 sample FFT
+ BASS_DATA_FFT512 = $80000001; // 512 FFT
+ BASS_DATA_FFT1024 = $80000002; // 1024 FFT
+ BASS_DATA_FFT2048 = $80000003; // 2048 FFT
+ BASS_DATA_FFT4096 = $80000004; // 4096 FFT
+ BASS_DATA_FFT8192 = $80000005; // 8192 FFT
BASS_DATA_FFT_INDIVIDUAL = $10; // FFT flag: FFT for each channel, else all combined
BASS_DATA_FFT_NOWINDOW = $20; // FFT flag: no Hanning window
// BASS_ChannelGetTags types : what's returned
BASS_TAG_ID3 = 0; // ID3v1 tags : 128 byte block
BASS_TAG_ID3V2 = 1; // ID3v2 tags : variable length block
- BASS_TAG_OGG = 2; // OGG comments : array of null-terminated strings
- BASS_TAG_HTTP = 3; // HTTP headers : array of null-terminated strings
- BASS_TAG_ICY = 4; // ICY headers : array of null-terminated strings
+ BASS_TAG_OGG = 2; // OGG comments : series of null-terminated strings
+ BASS_TAG_HTTP = 3; // HTTP headers : series of null-terminated strings
+ BASS_TAG_ICY = 4; // ICY headers : series of null-terminated strings
BASS_TAG_META = 5; // ICY metadata : null-terminated string
BASS_TAG_VENDOR = 9; // OGG encoder : null-terminated string
BASS_TAG_LYRICS3 = 10; // Lyric3v2 tag : ASCII string
- BASS_TAG_RIFF_INFO = $100; // RIFF/WAVE tags : array of null-terminated ANSI strings
+ BASS_TAG_RIFF_INFO = $100; // RIFF/WAVE tags : series of null-terminated ANSI strings
BASS_TAG_MUSIC_NAME = $10000; // MOD music name : ANSI string
BASS_TAG_MUSIC_MESSAGE = $10001; // MOD message : ANSI string
BASS_TAG_MUSIC_INST = $10100; // + instrument #, MOD instrument name : ANSI string
BASS_TAG_MUSIC_SAMPLE = $10300; // + sample #, MOD sample name : ANSI string
- BASS_FX_CHORUS = 0; // GUID_DSFX_STANDARD_CHORUS
- BASS_FX_COMPRESSOR = 1; // GUID_DSFX_STANDARD_COMPRESSOR
- BASS_FX_DISTORTION = 2; // GUID_DSFX_STANDARD_DISTORTION
- BASS_FX_ECHO = 3; // GUID_DSFX_STANDARD_ECHO
- BASS_FX_FLANGER = 4; // GUID_DSFX_STANDARD_FLANGER
- BASS_FX_GARGLE = 5; // GUID_DSFX_STANDARD_GARGLE
- BASS_FX_I3DL2REVERB = 6; // GUID_DSFX_STANDARD_I3DL2REVERB
- BASS_FX_PARAMEQ = 7; // GUID_DSFX_STANDARD_PARAMEQ
- BASS_FX_REVERB = 8; // GUID_DSFX_WAVES_REVERB
-
- BASS_FX_PHASE_NEG_180 = 0;
- BASS_FX_PHASE_NEG_90 = 1;
- BASS_FX_PHASE_ZERO = 2;
- BASS_FX_PHASE_90 = 3;
- BASS_FX_PHASE_180 = 4;
+ // BASS_ChannelGetLength/GetPosition/SetPosition modes
+ BASS_POS_BYTE = 0; // byte position
+ BASS_POS_MUSIC_ORDER = 1; // order.row position, MAKELONG(order,row)
// BASS_RecordSetInput flags
BASS_INPUT_OFF = $10000;
BASS_INPUT_ON = $20000;
- BASS_INPUT_LEVEL = $40000;
- BASS_INPUT_TYPE_MASK = $ff000000;
+ BASS_INPUT_TYPE_MASK = $FF000000;
BASS_INPUT_TYPE_UNDEF = $00000000;
BASS_INPUT_TYPE_DIGITAL = $01000000;
BASS_INPUT_TYPE_LINE = $02000000;
@@ -466,59 +377,23 @@ const BASS_INPUT_TYPE_SPEAKER = $07000000;
BASS_INPUT_TYPE_WAVE = $08000000;
BASS_INPUT_TYPE_AUX = $09000000;
- BASS_INPUT_TYPE_ANALOG = $0a000000;
-
- // BASS_SetNetConfig flags
- BASS_NET_TIMEOUT = 0;
- BASS_NET_BUFFER = 1;
-
- // BASS_StreamGetFilePosition modes
- BASS_FILEPOS_CURRENT = 0;
- BASS_FILEPOS_DECODE = BASS_FILEPOS_CURRENT;
- BASS_FILEPOS_DOWNLOAD = 1;
- BASS_FILEPOS_END = 2;
- BASS_FILEPOS_START = 3;
- BASS_FILEPOS_CONNECTED = 4;
-
- // STREAMFILEPROC actions
- BASS_FILE_CLOSE = 0;
- BASS_FILE_READ = 1;
- BASS_FILE_LEN = 3;
- BASS_FILE_SEEK = 4;
-
- BASS_STREAMPROC_END = $80000000; // end of user stream flag
-
- // BASS_MusicSet/GetAttribute options
- BASS_MUSIC_ATTRIB_AMPLIFY = 0;
- BASS_MUSIC_ATTRIB_PANSEP = 1;
- BASS_MUSIC_ATTRIB_PSCALER = 2;
- BASS_MUSIC_ATTRIB_BPM = 3;
- BASS_MUSIC_ATTRIB_SPEED = 4;
- BASS_MUSIC_ATTRIB_VOL_GLOBAL = 5;
- BASS_MUSIC_ATTRIB_VOL_CHAN = $100; // + channel #
- BASS_MUSIC_ATTRIB_VOL_INST = $200; // + instrument #
-
- // BASS_Set/GetConfig options
- BASS_CONFIG_BUFFER = 0;
- BASS_CONFIG_UPDATEPERIOD = 1;
- BASS_CONFIG_MAXVOL = 3;
- BASS_CONFIG_GVOL_SAMPLE = 4;
- BASS_CONFIG_GVOL_STREAM = 5;
- BASS_CONFIG_GVOL_MUSIC = 6;
- BASS_CONFIG_CURVE_VOL = 7;
- BASS_CONFIG_CURVE_PAN = 8;
- BASS_CONFIG_FLOATDSP = 9;
- BASS_CONFIG_3DALGORITHM = 10;
- BASS_CONFIG_NET_TIMEOUT = 11;
- BASS_CONFIG_NET_BUFFER = 12;
- BASS_CONFIG_PAUSE_NOPLAY = 13;
- BASS_CONFIG_NET_PREBUF = 15;
- BASS_CONFIG_NET_AGENT = 16;
- BASS_CONFIG_NET_PROXY = 17;
- BASS_CONFIG_NET_PASSIVE = 18;
- BASS_CONFIG_REC_BUFFER = 19;
- BASS_CONFIG_NET_PLAYLIST = 21;
- BASS_CONFIG_MUSIC_VIRTUAL = 22;
+ BASS_INPUT_TYPE_ANALOG = $0A000000;
+
+ BASS_FX_DX8_CHORUS = 0;
+ BASS_FX_DX8_COMPRESSOR = 1;
+ BASS_FX_DX8_DISTORTION = 2;
+ BASS_FX_DX8_ECHO = 3;
+ BASS_FX_DX8_FLANGER = 4;
+ BASS_FX_DX8_GARGLE = 5;
+ BASS_FX_DX8_I3DL2REVERB = 6;
+ BASS_FX_DX8_PARAMEQ = 7;
+ BASS_FX_DX8_REVERB = 8;
+
+ BASS_DX8_PHASE_NEG_180 = 0;
+ BASS_DX8_PHASE_NEG_90 = 1;
+ BASS_DX8_PHASE_ZERO = 2;
+ BASS_DX8_PHASE_90 = 3;
+ BASS_DX8_PHASE_180 = 4;
type
DWORD = cardinal;
@@ -536,6 +411,13 @@ type HFX = DWORD; // DX8 effect handle
HPLUGIN = DWORD; // Plugin handle
+ // Device info structure
+ BASS_DEVICEINFO = record
+ name: PChar; // description
+ driver: PChar; // driver
+ flags: DWORD;
+ end;
+
BASS_INFO = record
flags: DWORD; // device capabilities (DSCAPS_xxx flags)
hwsize: DWORD; // size of total device hardware memory
@@ -548,12 +430,12 @@ type minbuf: DWORD; // recommended minimum buffer length in ms (requires BASS_DEVICE_LATENCY)
dsver: DWORD; // DirectSound version
latency: DWORD; // delay (in ms) before start of playback (requires BASS_DEVICE_LATENCY)
- initflags: DWORD; // "flags" parameter of BASS_Init call
+ initflags: DWORD; // BASS_Init "flags" parameter
speakers: DWORD; // number of speakers available
- driver: PChar; // driver
freq: DWORD; // current output rate (OSX only)
end;
+ // Recording device info structure
BASS_RECORDINFO = record
flags: DWORD; // device capabilities (DSCCAPS_xxx flags)
formats: DWORD; // supported standard formats (WAVE_FORMAT_xxx flags)
@@ -563,60 +445,54 @@ type freq: DWORD; // current input rate (OSX only)
end;
- BASS_CHANNELINFO = record
- freq: DWORD; // default playback rate
- chans: DWORD; // channels
- flags: DWORD; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
- ctype: DWORD; // type of channel
- origres: DWORD; // original resolution
- plugin: HPLUGIN; // plugin
- end;
-
- BASS_PLUGINFORM = record
- ctype: DWORD; // channel type
- name: PChar; // format description
- exts: PChar; // file extension filter (*.ext1;*.ext2;etc...)
- end;
- PBASS_PLUGINFORMS = ^TBASS_PLUGINFORMS;
- TBASS_PLUGINFORMS = array[0..maxInt div sizeOf(BASS_PLUGINFORM) - 1] of BASS_PLUGINFORM;
-
- BASS_PLUGININFO = record
- version: DWORD; // version (same form as BASS_GetVersion)
- formatc: DWORD; // number of formats
- formats: PBASS_PLUGINFORMS; // the array of formats
- end;
- PBASS_PLUGININFO = ^BASS_PLUGININFO;
-
// Sample info structure
BASS_SAMPLE = record
freq: DWORD; // default playback rate
- volume: DWORD; // default volume (0-100)
- pan: Integer; // default pan (-100=left, 0=middle, 100=right)
+ volume: FLOAT; // default volume (0-100)
+ pan: FLOAT; // default pan (-100=left, 0=middle, 100=right)
flags: DWORD; // BASS_SAMPLE_xxx flags
length: DWORD; // length (in samples, not bytes)
max: DWORD; // maximum simultaneous playbacks
origres: DWORD; // original resolution
chans: DWORD; // number of channels
mingap: DWORD; // minimum gap (ms) between creating channels
- {
- The following are the sample's default 3D attributes
- (if the sample is 3D, BASS_SAMPLE_3D is in flags)
- see BASS_ChannelSet3DAttributes
- }
mode3d: DWORD; // BASS_3DMODE_xxx mode
mindist: FLOAT; // minimum distance
maxdist: FLOAT; // maximum distance
iangle: DWORD; // angle of inside projection cone
oangle: DWORD; // angle of outside projection cone
- outvol: DWORD; // delta-volume outside the projection cone
- {
- The following are the defaults used if the sample uses the DirectX 7
- voice allocation/management features.
- }
+ outvol: FLOAT; // delta-volume outside the projection cone
vam: DWORD; // voice allocation/management flags (BASS_VAM_xxx)
priority: DWORD; // priority (0=lowest, $ffffffff=highest)
end;
+ // Channel info structure
+ BASS_CHANNELINFO = record
+ freq: DWORD; // default playback rate
+ chans: DWORD; // channels
+ flags: DWORD; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
+ ctype: DWORD; // type of channel
+ origres: DWORD; // original resolution
+ plugin: HPLUGIN; // plugin
+ sample: HSAMPLE; // sample
+ filename: PChar; // filename
+ end;
+
+ BASS_PLUGINFORM = record
+ ctype: DWORD; // channel type
+ name: PChar; // format description
+ exts: PChar; // file extension filter (*.ext1;*.ext2;etc...)
+ end;
+ PBASS_PLUGINFORMS = ^TBASS_PLUGINFORMS;
+ TBASS_PLUGINFORMS = array[0..maxInt div sizeOf(BASS_PLUGINFORM) - 1] of BASS_PLUGINFORM;
+
+ BASS_PLUGININFO = record
+ version: DWORD; // version (same form as BASS_GetVersion)
+ formatc: DWORD; // number of formats
+ formats: PBASS_PLUGINFORMS; // the array of formats
+ end;
+ PBASS_PLUGININFO = ^BASS_PLUGININFO;
+
// 3D vector (for 3D positions/velocities/orientations)
BASS_3DVECTOR = record
x: FLOAT; // +=right, -=left
@@ -624,17 +500,30 @@ type z: FLOAT; // +=front, -=behind
end;
- BASS_FXCHORUS = record
+ // User file stream callback functions
+ FILECLOSEPROC = procedure(user: Pointer); {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+ FILELENPROC = function(user: Pointer): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+ FILEREADPROC = function(buffer: Pointer; length: DWORD; user: Pointer): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+ FILESEEKPROC = function(offset: QWORD; user: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
+
+ BASS_FILEPROCS = record
+ close: FILECLOSEPROC;
+ length: FILELENPROC;
+ read: FILEREADPROC;
+ seek: FILESEEKPROC;
+ end;
+
+ BASS_DX8_CHORUS = record
fWetDryMix: FLOAT;
fDepth: FLOAT;
fFeedback: FLOAT;
fFrequency: FLOAT;
lWaveform: DWORD; // 0=triangle, 1=sine
fDelay: FLOAT;
- lPhase: DWORD; // BASS_FX_PHASE_xxx
+ lPhase: DWORD; // BASS_DX8_PHASE_xxx
end;
- BASS_FXCOMPRESSOR = record
+ BASS_DX8_COMPRESSOR = record
fGain: FLOAT;
fAttack: FLOAT;
fRelease: FLOAT;
@@ -643,7 +532,7 @@ type fPredelay: FLOAT;
end;
- BASS_FXDISTORTION = record
+ BASS_DX8_DISTORTION = record
fGain: FLOAT;
fEdge: FLOAT;
fPostEQCenterFrequency: FLOAT;
@@ -651,7 +540,7 @@ type fPreLowpassCutoff: FLOAT;
end;
- BASS_FXECHO = record
+ BASS_DX8_ECHO = record
fWetDryMix: FLOAT;
fFeedback: FLOAT;
fLeftDelay: FLOAT;
@@ -659,22 +548,22 @@ type lPanDelay: BOOL;
end;
- BASS_FXFLANGER = record
+ BASS_DX8_FLANGER = record
fWetDryMix: FLOAT;
fDepth: FLOAT;
fFeedback: FLOAT;
fFrequency: FLOAT;
lWaveform: DWORD; // 0=triangle, 1=sine
fDelay: FLOAT;
- lPhase: DWORD; // BASS_FX_PHASE_xxx
+ lPhase: DWORD; // BASS_DX8_PHASE_xxx
end;
- BASS_FXGARGLE = record
+ BASS_DX8_GARGLE = record
dwRateHz: DWORD; // Rate of modulation in hz
dwWaveShape: DWORD; // 0=triangle, 1=square
end;
- BASS_FXI3DL2REVERB = record
+ BASS_DX8_I3DL2REVERB = record
lRoom: Longint; // [-10000, 0] default: -1000 mB
lRoomHF: Longint; // [-10000, 0] default: 0 mB
flRoomRolloffFactor: FLOAT; // [0.0, 10.0] default: 0.0
@@ -689,13 +578,13 @@ type flHFReference: FLOAT; // [20.0, 20000.0] default: 5000.0 Hz
end;
- BASS_FXPARAMEQ = record
+ BASS_DX8_PARAMEQ = record
fCenter: FLOAT;
fBandwidth: FLOAT;
fGain: FLOAT;
end;
- BASS_FXREVERB = record
+ BASS_DX8_REVERB = record
fInGain: FLOAT; // [-96.0,0.0] default: 0.0 dB
fReverbMix: FLOAT; // [-96.0,0.0] default: 0.0 db
fReverbTime: FLOAT; // [0.001,3000.0] default: 1000.0 ms
@@ -703,7 +592,7 @@ type end;
// callback function types
- STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: DWORD): DWORD; stdcall;
+ STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: Pointer): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
{
User stream callback function. NOTE: A stream function should obviously be as
quick as possible, other streams (and MOD musics) can't be mixed until
@@ -716,17 +605,14 @@ type the stream.
}
- STREAMFILEPROC = function(action, param1, param2, user: DWORD): DWORD; stdcall;
- {
- User file stream callback function.
- action : The action to perform, one of BASS_FILE_xxx values.
- param1 : Depends on "action"
- param2 : Depends on "action"
- user : The 'user' parameter value given when calling BASS_StreamCreate
- RETURN : Depends on "action"
- }
+const
+ // special STREAMPROCs
+ STREAMPROC_DUMMY {: STREAMPROC} = Pointer(0); // "dummy" stream
+ STREAMPROC_PUSH {: STREAMPROC} = Pointer(-1); // push stream
+
+type
- DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: DWORD); stdcall;
+ DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: Pointer); {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
{
Internet stream download callback function.
buffer : Buffer containing the downloaded data... NULL=end of download
@@ -734,7 +620,7 @@ type user : The 'user' parameter value given when calling BASS_StreamCreateURL
}
- SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: DWORD); stdcall;
+ SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: Pointer); {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
{
Sync callback function. NOTE: a sync callback function should be very
quick as other syncs cannot be processed until it has finished. If the
@@ -746,7 +632,7 @@ type user : The 'user' parameter given when calling BASS_ChannelSetSync
}
- DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: DWORD); stdcall;
+ DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: Pointer); {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
{
DSP callback function. NOTE: A DSP function should obviously be as quick
as possible... other DSP functions, streams and MOD musics can not be
@@ -758,7 +644,7 @@ type user : The 'user' parameter given when calling BASS_ChannelSetDSP
}
- RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: DWORD): BOOL; stdcall;
+ RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}
{
Recording callback function.
handle : The recording handle
@@ -771,117 +657,130 @@ type // Functions
const
+{$IFDEF MSWINDOWS}
bassdll = 'bass.dll';
-
-function BASS_SetConfig(option, value: DWORD): DWORD; stdcall; external bassdll;
-function BASS_GetConfig(option: DWORD): DWORD; stdcall; external bassdll;
-function BASS_GetVersion: DWORD; stdcall; external bassdll;
-function BASS_GetDeviceDescription(device: DWORD): PChar; stdcall; external bassdll;
-function BASS_ErrorGetCode: Integer; stdcall; external bassdll;
-function BASS_Init(device: Integer; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; stdcall; external bassdll;
-function BASS_SetDevice(device: DWORD): BOOL; stdcall; external bassdll;
-function BASS_GetDevice: DWORD; stdcall; external bassdll;
-function BASS_Free: BOOL; stdcall; external bassdll;
-function BASS_GetDSoundObject(obj: DWORD): Pointer; stdcall; external bassdll;
-function BASS_GetInfo(var info: BASS_INFO): BOOL; stdcall; external bassdll;
-function BASS_Update: BOOL; stdcall; external bassdll;
-function BASS_GetCPU: FLOAT; stdcall; external bassdll;
-function BASS_Start: BOOL; stdcall; external bassdll;
-function BASS_Stop: BOOL; stdcall; external bassdll;
-function BASS_Pause: BOOL; stdcall; external bassdll;
-function BASS_SetVolume(volume: DWORD): BOOL; stdcall; external bassdll;
-function BASS_GetVolume: Integer; stdcall; external bassdll;
-
-function BASS_PluginLoad(filename: PChar; flags: DWORD): HPLUGIN; stdcall; external bassdll;
-function BASS_PluginFree(handle: HPLUGIN): BOOL; stdcall; external bassdll;
-function BASS_PluginGetInfo(handle: HPLUGIN): PBASS_PLUGININFO; stdcall; external bassdll;
-
-function BASS_Set3DFactors(distf, rollf, doppf: FLOAT): BOOL; stdcall; external bassdll;
-function BASS_Get3DFactors(var distf, rollf, doppf: FLOAT): BOOL; stdcall; external bassdll;
-function BASS_Set3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
-function BASS_Get3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
-procedure BASS_Apply3D; stdcall; external bassdll;
-function BASS_SetEAXParameters(env: Integer; vol, decay, damp: FLOAT): BOOL; stdcall; external bassdll;
-function BASS_GetEAXParameters(var env: DWORD; var vol, decay, damp: FLOAT): BOOL; stdcall; external bassdll;
-
-function BASS_MusicLoad(mem: BOOL; f: Pointer; offset, length, flags, freq: DWORD): HMUSIC; stdcall; external bassdll;
-function BASS_MusicFree(handle: HMUSIC): BOOL; stdcall; external bassdll;
-function BASS_MusicSetAttribute(handle: HMUSIC; attrib,value: DWORD): DWORD; stdcall; external bassdll;
-function BASS_MusicGetAttribute(handle: HMUSIC; attrib: DWORD): DWORD; stdcall; external bassdll;
-function BASS_MusicGetOrders(handle: HMUSIC): DWORD; stdcall; external bassdll;
-function BASS_MusicGetOrderPosition(handle: HMUSIC): DWORD; stdcall; external bassdll;
-
-function BASS_SampleLoad(mem: BOOL; f: Pointer; offset, length, max, flags: DWORD): HSAMPLE; stdcall; external bassdll;
-function BASS_SampleCreate(length, freq, chans, max, flags: DWORD): Pointer; stdcall; external bassdll;
-function BASS_SampleCreateDone: HSAMPLE; stdcall; external bassdll;
-function BASS_SampleFree(handle: HSAMPLE): BOOL; stdcall; external bassdll;
-function BASS_SampleGetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall; external bassdll;
-function BASS_SampleSetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall; external bassdll;
-function BASS_SampleGetChannel(handle: HSAMPLE; onlynew: BOOL): HCHANNEL; stdcall; external bassdll;
-function BASS_SampleGetChannels(handle: HSAMPLE; channels: Pointer): DWORD; stdcall; external bassdll;
-function BASS_SampleStop(handle: HSAMPLE): BOOL; stdcall; external bassdll;
-
-function BASS_StreamCreate(freq, chans, flags: DWORD; proc: Pointer; user: DWORD): HSTREAM; stdcall; external bassdll;
-function BASS_StreamCreateFile(mem: BOOL; f: Pointer; offset, length, flags: DWORD): HSTREAM; stdcall; external bassdll;
-function BASS_StreamCreateURL(url: PChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: DWORD):HSTREAM; stdcall; external bassdll;
-function BASS_StreamCreateFileUser(buffered: BOOL; flags: DWORD; proc: STREAMFILEPROC; user: DWORD): HSTREAM; stdcall; external bassdll;
-function BASS_StreamFree(handle: HSTREAM): BOOL; stdcall; external bassdll;
-function BASS_StreamGetFilePosition(handle:HSTREAM; mode:DWORD) : DWORD;stdcall;external bassdll;
-
-function BASS_RecordGetDeviceDescription(devnum: DWORD):PChar;stdcall;external bassdll;
-function BASS_RecordInit(device: Integer):BOOL;stdcall;external bassdll;
-function BASS_RecordSetDevice(device: DWORD): BOOL; stdcall; external bassdll;
-function BASS_RecordGetDevice: DWORD; stdcall; external bassdll;
-function BASS_RecordFree:BOOL;stdcall;external bassdll;
-function BASS_RecordGetInfo(var info:BASS_RECORDINFO):BOOL;stdcall;external bassdll;
-function BASS_RecordGetInputName(input:Integer):PChar;stdcall;external bassdll;
-function BASS_RecordSetInput(input:Integer; setting:DWORD):BOOL;stdcall;external bassdll;
-function BASS_RecordGetInput(input:Integer):DWORD;stdcall;external bassdll;
-function BASS_RecordStart(freq,chans,flags:DWORD; proc:RECORDPROC; user:DWORD):HRECORD;stdcall;external bassdll;
-
-function BASS_ChannelBytes2Seconds(handle: DWORD; pos: QWORD): FLOAT; stdcall;external bassdll;
-function BASS_ChannelSeconds2Bytes(handle: DWORD; pos: FLOAT): QWORD; stdcall;external bassdll;
-function BASS_ChannelGetDevice(handle: DWORD): DWORD; stdcall; external bassdll;
-function BASS_ChannelSetDevice(handle, device: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelIsActive(handle: DWORD): DWORD; stdcall;external bassdll;
-function BASS_ChannelGetInfo(handle: DWORD; var info:BASS_CHANNELINFO):BOOL;stdcall;external bassdll;
-function BASS_ChannelGetTags(handle: HSTREAM; tags : DWORD): PChar; stdcall; external bassdll;
-function BASS_ChannelSetFlags(handle, flags: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelPreBuf(handle, length: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; stdcall; external bassdll;
-function BASS_ChannelStop(handle: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelPause(handle: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetAttributes(handle: DWORD; freq, volume, pan: Integer): BOOL; stdcall; external bassdll;
-function BASS_ChannelGetAttributes(handle: DWORD; var freq, volume: DWORD; var pan: Integer): BOOL; stdcall; external bassdll;
-function BASS_ChannelSlideAttributes(handle: DWORD; freq, volume, pan: Integer; time: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelIsSliding(handle: DWORD): DWORD; stdcall;external bassdll;
-function BASS_ChannelSet3DAttributes(handle: DWORD; mode: Integer; min, max: FLOAT; iangle, oangle, outvol: Integer): BOOL; stdcall; external bassdll;
-function BASS_ChannelGet3DAttributes(handle: DWORD; var mode: DWORD; var min, max: FLOAT; var iangle, oangle, outvol: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelSet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
-function BASS_ChannelGet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
-function BASS_ChannelGetLength(handle: DWORD): QWORD; stdcall; external bassdll;
-function BASS_ChannelSetPosition(handle: DWORD; pos: QWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelGetPosition(handle: DWORD): QWORD; stdcall; external bassdll;
-function BASS_ChannelGetLevel(handle: DWORD): DWORD; stdcall; external bassdll;
-function BASS_ChannelGetData(handle: DWORD; buffer: Pointer; length: DWORD): DWORD; stdcall; external bassdll;
-function BASS_ChannelSetSync(handle: DWORD; stype: DWORD; param: QWORD; proc: SYNCPROC; user: DWORD): HSYNC; stdcall; external bassdll;
-function BASS_ChannelRemoveSync(handle: DWORD; sync: HSYNC): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetDSP(handle: DWORD; proc: DSPPROC; user: DWORD; priority: Integer): HDSP; stdcall; external bassdll;
-function BASS_ChannelRemoveDSP(handle: DWORD; dsp: HDSP): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetEAXMix(handle: DWORD; mix: FLOAT): BOOL; stdcall; external bassdll;
-function BASS_ChannelGetEAXMix(handle: DWORD; var mix: FLOAT): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetLink(handle, chan: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelRemoveLink(handle, chan: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetFX(handle, etype: DWORD; priority: Integer): HFX; stdcall; external bassdll;
-function BASS_ChannelRemoveFX(handle: DWORD; fx: HFX): BOOL; stdcall; external bassdll;
-
-function BASS_FXSetParameters(handle: HFX; par: Pointer): BOOL; stdcall; external bassdll;
-function BASS_FXGetParameters(handle: HFX; par: Pointer): BOOL; stdcall; external bassdll;
-function BASS_FXReset(handle: HFX): BOOL; stdcall; external bassdll;
+{$ENDIF}
+{$IFDEF DARWIN}
+ bassdll = 'libbass.dylib';
+{$ENDIF}
+
+function BASS_SetConfig(option, value: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_GetConfig(option: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SetConfigPtr(option: DWORD; value: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_GetConfigPtr(option: DWORD): Pointer; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_GetVersion: DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ErrorGetCode: Integer; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_GetDeviceInfo(device: DWORD; var info: BASS_DEVICEINFO): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+{$IFDEF MSWINDOWS}
+function BASS_Init(device: Integer; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+{$ELSE}
+function BASS_Init(device: Integer; freq, flags: DWORD; win: Pointer; clsid: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+{$ENDIF}
+function BASS_SetDevice(device: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_GetDevice: DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_Free: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+{$IFDEF MSWINDOWS}
+function BASS_GetDSoundObject(obj: DWORD): Pointer; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+{$ENDIF}
+function BASS_GetInfo(var info: BASS_INFO): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_Update(length: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_GetCPU: FLOAT; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_Start: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_Stop: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_Pause: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SetVolume(volume: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_GetVolume: FLOAT; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+
+function BASS_PluginLoad(filename: PChar; flags: DWORD): HPLUGIN; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_PluginFree(handle: HPLUGIN): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_PluginGetInfo(handle: HPLUGIN): PBASS_PLUGININFO; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+
+function BASS_Set3DFactors(distf, rollf, doppf: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_Get3DFactors(var distf, rollf, doppf: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_Set3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_Get3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+procedure BASS_Apply3D; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+{$IFDEF MSWINDOWS}
+function BASS_SetEAXParameters(env: Integer; vol, decay, damp: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_GetEAXParameters(var env: DWORD; var vol, decay, damp: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+{$ENDIF}
+
+function BASS_MusicLoad(mem: BOOL; f: Pointer; offset: QWORD; length, flags, freq: DWORD): HMUSIC; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_MusicFree(handle: HMUSIC): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+
+function BASS_SampleLoad(mem: BOOL; f: Pointer; offset: QWORD; length, max, flags: DWORD): HSAMPLE; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleCreate(length, freq, chans, max, flags: DWORD): HSAMPLE; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleFree(handle: HSAMPLE): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleSetData(handle: HSAMPLE; buffer: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleGetData(handle: HSAMPLE; buffer: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleGetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleSetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleGetChannel(handle: HSAMPLE; onlynew: BOOL): HCHANNEL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleGetChannels(handle: HSAMPLE; channels: Pointer): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_SampleStop(handle: HSAMPLE): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+
+function BASS_StreamCreate(freq, chans, flags: DWORD; proc: STREAMPROC; user: Pointer): HSTREAM; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_StreamCreateFile(mem: BOOL; f: Pointer; offset, length: QWORD; flags: DWORD): HSTREAM; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_StreamCreateURL(url: PChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: Pointer):HSTREAM; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_StreamCreateFileUser(system, flags: DWORD; var procs: BASS_FILEPROCS; user: Pointer): HSTREAM; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_StreamFree(handle: HSTREAM): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_StreamGetFilePosition(handle: HSTREAM; mode: DWORD): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_StreamPutData(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_StreamPutFileData(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+
+function BASS_RecordGetDeviceInfo(device: DWORD; var info: BASS_DEVICEINFO): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordInit(device: Integer):BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordSetDevice(device: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordGetDevice: DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordFree: BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordGetInfo(var info: BASS_RECORDINFO): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordGetInputName(input: Integer): PChar; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordSetInput(input: Integer; flags: DWORD; volume: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordGetInput(input: Integer; var volume: FLOAT): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_RecordStart(freq, chans, flags: DWORD; proc: RECORDPROC; user: Pointer): HRECORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+
+function BASS_ChannelBytes2Seconds(handle: DWORD; pos: QWORD): Double; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
+function BASS_ChannelSeconds2Bytes(handle: DWORD; pos: Double): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
+function BASS_ChannelGetDevice(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSetDevice(handle, device: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelIsActive(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
+function BASS_ChannelGetInfo(handle: DWORD; var info: BASS_CHANNELINFO):BOOL;{$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
+function BASS_ChannelGetTags(handle: HSTREAM; tags: DWORD): PChar; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelFlags(handle, flags, mask: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelUpdate(handle, length: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelLock(handle: DWORD; lock: BOOL): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelStop(handle: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelPause(handle: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSetAttribute(handle, attrib: DWORD; value: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelGetAttribute(handle, attrib: DWORD; var value: FLOAT): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSlideAttribute(handle, attrib: DWORD; value: FLOAT; time: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelIsSliding(handle, attrib: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF}external bassdll;
+function BASS_ChannelSet3DAttributes(handle: DWORD; mode: Integer; min, max: FLOAT; iangle, oangle, outvol: Integer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelGet3DAttributes(handle: DWORD; var mode: DWORD; var min, max: FLOAT; var iangle, oangle, outvol: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelGet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelGetLength(handle, mode: DWORD): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSetPosition(handle: DWORD; pos: QWORD; mode: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelGetPosition(handle, mode: DWORD): QWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelGetLevel(handle: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelGetData(handle: DWORD; buffer: Pointer; length: DWORD): DWORD; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSetSync(handle: DWORD; type_: DWORD; param: QWORD; proc: SYNCPROC; user: Pointer): HSYNC; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelRemoveSync(handle: DWORD; sync: HSYNC): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSetDSP(handle: DWORD; proc: DSPPROC; user: Pointer; priority: Integer): HDSP; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelRemoveDSP(handle: DWORD; dsp: HDSP): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSetLink(handle, chan: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelRemoveLink(handle, chan: DWORD): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelSetFX(handle, type_: DWORD; priority: Integer): HFX; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_ChannelRemoveFX(handle: DWORD; fx: HFX): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+
+function BASS_FXSetParameters(handle: HFX; par: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_FXGetParameters(handle: HFX; par: Pointer): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
+function BASS_FXReset(handle: HFX): BOOL; {$IFDEF DLL_STDCALL}stdcall;{$ENDIF}{$IFDEF DLL_CDECL}cdecl;{$ENDIF} external bassdll;
function BASS_SPEAKER_N(n: DWORD): DWORD;
-function MAKEMUSICPOS(order,row: DWORD): DWORD;
+{$IFDEF MSWINDOWS}
function BASS_SetEAXPreset(env: Integer): BOOL;
{
This function is defined in the implementation part of this unit.
@@ -889,7 +788,7 @@ function BASS_SetEAXPreset(env: Integer): BOOL; to set the predefined EAX environments.
env : a EAX_ENVIRONMENT_xxx constant
}
-
+{$ENDIF}
implementation
@@ -898,11 +797,7 @@ begin Result := n shl 24;
end;
-function MAKEMUSICPOS(order,row: DWORD): DWORD;
-begin
- Result := $80000000 or DWORD(MAKELONG(order,row));
-end;
-
+{$IFDEF MSWINDOWS}
function BASS_SetEAXPreset(env: Integer): BOOL;
begin
case (env) of
@@ -962,6 +857,7 @@ begin Result := FALSE;
end;
end;
+{$ENDIF}
end.
// END OF FILE /////////////////////////////////////////////////////////////////
diff --git a/Game/Code/lib/bass/lazarustest.lpi b/Game/Code/lib/bass/lazarustest.lpi deleted file mode 100644 index fd0f1c9c..00000000 --- a/Game/Code/lib/bass/lazarustest.lpi +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="\"/>
- <Version Value="5"/>
- <General>
- <MainUnit Value="0"/>
- <TargetFileExt Value=".exe"/>
- <ActiveEditorIndexAtStart Value="0"/>
- </General>
- <VersionInfo>
- <ProjectVersion Value=""/>
- <Language Value=""/>
- <CharSet Value=""/>
- </VersionInfo>
- <PublishOptions>
- <Version Value="2"/>
- <IgnoreBinaries Value="False"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <Units Count="2">
- <Unit0>
- <Filename Value="lazarustest.lpr"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="lazarustest"/>
- <CursorPos X="38" Y="33"/>
- <TopLine Value="10"/>
- <EditorIndex Value="0"/>
- <UsageCount Value="20"/>
- <Loaded Value="True"/>
- </Unit0>
- <Unit1>
- <Filename Value="delphi\bass.pas"/>
- <UnitName Value="Bass"/>
- <CursorPos X="12" Y="539"/>
- <TopLine Value="589"/>
- <EditorIndex Value="1"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
- </Unit1>
- </Units>
- <JumpHistory Count="30" HistoryIndex="29">
- <Position1>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="778" Column="59" TopLine="758"/>
- </Position1>
- <Position2>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="779" Column="84" TopLine="759"/>
- </Position2>
- <Position3>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="780" Column="63" TopLine="760"/>
- </Position3>
- <Position4>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="781" Column="114" TopLine="761"/>
- </Position4>
- <Position5>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="782" Column="72" TopLine="762"/>
- </Position5>
- <Position6>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="783" Column="58" TopLine="763"/>
- </Position6>
- <Position7>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="784" Column="52" TopLine="764"/>
- </Position7>
- <Position8>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="785" Column="78" TopLine="765"/>
- </Position8>
- <Position9>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="786" Column="76" TopLine="766"/>
- </Position9>
- <Position10>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="787" Column="54" TopLine="767"/>
- </Position10>
- <Position11>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="788" Column="55" TopLine="768"/>
- </Position11>
- <Position12>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="789" Column="53" TopLine="769"/>
- </Position12>
- <Position13>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="790" Column="52" TopLine="770"/>
- </Position13>
- <Position14>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="791" Column="53" TopLine="771"/>
- </Position14>
- <Position15>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="792" Column="72" TopLine="772"/>
- </Position15>
- <Position16>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="793" Column="60" TopLine="773"/>
- </Position16>
- <Position17>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="795" Column="92" TopLine="775"/>
- </Position17>
- <Position18>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="796" Column="75" TopLine="776"/>
- </Position18>
- <Position19>
- <Filename Value="lazarustest.lpr"/>
- <Caret Line="11" Column="42" TopLine="1"/>
- </Position19>
- <Position20>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="786" Column="42" TopLine="762"/>
- </Position20>
- <Position21>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
- </Position21>
- <Position22>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="74" Column="73" TopLine="54"/>
- </Position22>
- <Position23>
- <Filename Value="delphi\bass.pas"/>
- <Caret Line="82" Column="15" TopLine="62"/>
- </Position23>
- <Position24>
- <Filename Value="lazarustest.lpr"/>
- <Caret Line="43" Column="67" TopLine="6"/>
- </Position24>
- <Position25>
- <Filename Value="lazarustest.lpr"/>
- <Caret Line="7" Column="9" TopLine="1"/>
- </Position25>
- <Position26>
- <Filename Value="lazarustest.lpr"/>
- <Caret Line="16" Column="12" TopLine="1"/>
- </Position26>
- <Position27>
- <Filename Value="lazarustest.lpr"/>
- <Caret Line="7" Column="1" TopLine="1"/>
- </Position27>
- <Position28>
- <Filename Value="lazarustest.lpr"/>
- <Caret Line="15" Column="9" TopLine="1"/>
- </Position28>
- <Position29>
- <Filename Value="lazarustest.lpr"/>
- <Caret Line="17" Column="58" TopLine="1"/>
- </Position29>
- <Position30>
- <Filename Value="lazarustest.lpr"/>
- <Caret Line="22" Column="32" TopLine="2"/>
- </Position30>
- </JumpHistory>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <PathDelim Value="\"/>
- <CodeGeneration>
- <Generate Value="Faster"/>
- </CodeGeneration>
- <Other>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
- <Debugging>
- <Exceptions Count="2">
- <Item1>
- <Name Value="ECodetoolError"/>
- </Item1>
- <Item2>
- <Name Value="EFOpenError"/>
- </Item2>
- </Exceptions>
- </Debugging>
-</CONFIG>
diff --git a/Game/Code/lib/bass/lazarustest.lpr b/Game/Code/lib/bass/lazarustest.lpr deleted file mode 100644 index 6faee86d..00000000 --- a/Game/Code/lib/bass/lazarustest.lpr +++ /dev/null @@ -1,51 +0,0 @@ -program lazarustest;
-
-{$mode objfpc}{$H+}
-
-uses
- sysutils,
- bass in 'delphi\bass.pas'
- { add your units here };
-
-var
- chan : HSTREAM;
-
-begin
- // check the correct BASS was loaded
- if (hi(BASS_GetVersion) <> BASSVERSION) then
- begin
- writeln('An incorrect version of BASS.DLL was loaded');
- Halt;
- end;
-
- //init BASS
- if not BASS_Init(0,44100,0,0,nil) then
- writeln('Can''t initialize device');
-
- //creating stream
- if fileexists( 'music.mp3 ') then
- begin
- chan := BASS_StreamCreateFile(FALSE,pchar('music.mp3'),0,0,0);
- if chan = 0 then
- begin
- chan := BASS_MusicLoad(False, pchar('music.mp3'), 0, 0, BASS_MUSIC_RAMPS or BASS_MUSIC_POSRESET or BASS_MUSIC_PRESCAN, 0);
- if (chan = 0) then
- begin
- writeln('Can''t play file');
- Exit;
- end;
- end;
-
- BASS_ChannelPlay(chan,FALSE); // start playing
- end
- else
- begin
- writeln( 'music.mp3 not found.. could not test mp3 playback');
- end;
-
- BASS_Free();
- writeln( 'Seems BASS is compatible with lazarus :) ');
-
-
-end.
-
diff --git a/Game/Code/lib/bass/libbass.dylib b/Game/Code/lib/bass/libbass.dylib Binary files differindex 1168bd07..4d7d8c62 100755 --- a/Game/Code/lib/bass/libbass.dylib +++ b/Game/Code/lib/bass/libbass.dylib |