blob: ab3bb33f0cdaded44b857a86b03035a39b058c30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
diff --git a/src/Engine.hpp b/src/Engine.hpp
index 873ec4d..0d3c988 100644
--- a/src/Engine.hpp
+++ b/src/Engine.hpp
@@ -60,7 +60,7 @@ public:
return _stretch;
}
void set_stretch(float str) {
- if(str > 0.5 && str < 2.0) {
+ if(str > 0.2499 && str < 1.2501) { /* would be 'if(str >= 0.25 && str <= 1.25)', but floating point is tricky... */
_stretch = str;
//_state_changed = true;
}
diff --git a/src/PlayerWidget.cpp b/src/PlayerWidget.cpp
index e906446..489856b 100644
--- a/src/PlayerWidget.cpp
+++ b/src/PlayerWidget.cpp
@@ -234,7 +234,7 @@ namespace StretchPlayer
void PlayerWidget::stretch(int pos)
{
- _engine->set_stretch( 0.5 + double(pos)/1000.0 );
+ _engine->set_stretch( 0.25 + double(pos)/1000.0 );
}
void PlayerWidget::volume(int vol)
@@ -322,7 +322,7 @@ namespace StretchPlayer
_volume->setValue( _to_fader(vol) );
_status->volume( _volume->value() / 1000.0 );
- _stretch->setValue( (sch-0.5) * 1000 );
+ _stretch->setValue( (sch-0.25) * 1000 );
_status->update();
}
|