Chris Robinson
5867c7b8c2
Don't bother inlining some functions
2018-11-13 19:45:26 -08:00
Chris Robinson
09ea1d58f6
Convert the backend base to C++
2018-11-13 01:39:42 -08:00
Chris Robinson
a6d780574d
Make the enumerated HRTF entry name a char*
...
Would ideally be a std::string with the HRTF name itself, but they're still
seen in C code.
2018-11-12 22:26:12 -08:00
Chris Robinson
d4d0b1fdd4
Use a regular char* for the HRTF string name
2018-11-12 19:02:38 -08:00
Chris Robinson
58a71a1a00
Convert helpers.c to C++
2018-11-11 14:56:25 -08:00
Chris Robinson
dc31969b04
Get rid of the last few al_fopen calls
2018-11-10 04:27:10 -08:00
Chris Robinson
0e7986eaa8
Move some extern inline declarations to C
2018-10-31 13:21:05 -07:00
Chris Robinson
7a79f09a31
Add a comment about waiting to kill the event thread
2018-10-07 17:18:50 -07:00
Chris Robinson
db65113c5f
Use a 24-bit dither depth limit
2018-10-03 13:51:21 -07:00
Chris Robinson
f3f94e478b
Don't limit output for ALC_DONT_CARE_SOFT and float samples
2018-10-03 13:48:04 -07:00
Chris Robinson
c39eeb9638
Don't try to get the JNIEnv on Android
...
It's currently not used. More stuff is needed anyway which may need a different
approach.
2018-10-02 12:40:26 -07:00
Chris Robinson
1860b2ec8a
Make the Compressor struct opaque
2018-09-30 12:08:01 -07:00
Chris Robinson
79314c4461
Include the limiter's lookAhead delay in the device latency
2018-09-25 23:05:27 -07:00
Chris Robinson
2d6309d6fc
Don't hardcode the limiter threshold
...
It's now calculated from the output sample type and dither depth.
2018-09-25 10:33:20 -07:00
Chris Robinson
c69338bc0d
Update the output limiter/compressor
...
This provides better characteristics for an amplitude limiter. In particular,
it utilizes the peak amplitude instead of the RMS, and the used parameters
basically guarantee no output samples exceed the given threshold... almost, due
to floating-point errors as the threshold is converted from dB to log-e for the
envelope, then is negated and converted to linear amplitude to apply to the
signal. It's quite possible for some rounding errors to creep in and not
perfectly saturate the result.
2018-09-25 10:04:14 -07:00
Chris Robinson
f21e2df4cf
Remove an unnecessary mutex
2018-09-20 22:53:16 -07:00
Chris Robinson
84a90b7cc3
Stop the event thread when releasing the context
...
To ensure no user callback gets called after alcDestroyContext.
2018-09-20 22:44:58 -07:00
Chris Robinson
ebbbeb0d66
Put user events in a union structure
2018-09-20 21:59:38 -07:00
Chris Robinson
cb8545346d
Always start the event thread with the context
2018-09-20 19:58:01 -07:00
Chris Robinson
46cfedb117
Pass the device name list to the backend probe method
2018-09-07 22:02:37 -07:00
Chris Robinson
7394dd512d
Rename ALCsndioBackend
2018-09-07 18:45:24 -07:00
Raulshc
83dba26ea6
EFX: Autowah implementation
...
Add autowah effect using biquad peaking filter and envelope follower
2018-07-25 12:51:09 -07:00
Chris Robinson
ed1f1d2bf3
Start an extension to allow source filter gains greater than 1
2018-07-15 21:01:26 -07:00
Tobias Kortkamp
e2d7c5dfb3
Prefer sndio over OSS when both are enabled
...
Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
2018-06-22 14:36:33 +02:00
kdhp
35b78d55a4
Stop capture devices while closing
...
In 'alcCaptureCloseDevice', check if the capture device is
running and stop it if necessary.
This fixes the case where the device data is deallocated while
a background thread is still running (Issue #199 )
2018-06-08 01:42:13 +00:00
Chris Robinson
422cf429e6
Clamp the dither depth between 2 and 20 bits
2018-05-23 19:49:49 -07:00
Raulshc
d3a81f4f28
EFX: Frequency Shifter implementation
...
Add frequency shifter effect using discrete Hilbert transform. Only mono signal processing by now (LEFT_DIRECTION).
2018-05-20 17:23:03 +02:00
Chris Robinson
7a23330ffe
Move the filter implementation to a separate directory
2018-03-22 07:05:40 -07:00
Raulshc
6fd23f0984
EFX:Pitch Shifter implementation
...
Add pitch shifter effect using standard phase vocoder, based on work of Stephan Bernsee. Only mono signal processing by now.
2018-03-18 17:47:17 +01:00
Chris Robinson
dac9379449
Add methods to clean up althrd and altss data
2018-03-10 12:10:58 -08:00
Chris Robinson
a6ddeaf5f1
Rename the mmdevapi backend to wasapi
2018-03-09 18:56:24 -08:00
Chris Robinson
0c7fa1b955
Avoid deinitializing backends that never initialized
2018-03-08 18:53:49 -08:00
Chris Robinson
19281868dc
Properly limit the max number of effect slots to 2^31 - 1
2018-03-08 17:48:21 -08:00
Jan Niklas Hasse
86319127e3
Add SDL2 backend for playback, fix #173
2018-03-07 20:57:53 +01:00
Chris Robinson
179e1c4dbc
Don't check for space in the ringbuffer before trying to write
...
The write method already checks and returns how much it managed to fit in.
2018-03-03 21:57:42 -08:00
Chris Robinson
4e6c758daf
Use a plain mutex for the property lock
2018-03-03 13:42:37 -08:00
Chris Robinson
4bd02eada6
Init more stuff in InitDevice
2018-03-03 09:00:14 -08:00
Chris Robinson
bd32a682f7
Use atomic variables instead of volatile
2018-03-02 19:16:55 -08:00
Chris Robinson
4d417f3dd4
Make bformatdec_free and ambiup_free clear the freed pointer
2018-02-12 20:48:28 -08:00
Chris Robinson
e63e0ee596
Combine multiple functions called sequentially
2018-02-11 22:23:03 -08:00
Chris Robinson
5b11129eaa
Use a function pointer for applying the dry mix post-process
2018-02-10 15:50:05 -08:00
Chris Robinson
9b878c64f9
Make the Connected state atomic
...
Also don't send the Disconnected event more than once.
2018-02-04 00:01:12 -08:00
Chris Robinson
b99e64a0e3
Provide more descriptive messages to disconnection events
2018-02-03 13:54:42 -08:00
Chris Robinson
80cc32d77b
Remove the unused thunk code
2018-02-02 22:59:06 -08:00
Chris Robinson
e240351d81
Use a semaphore to signal the event handler
...
Semaphores allow for semi-persistent signals, compared to a condition variable
which requires a mutex for proper detection. A semaphore can be 'post'ed after
writing some data on one thread, and another thread will be able to recognize
it quickly even if the post occured in between checking for data and waiting.
This more correctly fixes a race condition with events since the mixer
shouldn't be using mutexes, and arbitrary wake-ups just to make sure an event
wasn't missed was quite inefficient.
2018-02-01 18:20:14 -08:00
Chris Robinson
7256bc92fa
Add a thread to marshal events from the mixer
...
To avoid having unknown user code running in the mixer thread that could
significantly delay the mixed output, a lockless ringbuffer is used for the
mixer to provide events that a secondary thread will pop off and process.
2018-01-31 20:21:54 -08:00
Chris Robinson
0394d5a44f
Rename EventLock to make it more clear it's protecting the callback
2018-01-30 12:34:25 -08:00
Chris Robinson
e7217760f3
Don't bother with an explicit stop backend method
2018-01-29 01:00:53 -08:00
Chris Robinson
328fd7329d
Combine common initialization code into a function
2018-01-28 18:03:54 -08:00
Chris Robinson
c2710ffe87
Make EnabledEvts atomic
2018-01-28 16:58:41 -08:00