summaryrefslogtreecommitdiffstats
path: root/mixer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-04-09 03:03:22 +0300
committerUoti Urpala <uau@mplayer2.org>2011-04-09 03:03:22 +0300
commit2a7c5a1365ad194a42e3f667f85828a152544857 (patch)
tree76c8ec2336e1f90f2e282bf130b876931fdb66cc /mixer.c
parent9ef15ac4fc28ecf85a497bc664246f227b40c135 (diff)
downloadmpv-2a7c5a1365ad194a42e3f667f85828a152544857.tar.bz2
mpv-2a7c5a1365ad194a42e3f667f85828a152544857.tar.xz
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.
Diffstat (limited to 'mixer.c')
-rw-r--r--mixer.c8
1 files changed, 4 insertions, 4 deletions
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 {