From 219e35075144e32b5a01c1a98500320ed7319223 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 6 Jul 2008 11:08:09 +0000 Subject: [PATCH] Yet another ffwd/rev model --- Sources/VLDocument.mm | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Sources/VLDocument.mm b/Sources/VLDocument.mm index cbf434d..8af6ae3 100644 --- a/Sources/VLDocument.mm +++ b/Sources/VLDocument.mm @@ -577,9 +577,7 @@ - (IBAction) playMusic:(id)sender { - const float kMaxRate = 8.0f; - const float kMinRate = 0.2f; - const float kUpScale = 1.1f; + const float kUpScale = 1.41f; const float kDownScale = 1.0f/kUpScale; bool nowPlaying = VLSoundOut::Instance()->Playing(); const float tempoRate = [songTempo floatValue] / baseTempo; @@ -595,14 +593,10 @@ case -1: // Rew if (tag * playRate < 0) playRate = tag; - else if (fabsf(playRate) >= kMaxRate) - playRate = tag*kDownScale; - else if (fabsf(playRate) <= kMinRate) - playRate = tag*kUpScale; - else if (fabsf(playRate) >= 1.0f) - playRate *= kUpScale; - else + else if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) playRate *= kDownScale; + else + playRate *= kUpScale; VLSoundOut::Instance()->SetPlayRate(playRate*tempoRate); break; case -2: // To Start