Commit Graph

4431 Commits

Author SHA1 Message Date
Chris Robinson
dc17f287fe Use a spinbox for the nfc-ref-delay value 2017-03-12 16:10:49 -07:00
Chris Robinson
d9e2a0cbf0 Use QString's arg method to format the float value 2017-03-12 15:27:50 -07:00
Chris Robinson
948ce36fa9 Increase _XOPEN_SOURCE to 600 for Solaris 2017-03-12 14:42:02 -07:00
Chris Robinson
097ed84a87 Handle the nfc-ref-delay config option 2017-03-12 13:24:16 -07:00
Chris Robinson
f276e83c8d Document the nfc config option and expose it in alsoft-config 2017-03-12 08:56:19 -07:00
Chris Robinson
7b4645f5f8 Store the HRIR coeff pointer and delays directly in MixHrtfParams 2017-03-12 06:58:27 -07:00
Chris Robinson
96aaab9366 Rework HRTF coefficient fading
This improves fading between HRIRs as sources pan around. In particular, it
improves the issue with individual coefficients having various rounding errors
in the stepping values, as well as issues with interpolating delay values.

It does this by doing two mixing passes for each source. First using the last
coefficients that fade to silence, and then again using the new coefficients
that fade from silence. When added together, it creates a linear fade from one
to the other. Additionally, the gain is applied separately so the individual
coefficients don't step with rounding errors. Although this does increase CPU
cost since it's doing two mixes per source, each mix is a bit cheaper now since
the stepping is simplified to a single gain value, and the overall quality is
improved.
2017-03-11 18:04:06 -08:00
Chris Robinson
feffe1e81a Make the voice's 'moving' state a bitflag 2017-03-11 06:26:05 -08:00
Chris Robinson
98e8f941b7 Allocate as many channels for DirectHrtfState as needed 2017-03-11 06:20:04 -08:00
Chris Robinson
6b4b00e462 Dynamically allocate the device's HRTF state 2017-03-10 10:47:43 -08:00
Chris Robinson
51cb969446 Fix building on MSVC 2017-03-10 05:05:25 -08:00
Chris Robinson
b878769ee0 Fix building without C11 2017-03-10 04:59:22 -08:00
Chris Robinson
583d431947 Implement NFC filters for Ambisonic rendering
NFC filters currently only work when rendering to ambisonic buffers, which
includes HQ rendering and ambisonic output. There are two new config options:
'decoder/nfc' (default on) enables or disables use of NFC filters globally, and
'decoder/nfc-ref-delay' (default 0) specifies the reference delay parameter for
NFC-HOA rendering with ambisonic output (a value of 0 disables NFC).

Currently, NFC filters rely on having an appropriate value set for
AL_METERS_PER_UNIT to get the correct scaling. HQ rendering uses the averaged
speaker distances as a control/reference, and currently doesn't correct for
individual speaker distances (if the speakers are all equidistant, this is
fine, otherwise per-speaker correction should be done as well).
2017-03-10 04:35:32 -08:00
Chris Robinson
d9b1995e95 Add an NFC filter implementation 2017-03-09 15:41:20 -08:00
Chris Robinson
9454d3e776 Move ALvoice declaration to alu.h 2017-03-09 07:23:12 -08:00
Chris Robinson
ae22d742dc Remove an unnecessary variable 2017-03-09 07:15:06 -08:00
Chris Robinson
5ffb0842ac Remove unnecessary atomic members 2017-03-08 04:59:22 -08:00
Chris Robinson
b1b3a369ef Remove an unnecessary variable 2017-03-07 09:38:33 -08:00
Chris Robinson
b64da108a9 Check that a source is actually playing before setting paused
Also slightly refactor setting playing state when the device is disconnected or
there's no buffers to play.
2017-03-07 04:50:09 -08:00
Chris Robinson
190120dfd7 Store the channel count and sample size in the voice 2017-03-07 00:19:40 -08:00
Chris Robinson
bc0096365e Don't modify the source state in the mixer 2017-03-07 00:19:40 -08:00
Chris Robinson
1b3100ab9a Remove an unused function 2017-03-07 00:19:40 -08:00
kcat
0b591844b1 Merge pull request #97 from adrianbroher/ci-backends
Enable and enforce dependencies on CI services.
2017-03-07 00:19:13 -08:00
Marcel Metz
099b0a1f7c Only download and strip Android NDK when not cached 2017-03-06 11:39:39 +01:00
Marcel Metz
6a067d9f7e Use TravisCI cache to store stripped Android NDK toolchain 2017-03-06 11:21:51 +01:00
Marcel Metz
25de358c9a Unpack only required files from Android NDK 2017-03-06 11:21:51 +01:00
Marcel Metz
a2d0bf8d3a Configure CMake to require available backends on CI services
Configure CMake to require the installed backend libraries.  This should
help to find build system regressions.

On TravisCI with Linux this requires the ALSA, PulseAudio, PortAudio, OSS
and JACK backend.

On TravisCI with Android cross compile Linux this requires the OpenSL
backend.

