summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-08-04 23:56:20 +0200
committerwm4 <wm4@nowhere>2013-08-05 00:00:26 +0200
commitee2e3b3374c4756dc881962bea4e4615805a8122 (patch)
treeeefd7cd4f17e6b68d2a7eebf4d9fcd1db0b9b1f1 /audio
parentcccfac47a423cbaeda04f9864c4676ed1c9d5002 (diff)
downloadmpv-ee2e3b3374c4756dc881962bea4e4615805a8122.tar.bz2
mpv-ee2e3b3374c4756dc881962bea4e4615805a8122.tar.xz
core: change speed option/property to double
The --speed option and the speed property used float. Change them to double. Change the commands that manipulate the property (speed_mult/add) to double as well. Since the cycle command shares code with the add command, we change that as well. The reason for this change is that this allows better control over speed, such as stepping by semitones. Using floats is also just plain unnecessary.
Diffstat (limited to 'audio')
-rw-r--r--audio/filter/af_scaletempo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c
index b12954f1af..d409ed85cf 100644
--- a/audio/filter/af_scaletempo.c
+++ b/audio/filter/af_scaletempo.c
@@ -444,11 +444,11 @@ static int control(struct af_instance* af, int cmd, void* arg)
if (s->speed_pitch) {
break;
}
- s->speed = *(float*)arg;
+ s->speed = *(double *)arg;
s->scale = s->speed * s->scale_nominal;
} else {
if (s->speed_pitch) {
- s->speed = 1 / *(float*)arg;
+ s->speed = 1 / *(double *)arg;
s->scale = s->speed * s->scale_nominal;
break;
}