diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-05-08 22:46:29 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-05-08 22:46:29 +0000 |
commit | 69cd34b1a50914fad7e5befaa848a6a2c537b4ac (patch) | |
tree | 2af1f9f588faa82c445026c212250f9cf38d26a2 /src/screens | |
parent | 4ae6069e48c8b30610cec32c7508e2a7400d4d35 (diff) | |
download | usdx-69cd34b1a50914fad7e5befaa848a6a2c537b4ac.tar.gz usdx-69cd34b1a50914fad7e5befaa848a6a2c537b4ac.tar.xz usdx-69cd34b1a50914fad7e5befaa848a6a2c537b4ac.zip |
validate microphone settings when leaving the record options and when USDX is started:
- check if a user is assigned to multiple devices. If this is the case either do not leave the record options (if we already are there) or enter the record options (if USDX was started)
- the check is performed by calling TAudioInputProcessor.ValidateSettings()
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2346 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/UScreenOptionsRecord.pas | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/screens/UScreenOptionsRecord.pas b/src/screens/UScreenOptionsRecord.pas index b7a40676..0f9cd49a 100644 --- a/src/screens/UScreenOptionsRecord.pas +++ b/src/screens/UScreenOptionsRecord.pas @@ -168,17 +168,23 @@ begin SDLK_BACKSPACE: begin // TODO: Show Save/Abort screen - Ini.Save; - AudioPlayback.PlaySound(SoundLib.Back); - FadeTo(@ScreenOptions); + if (AudioInputProcessor.ValidateSettings()) then + begin + Ini.Save; + AudioPlayback.PlaySound(SoundLib.Back); + FadeTo(@ScreenOptions); + end; end; SDLK_RETURN: begin if (SelInteraction = ExitButtonIID) then begin - Ini.Save; - AudioPlayback.PlaySound(SoundLib.Back); - FadeTo(@ScreenOptions); + if (AudioInputProcessor.ValidateSettings()) then + begin + Ini.Save; + AudioPlayback.PlaySound(SoundLib.Back); + FadeTo(@ScreenOptions); + end; end; end; SDLK_DOWN: @@ -434,7 +440,7 @@ begin SetLength(ChannelPeak, MaxChannelCount); - StartPreview(); + UpdateInputDevice(); end; procedure TScreenOptionsRecord.OnHide; |