On TravisCI with MacOSX this requires the CoreAudio backend.

ON AppVeyor with Windows this requires the WinMM, DSound and MMDevAPI
backend.
2017-03-06 10:26:03 +01:00
Marcel Metz
1d208c49b5 Add Android cross-compile to TravisCI test matrix
The test entry adds the ability to test the OpenSLES backend.
2017-03-06 10:24:26 +01:00
Marcel Metz
adf6fee6d1 Explicit declare test matrix for TravisCI 2017-03-06 10:23:11 +01:00
Marcel Metz
2a08871fba Delete Xamarin.Common.targets on AppVeyor
This is a workaround for a Xamarin build script bug specific to
AppVeyor.  For more details see:

http://help.appveyor.com/discussions/problems/4569
2017-03-06 10:23:11 +01:00
Marcel Metz
441180a08a Install dependencies on TravisCI to enable more features
Install Ubuntu development packages for PulseAudio, PortAudio, ALSA and
JACK to enable the building of most Linux backends on TravisCI.

Intall Ubuntu development packages for Qt5 to enable `alsoft-config`.
2017-03-05 16:14:18 +01:00
Chris Robinson
073829f26a Make the voice's source pointer atomic 2017-03-05 04:50:27 -08:00
Chris Robinson
c040491615 Update alffplay for newer ffmpeg and convert to C++ 2017-03-05 01:20:19 -08:00
Chris Robinson
40c5fe4c33 Remove ex-common and test-common static libs 2017-03-04 23:02:52 -08:00
Chris Robinson
87fd288359 Remove unnecessary wrappers around SDL_sound
Also remove wrappers for the now-unsupported buffer_samples extension.
2017-03-04 22:30:57 -08:00
Chris Robinson
c013068003 Use the LINK_FLAGS property instead of abusing libs for flags 2017-03-04 18:20:43 -08:00
kcat
9f9faff90a Merge pull request #95 from adrianbroher/export-config
Enable exporting of CMake import targets
2017-03-04 17:47:13 -08:00
Marcel Metz
a11a13bdd1 Use Ubuntu 14.04 in TravisCI to get a less antique CMake version 2017-03-05 00:14:49 +01:00
Marcel Metz
ad640245d8 Export cmake import targets for project build tree 2017-03-05 00:14:49 +01:00
Marcel Metz
df87cf8002 Export cmake import targets for project install tree 2017-03-05 00:14:49 +01:00
Marcel Metz
27be429ca4 Rename logical CMake target openal to OpenAL 2017-03-05 00:14:49 +01:00
Marcel Metz
9d0bf065ee Compile common library within dependent targets 2017-03-04 22:20:56 +01:00
Marcel Metz
952fb94ff7 Make logical target name openal uniform accross all platforms 2017-03-04 21:08:07 +01:00
Chris Robinson
6d7a790183 Add a boolean to specify if a voice should be playing 2017-03-02 01:02:40 -08:00
Chris Robinson
0e8ca50d7a Stretch out some GUI elements for the decoder configurations 2017-03-01 20:53:52 -08:00
Chris Robinson
d1833c7b94 Increment MixCount in UpdateClockBase
This is to protect clocktime reads since the backend lock won't protect it.
2017-02-28 23:18:51 -08:00
Chris Robinson
521abf2e07 Dynamically allocate the channel delay buffers 2017-02-28 21:01:13 -08:00
Chris Robinson
51092a6315 Remove unused function declarations 2017-02-28 19:58:20 -08:00
Chris Robinson
6f2a30dea2 Remove an unneeded function 2017-02-28 19:48:44 -08:00
Chris Robinson
d3365f1b5b Start a ALC_SOFT_loopback2 extension
This extends the base ALC_SOFT_loopback extension with support for B-Format.
When ALC_FORMAT_CHANNELS_SOFT is set to ALC_BFORMAT3D_SOFT, then additional
attributes must be specified. ALC_AMBISONIC_LAYOUT_SOFT must be set to
ALC_ACN_SOFT or ALC_FUMA_SOFT for the desired channel layout,
ALC_AMBISONIC_SCALING_SOFT must be set to ALC_N3D_SOFT, ALC_SN3D_SOFT, or
ALC_FUMA_SOFT for the desired channel scaling/normalization scheme, and
ALC_AMBISONIC_ORDER_SOFT must be set to an integer value greater than 0 for the
ambisonic order (maximum allowed is implementation-dependent).

Note that the number of channels required for ALC_BFORMAT3D_SOFT is dependent
on the ambisonic order. The number of channels can be calculated by:
num_channels = (order+1) * (order+1); /* or pow(order+1, 2); */

In addition, a new alcIsAmbisonicFormatSupportedSOFT function allows apps to
determine which layout/scaling/order combinations are supported by the loopback
device. For example,
alcIsAmbisonicFormatSupported(device, ALC_ACN_SOFT, ALC_SN3D_SOFT, 2) will
check if 2nd order AmbiX (ACN layout and SN3D scaling) rendering is supported
for ALC_BFORMAT3D_SOFT output.
2017-02-28 19:01:48 -08:00