diff Alc/backends/loopback.c @ 0:f9476ff7637e

initial forking of open-al to create multiple listeners
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Oct 2011 13:02:31 -0700
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Alc/backends/loopback.c	Tue Oct 25 13:02:31 2011 -0700
     1.3 @@ -0,0 +1,77 @@
     1.4 +/**
     1.5 + * OpenAL cross platform audio library
     1.6 + * Copyright (C) 2011 by Chris Robinson
     1.7 + * This library is free software; you can redistribute it and/or
     1.8 + *  modify it under the terms of the GNU Library General Public
     1.9 + *  License as published by the Free Software Foundation; either
    1.10 + *  version 2 of the License, or (at your option) any later version.
    1.11 + *
    1.12 + * This library is distributed in the hope that it will be useful,
    1.13 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.14 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.15 + *  Library General Public License for more details.
    1.16 + *
    1.17 + * You should have received a copy of the GNU Library General Public
    1.18 + *  License along with this library; if not, write to the
    1.19 + *  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1.20 + *  Boston, MA  02111-1307, USA.
    1.21 + * Or go to http://www.gnu.org/copyleft/lgpl.html
    1.22 + */
    1.23 +
    1.24 +#include "config.h"
    1.25 +
    1.26 +#include <stdlib.h>
    1.27 +#include "alMain.h"
    1.28 +#include "AL/al.h"
    1.29 +#include "AL/alc.h"
    1.30 +
    1.31 +
    1.32 +static ALCboolean loopback_open_playback(ALCdevice *device, const ALCchar *deviceName)
    1.33 +{
    1.34 +    device->szDeviceName = strdup(deviceName);
    1.35 +    return ALC_TRUE;
    1.36 +}
    1.37 +
    1.38 +static void loopback_close_playback(ALCdevice *device)
    1.39 +{
    1.40 +    (void)device;
    1.41 +}
    1.42 +
    1.43 +static ALCboolean loopback_reset_playback(ALCdevice *device)
    1.44 +{
    1.45 +    SetDefaultWFXChannelOrder(device);
    1.46 +    return ALC_TRUE;
    1.47 +}
    1.48 +
    1.49 +static void loopback_stop_playback(ALCdevice *device)
    1.50 +{
    1.51 +    (void)device;
    1.52 +}
    1.53 +
    1.54 +static const BackendFuncs loopback_funcs = {
    1.55 +    loopback_open_playback,
    1.56 +    loopback_close_playback,
    1.57 +    loopback_reset_playback,
    1.58 +    loopback_stop_playback,
    1.59 +    NULL,
    1.60 +    NULL,
    1.61 +    NULL,
    1.62 +    NULL,
    1.63 +    NULL,
    1.64 +    NULL
    1.65 +};
    1.66 +
    1.67 +ALCboolean alc_loopback_init(BackendFuncs *func_list)
    1.68 +{
    1.69 +    *func_list = loopback_funcs;
    1.70 +    return ALC_TRUE;
    1.71 +}
    1.72 +
    1.73 +void alc_loopback_deinit(void)
    1.74 +{
    1.75 +}
    1.76 +
    1.77 +void alc_loopback_probe(enum DevProbe type)
    1.78 +{
    1.79 +    (void)type;
    1.80 +}