mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Yet another ffwd/rev model
This commit is contained in:
parent
74cb6433b4
commit
219e350751
|
@ -577,9 +577,7 @@
|
||||||
|
|
||||||
- (IBAction) playMusic:(id)sender
|
- (IBAction) playMusic:(id)sender
|
||||||
{
|
{
|
||||||
const float kMaxRate = 8.0f;
|
const float kUpScale = 1.41f;
|
||||||
const float kMinRate = 0.2f;
|
|
||||||
const float kUpScale = 1.1f;
|
|
||||||
const float kDownScale = 1.0f/kUpScale;
|
const float kDownScale = 1.0f/kUpScale;
|
||||||
bool nowPlaying = VLSoundOut::Instance()->Playing();
|
bool nowPlaying = VLSoundOut::Instance()->Playing();
|
||||||
const float tempoRate = [songTempo floatValue] / baseTempo;
|
const float tempoRate = [songTempo floatValue] / baseTempo;
|
||||||
|
@ -595,14 +593,10 @@
|
||||||
case -1: // Rew
|
case -1: // Rew
|
||||||
if (tag * playRate < 0)
|
if (tag * playRate < 0)
|
||||||
playRate = tag;
|
playRate = tag;
|
||||||
else if (fabsf(playRate) >= kMaxRate)
|
else if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
|
||||||
playRate = tag*kDownScale;
|
|
||||||
else if (fabsf(playRate) <= kMinRate)
|
|
||||||
playRate = tag*kUpScale;
|
|
||||||
else if (fabsf(playRate) >= 1.0f)
|
|
||||||
playRate *= kUpScale;
|
|
||||||
else
|
|
||||||
playRate *= kDownScale;
|
playRate *= kDownScale;
|
||||||
|
else
|
||||||
|
playRate *= kUpScale;
|
||||||
VLSoundOut::Instance()->SetPlayRate(playRate*tempoRate);
|
VLSoundOut::Instance()->SetPlayRate(playRate*tempoRate);
|
||||||
break;
|
break;
|
||||||
case -2: // To Start
|
case -2: // To Start
|
||||||
|
|
Loading…
Reference in New Issue
Block a user