Commit Graph

3192 Commits

Author SHA1 Message Date
Chris Robinson
cdfc5a4d31 Remove an unused function 2014-07-31 04:44:39 -07:00
Chris Robinson
ce046d2f03 Rename ATOMIC_COMPARE_EXCHANGE to ATOMIC_COMPARE_EXCHANGE_STRONG 2014-07-31 04:34:46 -07:00
Chris Robinson
6ce464aed8 Avoid a CPU memory fence, and better order memory barriers to accesses
Code produced by GCC 4.9's C11 atomic implementation does not seem to add a
CPU memory fence even with memory_order_seq_cst. Unnecessary memory fences
will be a detriment to performance, so they should only be added if needed.
2014-07-31 04:19:33 -07:00
Chris Robinson
7c847e62c3 Change Windows-based atomics for non-C99 compilers 2014-07-27 19:34:32 -07:00
Chris Robinson
38e8dc8540 Use a full memory barrier for Windows 2014-07-27 18:31:10 -07:00
Chris Robinson
6864053eee Use pulseaudio's write callback to signal a mixer proc wakeup 2014-07-26 22:04:26 -07:00
Chris Robinson
0ad3f61351 Don't try to use internal visibility
A number of functions are passed as callbacks to external libraries, which
internal visiiblity doesn't allow.
2014-07-26 17:48:36 -07:00
Chris Robinson
d3980bdebc Always set the active source's update method
If the source is stopped, changes its buffer, then played again quickly, the
source will never be removed from the active source list causing the update
method to remain as it was. If the buffer was changed between mono and multi-
channel, this causes it to use the wrong method.
2014-07-26 16:41:39 -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
a3dbe08c8b Support C11 atomics 2014-07-23 06:36:34 -07:00
Chris Robinson
e4b779c492 Use generic atomics in more places 2014-07-22 18:57:51 -07:00
Chris Robinson
a3b1d4a5e2 Implement RefCount as a generic atomic type 2014-07-22 18:18:14 -07:00
Chris Robinson
5a339a2a5b Add macros for generic atomic functionality 2014-07-22 00:20:28 -07:00
Chris Robinson
7b41ed7ec4 Check the current directory first for data files 2014-07-21 04:42:45 -07:00
Chris Robinson
0ff4a91442 Make some functions static 2014-07-20 01:27:33 -07:00
Chris Robinson
8592b9371a Use the UNUSED macro instead of a void cast 2014-07-19 20:46:41 -07:00
Chris Robinson
0c31ccd456 Stop trying to read samples if there was an error 2014-07-19 20:46:12 -07:00
Chris Robinson
9370fea359 Trace when a soundfont buffer goes unused 2014-07-19 14:18:52 -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
994c3f00e5 Keep existing presets when loading in a new soundfont
Note that alLoadSoundfontSOFT doesn't currently allow using a soundfont with
existing presets. This is for being able to load and stack multiple soundfonts
for the default soundfont.
2014-07-19 12:42:52 -07:00
Chris Robinson
85e135beea Use a macro to specify the fourcc formatters 2014-07-18 18:56:26 -07:00
Chris Robinson
17682cb0ce Explicitly include libavutil/channel_layout.h for the channel layout stuff 2014-07-18 01:21:42 -07:00
Chris Robinson
23cae7783d Properly scale the first HRTF pass-through coefficient
Coefficients are scaled by 32767. For pass-through, this is attenuated by
sqrt(0.5) to maintain a consistent perceived volume.
2014-07-17 18:02:23 -07:00
Chris Robinson
8635733d59 Fix typo (overriden -> overridden) 2014-07-17 10:22:58 -07:00
Chris Robinson
15d7ed2f0d Cleanup some HRTF code
Use loops instead of duplicating code, rewrite some lines to be clearer.
2014-07-16 13:26:47 -07:00
Chris Robinson
0d3b18b17d Fix omni-directional moving HRTF coeffs 2014-07-14 09:15:12 -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
c5af088b5f Access the result macro parameter only once 2014-07-06 22:11:29 -07:00
Chris Robinson
f4f1c1eeed Rename some functions 2014-07-06 09:21:38 -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
5de7271bcd AL_SOFT_source_length is complete 2014-07-05 04:25:37 -07:00
Chris Robinson
ad92181a26 Don't set modulators that have no destination 2014-07-05 03:55:45 -07:00
Chris Robinson
ff915534cd Avoid aliasing an int array 2014-07-05 02:01:36 -07:00
Chris Robinson
b88aaaf1bc Fix a couple checks 2014-07-05 01:47:08 -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
f667782df2 Set the 'valid' field when we have a valid buffer pointer 2014-07-04 06:57:58 -07:00
Chris Robinson
3f45c00779 Move an inline definition to a more appropriate source 2014-07-04 00:22:27 -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
5303ee2588 Avoid an undefined allocation of 0 bytes 2014-07-01 23:32:06 -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
8b1b52a687 Remove an unnecessary cast 2014-07-01 22:27:53 -07:00
Chris Robinson
56bb8689d4 Fix preset zone instrument header check 2014-07-01 19:43:20 -07:00