summaryrefslogtreecommitdiffstats
path: root/libaf
diff options
context:
space:
mode:
Diffstat (limited to 'libaf')
-rw-r--r--libaf/af.c2
-rw-r--r--libaf/af.h2
-rw-r--r--libaf/af_delay.c2
-rw-r--r--libaf/af_equalizer.c7
-rw-r--r--libaf/af_ladspa.c30
-rw-r--r--libaf/af_lavcac3enc.c6
-rw-r--r--libaf/af_resample.c1
-rw-r--r--libaf/af_scaletempo.c33
-rw-r--r--libaf/af_sweep.c1
-rw-r--r--libaf/filter.c1
-rw-r--r--libaf/format.c2
-rw-r--r--libaf/window.c1
12 files changed, 39 insertions, 49 deletions
diff --git a/libaf/af.c b/libaf/af.c
index 1de8ee3154..2e55a52fe1 100644
--- a/libaf/af.c
+++ b/libaf/af.c
@@ -70,7 +70,7 @@ static af_info_t* filter_list[]={
#endif
&af_info_volnorm,
&af_info_extrastereo,
-#ifdef CONFIG_LIBAVCODEC_A
+#ifdef CONFIG_LIBAVCODEC_INTERNALS
&af_info_lavcac3enc,
#endif
#ifdef CONFIG_LIBAVCODEC
diff --git a/libaf/af.h b/libaf/af.h
index b6b546525e..fe146906e9 100644
--- a/libaf/af.h
+++ b/libaf/af.h
@@ -106,7 +106,7 @@ typedef struct af_cfg_s{
}af_cfg_t;
// Current audio stream
-typedef struct af_stream_s
+typedef struct af_stream
{
// The first and last filter in the list
af_instance_t* first;
diff --git a/libaf/af_delay.c b/libaf/af_delay.c
index 02327d0c53..84a76c470e 100644
--- a/libaf/af_delay.c
+++ b/libaf/af_delay.c
@@ -202,5 +202,3 @@ af_info_t af_info_delay = {
AF_FLAGS_REENTRANT,
af_open
};
-
-
diff --git a/libaf/af_equalizer.c b/libaf/af_equalizer.c
index cdc0011cb7..bd69fdec9d 100644
--- a/libaf/af_equalizer.c
+++ b/libaf/af_equalizer.c
@@ -248,10 +248,3 @@ af_info_t af_info_equalizer = {
AF_FLAGS_NOT_REENTRANT,
af_open
};
-
-
-
-
-
-
-
diff --git a/libaf/af_ladspa.c b/libaf/af_ladspa.c
index e343d1ded7..5c1392d543 100644
--- a/libaf/af_ladspa.c
+++ b/libaf/af_ladspa.c
@@ -213,7 +213,7 @@ static int af_ladspa_parse_plugin(af_ladspa_t *setup) {
if (setup->ninputs == 0) {
mp_msg(MSGT_AFILTER, MSGL_WARN, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_WarnNoInputs);
+ _("WARNING! This LADSPA plugin has no audio inputs.\n The incoming audio signal will be lost."));
} else if (setup->ninputs == 1) {
mp_msg(MSGT_AFILTER, MSGL_V, "%s: this is a mono effect\n", setup->myname);
} else if (setup->ninputs == 2) {
@@ -225,13 +225,13 @@ static int af_ladspa_parse_plugin(af_ladspa_t *setup) {
if (setup->noutputs == 0) {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrNoOutputs);
+ _("This LADSPA plugin has no audio outputs."));
return AF_ERROR;
}
if (setup->noutputs != setup->ninputs ) {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrInOutDiff);
+ _("The number of audio inputs and audio outputs of the LADSPA plugin differ."));
return AF_ERROR;
}
@@ -391,7 +391,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) {
if (!setup->libhandle) {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s %s\n\t%s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrFailedToLoad, setup->file, dlerror() );
+ _("failed to load"), setup->file, dlerror() );
return AF_ERROR;
}
@@ -404,7 +404,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) {
if (!descriptor_function) {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n\t%s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrNoDescriptor, dlerror());
+ _("Couldn't find ladspa_descriptor() function in the specified library file."), dlerror());
return AF_ERROR;
}
@@ -412,7 +412,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) {
if (strcmp(setup->label, "help") == 0) {
mp_msg(MSGT_AFILTER, MSGL_INFO, "%s: %s %s:\n", setup->myname,
- MSGTR_AF_LADSPA_AvailableLabels, setup->file);
+ _("available labels in"), setup->file);
for (i=0; ; i++) {
ladspa_descriptor = descriptor_function(i);
if (ladspa_descriptor == NULL) {
@@ -432,7 +432,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) {
ladspa_descriptor = descriptor_function(i);
if (ladspa_descriptor == NULL) {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrLabelNotFound);
+ _("Couldn't find label in plugin library."));
return AF_ERROR;
}
if (strcmp(ladspa_descriptor->Label, setup->label) == 0) {
@@ -458,7 +458,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) {
*/
static int af_ladspa_malloc_failed(char *myname) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s", myname, MSGTR_MemAllocFailed);
+ mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s", myname, "Memory allocation failed.\n");
return AF_ERROR;
}
@@ -520,7 +520,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg) {
if (!arg) {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrNoSuboptions);
+ _("No suboptions specified."));
return AF_ERROR;
}
@@ -532,7 +532,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg) {
sscanf(arg, "%[^:]", buf);
if (buf[0] == '\0') {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrNoLibFile);
+ _("No library file specified."));
free(buf);
return AF_ERROR;
}
@@ -548,7 +548,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg) {
sscanf(arg, "%[^:]", buf);
if (buf[0] == '\0') {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrNoLabel);
+ _("No filter label specified."));
free(buf);
return AF_ERROR;
}
@@ -584,14 +584,14 @@ static int control(struct af_instance_s *af, int cmd, void *arg) {
for(i=0; i<setup->ninputcontrols; i++) {
if (!arg || (*(char*)arg != ':') ) {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrNotEnoughControls);
+ _("Not enough controls specified on the command line."));
return AF_ERROR;
}
arg++;
r = sscanf(arg, "%f", &val);
if (r!=1) {
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname,
- MSGTR_AF_LADSPA_ErrNotEnoughControls);
+ _("Not enough controls specified on the command line."));
return AF_ERROR;
}
setup->inputcontrols[setup->inputcontrolsmap[i]] = val;
@@ -617,13 +617,13 @@ static int control(struct af_instance_s *af, int cmd, void *arg) {
if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor) &&
val < hint.LowerBound) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_AF_LADSPA_ErrControlBelow,
+ mp_tmsg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is below lower boundary of %0.4f.\n",
setup->myname, i, hint.LowerBound);
return AF_ERROR;
}
if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor) &&
val > hint.UpperBound) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_AF_LADSPA_ErrControlAbove,
+ mp_tmsg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is above upper boundary of %0.4f.\n",
setup->myname, i, hint.UpperBound);
return AF_ERROR;
}
diff --git a/libaf/af_lavcac3enc.c b/libaf/af_lavcac3enc.c
index 3d2d9e3b82..a86b7fbdbd 100644
--- a/libaf/af_lavcac3enc.c
+++ b/libaf/af_lavcac3enc.c
@@ -99,7 +99,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg)
s->lavc_actx->bit_rate = bit_rate;
if(avcodec_open(s->lavc_actx, s->lavc_acodec) < 0) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_CouldntOpenCodec, "ac3", bit_rate);
+ mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Couldn't open codec %s, br=%d.\n", "ac3", bit_rate);
return AF_ERROR;
}
}
@@ -281,13 +281,13 @@ static int af_open(af_instance_t* af){
s->lavc_acodec = avcodec_find_encoder_by_name("ac3");
if (!s->lavc_acodec) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_LavcAudioCodecNotFound, "ac3");
+ mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't find encoder for codec %s.\n", "ac3");
return AF_ERROR;
}
s->lavc_actx = avcodec_alloc_context();
if (!s->lavc_actx) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_CouldntAllocateLavcContext);
+ mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't allocate context!\n");
return AF_ERROR;
}
diff --git a/libaf/af_resample.c b/libaf/af_resample.c
index ac39f36faf..5dd0e70329 100644
--- a/libaf/af_resample.c
+++ b/libaf/af_resample.c
@@ -393,4 +393,3 @@ af_info_t af_info_resample = {
AF_FLAGS_REENTRANT,
af_open
};
-
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;
}
}
diff --git a/libaf/af_sweep.c b/libaf/af_sweep.c
index 782bf7ec46..e1890c6b3b 100644
--- a/libaf/af_sweep.c
+++ b/libaf/af_sweep.c
@@ -105,4 +105,3 @@ af_info_t af_info_sweep = {
AF_FLAGS_REENTRANT,
af_open
};
-
diff --git a/libaf/filter.c b/libaf/filter.c
index 9ea4359a32..c5ab039130 100644
--- a/libaf/filter.c
+++ b/libaf/filter.c
@@ -448,4 +448,3 @@ int af_filter_szxform(const FLOAT_TYPE* a, const FLOAT_TYPE* b, FLOAT_TYPE Q, FL
return 0;
}
-
diff --git a/libaf/format.c b/libaf/format.c
index 21494f43b4..8146899c7e 100644
--- a/libaf/format.c
+++ b/libaf/format.c
@@ -124,7 +124,7 @@ char* af_fmt2str(int format, char* str, int size)
case(AF_FORMAT_IMA_ADPCM):
i+=snprintf(&str[i],size-i,"IMA-ADPCM "); break;
default:
- i+=snprintf(&str[i],size-i,MSGTR_AF_FORMAT_UnknownFormat);
+ i+=snprintf(&str[i],size-i,mp_gtext("unknown format "));
}
}
else{
diff --git a/libaf/window.c b/libaf/window.c
index 2b2923afc9..a970bdcbea 100644
--- a/libaf/window.c
+++ b/libaf/window.c
@@ -211,4 +211,3 @@ void af_window_kaiser(int n, FLOAT_TYPE* w, FLOAT_TYPE b)
w[end-(1&(!k2))+i] = w[end-1-i] = k1 * besselizero(b*sqrt(1.0 - tmp*tmp));
}
}
-