Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
69 lines (54 loc) · 1.89 KB

SDL_dummyaudio.c

File metadata and controls

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