Commit Graph

24 Commits

Author SHA1 Message Date
Ryan C. Gordon
4a50a04213 wasapi/win32: Sort initial device lists by device GUID.
This makes an unchanged set of hardware always report devices in the same
order on each run.
2018-10-21 22:40:17 -04:00
Ethan Lee
7f9854b9b2 WinRT: Wait until audio device activation is complete and PrepDevice during OpenAudio 2018-09-25 01:45:12 -04:00
Sam Lantinga
99a0c0f0e2 Fixed MinGW-w64 build 2018-02-24 08:23:44 -08:00
Ryan C. Gordon
c7e4366530 wasapi: let Windows do the resampling for us if possible. 2018-02-21 21:34:06 -05:00
Ryan C. Gordon
7e1fa0ce53 wasapi: fixed typo in an assert message. 2018-02-21 21:34:35 -05:00
sezero
40b27fd51b revert the recent typecast assignment changes (see bug #4079)
also change the void* typedefs for the two vulkan function
pointers added in vulkan_internal.h  into generic function
pointer typedefs.
2018-02-12 17:00:00 +03:00
Sam Lantinga
90e72bf4e2 Fixed ISO C99 compatibility
SDL now builds with gcc 7.2 with the following command line options:
-Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
2018-01-30 18:08:34 -08:00
Ryan C. Gordon
488824017a wasapi: Fixed some compiler warnings. 2018-01-22 09:36:40 -05:00
Sam Lantinga
e3cc5b2c6b Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Ryan C. Gordon
77bb49b7a7 wasapi: Patched to compile on non-UWP WinRT builds. 2017-12-31 03:34:16 -05:00
Ryan C. Gordon
ab4695f48f wasapi: switched to event-driven interface.
This reduces latency and improves battery life.
2017-12-13 14:35:55 -05:00
Ryan C. Gordon
351d6d4784 audio: Port WASAPI to WinRT, remove XAudio2 backend.
XAudio2 doesn't have capture support, so WASAPI was to replace it; the holdout
was WinRT, which still needed it as its primary audio target until the WASAPI
code code be made to work.

The support matrix now looks like:

WinXP: directsound by default, winmm as a fallback for buggy drivers.
Vista+: WASAPI (directsound and winmm as fallbacks for debugging).
WinRT: WASAPI
2017-12-06 12:24:32 -05:00
Sam Lantinga
bcf0e07107 Added WASAPI audio target to autoconf build process 2017-08-18 17:29:44 -07:00
Sam Lantinga
77ca0f273c Fixed crash if the WASAPI audio device couldn't be recovered 2017-07-27 22:55:18 -07:00
Sam Lantinga
4a734209a3 Fixed infinite recursion if the WASAPI audio device couldn't be recovered 2017-07-27 22:52:19 -07:00
Sam Lantinga
f033ce61e1 Fixed typo in WASAPI shutdown code 2017-07-27 02:41:58 -07:00
Ryan C. Gordon
e5918acf46 wasapi: properly report init failure if on pre-Vista version of Windows.
We really should change the Init interface to return 0 on success and -1 on
error, like everything else, to avoid this sort of confusion.
2017-05-28 00:41:55 -04:00
Ryan C. Gordon
91e6054b03 wasapi: don't mark capture devices as failed for AUDCLNT_S_BUFFER_EMPTY.
Fixes Bugzilla #3633.
2017-05-19 12:40:55 -04:00
Ryan C. Gordon
81ab6c98fd Patched to compile on Windows. 2017-05-18 16:27:36 -04:00
Ryan C. Gordon
13b6d9959a wasapi: Replace tabs with strings in source code. 2017-05-18 15:46:06 -04:00
Ryan C. Gordon
adabc38439 wasapi: Deal with AUDCLNT_S_BUFFER_EMPTY when flushing audio device. 2017-05-18 15:43:51 -04:00
Ryan C. Gordon
028716e79f wasapi: deal with default device changes, and more robust failure recovery. 2017-03-30 16:33:47 -04:00
Ryan C. Gordon
c85c57a05d wasapi: Handle lost audio device endpoints.
This gracefully recovers when a device format is changed, and will switch
to the new default device if the current one is unplugged, etc.

This does not handle when a new default device is added; it only notices
if the current default goes away. That will be fixed by implementing the
stubbed-out MMNotificationClient_OnDefaultDeviceChanged() function.
2017-03-29 14:23:39 -04:00
Ryan C. Gordon
6046fd4cb0 wasapi: Initial WASAPI support, for Windows Vista and later.
This should remain binary compatible with Windows XP, as we dynamically
load anything we need and fall back to DirectSound/WinMM/XAudio2 if not
available.
2017-02-14 03:03:27 -05:00