From b24bb7076d80108eb63ab595a3b787f70023f377 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 16 Jun 2013 18:33:19 +0200 Subject: audio/out: remove wrapper for old AOs It's unused now. --- audio/out/ao.c | 54 ---------------------------------- audio/out/ao.h | 10 ------- audio/out/audio_out_internal.h | 66 ------------------------------------------ 3 files changed, 130 deletions(-) delete mode 100644 audio/out/audio_out_internal.h (limited to 'audio') diff --git a/audio/out/ao.c b/audio/out/ao.c index 10badcfa07..2ad91ab858 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -261,57 +261,3 @@ bool ao_chmap_sel_get_def(struct ao *ao, const struct mp_chmap_sel *s, { return mp_chmap_sel_get_def(s, map, num); } - -int old_ao_init(struct ao *ao, char *params) -{ - assert(!global_ao); - global_ao = ao; - ao_subdevice = params ? talloc_strdup(ao, params) : NULL; - if (ao->driver->old_functions->init(ao->samplerate, &ao->channels, - ao->format, 0) == 0) { - global_ao = NULL; - return -1; - } - return 0; -} - -void old_ao_uninit(struct ao *ao, bool cut_audio) -{ - ao->driver->old_functions->uninit(cut_audio); - global_ao = NULL; -} - -int old_ao_play(struct ao *ao, void *data, int len, int flags) -{ - return ao->driver->old_functions->play(data, len, flags); -} - -int old_ao_control(struct ao *ao, enum aocontrol cmd, void *arg) -{ - return ao->driver->old_functions->control(cmd, arg); -} - -float old_ao_get_delay(struct ao *ao) -{ - return ao->driver->old_functions->get_delay(); -} - -int old_ao_get_space(struct ao *ao) -{ - return ao->driver->old_functions->get_space(); -} - -void old_ao_reset(struct ao *ao) -{ - ao->driver->old_functions->reset(); -} - -void old_ao_pause(struct ao *ao) -{ - ao->driver->old_functions->pause(); -} - -void old_ao_resume(struct ao *ao) -{ - ao->driver->old_functions->resume(); -} diff --git a/audio/out/ao.h b/audio/out/ao.h index d908841457..0e004572a6 100644 --- a/audio/out/ao.h +++ b/audio/out/ao.h @@ -127,14 +127,4 @@ bool ao_chmap_sel_adjust(struct ao *ao, const struct mp_chmap_sel *s, bool ao_chmap_sel_get_def(struct ao *ao, const struct mp_chmap_sel *s, struct mp_chmap *map, int num); -int old_ao_control(struct ao *ao, enum aocontrol cmd, void *arg); -int old_ao_init(struct ao *ao, char *params); -void old_ao_uninit(struct ao *ao, bool cut_audio); -void old_ao_reset(struct ao*ao); -int old_ao_get_space(struct ao *ao); -int old_ao_play(struct ao *ao, void *data, int len, int flags); -float old_ao_get_delay(struct ao *ao); -void old_ao_pause(struct ao *ao); -void old_ao_resume(struct ao *ao); - #endif /* MPLAYER_AUDIO_OUT_H */ diff --git a/audio/out/audio_out_internal.h b/audio/out/audio_out_internal.h deleted file mode 100644 index 7b863cfd21..0000000000 --- a/audio/out/audio_out_internal.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This file is part of MPlayer. - * - * MPlayer is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * MPlayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef MPLAYER_AUDIO_OUT_INTERNAL_H -#define MPLAYER_AUDIO_OUT_INTERNAL_H - -#include "core/options.h" -#include "ao.h" - -// prototypes: -//static ao_info_t info; -static int control(int cmd, void *arg); -static int init(int rate,const struct mp_chmap *channels,int format,int flags); -static void uninit(int immed); -static void reset(void); -static int get_space(void); -static int play(void* data,int len,int flags); -static float get_delay(void); -static void audio_pause(void); -static void audio_resume(void); - -extern struct ao *global_ao; -#define ao_data (*global_ao) -#define mixer_channel (global_ao->opts->mixer_channel) -#define mixer_device (global_ao->opts->mixer_device) - -#define LIBAO_EXTERN(x) const struct ao_driver audio_out_##x = { \ - .info = &info, \ - .control = old_ao_control, \ - .init = old_ao_init, \ - .uninit = old_ao_uninit, \ - .reset = old_ao_reset, \ - .get_space = old_ao_get_space, \ - .play = old_ao_play, \ - .get_delay = old_ao_get_delay, \ - .pause = old_ao_pause, \ - .resume = old_ao_resume, \ - .old_functions = &(const struct ao_old_functions) { \ - .control = control, \ - .init = init, \ - .uninit = uninit, \ - .reset = reset, \ - .get_space = get_space, \ - .play = play, \ - .get_delay = get_delay, \ - .pause = audio_pause, \ - .resume = audio_resume, \ - }, \ -}; - -#endif /* MPLAYER_AUDIO_OUT_INTERNAL_H */ -- cgit v1.2.3