rlm@0: rlm@0: rlm@33: rlm@0: rlm@33: Steps to add a new Device to Open-AL rlm@0: rlm@33: rlm@0: rlm@33: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@0: rlm@33: rlm@0:
rlm@33:

Steps to add a new Device to Open-AL

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:
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@33:

1 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@33:   
rlm@33: static ALCboolean <your-device>_open_playback
rlm@33:   (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@33: 
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:
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@33:
rlm@33:

2 In OpenAL32/Include/alMain.h :

rlm@33:
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@33:
rlm@33: rlm@33:
rlm@33: rlm@33:
rlm@33:

3 In Alc/ALc.c :

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

4 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@33:               # : add <your-device> herex
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@33:
rlm@33:

5 In ~/.alsoftrc

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

Date: 2012-02-11 04:43:24 MST

rlm@33:

Author: Robert McIntyre

rlm@33:

Org version 7.7 with Emacs version 23

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