Mercurial > audio-send
annotate org/device_details.org @ 28:1fc162d84343
updated README
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 19 Nov 2011 20:09:50 -0700 |
parents | c41d773a85fb |
children |
rev | line source |
---|---|
rlm@0 | 1 * a device has a two names, |
rlm@0 | 2 - *name*, which is the filename and which appears before all of the functions. |
rlm@0 | 3 - *trueName*, which is a string that is used to summon the device. |
rlm@0 | 4 |
rlm@0 | 5 |
rlm@0 | 6 Every device has the *<name>_data* struct, which is where all the |
rlm@0 | 7 device specific state is located. |
rlm@0 | 8 |
rlm@0 | 9 In the function *<name>_open_playback*, the device is initialized, |
rlm@0 | 10 here the trueName is set, and the devices data is initialized. |
rlm@0 | 11 |
rlm@0 | 12 The ALCdevice's ExtraData field must always be cast to to the actual |
rlm@0 | 13 data struct that the device uses. |
rlm@0 | 14 |
rlm@0 | 15 |
rlm@0 | 16 |
rlm@0 | 17 the =open_playback= function is where everything is initialized, |
rlm@0 | 18 |
rlm@0 | 19 |
rlm@0 | 20 but the =reset_playback= is where the actual thread which is the heart |
rlm@0 | 21 of the device is started. |
rlm@0 | 22 |
rlm@0 | 23 |
rlm@0 | 24 every device has a <name>Proc function which takes a pointer to an |
rlm@0 | 25 ALCdevice and is run in a separate thread. It is this procedure that |
rlm@0 | 26 actually does stuff with sound data. |
rlm@0 | 27 |
rlm@0 | 28 |
rlm@0 | 29 It is the ALContext which controls the particulars of a listener. |
rlm@0 | 30 |
rlm@0 | 31 The context contains the device. |
rlm@0 | 32 |
rlm@0 | 33 * so do we need a new context for each listener, alone with their own |
rlm@0 | 34 devices? |
rlm@0 | 35 |
rlm@0 | 36 However, the device also maintains a *list* of contexts... |
rlm@0 | 37 |