Commit Graph

14 Commits

Author SHA1 Message Date
Ryan C. Gordon
b24ff44692 Make static analysis happy. 2015-03-19 23:44:47 -04:00
Ryan C. Gordon
277e07e700 Fixed a compiler warning on Visual Studio. 2015-03-19 23:39:53 -04:00
Ryan C. Gordon
537b68b9f0 Zero out the audio hotplug event structure, so the "padded" fields are sane.
Just in case we ever need those bits in the future.
2015-03-19 22:11:20 -04:00
Ryan C. Gordon
11cffe1dc9 SDL_RemoveAudioDevice() should specify capture vs output.
This lets us reuse values between the two categories without conflicting, etc.
2015-03-19 15:43:00 -04:00
Ryan C. Gordon
1e78ef2155 Removed the broken audio streaming code, other small cleanups. 2015-03-19 13:34:17 -04:00
Ryan C. Gordon
5cbb32ef57 Disconnected/broken/lost audio devices now continue to fire their callback.
The data produced by the callback is just thrown away and the audio thread
delays as if it's waiting for the hardware to drain.

This lets apps that rely on their audio callback firing regularly continue
to make progress to function as properly as possible in the face of disaster.
Apps that want to know that the device is really gone and deal with that
scenario can use the new hotplug functionality.
2015-03-19 13:27:10 -04:00
Ryan C. Gordon
75973f81b2 Don't assert if an audio backend reports the same device disconnected twice. 2015-03-19 13:15:28 -04:00
Ryan C. Gordon
f9cfd9fa14 Bunch of reworking to how we manage audio devices.
Device enumeration now happens at startup and then is managed exclusively
through hotplugging instead of full redetection. The device name list now has
a unique "handle" associated with each item and SDL will pass this to the
backend so they don't have to figure out how a human readable name maps to
real hardware for a second time.

Other cleanups, fixes, improvements, plus all the audio backends updated to
the new interface...largely untested at this point, though.
2015-03-18 02:01:17 -04:00
Ryan C. Gordon
0e02ce0856 Initial work on audio device hotplug support.
This fills in the core pieces and fully implements it for Mac OS X.

Most other platforms, at the moment, will report a disconnected device if
it fails to write audio, but don't notice if the system's device list changed
at all.
2015-03-16 02:11:39 -04:00
Ryan C. Gordon
338bf5d297 Changed some SDL_memset() calls to SDL_zero(). 2015-03-18 10:09:39 -04:00
Ryan C. Gordon
97ff10c63c Tweaked a couple comments, added some FIXMEs. 2015-03-18 10:09:23 -04:00
Ryan C. Gordon
809b7be27f Cleaning out a silly coding style I used to use.
Changed all the "return (x);" lines to "return x;"
2015-03-13 12:20:17 -04:00
Ryan C. Gordon
3a53258814 Removed an unnecessary #ifdef. 2015-03-13 00:48:30 -04:00
Philipp Wiesemann
b48e54aafe Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation
Jonas Kulla

The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c.

I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
2015-01-26 22:00:29 +01:00