summaryrefslogtreecommitdiffstats
path: root/libaf/af_scaletempo.c
diff options
context:
space:
mode:
Diffstat (limited to 'libaf/af_scaletempo.c')
-rw-r--r--libaf/af_scaletempo.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/libaf/af_scaletempo.c b/libaf/af_scaletempo.c
index 8b39290efa..4c86744231 100644
--- a/libaf/af_scaletempo.c
+++ b/libaf/af_scaletempo.c
@@ -226,6 +226,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
int8_t* pout;
if (s->scale == 1.0) {
+ af->delay = 0;
return data;
}
@@ -470,27 +471,28 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
return AF_ERROR;
}
if (s->scale_nominal <= 0) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] "
- MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange
- ": scale > 0\n");
+ mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] %s: %s: scale > 0\n",
+ mp_gtext("error parsing command line"),
+ mp_gtext("value out of range"));
return AF_ERROR;
}
if (s->ms_stride <= 0) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] "
- MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange
- ": stride > 0\n");
+ mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] %s: %s: stride > 0\n",
+ mp_gtext("error parsing command line"),
+ mp_gtext("value out of range"));
return AF_ERROR;
}
if (s->percent_overlap < 0 || s->percent_overlap > 1) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] "
- MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange
- ": 0 <= overlap <= 1\n");
+ mp_msg(MSGT_AFILTER, MSGL_ERR,
+ "[scaletempo] %s: %s: 0 <= overlap <= 1\n",
+ mp_gtext("error parsing command line"),
+ mp_gtext("value out of range"));
return AF_ERROR;
}
if (s->ms_search < 0) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] "
- MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange
- ": search >= 0\n");
+ mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] %s: %s: search >= 0\n",
+ mp_gtext("error parsing command line"),
+ mp_gtext("value out of range"));
return AF_ERROR;
}
if (speed.len > 0) {
@@ -507,9 +509,10 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
s->speed_tempo = 1;
s->speed_pitch = 1;
} else {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] "
- MSGTR_ErrorParsingCommandLine ": " MSGTR_AF_ValueOutOfRange
- ": speed=[pitch|tempo|none|both]\n");
+ mp_msg(MSGT_AFILTER, MSGL_ERR,
+ "[scaletempo] %s: %s: speed=[pitch|tempo|none|both]\n",
+ mp_gtext("error parsing command line"),
+ mp_gtext("value out of range"));
return AF_ERROR;
}
}