From d35ae3cd792d22766f56c8210781148c36c9ae62 Mon Sep 17 00:00:00 2001 From: tobigun Date: Sun, 6 Jun 2010 08:23:22 +0000 Subject: Do not overwrite a devices MicSource if it is already set (Note: MicSource is not used at the moment) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2447 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/media/UAudioInput_Bass.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/media/UAudioInput_Bass.pas b/src/media/UAudioInput_Bass.pas index b8f914c5..0e79b343 100644 --- a/src/media/UAudioInput_Bass.pas +++ b/src/media/UAudioInput_Bass.pas @@ -471,9 +471,12 @@ begin Flags := BASS_RecordGetInput(SourceIndex, PSingle(nil)^); if (Flags <> -1) then begin - // is the current source a mic-source? - if ((Flags and BASS_INPUT_TYPE_MIC) <> 0) then + // chech if current source is a mic (and none was set before) + if ((Flags and BASS_INPUT_TYPE_MIC) <> 0) and + (BassDevice.MicSource = -1) then + begin BassDevice.MicSource := SourceIndex; + end; end; Inc(SourceIndex); -- cgit v1.2.3