Henrik Rydgård
11d4107230
WASAPI: Replace magic numbers with named constants
...
Define constants for channel upmixing attenuation factors to improve
code readability and maintainability:
- SURROUND_ATTENUATION (0.7f) for rear/side channels
- CENTER_MIX_ATTENUATION (0.7f) for center channel
- LFE_MIX_ATTENUATION (0.5f) for LFE channel
2026-08-04 00:37:55 +02:00
Henrik Rydgård
fd1e48ecc5
WASAPI: Add error check for RegisterEndpointNotificationCallback
...
Log a warning if registering for device change notifications fails.
This is non-fatal but means automatic device switching won't work.
2026-08-04 00:37:55 +02:00
Henrik Rydgård
95e09324a7
WASAPI: Fix ClampFloatToS16 to use full s16 range
...
Changed minimum clamp from -32767 to -32768 to match the full
range of signed 16-bit integers.
2026-08-04 00:37:55 +02:00
Henrik Rydgård
d97f42c225
WASAPI: Cache channel count to avoid unsafe pointer access from audio thread
...
Store format_->nChannels in atomic curChannels_ member to avoid
unsynchronized access to format_ pointer from the audio thread.
The format_ pointer can be freed/reallocated during Stop() while
the audio thread might still be reading it.
2026-08-04 00:37:55 +02:00
Henrik Rydgård
5d609598ce
Add some extreme paranoia-level error checking
2026-06-24 20:15:35 +02:00
Henrik Rydgård
0070ec2155
Improve audio logging, fix the fallback with some errors
2026-06-24 19:32:24 +02:00
Henrik Rydgård
caf6d885e9
Fix a buffer allocation issue in the WASAPI backend, update comments.
...
Claude Sonnect helped spot this, but I'm unsure if it will actually fix #21711
2026-05-21 01:39:53 +02:00
Henrik Rydgård
9d43abc8bc
WASAPI: Improve channel mix for high audio channel setups
2026-05-21 01:24:14 +02:00
Henrik Rydgård
53bbe11f30
WASAPI init bug fixes
2026-05-01 16:29:37 +02:00
Henrik Rydgård
f385a11b6f
WASAPI: If audioclient3 exists but fails init, fall back to audioclient.
2026-05-01 15:59:33 +02:00
Henrik Rydgård
2cc8e87389
WASAPI: Improve error handling and sysinfo display
2026-03-14 23:50:10 +01:00
Henrik Rydgård
b4664bf3f2
WASAPI: Improve the format checks to match the old implementation.
...
Will hopefully help a reported issue.
2026-03-07 18:59:03 +01:00
Henrik Rydgård
8445644920
Additional cleanup
2026-03-04 15:15:53 +01:00
Henrik Rydgård
b6a0e051aa
Minor fixes in WASAPIContext.cpp/h
2026-03-04 15:05:35 +01:00
Henrik Rydgård
2052ebc60c
Fix switching of audio devices on Windows.
...
Fixes #21337
2026-03-04 14:41:59 +01:00
Henrik Rydgård
892ef99daa
Misc cleanups and fixes
2026-03-04 14:41:59 +01:00
Henrik Rydgård
b7aa38a738
WASAPI: Re-enable AudioClient3. Fix a possible crash.
2026-01-05 19:48:22 +01:00
Henrik Rydgård
9abd8c21e1
Finish implementing the multipart protocol, now multi file uploads work without corruption.
2025-10-27 12:20:24 +01:00
oltolm
de3abcf579
fix compiler warnings
2025-09-19 11:36:11 +02:00
Henrik Rydgård
5685331198
Unrelated sanity checks in audio
2025-09-12 12:17:27 -06:00
Henrik Rydgård
92b7f0dba1
WASAPI: Improve logging and error handling.
...
Hopefully will finally fix #20540
2025-07-11 13:53:27 +02:00
Henrik Rydgård
a00c857b4b
WASAPI: Try to ask the device for a stereo format if it has too many channels.
...
Also, add support for 16-bit audio (should be rare)
2025-07-11 09:41:08 +02:00
oltolm
11d8f85bf4
use ComPtr in WASAPIContext
2025-07-09 22:54:58 +02:00
oltolm
41e325475c
fix mingw64 build and Clang warnings
2025-06-22 12:30:13 +02:00
Henrik Rydgård
5d98e02d9b
Add more info about the output audio stream to System Information.
...
Plus another channel number fix
2025-06-19 01:20:16 +02:00
Henrik Rydgård
0502d79c99
Remove the return value from NativeMix, correct mixing with other channel numbers than 2
2025-06-18 23:48:00 +02:00
Henrik Rydgård
6271af52e9
Add the new low-latency WASAPI backend. Implement audio device selection on Windows
2025-06-16 22:40:13 +02:00
Henrik Rydgård
990b74cc17
More audio refactoring
2025-06-16 18:48:53 +02:00