1502 Commits

Author SHA1 Message Date
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
0ff4a91442 Make some functions static 2014-07-20 01:27:33 -07:00
Chris Robinson
36381f3164 Load the default soundfont as a comma-separate list of filename
This allows multiple soundfont files to be "patched" together to create a
single soundfont. For instance a GM soundfont with a separate soundfont for
GS-only additions.
2014-07-19 13:44:02 -07:00
Chris Robinson
f4cdecebcf Add a source radius property that determines the directionality of a sound
At 0 distance from the listener, the sound is omni-directional. As the source
and listener become 'radius' units apart, the sound becomes more directional.

With HRTF, an omni-directional sound is handled using 0-delay, pass-through
filter coefficients, which is blended with the real delay and coefficients as
needed to become more directional.
2014-07-11 00:03:13 -07:00
Chris Robinson
8dec92531b Store 4 modulators per map entry 2014-07-06 09:06:35 -07:00
Chris Robinson
dc76013126 Regroup and reorganize some macros 2014-07-06 08:05:35 -07:00
Chris Robinson
23979ac648 Use VECTOR_FIND_IF instead of a manual loop 2014-07-06 05:16:44 -07:00
Chris Robinson
f809d3c81a Allow ALsoundfont_deleteSoundfont to handle multiple buffers 2014-07-06 05:00:05 -07:00
Chris Robinson
d0a64fe191 Don't require pre-declaring vector types 2014-07-06 03:27:39 -07:00
Chris Robinson
ff915534cd Avoid aliasing an int array 2014-07-05 02:01:36 -07:00
Chris Robinson
47f5e710c2 Make some more functions static 2014-07-05 01:23:06 -07:00
Chris Robinson
5afc29f65d Use a helper function to check valid MIDI controller inputs 2014-07-04 22:08:24 -07:00
Chris Robinson
17f79ea43e Make a function static 2014-07-04 00:00:39 -07:00
Chris Robinson
fda5bc2bd2 AL_SOFT_MSADPCM is functionally complete 2014-07-03 20:59:44 -07:00
Chris Robinson
cb726d87ce Simplify setting a fontsound link 2014-07-01 23:24:11 -07:00
Chris Robinson
fec1fec373 Check that a fontsound is NOT null before deleting it 2014-07-01 22:52:29 -07:00
Chris Robinson
347d8f94e8 Remove an unused variable 2014-07-01 22:52:06 -07:00
Chris Robinson
22982948cf Standardize some New/Delete methods 2014-06-30 00:10:40 -07:00
Chris Robinson
8f8898b7b0 Remove an unused macro 2014-06-29 04:35:35 -07:00
Chris Robinson
8176d2c058 Load soundfont samples into an ALbuffer
Also remove ALsoundfont's now-unneeded sample storage functions and struct
fields.
2014-06-29 02:04:05 -07:00
Chris Robinson
389a2f7b4b Store and use an ALbuffer for samples in an ALfontsound
The fontsound still maintains its own start, end, and loop offsets, so that the
same buffer may be shared between multiple/all fontsounds. Ideally a single
buffer should be used for all fontsounds to avoid memory fragmentation and help
CPU caching, although higher quality soundfonts may need more memory than a
single buffer can hold.
2014-06-29 00:47:29 -07:00
Chris Robinson
d19e42a723 Don't require MIDI sysex data to have the high bit clear 2014-06-26 04:35:51 -07:00
Chris Robinson
57c683f822 Get the mixer and resampler functions when needed 2014-06-13 16:07:25 -07:00
Chris Robinson
a8deaf12f4 Combine the direct and send mixers 2014-06-13 13:34:19 -07:00
Chris Robinson
c29eb63489 Combine some dry and wet path types 2014-06-13 11:42:04 -07:00
Chris Robinson
19ec7b2ad2 Pre-apply the crossfeed filter gain to the input sample coefficients 2014-06-12 09:40:30 -07:00
Chris Robinson
4c706f59d9 Use floats for the BS2B filter 2014-06-11 09:57:48 -07:00
Chris Robinson
dfded9595c Make bs2b_cross_feed inline 2014-06-10 12:46:58 -07:00
Timothy Arceri
fc0be88c0f Add SSE2 and SSE4.1 linear resamplers
Currently the only way SSE 4.1 is detected is by using __get_cpuid, i.e. with
GCC. Windows' IsProcessorFeaturePresent does not report SSE4.1 capabilities.
2014-06-06 07:15:00 -07:00
Chris Robinson
3b2fcb3ef6 Avoid a loop when updating the source position variables 2014-06-02 19:19:22 -07:00
Chris Robinson
0ec0f7561c Add an option to get the length of a source's full queue
This simplifies keeping track how much a source has buffered in its queue,
which reduces a bunch of unnecessary book keeping the app would have to do.
2014-05-25 16:16:55 -07:00
Chris Robinson
4ca561acd3 Move the active source's offset out of the direct params 2014-05-24 16:55:10 -07:00
Chris Robinson
5ef5d218c4 Mark a few more functions as const 2014-05-23 10:00:58 -07:00
Chris Robinson
3fc9791747 Rename CONST_FUNC and PRINTF_STYLE, and fix non-GNU AL_PRINT 2014-05-23 08:30:33 -07:00
Chris Robinson
7d997277a0 AL_SOFT_block_alignment is now considered done 2014-05-22 12:27:07 -07:00
Chris Robinson
e32e3df3aa Use the first non-0-length buffer when starting a source 2014-05-22 11:08:21 -07:00
Chris Robinson
2b3550b61c Use an unsigned type for the win32 size_t formatter 2014-05-22 08:02:39 -07:00
Chris Robinson
100c059157 Mark some functions as const 2014-05-22 07:40:22 -07:00
Chris Robinson
f313ce2a96 Add some asserts to verify block alignment for conversion 2014-05-20 09:16:54 -07:00
Chris Robinson
cd983245f1 Return a sample pointer from resamplers
Both resampling and filtering now avoid copying samples when they no-op.
2014-05-19 05:46:01 -07:00
Chris Robinson
8e04a8a022 Put per-channel filter properties together 2014-05-19 02:24:31 -07:00
Chris Robinson
ef9dfe3772 Move an HRTF mixer parameter and shorten a couple variable names 2014-05-18 11:05:38 -07:00
Chris Robinson
9317ec59b9 Don't pass the SendParams to the wet-path mixer 2014-05-18 10:35:11 -07:00
Chris Robinson
c9083d04fa Don't pass the DirectParams to the dry-path mixer 2014-05-18 10:24:07 -07:00
Chris Robinson
5a1abf6918 Use different parameters for HRTF mixers 2014-05-18 09:31:08 -07:00
Chris Robinson
29b5dae6aa Pass some DirectParams as function parameters 2014-05-18 08:59:10 -07:00
Chris Robinson
a5631e05cc Add a ALfilterState method to process multiple samples at once 2014-05-18 06:23:20 -07:00
Chris Robinson
cd53a4b74c Reset filter properties when setting a null filter type 2014-05-17 08:05:49 -07:00
Chris Robinson
190ab90c0d Support the band-pass filter 2014-05-17 08:04:14 -07:00