aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/URecord.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-19 21:40:23 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-19 21:40:23 +0000
commitec49bde7e1919e5a460c05903b6ccafc00be0455 (patch)
tree190870c5c19d1a35e3d0d00567fb16d77f5a782b /src/base/URecord.pas
parentaecd412bef5a839a34617f11ba2fdf247d086584 (diff)
downloadusdx-ec49bde7e1919e5a460c05903b6ccafc00be0455.tar.gz
usdx-ec49bde7e1919e5a460c05903b6ccafc00be0455.tar.xz
usdx-ec49bde7e1919e5a460c05903b6ccafc00be0455.zip
bugfix for crash with portaudio (all platforms):
- UAudioInput_Portaudio: UnifyDeviceNames was called with the wrong index further changes: - BASS input source-names seem to be encoded with local encoding and are converted to UTF8 - Portaudio source and device names encoding is auto-detected and converted to UTF8 - some clean-up git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2252 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/URecord.pas')
-rw-r--r--src/base/URecord.pas16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/base/URecord.pas b/src/base/URecord.pas
index c4612adb..09ac92de 100644
--- a/src/base/URecord.pas
+++ b/src/base/URecord.pas
@@ -95,7 +95,7 @@ const
type
TAudioInputSource = record
- Name: string;
+ Name: UTF8String;
end;
// soundcard input-devices information
@@ -745,7 +745,7 @@ function TAudioInputBase.UnifyDeviceName(const name: UTF8String; deviceIndex: in
var
count: integer; // count of devices with this name
- function IsDuplicate(const name: string): boolean;
+ function IsDuplicate(const name: UTF8String): boolean;
var
i: integer;
begin
@@ -754,11 +754,13 @@ var
for i := 0 to deviceIndex-1 do
begin
if (AudioInputProcessor.DeviceList[i] <> nil) then
- if (AudioInputProcessor.DeviceList[i].Name = name) then
- begin
- Result := true;
- Break;
- end;
+ begin
+ if (AudioInputProcessor.DeviceList[i].Name = name) then
+ begin
+ Result := true;
+ Break;
+ end;
+ end;
end;
end;