diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-04-19 21:40:23 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-04-19 21:40:23 +0000 |
commit | ec49bde7e1919e5a460c05903b6ccafc00be0455 (patch) | |
tree | 190870c5c19d1a35e3d0d00567fb16d77f5a782b /src/media/UAudioInput_Bass.pas | |
parent | aecd412bef5a839a34617f11ba2fdf247d086584 (diff) | |
download | usdx-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/media/UAudioInput_Bass.pas')
-rw-r--r-- | src/media/UAudioInput_Bass.pas | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/media/UAudioInput_Bass.pas b/src/media/UAudioInput_Bass.pas index e51ba254..b8f914c5 100644 --- a/src/media/UAudioInput_Bass.pas +++ b/src/media/UAudioInput_Bass.pas @@ -392,8 +392,8 @@ begin BassDevice.BassDeviceID := BassDeviceID; - // bass device name seems to be encoded w/ local encoding - // to-do : check if this is correct + // BASS device names seem to be encoded with local encoding + // TODO: works for windows, check Linux + Mac OS X Descr := DecodeStringUTF8(DeviceInfo.name, encLocale); BassDevice.Name := UnifyDeviceName(Descr, DeviceIndex); @@ -463,7 +463,9 @@ begin break; SetLength(BassDevice.Source, Length(BassDevice.Source)+1); - BassDevice.Source[SourceIndex].Name := SourceName; + // BASS source names seem to be encoded with local encoding + // TODO: works for windows, check Linux + Mac OS X + BassDevice.Source[SourceIndex].Name := DecodeStringUTF8(SourceName, encLocale); // get input-source info Flags := BASS_RecordGetInput(SourceIndex, PSingle(nil)^); |