icculus@1532
|
1 |
/*
|
icculus@1532
|
2 |
SDL - Simple DirectMedia Layer
|
icculus@1532
|
3 |
Copyright (C) 1997-2006 Sam Lantinga
|
icculus@1532
|
4 |
|
icculus@1532
|
5 |
This library is free software; you can redistribute it and/or
|
icculus@1532
|
6 |
modify it under the terms of the GNU Lesser General Public
|
icculus@1532
|
7 |
License as published by the Free Software Foundation; either
|
icculus@1532
|
8 |
version 2.1 of the License, or (at your option) any later version.
|
icculus@1532
|
9 |
|
icculus@1532
|
10 |
This library is distributed in the hope that it will be useful,
|
icculus@1532
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
icculus@1532
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
icculus@1532
|
13 |
Lesser General Public License for more details.
|
icculus@1532
|
14 |
|
icculus@1532
|
15 |
You should have received a copy of the GNU Lesser General Public
|
icculus@1532
|
16 |
License along with this library; if not, write to the Free Software
|
icculus@1532
|
17 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
icculus@1532
|
18 |
|
icculus@1532
|
19 |
Sam Lantinga
|
icculus@1532
|
20 |
slouken@libsdl.org
|
icculus@1532
|
21 |
|
icculus@1537
|
22 |
This file written by Ryan C. Gordon (icculus@icculus.org)
|
icculus@1532
|
23 |
*/
|
icculus@1532
|
24 |
#include "SDL_config.h"
|
icculus@1532
|
25 |
|
slouken@1533
|
26 |
/* Output audio to nowhere... */
|
icculus@1532
|
27 |
|
icculus@1532
|
28 |
#include "SDL_rwops.h"
|
icculus@1532
|
29 |
#include "SDL_timer.h"
|
icculus@1532
|
30 |
#include "SDL_audio.h"
|
icculus@1532
|
31 |
#include "../SDL_audiomem.h"
|
icculus@1532
|
32 |
#include "../SDL_audio_c.h"
|
icculus@1532
|
33 |
#include "SDL_dummyaudio.h"
|
icculus@1532
|
34 |
|
icculus@1532
|
35 |
/* The tag name used by DUMMY audio */
|
icculus@1532
|
36 |
#define DUMMYAUD_DRIVER_NAME "dummy"
|
icculus@1532
|
37 |
|
icculus@1532
|
38 |
/* Audio driver functions */
|
icculus@3792
|
39 |
static int DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture);
|
icculus@3792
|
40 |
static void DUMMYAUD_WaitDevice(_THIS);
|
icculus@3792
|
41 |
static void DUMMYAUD_PlayDevice(_THIS);
|
icculus@3792
|
42 |
static Uint8 *DUMMYAUD_GetDeviceBuf(_THIS);
|
icculus@3792
|
43 |
static void DUMMYAUD_CloseDevice(_THIS);
|
icculus@1532
|
44 |
|
icculus@1532
|
45 |
/* Audio driver bootstrap functions */
|
slouken@1895
|
46 |
static int
|
slouken@1895
|
47 |
DUMMYAUD_Available(void)
|
icculus@1532
|
48 |
{
|
icculus@3798
|
49 |
return 1; /* always available. */
|
icculus@1532
|
50 |
}
|
icculus@1532
|
51 |
|
icculus@3784
|
52 |
static int
|
icculus@3784
|
53 |
DUMMYAUD_Init(SDL_AudioDriverImpl *impl)
|
icculus@1532
|
54 |
{
|
icculus@3784
|
55 |
/* Set the function pointers */
|
icculus@3792
|
56 |
impl->OpenDevice = DUMMYAUD_OpenDevice;
|
icculus@3796
|
57 |
impl->OnlyHasDefaultOutputDevice = 1;
|
icculus@1532
|
58 |
|
icculus@3784
|
59 |
return 1;
|
icculus@1532
|
60 |
}
|
icculus@1532
|
61 |
|
icculus@1532
|
62 |
AudioBootStrap DUMMYAUD_bootstrap = {
|
slouken@1895
|
63 |
DUMMYAUD_DRIVER_NAME, "SDL dummy audio driver",
|
icculus@3798
|
64 |
DUMMYAUD_Available, DUMMYAUD_Init, 1
|
icculus@1532
|
65 |
};
|
icculus@1532
|
66 |
|
slouken@1895
|
67 |
static int
|
icculus@3792
|
68 |
DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture)
|
icculus@1532
|
69 |
{
|
icculus@3798
|
70 |
return 1; /* always succeeds. */
|
icculus@1532
|
71 |
}
|
icculus@1532
|
72 |
|
slouken@1895
|
73 |
/* vi: set ts=4 sw=4 expandtab: */
|