1 /*****************************************************************************
2 * aout_dummy.c : dummy audio output plugin
3 *****************************************************************************
4 * Copyright (C) 2002 VideoLAN
5 * $Id: aout.c,v 1.3 2002/08/12 22:12:51 massiot Exp $
7 * Authors: Christophe Massiot <massiot@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
33 #include "aout_internal.h"
35 #define FRAME_SIZE 2048
37 /*****************************************************************************
39 *****************************************************************************/
40 static int SetFormat ( aout_instance_t * );
41 static void Play ( aout_instance_t *, aout_buffer_t * );
43 /*****************************************************************************
44 * OpenAudio: open a dummy audio device
45 *****************************************************************************/
46 int E_(OpenAudio) ( vlc_object_t * p_this )
48 aout_instance_t * p_aout = (aout_instance_t *)p_this;
50 p_aout->output.pf_setformat = SetFormat;
51 p_aout->output.pf_play = Play;
56 /*****************************************************************************
57 * SetFormat: pretend to set the dsp output format
58 *****************************************************************************/
59 static int SetFormat( aout_instance_t * p_aout )
61 p_aout->output.i_nb_samples = FRAME_SIZE;
65 /*****************************************************************************
66 * Play: pretend to play a sound
67 *****************************************************************************/
68 static void Play( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
70 aout_BufferFree( p_buffer );