summaryrefslogtreecommitdiffstats
path: root/audio/filter/af_hrtf.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/filter/af_hrtf.c')
-rw-r--r--audio/filter/af_hrtf.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/audio/filter/af_hrtf.c b/audio/filter/af_hrtf.c
index 83495f4fcb..e3fecb8ad7 100644
--- a/audio/filter/af_hrtf.c
+++ b/audio/filter/af_hrtf.c
@@ -296,8 +296,7 @@ static int control(struct af_instance *af, int cmd, void* arg)
if(af->data->rate != 48000) {
// automatic samplerate adjustment in the filter chain
// is not yet supported.
- mp_msg(MSGT_AFILTER, MSGL_ERR,
- "[hrtf] ERROR: Sampling rate is not 48000 Hz (%d)!\n",
+ MP_ERR(af, "[hrtf] ERROR: Sampling rate is not 48000 Hz (%d)!\n",
af->data->rate);
return AF_ERROR;
}
@@ -368,30 +367,25 @@ static int filter(struct af_instance *af, struct mp_audio *data, int flags)
s->print_flag = 0;
switch (s->decode_mode) {
case HRTF_MIX_51:
- mp_msg(MSGT_AFILTER, MSGL_INFO,
- "[hrtf] Using HRTF to mix %s discrete surround into "
+ MP_INFO(af, "[hrtf] Using HRTF to mix %s discrete surround into "
"L, R channels\n", s->matrix_mode ? "5+1" : "5");
break;
case HRTF_MIX_STEREO:
- mp_msg(MSGT_AFILTER, MSGL_INFO,
- "[hrtf] Using HRTF to mix stereo into "
+ MP_INFO(af, "[hrtf] Using HRTF to mix stereo into "
"L, R channels\n");
break;
case HRTF_MIX_MATRIX2CH:
- mp_msg(MSGT_AFILTER, MSGL_INFO,
- "[hrtf] Using active matrix to decode 2 channel "
+ MP_INFO(af, "[hrtf] Using active matrix to decode 2 channel "
"input, HRTF to mix %s matrix surround into "
"L, R channels\n", "3/2");
break;
default:
- mp_msg(MSGT_AFILTER, MSGL_WARN,
- "[hrtf] bogus decode_mode: %d\n", s->decode_mode);
+ MP_WARN(af, "[hrtf] bogus decode_mode: %d\n", s->decode_mode);
break;
}
if(s->matrix_mode)
- mp_msg(MSGT_AFILTER, MSGL_INFO,
- "[hrtf] Using active matrix to decode rear center "
+ MP_INFO(af, "[hrtf] Using active matrix to decode rear center "
"channel\n");
}
@@ -601,7 +595,7 @@ static int af_open(struct af_instance* af)
s->print_flag = 1;
if (allocate(s) != 0) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[hrtf] Memory allocation error.\n");
+ MP_ERR(af, "[hrtf] Memory allocation error.\n");
return AF_ERROR;
}
@@ -620,13 +614,13 @@ static int af_open(struct af_instance* af)
s->cr_ir = cr_filt + (s->cr_o = pulse_detect(cr_filt));
if((s->ba_ir = malloc(s->basslen * sizeof(float))) == NULL) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[hrtf] Memory allocation error.\n");
+ MP_ERR(af, "[hrtf] Memory allocation error.\n");
return AF_ERROR;
}
fc = 2.0 * BASSFILTFREQ / (float)af->data->rate;
if(af_filter_design_fir(s->basslen, s->ba_ir, &fc, LP | KAISER, 4 * M_PI) ==
-1) {
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[hrtf] Unable to design low-pass "
+ MP_ERR(af, "[hrtf] Unable to design low-pass "
"filter.\n");
return AF_ERROR;
}