]> git.sesse.net Git - vlc/blob - plugins/dummy/aout_dummy.c
. autod�tection des plugins
[vlc] / plugins / dummy / aout_dummy.c
1 /*****************************************************************************
2  * aout_dummy.c : dummy audio output plugin
3  *****************************************************************************
4  * Copyright (C) 2000 VideoLAN
5  *
6  * Authors:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  * 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
21  *****************************************************************************/
22
23 /*****************************************************************************
24  * Preamble
25  *****************************************************************************/
26 #include "defs.h"
27
28 #include "config.h"
29 #include "common.h"                                     /* boolean_t, byte_t */
30 #include "threads.h"
31 #include "mtime.h"
32 #include "plugins.h"
33
34 #include "audio_output.h"                                   /* aout_thread_t */
35
36 #include "main.h"
37
38 /*****************************************************************************
39  * vout_dummy_t: dummy video output method descriptor
40  *****************************************************************************
41  * This structure is part of the video output thread descriptor.
42  * It describes the dummy specific properties of an output thread.
43  *****************************************************************************/
44 typedef struct aout_sys_s
45 {
46
47
48 } aout_sys_t;
49
50 /*****************************************************************************
51  * aout_DummyOpen: opens a dummy audio device
52  *****************************************************************************/
53 int aout_DummyOpen( aout_thread_t *p_aout )
54 {
55     /* Initialize some variables */
56     p_aout->i_format = AOUT_DEFAULT_FORMAT;
57     p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR, AOUT_STEREO_DEFAULT );
58     p_aout->l_rate     = main_GetIntVariable( AOUT_RATE_VAR, AOUT_RATE_DEFAULT );
59
60     return( 0 );
61 }
62
63 /*****************************************************************************
64  * aout_DummyReset: fake reset
65  *****************************************************************************/
66 int aout_DummyReset( aout_thread_t *p_aout )
67 {
68     return( 0 );
69 }
70
71 /*****************************************************************************
72  * aout_DummySetFormat: pretends to set the dsp output format
73  *****************************************************************************/
74 int aout_DummySetFormat( aout_thread_t *p_aout )
75 {
76     return( 0 );
77 }
78
79 /*****************************************************************************
80  * aout_DummySetChannels: pretends to set stereo or mono mode
81  *****************************************************************************/
82 int aout_DummySetChannels( aout_thread_t *p_aout )
83 {
84     return( 0 );
85 }
86
87 /*****************************************************************************
88  * aout_DummySetRate: pretends to set audio output rate
89  *****************************************************************************/
90 int aout_DummySetRate( aout_thread_t *p_aout )
91 {
92     return( 0 );
93 }
94
95 /*****************************************************************************
96  * aout_DummyGetBufInfo: returns available bytes in buffer
97  *****************************************************************************/
98 long aout_DummyGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
99 {
100     return( 2 * l_buffer_limit );               /* value big enough to sleep */
101 }
102
103 /*****************************************************************************
104  * aout_DummyPlaySamples: pretends to play a sound
105  *****************************************************************************/
106 void aout_DummyPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )
107 {
108     ;
109 }
110
111 /*****************************************************************************
112  * aout_DummyClose: closes the dummy audio device
113  *****************************************************************************/
114 void aout_DummyClose( aout_thread_t *p_aout )
115 {
116     ;
117 }
118