Chris Robinson
167bdce48d
Hold the ListLock while opening a device
...
Since it may rely on the enumerated device list that could be updated
asynchronously.
2020-03-30 13:50:50 -07:00
Chris Robinson
75479b58e3
Remove use of unnecessary type aliases
2020-03-30 13:43:49 -07:00
Chris Robinson
cc009b8aa0
Move the FrontStablizer definition to its own header
2020-03-30 01:16:15 -07:00
Chris Robinson
f8a5ea2d74
Inline a couple BackendBase methods
2020-03-30 00:07:35 -07:00
Chris Robinson
9b237790b2
Remove the mutex from the backend base
2020-03-29 23:57:37 -07:00
Chris Robinson
d70912c034
Remove the QSA backend
...
It's been broken for who knows how long, and could really do with a rewrite for
the new interface anyway.
2020-03-29 20:37:58 -07:00
Chris Robinson
fed80e0c10
Reset real-time priority on fork
2020-03-29 19:39:00 -07:00
Chris Robinson
fb433cd918
Protect the call to pa_mainloop_quit with the mutex
2020-03-29 03:44:34 -07:00
Chris Robinson
5dfa24d5e2
Stop updating effects when one fails
2020-03-29 03:10:35 -07:00
Chris Robinson
a5b8167280
Make some functions private methods
2020-03-28 18:15:05 -07:00
Chris Robinson
963d9b761b
Rename ALvoice and related structs to Voice
2020-03-28 18:15:05 -07:00
Chris Robinson
f1f9a14172
Avoid AL[C]boolean for internal use
2020-03-28 18:15:05 -07:00
Chris Robinson
504745abec
Use a standard bool instead of ALboolean
2020-03-28 18:15:05 -07:00
Chris Robinson
e78cb9b77f
Avoid using more unnecessary type aliases
2020-03-28 18:15:04 -07:00
Chris Robinson
8731accd3f
Make sure prebuf is filled when starting pulseaudio playback
2020-03-27 01:03:01 -07:00
Chris Robinson
e73c0979a1
Use "zero-copy" writes with pulseaudio playback
2020-03-26 22:50:54 -07:00
Chris Robinson
e8149ec509
Move some setup to a more logical place
2020-03-25 22:24:09 -07:00
Chris Robinson
a27096dd63
Dynamically allocate voice channel data
...
Rather than allocating for a full 8 channels for each voice, when the vast
majority will only need 1 or 2. The voice channel data is relatively big since
it needs to hold HRTF coefficients and history, and this will allow increasing
the maximum number of buffer channels without an obscene memory increase.
2020-03-25 21:06:24 -07:00
Chris Robinson
cc27bbb680
Clear the WASAPI device list when enumerating
2020-03-24 11:48:25 -07:00
Chris Robinson
62f17d8763
Don't send close messages for unopened WASAPI devices
2020-03-24 11:40:34 -07:00
Chris Robinson
41b4c06697
Simplify clamping the voice mix size
2020-03-23 11:35:08 -07:00
Chris Robinson
dc8ccc06ce
More cleanup for the pitch shifter
2020-03-22 20:48:02 -07:00
Chris Robinson
813d4ed566
Use make_unique instead of new'ing into a unique_ptr
2020-03-22 18:48:33 -07:00
Chris Robinson
be1584ab47
Avoid assigning in a conditional expression
2020-03-22 11:35:08 -07:00
Chris Robinson
ef663f13c0
Properly allocate voices
2020-03-22 11:34:37 -07:00
Chris Robinson
3d09898d40
Use the correct include for al::fstream
2020-03-22 11:09:19 -07:00
Chris Robinson
2acdcba8d1
Silence a potential type truncation warning
2020-03-22 10:41:23 -07:00
Chris Robinson
f3ff28fb2a
Some type cleanup
2020-03-22 10:41:02 -07:00
Chris Robinson
d30d9a2c9f
Clean up the pitch and frequency shifter some
2020-03-22 10:06:23 -07:00
Chris Robinson
002d0eb6a0
Fix the frequency shifter channel panning
2020-03-22 08:51:59 -07:00
Chris Robinson
9ce182228d
Avoid some pre-C++14 workarounds
2020-03-22 08:51:06 -07:00
Chris Robinson
040309b9f4
Add missing semicolon
2020-03-22 08:22:25 -07:00
Chris Robinson
adf28d87aa
Remove the check for stat()
...
It's POSIX-2001 standard
2020-03-21 08:39:45 -07:00
Chris Robinson
12775513ae
Cleanup some helper code
2020-03-20 15:48:27 -07:00
Chris Robinson
0d11de3e8d
Move CPUCapFlags and FillCPUCaps to their own source
2020-03-20 15:30:41 -07:00
Chris Robinson
f56ef433d8
Move the FPUCtl methods to its own source
2020-03-20 15:01:45 -07:00
Chris Robinson
ad98895876
Avoid a function call to get the channel count
2020-03-18 04:08:26 -07:00
Chris Robinson
7805179313
Rename a method to be clearer
2020-03-18 03:17:14 -07:00
Chris Robinson
54e2eafcc9
Make the pulseaudio enumeration functions class methods
2020-03-18 03:07:54 -07:00
Chris Robinson
9f077d5f41
Remove a couple unused methods
2020-03-18 02:35:31 -07:00
Chris Robinson
bf50f227b9
Use a busy-wait when synchronizing against the mixer
...
The mixer should have higher priority than any thread that can make AL calls,
so even on single-core systems, it shouldn't stall the mix. It will, however,
return back to the caller as soon as it can, while yielding will give up the
timeslice if there's any other thread waiting to process even if the mix is
almost done.
2020-03-16 01:05:14 -07:00
Chris Robinson
78251fd7e6
Fix voices being forced to update without valid properties
...
When starting a voice, the source ID was set before its first update struct was
provided, creating a small window where a listener or effect slot update could
force a voice to update without it having any valid properties to update with.
Supplying the update struct first would create a different race, where the
mixer could see a voice without a source but with an update struct, causing the
update struct to be 'freed' without being applied.
The fix here is to provide the update struct before setting the source ID, and
change the mixer to ignore update structs for voices without a source ID. This
can pseudo-orphan the updates that get set on a voice just as it stops, leaving
the struct unusable until the voice is used again, or the voice gets deleted
which will clear it. But it allows the update struct to stay in place and get
applied once the voice gets a source ID.
2020-03-04 23:18:05 -08:00
Chris Robinson
e7405f7801
Use a new voice state to indicate a pending source offset change
2020-03-04 10:16:59 -08:00
Chris Robinson
accc1ec1c8
Add a helper to wait for the device mix
2020-03-03 20:32:44 -08:00
Chris Robinson
3e1a2c0f77
Use an intrusive_ptr for the device's HrtfStore
2020-03-01 17:16:09 -08:00
Chris Robinson
b42d241da5
Use real-time priority by default
2020-02-26 09:53:06 -08:00
Chris Robinson
eb49290dab
Remove unnecessary locks now that the mixer doesn't require one
2020-02-26 04:58:02 -08:00
Chris Robinson
4555b74bd7
Use a VoiceChange object to change the offset of a playing source
2020-02-26 03:52:40 -08:00
Chris Robinson
872096958b
Rename the voice's PendingStop to PendingChange
2020-02-26 01:48:59 -08:00
Chris Robinson
795c4fcecc
Make the source's send array static instead of dynamic
2020-02-25 06:39:03 -08:00