8119 Commits

Author SHA1 Message Date
Chris Robinson
9bf630c9d6 Handle a blank channel mask from WASAPI
Without a channel mask, the channels are treated as "raw" or unknown. Auto-
detection will only go up to stereo (assuming the first two channels are front-
left and front-right), while explicit requests will work as long as there are
enough channels (the user is responsible for ensuring a correct setup).
2022-06-14 03:24:23 -07:00
Chris Robinson
11d148502d Use an inline function instead of a function-like macro 2022-06-12 23:20:53 -07:00
Chris Robinson
80bb080393 Update changelog 2022-06-10 23:16:05 -07:00
Chris Robinson
2a81f32abd Disable EAX if the Chorus effect is disabled 2022-06-10 23:15:13 -07:00
Chris Robinson
1278d3b849 Handle 5.1 Rear with DSound playback 2022-06-08 02:21:37 -07:00
Chris Robinson
14e6d3836a Check and handle 5.1 Rear with WASAPI capture 2022-06-07 23:53:03 -07:00
Chris Robinson
d923f2d0a6 Trace the WASAPI device mix format 2022-06-07 18:58:44 -07:00
Chris Robinson
4750e553f1 Track 5.1 Rear with WASAPI playback 2022-06-07 18:50:28 -07:00
Chris Robinson
86d1eb90ed Use a proper literal type 2022-06-07 01:00:21 -07:00
Chris Robinson
862628966d Increase the priority of the ALSA backend
So that it's tried before sndio. Many Linux systems seem to have libsndio
installed as a hard dependency from SDL2, but not the server component to
actually make it work. And because there's no way to test if it's usable
without opening a device, the backend would get selected over ALSA and
subsequently fail to work. As a result, Linux users that don't use PipeWire or
PulseAudio would have to explicitly configure for ALSA.
2022-06-04 13:00:58 -07:00
Chris Robinson
cdd9a2177c Update changelog 2022-06-01 10:47:58 -07:00
Chris Robinson
f3092e286e Search for Oboe config modules first 2022-06-01 10:44:29 -07:00
3DJ
c6820bf266
Upload Win32 and x64 artifacts to Github actions (#708)
* Upload Win32 and x64 artifacts to Github actions

Provides an alternative Windows binary download location that expires in 3 months (2 months longer than Appveyor)

* Add Windows check to skip failed Github actions artifact upload for Linux and macOS
2022-05-30 15:51:05 -07:00
Chris Robinson
7f1d9725b2 Use a ringbuffer for Oboe capture 2022-05-28 07:00:45 -07:00
Chris Robinson
d7367aeee0 Fix requeueing logic for OpenSLCapture::captureSamples
The write vector represents the chunks queued for OpenSL, and the write pointer
only increments when OpenSL fills in more samples. So requeueing from the start
of the write vector is requeueing chunks that are already queued, which is
obviously wrong. It instead needs to queue chunks that become available as
they're read.

Because the ring buffer holds more elements than can be written to at a givem
time, the read vector does not represent the next writable chunks to queue.
Advancing the read pointer increases the number of writable elements, so
instead of queueing from the read vector or the start of the write vector,
queue from the end of the write vector given the number of chunks read.
2022-05-28 06:56:41 -07:00
Chris Robinson
ecb444e1e0 Update Changelog 2022-05-27 15:59:38 -07:00
Chris Robinson
7518a8a503 Ensure enough default sends for EAX with the config option set 2022-05-27 15:58:03 -07:00
Chris Robinson
233863cf29 Use a boolean check instead of a function pointer 2022-05-24 05:22:49 -07:00
Chris Robinson
6027ac4bc2 Avoid dividing by a constant 2022-05-24 02:20:33 -07:00
Boris I. Bendovsky
074dbef2e3
[EAX] Add separate effect state for each version (#705)
* [EAX] Add separate effect state for each version

* [EAX] Don't use EAX call as data member
2022-05-24 02:19:14 -07:00
Chris Robinson
54d72d17ad Use the mix format if IsFormatSupported fails for WASAPI capture 2022-05-17 13:02:00 -07:00
Chris Robinson
c7c40b2606 Update documentation about the 3D7.1 preset 2022-05-17 04:23:17 -07:00
Chris Robinson
7550dc571b Fix some formatting in the 3D7.1 preset 2022-05-17 04:18:28 -07:00
Chris Robinson
556c5d14d7 Avoid a virtual function call to set the decoder width 2022-05-17 02:32:10 -07:00
Chris Robinson
64cb0dc264 Use a member variable to specify the decoder padding 2022-05-17 02:28:57 -07:00
Chris Robinson
a5729d1ff6 Check the container type given to DEF_NEWDEL and DEF_FAM_NEWDEL
There's apparently no way to get the containing class/struct type from a static
member function, and operator new/delete are implicitly static member functions
so the macros to define them need to be told the type to allocate for. This
ensures the type specified matches the containing type.
2022-05-16 23:56:07 -07:00
Chris Robinson
3e9597a768 Avoid magic numbers 2022-05-16 22:49:03 -07:00
Chris Robinson
65e4c20c27 Move EAX files to their own sub-directory 2022-05-16 02:08:18 -07:00
Chris Robinson
83238973ed Use virtual functions for the decoder 2022-05-14 21:23:03 -07:00
Chris Robinson
0a57ebdd49 Mark the template base as inline
Apple LLVM doesn't like template specializatioms marked inline without the
(deleted) base also being inline.
2022-05-14 10:27:03 -07:00
Chris Robinson
f2858ac865 Resample before frequency analysis
We want to resample before minimum phase reconstruction since that changes the
phase relationship of the sampled signal, introducing a slight bit of noise
from truncated sampling. It's not clear that the frequency domain resampling
method is accurate, so resampling prior to frequency analysis is an alternative
to ensure the resulting frequencies are given the proper phase for sampling.

This also cleans up some micro allocations in loops.
2022-05-13 15:40:15 -07:00
Chris Robinson
82c8e87ec7 Keep some variables local to where they're needed 2022-05-13 15:40:15 -07:00
Chris Robinson
dbf5306828 Use pw_buffer::requested in newer PipeWire versions 2022-05-13 15:40:15 -07:00
Chris Robinson
d38d9b091e Remove a couple unnecessary casts 2022-05-13 15:40:15 -07:00
ilya-fedin
0bf2abae9b
Fix pkg-config file when libdir/bindir/includedir specified as absolute paths (#696)
Currently it makes the pkg-config file unusable as prefix is specified twice.

FULL variables do the necessary parsing and automatically prepend the prefix if needed.
2022-05-13 15:39:43 -07:00
ilya-fedin
e0d26ba25a
Search the installation data directory (#693)
That allows the logic to work on non-FHS distros like NixOS
2022-05-13 13:55:17 -07:00
Chris Robinson
af8e756dcb Fix the CoreAudio output element value 2022-05-10 15:36:26 -07:00
Chris Robinson
23b4611cd0 Properly set the air absorption gain base 2022-05-10 06:46:10 -07:00
Chris Robinson
c870e550fa Don't enable RTKit/D-Bus support on Windows 2022-05-09 12:38:12 -07:00
Chris Robinson
5c55ec2f9b More agressively hide PipeWire and SDL header warnings 2022-05-09 07:47:43 -07:00
Chris Robinson
2c9da1b671 Avoid an ugly and confusing generate_n 2022-05-08 20:22:25 -07:00
Chris Robinson
6f11638162 Clean up readAudio some 2022-05-08 11:39:28 -07:00
Chris Robinson
97ed5a870d Drain audio frames when stopping playback in alffplay 2022-05-07 17:42:37 -07:00
Chris Robinson
96756acc52 Reject older versions of PipeWire than built against
Newer versions of PipeWire may add things to public structures. For example,
pw_buffer::requested added in 0.3.49. Building against 0.3.49 or newer, but
then running with 0.3.48 could result in invalid accesses since the returned
pw_buffer objects are shorter than the definition says to expect, creating
undefined behavior. Even if explicit access to the additional fields is
protected by a runtime check, the language allows the compiler to assume a
pointer to a pw_buffer object contains a complete pw_buffer, allowing the
optimizer to access the field earlier than the check (with the check only
controlling if the value gets used).

Another example is pw_time, which had a few fields added in 0.3.50 along with a
function, pw_stream_get_time_n, that provides the size of the pw_time struct
the application is using (so the library knows what version of the struct it
has to fill in). If a later version adds a new field, running it with an older
version will either fail (due to the library getting a size larger than it
knows about) or silently leave the newer fields as garbage.
2022-05-07 08:49:02 -07:00
Chris Robinson
10e863d1b4 Avoid a deprecated PipeWire function
Building against 0.3.50 or newer will require that version or newer at runtime.
Building against a version before 0.3.50 will work with newer versions.
2022-05-06 12:46:36 -07:00
Chris Robinson
7e6ed2fa95 Use an array of pointers for the UHJ encoder input 2022-05-06 04:14:34 -07:00
Chris Robinson
de33f4968c Fix CoreAudio audio unit element values for capture 2022-05-02 05:17:22 -07:00
Chris Robinson
22e6c0df60 Check for a minimum PipeWire version
The backend is apparently using some stuff that wasn't in earlier headers, but
it's not clear what was introduced in which versions. 0.3.23 should work,
though it may need to be higher or it could go a bit lower.
2022-04-27 01:25:15 -07:00
Chris Robinson
514ff1d71b Update alsoftrc.sample about surround3d71 2022-04-27 00:28:23 -07:00
Chris Robinson
d9fe5a11cd Reset the ringbuffer when stopping OpenSL playback 2022-04-26 23:42:23 -07:00