aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/media/UAudioInput_Bass.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
commit1ab628e8ad6c85c8f1b562f10480253ee3e622b7 (patch)
treed21621f68850ecd7762137e1c4387fa15731a811 /Lua/src/media/UAudioInput_Bass.pas
parent6ec275387c320d3d9a8f5b6fe185687643565b8c (diff)
downloadusdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.gz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.xz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.zip
merged trunk into lua branch
plugin loading is disabled atm because of a bug reading the files (lua may be the reason). Reading the files in usdx and passing the contents to lua may solve this git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2019 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Lua/src/media/UAudioInput_Bass.pas')
-rw-r--r--Lua/src/media/UAudioInput_Bass.pas7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lua/src/media/UAudioInput_Bass.pas b/Lua/src/media/UAudioInput_Bass.pas
index cf292c45..9d4417f1 100644
--- a/Lua/src/media/UAudioInput_Bass.pas
+++ b/Lua/src/media/UAudioInput_Bass.pas
@@ -95,7 +95,7 @@ var
* user - players associated with left/right channels
*}
function MicrophoneCallback(stream: HSTREAM; buffer: Pointer;
- len: Cardinal; inputDevice: Pointer): boolean; {$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
+ len: integer; inputDevice: Pointer): boolean; {$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
begin
AudioInputProcessor.HandleMicrophoneData(buffer, len, inputDevice);
Result := true;
@@ -489,6 +489,11 @@ end;
function TAudioInput_Bass.InitializeRecord(): boolean;
begin
BassCore := TAudioCore_Bass.GetInstance();
+ if not BassCore.CheckVersion then
+ begin
+ Result := false;
+ Exit;
+ end;
Result := EnumDevices();
end;