src/audio/dummy/SDL_dummyaudio.c
author Sam Lantinga
Fri, 11 Feb 2011 22:37:15 -0800
changeset 5262 b530ef003506
parent 3699 4160ba33b597
child 5535 96594ac5fd1a
permissions -rw-r--r--
Happy 2011! :)
icculus@1532
     1
/*
icculus@1532
     2
    SDL - Simple DirectMedia Layer
slouken@5262
     3
    Copyright (C) 1997-2011 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_audio.h"
icculus@1532
    29
#include "../SDL_audio_c.h"
icculus@1532
    30
#include "SDL_dummyaudio.h"
icculus@1532
    31
slouken@1895
    32
static int
icculus@2049
    33
DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture)
icculus@1532
    34
{
slouken@2060
    35
    return 1;                   /* always succeeds. */
icculus@1532
    36
}
icculus@1532
    37
icculus@2049
    38
static int
slouken@2060
    39
DUMMYAUD_Init(SDL_AudioDriverImpl * impl)
icculus@1532
    40
{
slouken@1895
    41
    /* Set the function pointers */
icculus@2049
    42
    impl->OpenDevice = DUMMYAUD_OpenDevice;
icculus@2049
    43
    impl->OnlyHasDefaultOutputDevice = 1;
icculus@3699
    44
    return 1;   /* this audio target is available. */
icculus@1532
    45
}
icculus@1532
    46
icculus@1532
    47
AudioBootStrap DUMMYAUD_bootstrap = {
icculus@2049
    48
    "dummy", "SDL dummy audio driver", DUMMYAUD_Init, 1
icculus@1532
    49
};
icculus@1532
    50
slouken@1895
    51
/* vi: set ts=4 sw=4 expandtab: */