From 2a7c5a1365ad194a42e3f667f85828a152544857 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 9 Apr 2011 03:03:22 +0300 Subject: audio: change external AO interface to "ao_[method](ao, ...)" Make the outside interface of audio output handling similar to the video output one. An AO object is first created, and then methods called with ao_[methodname](ao, args...). However internally libao2/ still holds all data in globals, and trying to create multiple simultaneous AO instances won't work. --- mixer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mixer.c') diff --git a/mixer.c b/mixer.c index 4b9d8db1b7..d4e794d5f5 100644 --- a/mixer.c +++ b/mixer.c @@ -39,9 +39,9 @@ void mixer_getvolume(mixer_t *mixer, float *l, float *r) { ao_control_vol_t vol; *l=0; *r=0; - if(mixer->audio_out){ + if (mixer->ao) { if(soft_vol || - CONTROL_OK != mixer->audio_out->control(AOCONTROL_GET_VOLUME,&vol)) { + CONTROL_OK != ao_control(mixer->ao, AOCONTROL_GET_VOLUME, &vol)) { if (!mixer->afilter) return; else { @@ -64,9 +64,9 @@ void mixer_setvolume(mixer_t *mixer, float l, float r) { ao_control_vol_t vol; vol.right=r; vol.left=l; - if(mixer->audio_out){ + if (mixer->ao) { if(soft_vol || - CONTROL_OK != mixer->audio_out->control(AOCONTROL_SET_VOLUME,&vol)) { + CONTROL_OK != ao_control(mixer->ao, AOCONTROL_SET_VOLUME, &vol)) { if (!mixer->afilter) return; else { -- cgit v1.2.3