diff options
author | wm4 <wm4@nowhere> | 2013-03-28 22:35:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-04-13 04:21:28 +0200 |
commit | bc268b313e3764ff192f9adb28c5735a6241224a (patch) | |
tree | 9f1de20bc954ebbb8f72d32277d390be38443b79 /audio/filter/af_volume.c | |
parent | 41aefce730efd7da6068b7f61697c65759cd3f84 (diff) | |
download | mpv-bc268b313e3764ff192f9adb28c5735a6241224a.tar.bz2 mpv-bc268b313e3764ff192f9adb28c5735a6241224a.tar.xz |
audio: remove float processing option
The only thing this option did was changing the behavior of af_volume.
The option decided what sample format af_volume would use, but only if
the sample format was not already float. If the option was set, it would
default to float, otherwise to S16.
Remove use of the option and all associated code, and make af_volume
always use float (unless a af_volume specific sub-option is set).
Silence maximum value tracking. This message is printed when the filter
is destroyed, and it's slightly annoying. Was enabled due to enabling
float by default.
Diffstat (limited to 'audio/filter/af_volume.c')
-rw-r--r-- | audio/filter/af_volume.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/audio/filter/af_volume.c b/audio/filter/af_volume.c index ecf181c8b8..474ad72777 100644 --- a/audio/filter/af_volume.c +++ b/audio/filter/af_volume.c @@ -87,14 +87,10 @@ static int control(struct af_instance* af, int cmd, void* arg) float v=0.0; float vol[AF_NCH]; int i; - sscanf((char*)arg,"%f:%i", &v, &s->soft); + sscanf((char*)arg,"%f:%i:%i", &v, &s->soft, &s->fast); for(i=0;i<AF_NCH;i++) vol[i]=v; return control(af,AF_CONTROL_VOLUME_LEVEL | AF_CONTROL_SET, vol); } - case AF_CONTROL_POST_CREATE: - s->fast = ((((struct af_cfg*)arg)->force & AF_INIT_FORMAT_MASK) == - AF_INIT_FLOAT) ? 0 : 1; - return AF_OK; case AF_CONTROL_VOLUME_ON_OFF | AF_CONTROL_SET: memcpy(s->enable,(int*)arg,AF_NCH*sizeof(int)); return AF_OK; @@ -122,7 +118,7 @@ static int control(struct af_instance* af, int cmd, void* arg) for(i=0;i<AF_NCH;i++) m=max(m,s->max[i]); af_to_dB(1, &m, &m, 10.0); - mp_msg(MSGT_AFILTER, MSGL_INFO, "[volume] The maximum volume was %0.2fdB \n", m); + mp_msg(MSGT_AFILTER, MSGL_V, "[volume] The maximum volume was %0.2fdB \n", m); } return AF_OK; } |