Commit Graph

3317 Commits

Author SHA1 Message Date
Chris Robinson
1efddac3db Document the different filter types, and combine some split lines 2014-05-17 02:09:43 -07:00
Chris Robinson
c5b25ba2a7 Rename freq_scale parameter to freq_mult 2014-05-17 01:32:55 -07:00
Chris Robinson
a11e1c0858 Ensure that LoopEnd > LoopStart
For the benefit of Clang's static analysis, which doesn't know that a
static source will always have a valid buffer and a buffer must have a
non-0 loop range.
2014-05-15 01:44:29 -07:00
Chris Robinson
fdcdda2ed3 Initialize a pointer to NULL instead of a string 2014-05-15 01:39:42 -07:00
Chris Robinson
028bd9767c Don't bother stripping whitespace from comments 2014-05-15 01:37:01 -07:00
Chris Robinson
042003896f Early-out when outN is 0 2014-05-15 01:32:32 -07:00
Chris Robinson
6dcd4fec7d Remove some unnecessary casts 2014-05-15 01:21:22 -07:00
Chris Robinson
ef1b34dcd2 Initialize some variables when declaring them 2014-05-15 01:14:31 -07:00
Chris Robinson
f0797e27f3 Initialize newformat to AL_NONE instead of a valid format 2014-05-15 01:11:38 -07:00
Chris Robinson
16d3316f70 Use an enum for the chorus and flanger waveforms 2014-05-14 23:51:24 -07:00
Chris Robinson
a6974a6c83 Don't try to read the internal capture buffer into itself 2014-05-14 21:20:28 -07:00
Chris Robinson
a1fbb434e8 Remove a dead assignment 2014-05-14 05:27:16 -07:00
Chris Robinson
debd5346fb Add a couple asserts to ensure a proper buffer
It should not be possible for a playing or paused source to not have a
valid buffer, but Clang's static analyzer doesn't know that. Hopefully
an assert will convince it.
2014-05-14 03:40:01 -07:00
Chris Robinson
f311f74001 Avoid freeing an in-use capture buffer
When stopping, ALSA may capture into its own storage buffer. Do not free
the storage buffer if it first reads from it.
2014-05-14 03:22:42 -07:00
Chris Robinson
1d2504d12e Make RefCount a non-integer type
It should only be accessed through the appropriate functions to ensure proper
atomicity.
2014-05-14 02:47:07 -07:00
Chris Robinson
4454ae25c7 Add HF Reference as a filter property 2014-05-14 01:24:18 -07:00
Chris Robinson
3582a44dff Make LOWPASSFREQREF a float value 2014-05-11 10:09:52 -07:00
Chris Robinson
343200d229 Store the filter reference frequency in the source 2014-05-11 10:07:17 -07:00
Chris Robinson
58235bec17 Update the source send target gains properly 2014-05-11 09:45:07 -07:00
Chris Robinson
b89cc3417b Avoid locking the mixer when unqueueing buffers 2014-05-11 03:52:22 -07:00
Chris Robinson
9f8615c670 Avoid accessing the source's buffer queue head multiple times 2014-05-11 03:11:35 -07:00
Chris Robinson
851a917b03 Use a struct to store the source's direct gain/gainhf properties 2014-05-11 01:40:44 -07:00
Chris Robinson
e78acce652 Don't mix old- and new-style FIND_PACKAGE_HANDLE_STANDARD_ARGS calls
Some (all?) versions of cmake seem to get a bit confused when an old-style
FIND_PACKAGE_HANDLE_STANDARD_ARGS call fails, and the scripts attempt a new-
style call later on. It continues to think it's using old-style, acting as if
REQUIRED_VARS is the message and looks for a VERSION_VAR variable.
2014-05-10 09:34:16 -07:00
Chris Robinson
ddd1550a8b Avoid locking the mixer while queueing buffers onto a source. 2014-05-10 08:55:28 -07:00
Chris Robinson
e9297d9744 Mark the buffer queue pointers volatile 2014-05-10 08:03:53 -07:00
Chris Robinson
3e28fb33a3 Add a missing pointer init 2014-05-10 07:57:35 -07:00
Chris Robinson
9e25ea8666 Update the output buffer pointer in the Write_* methods 2014-05-10 07:52:02 -07:00
Chris Robinson
67b4bd1031 Add a couple consts 2014-05-10 07:25:05 -07:00
Chris Robinson
9642bf637d Explicit init the source queue and current_buffer pointers 2014-05-10 06:32:39 -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
eebde08e65 Don't explicitly store the BuffersInQueue 2014-05-10 03:33:41 -07:00
Chris Robinson
c4383b65e2 Store the current buffer queue item, rather than played buffer count 2014-05-10 03:21:40 -07:00
Chris Robinson
eea46f268d Avoid checking the previous buffer multiple times 2014-05-10 02:01:38 -07:00
Chris Robinson
bf97f58edb Append the number of bits, not bytes, to types
Also use ALuint64SOFT from alext.h for uint64
2014-05-08 00:28:34 -07:00
Chris Robinson
8b7c71e20e Always use unsigned int for RefCount 2014-05-07 23:49:06 -07:00
Chris Robinson
bd88e1743a Build a common static lib for reusable code 2014-05-07 19:51:42 -07:00
Chris Robinson
a2bddb7b40 Move RWLock and UIntMap implementations to common
This should make the code in common completely self-reliant.
2014-05-07 19:16:49 -07:00
Chris Robinson
3e274c3a57 Make sure FILETIME and ULARGE_INTEGER sizes match 2014-05-07 16:12:34 -07:00
Chris Robinson
1c01e94237 Move the static_assert definition to its own header 2014-05-07 02:28:25 -07:00
Chris Robinson
d8d609b940 Use standard types for the RWLock 2014-05-07 01:03:06 -07:00
Chris Robinson
38b98de78e Check for C99 _Bool support 2014-05-06 23:10:50 -07:00
Chris Robinson
1aff37114a Move atomic method definitions to a separate common source 2014-05-06 19:07:40 -07:00
Chris Robinson
fa12855d19 Move threads.c to a separate source dir
This will eventually serve to build a static lib of common wrapper methods,
such as threads, mutexes, atomics, etc.
2014-05-06 18:57:42 -07:00
Chris Robinson
0ea979a262 Move some headers to include/
Note, these are not installed. Only headers in include/AL/ are installed.
2014-05-06 18:29:53 -07:00
Chris Robinson
1a76a3238c Use gettimeofday if clock_gettime isn't available 2014-05-06 17:46:17 -07:00
Chris Robinson
cbb94405db Test _Alignas with 16 instead of 4 2014-05-05 14:21:09 -07:00
Chris Robinson
2edd047178 C11's alignas is also sufficient for SSE aligning 2014-05-05 13:53:07 -07:00
Chris Robinson
2bc16e9947 Add a cast to silence an MSVC warning 2014-05-04 11:50:58 -07:00
Chris Robinson
a48d235ef4 Trace skipped info sub-chunks 2014-05-04 01:19:09 -07:00
Chris Robinson
bca7c682f1 Use ALuint for the amount to skip 2014-05-04 01:00:21 -07:00