summaryrefslogtreecommitdiffstats
path: root/audio/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-28 22:35:54 +0100
committerwm4 <wm4@nowhere>2013-04-13 04:21:28 +0200
commitbc268b313e3764ff192f9adb28c5735a6241224a (patch)
tree9f1de20bc954ebbb8f72d32277d390be38443b79 /audio/decode
parent41aefce730efd7da6068b7f61697c65759cd3f84 (diff)
downloadmpv-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/decode')
-rw-r--r--audio/decode/ad.h6
-rw-r--r--audio/decode/dec_audio.c12
2 files changed, 2 insertions, 16 deletions
diff --git a/audio/decode/ad.h b/audio/decode/ad.h
index 3bc3e39267..de1bc33aba 100644
--- a/audio/decode/ad.h
+++ b/audio/decode/ad.h
@@ -48,10 +48,4 @@ extern const ad_functions_t * const mpcodecs_ad_drivers[];
// fallback if ADCTRL_SKIP not implemented: ds_fill_buffer(sh_audio->ds);
#define ADCTRL_SKIP_FRAME 2 // skip block/frame, called while seeking
-// fallback if ADCTRL_QUERY_FORMAT not implemented: sh_audio->sample_format
-#define ADCTRL_QUERY_FORMAT 3 // test for availabilty of a format
-
-// fallback: use hw mixer in libao
-#define ADCTRL_SET_VOLUME 4 // not used at the moment
-
#endif /* MPLAYER_AD_H */
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c
index cac33a9a31..69ca3f110c 100644
--- a/audio/decode/dec_audio.c
+++ b/audio/decode/dec_audio.c
@@ -47,16 +47,8 @@ static int init_audio_codec(sh_audio_t *sh_audio, const char *decoder)
{
assert(!sh_audio->initialized);
resync_audio_stream(sh_audio);
- sh_audio->samplesize = 2;
- sh_audio->sample_format = AF_FORMAT_S16_NE;
- if ((af_cfg.force & AF_INIT_FORMAT_MASK) == AF_INIT_FLOAT) {
- int fmt = AF_FORMAT_FLOAT_NE;
- if (sh_audio->ad_driver->control(sh_audio, ADCTRL_QUERY_FORMAT,
- &fmt) == CONTROL_TRUE) {
- sh_audio->sample_format = fmt;
- sh_audio->samplesize = 4;
- }
- }
+ sh_audio->samplesize = 4;
+ sh_audio->sample_format = AF_FORMAT_FLOAT_NE;
sh_audio->audio_out_minsize = 8192; // default, preinit() may change it
if (!sh_audio->ad_driver->preinit(sh_audio)) {
mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, "Audio decoder preinit failed.\n");