summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-19 14:33:26 +0200
committerwm4 <wm4@nowhere>2013-09-20 13:23:25 +0200
commit01622717257673d424debfa762536f998d97a4dd (patch)
treedfc18807213d8fcdbc1a008421d07f5c6df656d8 /mpvcore
parent327a779a81098b39823f7036eba816b8b4c7245f (diff)
downloadmpv-01622717257673d424debfa762536f998d97a4dd.tar.bz2
mpv-01622717257673d424debfa762536f998d97a4dd.tar.xz
mixer: make struct opaque
Also remove stray include statements from ao_alsa and ao_oss.
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/command.c20
-rw-r--r--mpvcore/mp_core.h3
-rw-r--r--mpvcore/mplayer.c6
3 files changed, 14 insertions, 15 deletions
diff --git a/mpvcore/command.c b/mpvcore/command.c
index cb1bdd9678..a2de363b3d 100644
--- a/mpvcore/command.c
+++ b/mpvcore/command.c
@@ -764,17 +764,17 @@ static int mp_property_volume(m_option_t *prop, int action, void *arg,
{
switch (action) {
case M_PROPERTY_GET:
- mixer_getbothvolume(&mpctx->mixer, arg);
+ mixer_getbothvolume(mpctx->mixer, arg);
return M_PROPERTY_OK;
case M_PROPERTY_SET:
- mixer_setvolume(&mpctx->mixer, *(float *) arg, *(float *) arg);
+ mixer_setvolume(mpctx->mixer, *(float *) arg, *(float *) arg);
return M_PROPERTY_OK;
case M_PROPERTY_SWITCH: {
struct m_property_switch_arg *sarg = arg;
if (sarg->inc <= 0)
- mixer_decvolume(&mpctx->mixer);
+ mixer_decvolume(mpctx->mixer);
else
- mixer_incvolume(&mpctx->mixer);
+ mixer_incvolume(mpctx->mixer);
return M_PROPERTY_OK;
}
}
@@ -787,10 +787,10 @@ static int mp_property_mute(m_option_t *prop, int action, void *arg,
{
switch (action) {
case M_PROPERTY_SET:
- mixer_setmute(&mpctx->mixer, *(int *) arg);
+ mixer_setmute(mpctx->mixer, *(int *) arg);
return M_PROPERTY_OK;
case M_PROPERTY_GET:
- *(int *)arg = mixer_getmute(&mpctx->mixer);
+ *(int *)arg = mixer_getmute(mpctx->mixer);
return M_PROPERTY_OK;
}
return M_PROPERTY_NOT_IMPLEMENTED;
@@ -801,7 +801,7 @@ static int mp_property_volrestore(m_option_t *prop, int action,
{
switch (action) {
case M_PROPERTY_GET: {
- char *s = mixer_get_volume_restore_data(&mpctx->mixer);
+ char *s = mixer_get_volume_restore_data(mpctx->mixer);
*(char **)arg = s;
return s ? M_PROPERTY_OK : M_PROPERTY_UNAVAILABLE;
}
@@ -906,11 +906,11 @@ static int mp_property_balance(m_option_t *prop, int action, void *arg,
switch (action) {
case M_PROPERTY_GET:
- mixer_getbalance(&mpctx->mixer, arg);
+ mixer_getbalance(mpctx->mixer, arg);
return M_PROPERTY_OK;
case M_PROPERTY_PRINT: {
char **str = arg;
- mixer_getbalance(&mpctx->mixer, &bal);
+ mixer_getbalance(mpctx->mixer, &bal);
if (bal == 0.f)
*str = talloc_strdup(NULL, "center");
else if (bal == -1.f)
@@ -925,7 +925,7 @@ static int mp_property_balance(m_option_t *prop, int action, void *arg,
return M_PROPERTY_OK;
}
case M_PROPERTY_SET:
- mixer_setbalance(&mpctx->mixer, *(float *)arg);
+ mixer_setbalance(mpctx->mixer, *(float *)arg);
return M_PROPERTY_OK;
}
return M_PROPERTY_NOT_IMPLEMENTED;
diff --git a/mpvcore/mp_core.h b/mpvcore/mp_core.h
index 8f57a65edf..98096aa5fe 100644
--- a/mpvcore/mp_core.h
+++ b/mpvcore/mp_core.h
@@ -22,7 +22,6 @@
#include <stdbool.h>
#include "mpvcore/options.h"
-#include "audio/mixer.h"
#include "demux/demux.h"
// definitions used internally by the core player code
@@ -179,7 +178,7 @@ typedef struct MPContext {
// demuxer defines metadata), or special purpose demuxers like TV.
struct demuxer *master_demuxer;
- mixer_t mixer;
+ struct mixer *mixer;
struct ao *ao;
struct vo *video_out;
diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c
index 00229364e6..dc4322d4e3 100644
--- a/mpvcore/mplayer.c
+++ b/mpvcore/mplayer.c
@@ -449,7 +449,7 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
if (mask & INITIALIZED_ACODEC) {
mpctx->initialized_flags &= ~INITIALIZED_ACODEC;
- mixer_uninit_audio(&mpctx->mixer);
+ mixer_uninit_audio(mpctx->mixer);
if (mpctx->sh_audio)
uninit_audio(mpctx->sh_audio);
cleanup_demux_stream(mpctx, STREAM_AUDIO);
@@ -1608,7 +1608,7 @@ static int recreate_audio_filters(struct MPContext *mpctx)
return -1;
}
- mixer_reinit_audio(&mpctx->mixer, mpctx->ao, mpctx->sh_audio->afilter);
+ mixer_reinit_audio(mpctx->mixer, mpctx->ao, mpctx->sh_audio->afilter);
return 0;
}
@@ -4826,7 +4826,7 @@ static int mpv_main(int argc, char *argv[])
init_libav();
GetCpuCaps(&gCpuCaps);
screenshot_init(mpctx);
- mixer_init(&mpctx->mixer, opts);
+ mpctx->mixer = mixer_init(mpctx, opts);
// Preparse the command line
m_config_preparse_command_line(mpctx->mconfig, argc, argv);