Chris Robinson
0136df1e62
Improve the alffplay queue for FFmpeg's send/receive API
...
The packet handling thread now calls avcodec_send_packet to give compressed
data to libavcodec, while the audio/video threads call avcodec_receive_frame to
handle decoded frames. The packet thread still maintains local queues for each
stream to avoid starving an A/V thread when the other doesn't want another
frame yet.
2017-12-30 20:34:33 -08:00
Chris Robinson
98731bb574
Update resampler padding checks
2017-12-29 16:28:49 -08:00
Chris Robinson
27dfb7fd11
Fix up a comment
2017-12-24 20:41:20 -08:00
Chris Robinson
6457df54bb
Don't make a pass-through macro for FadedDelayLineOut
2017-12-24 20:41:20 -08:00
Chris Robinson
07f3ed0419
Use linear interpolation for reverb modulation
...
The core LateReverb_* functions are explicitly written out now, since the
tapping and blending done by the Faded version is a bit more complex and it's
not so easy to ensure proper optimizing on the Unfaded version.
2017-12-24 20:40:53 -08:00
Chris Robinson
dabb99de8d
Don't offset the chorus/flanger delay and LFO
...
The delay being added to the scaled LFO will ensure a proper positive result
regardless.
2017-12-24 20:40:33 -08:00
Chris Robinson
254ebe5f96
Fade between depths in the reverb modulator
2017-12-24 16:23:30 -08:00
Chris Robinson
b32a366137
Use a separate unmodulated feedback tap for reverb
2017-12-24 14:21:13 -08:00
Chris Robinson
3633b65e04
Only link to the common lib when building as shared
2017-12-23 21:23:32 -08:00
Chris Robinson
ce74098b40
Clarify some reverb values
2017-12-23 21:13:57 -08:00
Chris Robinson
5769efe48e
Reorder some global variables
2017-12-23 18:50:38 -08:00
Chris Robinson
02051ab51a
Cleanup reverb modulation scaling
2017-12-23 14:18:14 -08:00
Chris Robinson
02c0620141
Add missing integer queries
2017-12-21 11:46:01 -08:00
Chris Robinson
d7895db166
Fix the lfo_offset for a 0-rate flanger
2017-12-19 19:15:34 -08:00
Chris Robinson
0f84e32520
Use MixSamples for the echo output
2017-12-19 15:13:11 -08:00
Chris Robinson
1a911be617
Update the chorus and flanger state struct less often
2017-12-19 15:12:06 -08:00
Chris Robinson
a0565dc9bb
Make the echo effect only apply feedback to repeated samples
2017-12-19 14:11:37 -08:00
Chris Robinson
52569ef562
Fade gains in the chorus and flanger output
2017-12-19 13:52:05 -08:00
Chris Robinson
661bd054aa
Use a single delay line for chorus feedback on a fixed tap
...
The outputs themselves use a variale-delay tap, but using a separate fixed-
delay tap on the feedback helps improve the perceived "wobble" with sustained
notes. This also applies to the flanger effect.
2017-12-18 13:41:12 -08:00
Chris Robinson
eee4aca40b
Apply chorus and flanger feedback on the tapped re-feed
2017-12-17 22:14:20 -08:00
Chris Robinson
04cf832fe6
Use the selected mixer for chorus and flanger output
2017-12-17 22:10:58 -08:00
Chris Robinson
2346426b6e
Make MixSamples non-static global
2017-12-17 21:48:07 -08:00
Chris Robinson
8253014fe9
Fix some types to make MSVC happy
2017-12-17 15:56:30 -08:00
Chris Robinson
57e516720e
Avoid a potential calloc of 0
2017-12-17 14:30:51 -08:00
Chris Robinson
d229afb83d
Build common code once
2017-12-16 15:53:24 -08:00
Chris Robinson
3cd1f30577
Use the right path for android's cmake toolchain
2017-12-16 15:15:11 -08:00
Chris Robinson
94347d4e64
Update travis for android-ndk-r15, required for its newer cmake
2017-12-16 15:10:20 -08:00
Chris Robinson
6fe6c370c2
Include the fpu=neon switch when testing for arm_neon.h
2017-12-16 15:01:05 -08:00
Chris Robinson
42acafcbc3
Don't cache the Android NDK in Travis
2017-12-16 14:05:13 -08:00
Chris Robinson
ebd42ab619
Mix multiple buffers in each buffer list item
...
Basically now this just relies on being able to specify composited buffers.
2017-12-16 11:34:52 -08:00
Chris Robinson
b10780f119
Pre-clear the source temp buffer and accumulate into it
2017-12-16 09:41:27 -08:00
Chris Robinson
d657c51be8
Rename SrcDataSize to be less confusing
2017-12-16 08:58:46 -08:00
Chris Robinson
30007263e5
Allow storing multiple buffers in a ALbufferlistitem
...
This will be to allow buffer layering, multiple buffers of the same format and
sample rate that are mixed together prior to resampling, filtering, and
panning. This will allow composing sounds from individual components that can
be swapped around on different invocations (e.g. layer SoundA and SoundB on one
instance and SoundA and SoundC on a different instance for a slightly different
sound, then just SoundA for a third instance, and so on). The longest buffer
within the list item determines the length of the list item.
More work needs to be done to fully support it, namely the ability to specity
multiple buffers to layer for static and streaming sources. Also the behavior
of loop points for layered static sources should be worked out. Should also
consider allowing each layer to have a sample offset.
2017-12-15 22:59:51 -08:00
Chris Robinson
ff3d31e17f
Update flanger with the same changes as chorus
2017-12-15 17:35:46 -08:00
Chris Robinson
d281b25723
Use a separate LFO offset in the chorus effect
...
Given that the LFO range is not a power-of-two, it won't correctly wrap on
overflow.
2017-12-15 17:26:03 -08:00
Chris Robinson
2a3b5ab9e9
Use linear interpolation for the chorus delay output
2017-12-15 16:50:06 -08:00
Chris Robinson
d9f57c099b
Use the correct functions set to the compiler switches
2017-12-15 12:25:50 -08:00
Chris Robinson
32f72c7471
Add queries to get the source offset with the device clock
2017-12-03 14:45:19 -08:00
Chris Robinson
5993ef0baa
It's getFactory that may be NULL, not its return value...
2017-11-26 09:59:55 -08:00
Chris Robinson
d96be76875
Don't probe a NULL backend factory
2017-11-26 09:53:26 -08:00
Chris Robinson
0e2e9e9a29
Add a simple non-streaming play example
2017-11-07 23:12:12 -08:00
Chris Robinson
7c88e4a16b
Properly initialize with the default distance model
2017-10-29 18:25:04 -07:00
Chris Robinson
eac0539ea0
Enable NFC filters for HRTF
...
Only applies to the Ambisonic mix (basic HRTF rendering, or B-Format buffers).
2017-10-23 13:30:01 -07:00
Chris Robinson
b82d2cf055
Store the HRTF distance in the Hrtf handle
2017-10-23 13:26:35 -07:00
Chris Robinson
7d4028b2df
Update default HRTFs for 24-bit samples
...
This is still using the (mono) KEMAR set, although perhaps the IRCAM 1005 set
could be made the default (stereo and smaller).
2017-10-22 15:45:30 -07:00
Chris Robinson
0349bcc500
Update mhr format for 24-bit, multi-field, stereo measurements
...
Currently only single field HRTFs are supported, but the format now allows up
to 16.
2017-10-22 15:36:42 -07:00
Chris Robinson
2f5b86dd38
Add an "un-exposed" method to get the library version
...
This reports the same ALSOFT version as alGetString(AL_VERSION), but doesn't
require a current context (which requires a ALCdevice) to call. Do *NOT* use
this version to determine feature support, use the standard interfaces. If you
think you need to use this, you probably don't, and shouldn't.
2017-10-16 05:47:12 -07:00
Chris Robinson
5ec11a017c
Add casts for assigning the SSE bsinc filter pointers
2017-10-07 15:28:35 -07:00
Chris Robinson
b3f7df6f5b
Use a typedef to declare extern atomic variables
...
Some systems use anonymous structs for atomic storage, and extern declarations
need to have the same type as their non-extern definition.
2017-10-07 14:58:35 -07:00
Chris Robinson
d57eca57a9
Use _wfopen_s to silence MSVC security warnings
2017-10-07 14:48:07 -07:00