rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: all the steps to add a device to open-al rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
rlm@0: rlm@0: rlm@0: rlm@0:
rlm@0:
rlm@0: rlm@0:
rlm@0: rlm@0:

aurellem

rlm@0: rlm@0:
rlm@0: rlm@0:

all the steps to add a device to open-al

rlm@0:
Written by Robert McIntyre
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
rlm@0:

Table of Contents

rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0:

1 How to add a new backend device

rlm@0:
rlm@0: rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0:

2 In Alc/backends/<your-device>.c

rlm@0:
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
static const ALCchar <your-device>_device[] = <your-device-name>;
rlm@0: 
rlm@0: ALCboolean alc_<your-device>_init(BackendFuncs *func_list)
rlm@0: void alc_<your-device>_deinit(void)
rlm@0: 
rlm@0: static ALCboolean <your-device>_open_playback(ALCdevice *device, const ALCchar *deviceName)
rlm@0: static void <your-device>_close_playback(ALCdevice *device)
rlm@0: static ALCboolean <your-device>_reset_playback(ALCdevice *device)
rlm@0: static void <your-device>_stop_playback(ALCdevice *device)
rlm@0: 
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
void alc_<your-device>_probe(enum DevProbe type)
rlm@0: {
rlm@0:     switch(type)
rlm@0:     {
rlm@0:         case DEVICE_PROBE:
rlm@0:             AppendDeviceList(<your-device>Device);
rlm@0:             break;
rlm@0:         case ALL_DEVICE_PROBE:
rlm@0:             AppendAllDeviceList(<your-device>Device);
rlm@0:             break;
rlm@0:         case CAPTURE_DEVICE_PROBE:
rlm@0:             break;
rlm@0:     }
rlm@0: }
rlm@0: 
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
static const BackendFuncs <your-device>_funcs = {
rlm@0:     <your-device>_open_playback,
rlm@0:     <your-device>_close_playback,
rlm@0:     <your-device>_reset_playback,
rlm@0:     <your-device>_stop_playback,
rlm@0:     NULL,
rlm@0:     NULL,
rlm@0:     NULL,
rlm@0:     NULL,
rlm@0:     NULL,
rlm@0:     NULL
rlm@0: };
rlm@0: 
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0:

3 In OpenAL32/Include/alMain.h :

rlm@0:
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
ALCboolean alc_<your-device>_init(BackendFuncs *func_list);
rlm@0: void alc_<your-device>_deinit(void);
rlm@0: void alc_<your-device>_probe(enum DevProbe type);
rlm@0: 
rlm@0: 
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0:

4 In Alc/ALc.c :

rlm@0:
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
     { "<your-device>", alc_<your-device>_init, 
rlm@0:          alc_<your-device>_deinit, alc_<your-device>_probe, EmptyFuncs },
rlm@0: 
rlm@0: 
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0:

5 In CMakeLists.txt

rlm@0:
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
SET(ALC_OBJS  Alc/ALc.c
rlm@0:               Alc/ALu.c
rlm@0:               Alc/alcConfig.c
rlm@0:               Alc/alcDedicated.c
rlm@0:               Alc/alcEcho.c
rlm@0:               Alc/alcModulator.c
rlm@0:               Alc/alcReverb.c
rlm@0:               Alc/alcRing.c
rlm@0:               Alc/alcThread.c
rlm@0:               Alc/bs2b.c
rlm@0:               Alc/helpers.c
rlm@0:               Alc/hrtf.c
rlm@0:               Alc/mixer.c
rlm@0:               Alc/panning.c
rlm@0:               # Default backends, always available
rlm@0:               Alc/backends/loopback.c
rlm@0:               Alc/backends/null.c
rlm@0:               # : add <your-device> device
rlm@0:               Alc/backends/<your-device>.c
rlm@0: )
rlm@0: 
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0:

6 In ~/.alsoftrc

rlm@0:
rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0:
drivers = <your-device>
rlm@0: 
rlm@0: rlm@0: rlm@0: rlm@0:
rlm@0:
rlm@0:
rlm@0:

Date: 2011-10-20 15:48:47 MST

rlm@0:

Author: Robert McIntyre

rlm@0:

Org version 7.6 with Emacs version 23

rlm@0: Validate XHTML 1.0 rlm@0:
rlm@0:
rlm@0: rlm@0: