aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/base/URecord.pas6
-rw-r--r--src/media/UAudioInput_Bass.pas10
-rw-r--r--src/media/UAudioInput_Portaudio.pas2
3 files changed, 11 insertions, 7 deletions
diff --git a/src/base/URecord.pas b/src/base/URecord.pas
index a3f665e5..c4612adb 100644
--- a/src/base/URecord.pas
+++ b/src/base/URecord.pas
@@ -102,7 +102,7 @@ type
TAudioInputDevice = class
public
CfgIndex: integer; // index of this device in Ini.InputDeviceConfig
- Name: string; // soundcard name
+ Name: UTF8String; // soundcard name
Source: array of TAudioInputSource; // soundcard input-sources
SourceRestore: integer; // source-index that will be selected after capturing (-1: not detected)
MicSource: integer; // source-index of mic (-1: none detected)
@@ -143,7 +143,7 @@ type
private
Started: boolean;
protected
- function UnifyDeviceName(const name: string; deviceIndex: integer): string;
+ function UnifyDeviceName(const name: UTF8String; deviceIndex: integer): UTF8String;
public
function GetName: String; virtual; abstract;
function InitializeRecord: boolean; virtual; abstract;
@@ -741,7 +741,7 @@ begin
Started := false;
end;
-function TAudioInputBase.UnifyDeviceName(const name: string; deviceIndex: integer): string;
+function TAudioInputBase.UnifyDeviceName(const name: UTF8String; deviceIndex: integer): UTF8String;
var
count: integer; // count of devices with this name
diff --git a/src/media/UAudioInput_Bass.pas b/src/media/UAudioInput_Bass.pas
index 9d4417f1..e51ba254 100644
--- a/src/media/UAudioInput_Bass.pas
+++ b/src/media/UAudioInput_Bass.pas
@@ -46,6 +46,7 @@ uses
UIni,
ULog,
UAudioCore_Bass,
+ UTextEncoding,
UCommon, // (Note: for MakeLong on non-windows platforms)
{$IFDEF MSWINDOWS}
Windows, // (Note: for MakeLong)
@@ -352,7 +353,7 @@ end;
function TAudioInput_Bass.EnumDevices(): boolean;
var
- Descr: PChar;
+ Descr: UTF8String;
SourceName: PChar;
Flags: integer;
BassDeviceID: integer;
@@ -389,9 +390,12 @@ begin
BassDevice := TBassInputDevice.Create();
AudioInputProcessor.DeviceList[DeviceIndex] := BassDevice;
- Descr := DeviceInfo.name;
-
BassDevice.BassDeviceID := BassDeviceID;
+
+ // bass device name seems to be encoded w/ local encoding
+ // to-do : check if this is correct
+ Descr := DecodeStringUTF8(DeviceInfo.name, encLocale);
+
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)
diff --git a/src/media/UAudioInput_Portaudio.pas b/src/media/UAudioInput_Portaudio.pas
index c5ec8115..95b0f104 100644
--- a/src/media/UAudioInput_Portaudio.pas
+++ b/src/media/UAudioInput_Portaudio.pas
@@ -271,7 +271,7 @@ var
i: integer;
paApiIndex: TPaHostApiIndex;
paApiInfo: PPaHostApiInfo;
- deviceName: string;
+ deviceName: UTF8String;
deviceIndex: TPaDeviceIndex;
deviceInfo: PPaDeviceInfo;
channelCnt: integer;