aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens/UScreenEditSub.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/UScreenEditSub.pas')
-rw-r--r--src/screens/UScreenEditSub.pas39
1 files changed, 28 insertions, 11 deletions
diff --git a/src/screens/UScreenEditSub.pas b/src/screens/UScreenEditSub.pas
index 6e9cbebf..7956b127 100644
--- a/src/screens/UScreenEditSub.pas
+++ b/src/screens/UScreenEditSub.pas
@@ -492,17 +492,34 @@ begin
SDLK_SPACE:
begin
- // Play Sentence
- PlaySentenceMidi := false; // stop midi
- PlaySentence := true;
- Click := false;
- AudioPlayback.Stop;
- AudioPlayback.Position := GetTimeFromBeat(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start);
- PlayStopTime := (GetTimeFromBeat(
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start +
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length));
- AudioPlayback.Play;
- LastClick := -100;
+ if (SDL_ModState = 0) or (SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL) then
+ begin
+ // Play Sentence
+ PlaySentenceMidi := false; // stop midi
+ PlaySentence := true;
+ Click := false;
+ AudioPlayback.Stop;
+ AudioPlayback.Position := GetTimeFromBeat(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start);
+ PlayStopTime := (GetTimeFromBeat(
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start +
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length));
+ AudioPlayback.Play;
+ LastClick := -100;
+ end;
+
+ if (SDL_ModState = KMOD_LSHIFT) or (SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL) then
+ begin
+ // Play Midi
+ PlaySentenceMidi := true;
+
+ MidiTime := USTime.GetTime;
+ MidiStart := GetTimeFromBeat(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start);
+ MidiStop := GetTimeFromBeat(
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start +
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length);
+
+ LastClick := -100;
+ end;
end;
SDLK_RETURN: