diff options
author | wm4 <wm4@nowhere> | 2016-07-17 19:21:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-17 19:21:28 +0200 |
commit | 77e1e8e38e7b8d9318dc1bb437a88d8f13b7a5c9 (patch) | |
tree | d64c47c331174f59eeecb9a713ba76aa4b7110cb /player/core.h | |
parent | 79974e7ad94e7658c780e3b446a7822a533675e4 (diff) | |
download | mpv-77e1e8e38e7b8d9318dc1bb437a88d8f13b7a5c9.tar.bz2 mpv-77e1e8e38e7b8d9318dc1bb437a88d8f13b7a5c9.tar.xz |
audio: refactor mixer code and delete mixer.c
mixer.c didn't really deserve to be separate anymore, as half of its
contents were unnecessary glue code after recent changes. It also
created a weird split between audio.c and af.c due to the fact that
mixer.c could insert audio filters. With the code being in audio.c
directly, together with other code that unserts filters during runtime,
it will be possible to cleanup this code a bit and make it work like the
video filter code.
As part of this change, make the balance code work like the volume code,
and add an option to back the current balance value. Also, since the
balance semantics are unexpected for most users (panning between the
audio channels, instead of just changing the relative volume), and there
are some other volumes, formally deprecate both the old property and the
new option.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/player/core.h b/player/core.h index 8afcfbe64d..f2a9f191fa 100644 --- a/player/core.h +++ b/player/core.h @@ -287,7 +287,6 @@ typedef struct MPContext { struct lavfi *lavfi; - struct mixer *mixer; struct ao *ao; struct mp_audio *ao_decoder_fmt; // for weak gapless audio check struct ao_chain *ao_chain; @@ -429,6 +428,8 @@ void uninit_audio_out(struct MPContext *mpctx); void uninit_audio_chain(struct MPContext *mpctx); int init_audio_decoder(struct MPContext *mpctx, struct track *track); void reinit_audio_chain_src(struct MPContext *mpctx, struct lavfi_pad *src); +void audio_update_volume(struct MPContext *mpctx); +void audio_update_balance(struct MPContext *mpctx); // configfiles.c void mp_parse_cfgfiles(struct MPContext *mpctx); @@ -558,4 +559,11 @@ int init_video_decoder(struct MPContext *mpctx, struct track *track); int get_deinterlacing(struct MPContext *mpctx); void set_deinterlacing(struct MPContext *mpctx, bool enable); +// Values of MPOpts.softvol +enum { + SOFTVOL_NO = 0, + SOFTVOL_YES = 1, + SOFTVOL_AUTO = 2, +}; + #endif /* MPLAYER_MP_CORE_H */ |