4758 Commits

Author SHA1 Message Date
Chris Robinson
ff231b42ff Reorder some loops in the equalizer and use MixSamples 2018-01-11 05:03:00 -08:00
Chris Robinson
9c33f4aea8 Use MixSamples for the dedicated and ring modulator effect output 2018-01-11 04:48:18 -08:00
Chris Robinson
f55583330b Apply the distortion gain to the mixing gains 2018-01-11 04:34:51 -08:00
Chris Robinson
2c8e4467c3 Move some HRTF structures to hrtf.h 2018-01-11 03:53:25 -08:00
Chris Robinson
15f9d15ba0 Avoid using macros to access anonymous structures 2018-01-11 03:45:23 -08:00
Chris Robinson
279799ad70 Don't return whether the bsinc filter cuts or not 2018-01-10 19:20:58 -08:00
Chris Robinson
ea6b384980 Make a function pointer static 2018-01-10 19:13:41 -08:00
Chris Robinson
ef63ec3fe9 Use one macro to handle both resample padding sizes 2018-01-09 23:55:59 -08:00
Chris Robinson
de8c5b1824 Combine the chorus and flanger processing functions
Given that they're nearly identical, it should be relatively simple to use the
same effect state to process either of them, similar to the reverbs. The big
differences seem to be the delay range (much shorter with flanger) and the
defaults.
2018-01-09 23:21:16 -08:00
Chris Robinson
9e2eb5dc23 Rename the device's temp buffer storage to be more generic 2018-01-09 22:01:46 -08:00
Chris Robinson
5d1207104a Remove standard reverb specific processing functions 2018-01-07 22:48:03 -08:00
Chris Robinson
d547f52d8f Move the UNEXPECTED macro to the main header and rename it 2018-01-07 22:20:08 -08:00
Chris Robinson
56e9cb69d3 Ensure the chorus delay and depth leave enough padding for resampling
Also use cubic resampling for the modulated tap. Applies to flanger too.
2018-01-07 21:15:18 -08:00
Chris Robinson
70973035de Use a separate function to get the cubic value 2018-01-07 17:24:29 -08:00
Chris Robinson
c8a30592e8 Only print the time in alffplay when it changes 2018-01-07 17:23:51 -08:00
Chris Robinson
d8258984b4 Use a -40dB drop for bsinc12
This improves the transition width at the cost of slightly more audible high-
frequency noise (nothing compared to linear or cubic, but still some). The
previous transition band caused a noticeable loss in higher frequencies, making
lower sample rate sources sound exceptionally dull or muffled.
2018-01-07 06:43:35 -08:00
Chris Robinson
c423b6c8b7 Remove the sinc4 table 2018-01-07 05:58:52 -08:00
Chris Robinson
4cc1c64646 Replace the sinc4 resampler with cubic
Turns out the C version of the cubic resampler is just slightly faster than
even the SSE3 version of the FIR4 resampler. This is likely due to not using a
64KB random-access lookup table along with unaligned loads, both offseting the
gains from SSE.
2018-01-07 05:32:07 -08:00
Chris Robinson
0e1fd34c89 Fix a temp buffer leak in alffplay 2018-01-05 20:41:55 -08:00
Chris Robinson
10f2531b6c Handle the audio clock diff as nanoseconds in alffplay 2018-01-05 05:41:57 -08:00
Chris Robinson
ecd327e5e1 Test the correct offset for the loop start range 2018-01-04 21:21:48 -08:00
Chris Robinson
510bccb6ac Use the correct start point when looping 2018-01-04 20:21:46 -08:00
Chris Robinson
32330c5eef Use separate outputs for the vector reverse and scatter functions 2018-01-04 20:04:39 -08:00
Chris Robinson
e00ef16893 Avoid the modulated output tap for late reverb
And fix the output filtering. The modulation code is still there since it's
(probably) technically correct, but the interaction with the feedback loop and
filtering on the output caused improper behavior which needs to be sorted out.
2018-01-04 19:17:16 -08:00
Chris Robinson
fd8143fea0 Use a non-recursive mutex for alffplay's source lock 2018-01-03 19:05:25 -08:00
Chris Robinson
08a4840298 Don't offset the reverb modulation sinus 2018-01-02 19:52:57 -08:00
Chris Robinson
a16f933e3a Use a float literal for float math 2018-01-02 19:44:31 -08:00
Chris Robinson
9d61f429a5 Use ALC_SOFT_device_clock in alffplay 2018-01-02 19:32:28 -08:00
Chris Robinson
b8de63d608 Reset CompLen when loading loop repeats in the mixer 2018-01-02 19:29:58 -08:00
Chris Robinson
dcc0f6e25d Improve starting synchronization in alffplay
It waits until the internal buffers are filled before starting playback, then
triggering the audio and video to start as close together as possible.
2018-01-02 03:31:12 -08:00
Chris Robinson
21684fac69 Inline and simplify some code 2018-01-01 22:28:28 -08:00
Chris Robinson
329333ca8b Don't leak the AVIOContext 2018-01-01 19:16:05 -08:00
Chris Robinson
91e20dc12e Fix a couple alffplay comments still referencing Alure 2018-01-01 18:54:15 -08:00
Chris Robinson
aecfa0b426 Make smart pointer wrappers for some ffmpeg types 2018-01-01 18:47:48 -08:00
Chris Robinson
9675068706 Print the running time and duration in alffplay 2018-01-01 16:15:32 -08:00
Chris Robinson
cbd55ad31e Use aliases to simplify some time type names 2018-01-01 02:26:39 -08:00
Chris Robinson
5eb1753d31 Wrap av_gettime to ensure it's interpreted as microseconds 2018-01-01 01:39:28 -08:00
Chris Robinson
e277f5e268 Rename the do_direct_out variable 2018-01-01 01:14:53 -08:00
Chris Robinson
145bf52b7a Use a less-intense memory order to check for quitting 2018-01-01 01:13:32 -08:00
Chris Robinson
fe7bdc93eb Check for AL_SOFT_direct_channels once when initializing 2018-01-01 01:07:29 -08:00
Chris Robinson
d889435334 Declare the total buffer time instead of buffer count 2018-01-01 01:04:47 -08:00
Chris Robinson
dad17a7d91 Use a std::array for the buffers in alffplay 2018-01-01 00:32:27 -08:00
Chris Robinson
830adf6ae8 Use inline member initialization where possible 2018-01-01 00:17:40 -08:00
Chris Robinson
babfa70cab Make more values global const 2018-01-01 00:02:51 -08:00
Chris Robinson
258eadd003 Use a global to specify alffplay's audio sync threshold 2017-12-31 23:44:33 -08:00
Chris Robinson
6dd1643a70 Avoid dereferencing a NULL pointer
Even though it's taking the address of a member, it's still technically a
derefernce and thus undefined behavior. sizeof doesn't "execute" the
expression, so derefering in it instead is fine.
2017-12-31 23:19:41 -08:00
Chris Robinson
48916ebd76 Clear the buffer queue when underrun 2017-12-31 16:29:52 -08:00
Chris Robinson
506d316f55 Wake up the packet send loop when more frames are needed 2017-12-31 16:11:00 -08:00
Chris Robinson
490b71378e Readd AL_SOFT_source_latency support to alffplay 2017-12-30 23:12:19 -08:00
Chris Robinson
0e8b0c520e Use standard duration types for stream clocks 2017-12-30 22:46:09 -08:00