66 Commits

Author SHA1 Message Date
Chris Robinson
30e01a7dba Protect alProcessUpdatesSOFT with a lock 2014-09-03 16:02:00 -07:00
Chris Robinson
259e265920 Rename activesource to voice 2014-08-21 03:41:13 -07:00
Chris Robinson
65d2e0eb8d Use an array of objects for active sources instead of pointers 2014-08-21 02:27:56 -07:00
Chris Robinson
b92e643e97 Use a NULL source for inactive activesources
Also only access the activesource's source field once per update.
2014-08-21 00:29:42 -07:00
François Cami
3c13e1e333 Update COPYING to the latest https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt to fix the FSF' address Fix the FSF' address in the source 2014-08-18 11:34:29 -07:00
Chris Robinson
531c0d8e6b Explicitly pass the address of atomics and parameters that can be modified 2014-07-26 03:00:49 -07:00
Chris Robinson
e4b779c492 Use generic atomics in more places 2014-07-22 18:57:51 -07:00
Chris Robinson
5a339a2a5b Add macros for generic atomic functionality 2014-07-22 00:20:28 -07:00
Chris Robinson
a455704148 Use a RWLock to help protect the source's buffer queue
In some instances this allows to to remove the device/mixer lock, or reduce how
long it's held.
2014-05-10 05:07:13 -07:00
Chris Robinson
ff63188cc2 Add a generic vector interface and use it for the active effect slots 2014-03-21 01:23:01 -07:00
Chris Robinson
6ee54fb1f3 Store some source mixing parameters in the active source struct 2014-03-19 13:14:11 -07:00
Chris Robinson
d6f7aac1bb Use a separate struct for tracking active sources 2014-03-18 19:56:25 -07:00
Chris Robinson
a5bfc1e30b Add a method to get the current MIDI state 2014-01-12 12:27:46 -08:00
Chris Robinson
f85d733f9d Add a method to set and get soundfonts
The main purpose of this is to select soundfonts for playback, eventually,
instead of the existing method that takes a filename.
2013-12-27 02:59:50 -08:00
Chris Robinson
0653680690 Move the base MidiSynth to a separate file 2013-12-17 23:03:34 -08:00
Chris Robinson
c834713526 Add methods to set and get the MIDI gain 2013-11-30 23:47:42 -08:00
Chris Robinson
a48f362d28 Start a MIDI interface extension 2013-11-28 01:53:05 -08:00
Chris Robinson
9760a592b2 Rename VCALL and VCALL0 to V and V0 2013-11-02 17:30:28 -07:00
Chris Robinson
034935b2e1 Modify how VCALL is handled
Now instead of specifying the arguments as a third argument to the macro, like
VCALL(object,function,(arg1, arg2));
they are specified separately after the macro, like
VCALL(object,function)(arg1, arg2);

Also, VCALL_NOARGS has been removed in favor of VCALL0, which behaves like
above but expects an empty argument list (a separate macro is needed to work
around preprocessor limitations).
2013-10-28 11:06:04 -07:00
Chris Robinson
c080dcae8d Remove al_try from alState.c 2013-10-07 08:50:17 -07:00
Chris Robinson
764e3aa496 Fix up the naming convention of effect methods 2013-05-29 11:17:45 -07:00
Chris Robinson
9e84f38a46 Use generic VCALL[_NOARGS] macros instead of type-specific wrappers 2013-05-27 11:48:29 -07:00
Chris Robinson
43b406ad9b Simplify al_try code 2013-03-24 13:55:41 -07:00
Chris Robinson
657ee85136 Use a struct to store the FPU mode 2012-09-16 01:35:16 -07:00
Chris Robinson
74aee374a6 Remove an unused header 2012-09-14 03:10:12 -07:00
Chris Robinson
dec8e81211 Change alState.c to the new error handling 2012-04-24 03:09:28 -07:00
Chris Robinson
b023dbe7b8 Remove hungarian notation from the device and context structs 2012-04-19 22:50:11 -07:00
Chris Robinson
e47557630e Use a double to store the source offset and don't use milliseconds for seconds 2012-04-16 22:11:03 -07:00
Chris Robinson
b5ed2a5351 Pass a device to the effect update functions 2012-03-13 14:49:58 -07:00
Chris Robinson
f4925a0e6a Use inline functions to set/restore the FPU mode for mixer updates 2011-09-29 04:03:18 -07:00
Chris Robinson
53572da7de Set toward-zero rounding when updating in alDeferUpdatesSOFT 2011-09-28 22:02:36 -07:00
Chris Robinson
80f2b787ef Pre-apply the deferred source offset only when it's playing or paused 2011-09-12 06:04:40 -07:00
Chris Robinson
404cfde33e Rename the ALEffect_ macros to ALeffectState_ to reflect what they work on 2011-09-12 05:59:23 -07:00
Chris Robinson
23f576360c Avoid locking the context while getting and setting global state 2011-08-31 00:19:27 -07:00
Chris Robinson
d7bd9c7559 Use the active effect slot list for pending updates in alDeferUpdatesSOFT 2011-08-30 23:33:01 -07:00
Chris Robinson
9fb91f70aa Rename GetReffedContext to GetContextRef 2011-08-30 23:28:38 -07:00
Chris Robinson
7408396fd4 Use a generic int type to handle enum swaps 2011-08-29 21:30:12 -07:00
Chris Robinson
e4a2b69b37 Make specific functions to lock/unlock UIntMap access 2011-08-29 20:21:28 -07:00
Chris Robinson
8eaa9bb469 Manually lock the map while iterating through its contents 2011-08-29 20:05:50 -07:00
Chris Robinson
950570b8c3 Do a proper exchange when setting a new state 2011-08-29 13:29:37 -07:00
Chris Robinson
72beb577b6 Lock the context as needed for the defer and process calls 2011-08-29 13:22:07 -07:00
Chris Robinson
58078e2c1e Use atomic exchanges when checking for updates to objects' internal parameters 2011-08-29 00:50:55 -07:00
Chris Robinson
65d42083e1 Prevent source and effect slot updates from occuring while updates are deferred 2011-08-22 17:13:03 -07:00
Chris Robinson
858592832f Defer source offset changes requested by the app 2011-08-21 00:49:04 -07:00
Chris Robinson
f196a9fc67 Defer source state changes from alSourcePlay/Pause/Stop/Rewind calls 2011-08-20 23:59:24 -07:00
Chris Robinson
d5ddc6acee Make sure some state values are finite 2011-07-21 16:18:21 -07:00
Chris Robinson
163cc62a00 Add a couple new functions to handle deferred updates
Currently no-ops, they will be used in place of alcSuspendContext and
alcProcessContext for batching updates since the mentioned functions have no
coherent functionality between system implementations.
2011-07-16 16:59:20 -07:00
Chris Robinson
58466a304b Use a flag to signifiy that all sources need updating 2011-07-11 01:05:42 -07:00
Chris Robinson
51c09e94b8 Avoid some alGet* duplication 2011-07-11 00:51:18 -07:00
Chris Robinson
723755788d Rename Suspend/ProcessContext since they are locking a mutex 2011-06-30 18:10:04 -07:00