|
57d01d7d
|
2016-11-13T22:57:41
|
|
Patch from Sylvain to fix clang warnings
|
|
c13a077d
|
2016-11-13T00:09:02
|
|
Fixed bug 3488 - Random crashes (because Memory overlap in audio converters detected by Valgrind)
Vitaly Novichkov
Okay, when I researched code and algorithm, I tried to replace condition "while(dst >= target)" with "while(dst > target)" and crashes are gone.
Seems on some moments it tries to write into the place before memory block begin, therefore phantom crashes appearing after some moments.
|
|
302a6e62
|
2016-11-11T12:41:06
|
|
Fixed bug 3484 - DSP driver does not detect /dev/dsp0
Tobias Kortkamp
using SDL 2.0.5 (and a repository checkout) on FreeBSD 11.0 I get this output
from testaudioinfo with SDL_AUDIODRIVER=dsp:
INFO: Found 8 output devices:
INFO: 0: /dev/dsp
INFO: 1: /dev/dsp1
INFO: 2: /dev/dsp2
INFO: 3: /dev/dsp3
INFO: 4: /dev/dsp4
INFO: 5: /dev/dsp5
INFO: 6: /dev/dsp6
INFO: 7: /dev/dsp7
INFO:
INFO: Found 3 capture devices:
INFO: 0: /dev/dsp
INFO: 1: /dev/dsp4
INFO: 2: /dev/dsp5
INFO:
This is /dev/sndstat:
Installed devices:
pcm0: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC887 (Rear Analog 7.1/2.0)> (play/rec)
pcm5: <Realtek ALC887 (Front Analog)> (play/rec) default
pcm6: <Realtek ALC887 (Rear Digital)> (play)
pcm7: <Realtek ALC887 (Onboard Digital)> (play)
No devices installed from userspace.
I'd expect to find /dev/dsp0 in the output device list. It's not detected
because of a a small logic error in SDL_audiodev.c (see attached patch).
With the patch applied I get this which is what I'd expect:
INFO: Found 9 output devices:
INFO: 0: /dev/dsp
INFO: 1: /dev/dsp0
INFO: 2: /dev/dsp1
INFO: 3: /dev/dsp2
INFO: 4: /dev/dsp3
INFO: 5: /dev/dsp4
INFO: 6: /dev/dsp5
INFO: 7: /dev/dsp6
INFO: 8: /dev/dsp7
|
|
6380d5c2
|
2016-11-07T21:10:01
|
|
Fixed audio conversion for unsigned 16 bit data.
|
|
7ad3a46d
|
2016-11-05T21:23:17
|
|
ALSA: Fixed compile warning about unused function.
Found by buildbot.
|
|
6ed82130
|
2016-11-05T01:52:28
|
|
Fixed Windows build
|
|
a17abf10
|
2016-11-05T03:56:55
|
|
Also patched to compile on C89 compilers.
|
|
067f0c84
|
2016-11-05T03:53:59
|
|
Patched to compile on C89 compilers.
|
|
f3456e9a
|
2016-11-05T02:34:38
|
|
Reworked audio converter code.
This no longer uses a script to generate code for every possible type
conversion or resampler. This caused a bloat in binary size and and compile
times. Now we use a handful of more generic functions and assume staying in
the CPU cache is the most important thing anyhow.
This shrinks the size of the final build (in this case: macOS X amd64, -Os to
optimize for size) by 15%. When compiling on a single core, build times drop
by about 15% too (although the previous cost was largely hidden by multicore
builds).
|
|
88f2d16e
|
2016-10-28T17:00:37
|
|
Fixed compiling on older versions of ALSA
|
|
fdcac1c2
|
2016-10-28T16:47:06
|
|
Fixed audio data swizzling when the device channel map already matches what SDL expects
|
|
62310c6b
|
2016-10-12T22:25:19
|
|
Work-around for a hang when USB devices are unplugged, contributed by James Zipperer
|
|
fed9b604
|
2016-10-10T23:26:26
|
|
Use SDL C runtime strlen()
|
|
ca42373f
|
2016-10-10T15:29:18
|
|
alsa: more tapdancing to enumerate physical hardware devices.
Apparently some systems see "hw:", some see "default:" and some see
"sysdefault:" (and maybe others!). My workstation sees both "hw:" and
"sysdefault:" ...
Try to find a prefix we like and prioritize the prefixes we (think) we want
most. If everything else fails, if there's a "default" (not a prefix) device
name, list that by itself so the user gets _something_ here.
If we can't find a prefix we like _and_ there's no "default" device, report
no hardware found at all.
|
|
52ae92ea
|
2016-10-07T19:08:22
|
|
ALSA_snd_pcm_drop() can hang on some systems (Steam Link) so don't use that when shutting down the ALSA audio driver.
|
|
93ff12ce
|
2016-10-07T17:23:20
|
|
Fixed bug 2952 - SDL_MixAudioFormat does not support audio format AUDIO_U16LSB/AUDIO_U16MSB
Simon Sandstr?m
As stated in Summary. The switch statement will execute the default case and set a SDL error message: "SDL_MixAudio(): unknown audio format".
There are atleast two more problems here:
1. SDL_MixAudioFormat does not notify the user that an error has occured and that a SDL error message was set. It took me awhile to understand why I couldn't mix down the volume on my AUDIO_U16LSB formatted audio stream.. until I started digging in the SDL source code.
2. The error message is incorrect, it should read: "SDL_MixAudioFormat(): unknown audio format".
|
|
7d2108ce
|
2016-10-07T19:39:43
|
|
audio: Backed out the audio-thread detaching changes.
It added a ton of complexity. A simpler solution might arise at some
point though.
|
|
f6a280ab
|
2016-10-07T15:13:46
|
|
audio: Don't trust audio drivers to drain pending audio.
This tends to be a frequent spot where drivers hang, and the waits were
often unreliable in any case.
Instead, our audio thread now alerts the driver that we're done streaming audio
(which currently XAudio2 uses to alert the system not to warn about the
impending underflow) and then SDL_Delay()'s for a duration that's reasonable
to drain the DMA buffers before closing the device.
|
|
551cdc8d
|
2016-10-07T14:42:24
|
|
audio: better way to calculate buffer drain wait times.
|
|
76f48acf
|
2016-10-07T14:35:25
|
|
audio: threading and device hang improvements.
This tries to make SDL robust against device drivers that have hung up,
apps don't freeze in catastrophic (but not necessarily uncommon) conditions.
Now we detach the audio thread and let it clean up and don't care if it
never actually runs to completion.
|
|
3b0c7936
|
2016-10-07T11:18:55
|
|
Some systems include both "default:" and "hw:" for the same usb device
|
|
8e199461
|
2016-10-06T06:08:16
|
|
fix for finding ALSA hotplug devices on Steam Link
James Zipperer
The device names show up as "default:", not "hw:"
|
|
9257b72d
|
2016-10-05T00:12:16
|
|
Backed out a very unsafe change that was trying to prevent audio hang at quit.
Ryan and I have ideas on a better way to handle this.
|
|
bac61096
|
2016-10-04T06:48:07
|
|
ensure SDL_AUDIODEVICEREMOVED gets sent when hotplug removes a device
James Zipperer
The problem I was seeing was that the the ALSA hotplug thread would call SDL_RemoveAudioDevice, but my application code was not seeing an SDL_AUDIODEVICEREMOVED event to go along with it. To fix it, I added some code into SDL_RemoveAudioDevice to call SDL_OpenedAudioDeviceDisconnected on the corresponding open audio device. There didn't appear to be a way to cross reference the handle that SDL_RemoveAudioDevice gets and the SDL_AudioDevice pointer that SDL_OpenedAudioDeviceDisconnected needs, so I ended up adding a void *handle field to struct SDL_AudioDevice so that I could do the cross reference.
Is there some other way beside adding a void *handle field to the struct to get the proper information for SDL_OpenedAudioDeviceDisconnected?
|
|
69cf1703
|
2016-10-04T06:46:46
|
|
fix deadlock on close device
James Zipperer
snd_pcm_drain doesn't always drain when you unplug a usb device. Use snd_pcm_drop instead
|
|
2558c9c8
|
2016-10-04T06:45:28
|
|
fix audio deadlock
James Zipperer
Close the audio device before waiting for the audio thread to complete, which fixes a situation where the audio thread never completes
Add an additional check in the audio thread to see if the device is enabled and bail out if the device is no longer enabled
|
|
8e88f081
|
2016-09-21T23:06:49
|
|
Mac: Fixed whitespace around function return type.
|
|
f0fca288
|
2016-09-18T19:22:09
|
|
Handle audio interruptions on iOS/tvOS. Fixes bugs 2569 and 2960.
|
|
06700a90
|
2016-09-18T18:07:47
|
|
emscripten: get even more aggressive about audio device closing.
I still get exceptions thrown sometimes on shutdown without this.
|
|
4209a1fd
|
2016-09-15T19:59:57
|
|
CoreAudio iOS/tvOS: Use AVFoundation instead of AudioSession. Fixes audio on tvOS.
Note that linking with AVFoundation is now required if you don't disable SDL_audio compilation on iOS and tvOS.
|
|
f0505766
|
2016-09-13T22:18:06
|
|
Initial Apple TV / tvOS support.
The Apple TV remote is currently exposed as a joystick with its touch surface treated as two axes. Key presses are also generated when its buttons and touch surface are used.
A new hint has been added to help deal with deciding whether to background the app when the remote's menu button is pressed: SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS.
|
|
63200ea3
|
2016-09-13T00:03:41
|
|
optimize a getValue
|
|
0265d3af
|
2016-09-04T01:23:55
|
|
coreaudio: Move from AudioUnits to AudioQueues.
AudioQueues are available in Mac OS X 10.5 and later (and iOS 2.0 and later).
Their API is much more clear (and if you don't mind the threading tapdance
to get its own CFRunLoop) much easier to use in general for our purposes.
As an added benefit: they seemlessly deal with format conversion in ways
AudioUnits don't: for example, my MacBook Pro's built-in microphone won't
capture at 8000Hz and the AudioUnit version wouldn't resample to hide this
fact; the AudioQueue version, however, can handle this.
|
|
3b53304a
|
2016-09-03T00:13:41
|
|
coreaudio: capture devices should let the system allocate the render buffer.
|
|
fda7a3d1
|
2016-09-02T13:12:21
|
|
coreaudio: Replaced an int with an SDL_bool.
|
|
f9d9708f
|
2016-09-02T13:11:28
|
|
coreaudio: Move some variable declarations to the top of the scope.
|
|
2098bfb3
|
2016-08-31T16:10:04
|
|
emscripten: Be more aggressive when closing audio capture devices.
Fixes exceptions being thrown on shutdown.
|
|
c9bfcbde
|
2016-08-28T18:52:25
|
|
nacl: Patched to compile.
|
|
714aa211
|
2016-08-28T18:24:44
|
|
Patched to compile on Haiku.
|
|
2da1ec83
|
2016-08-28T13:36:13
|
|
Merge audio capture work back into the mainline.
|
|
06dcdc7d
|
2016-08-28T11:56:11
|
|
Patched to compile.
|
|
850da32f
|
2016-08-28T08:50:26
|
|
alsa: Implemented hotplug support, cleaned up device names.
|
|
cfa95fe6
|
2016-08-15T10:09:41
|
|
alsa: don't enumerate virtual devices, just physical hardware.
|
|
3b88f5c6
|
2016-08-12T00:03:58
|
|
emscripten audio: check for an "undefined" object, remove some console.log().
|
|
e435659c
|
2016-08-11T22:26:58
|
|
audio: Cleaned up "extern AudioBootStrap" list.
|
|
6f4bcd24
|
2016-08-11T22:22:09
|
|
audio: Renamed some internal driver symbols in various targets.
|
|
8f0af773
|
2016-08-11T22:04:49
|
|
android: implement audio capture support.
|
|
b78ec974
|
2016-08-10T16:00:16
|
|
directsound: Implemented audio capture support.
|
|
21c7fe00
|
2016-08-10T15:34:24
|
|
windows: directsound should also map audio device GUIDs to proper names.
Moved this code from winmm into core so both can use it.
DirectSound (at least on Win10) also returns truncated device names, even
though it's handed in as a string pointer and not a static-sized buffer. :/
|
|
b879595a
|
2016-08-10T14:14:14
|
|
audio: Patched to compile on C89 compilers.
|
|
244d2dbc
|
2016-08-10T14:13:48
|
|
emscripten audio: fix timer on capture's silence callback.
|
|
7a8e4cb0
|
2016-08-09T19:35:46
|
|
directsound: recalculate audiospec size before creating secondary buffer.
I think this was a bug before? Maybe I'm misunderstanding this, but it looks
like it was working because we allocate room for 8 chunks...
|
|
358a168c
|
2016-08-09T16:58:32
|
|
emscripten audio: Added audio capture support.
|
|
5de11a5f
|
2016-08-09T16:58:06
|
|
Added a FIXME.
|
|
a05bde21
|
2016-08-09T00:44:59
|
|
audio: Only allocate fake_stream if we're using the standard audio threads.
|
|
be8d7a46
|
2016-08-09T00:44:05
|
|
audio: simplifed check for internal callback.
Easier to check when it's NULL instead of a list of known internal functions.
|
|
df4985e2
|
2016-08-07T02:43:20
|
|
dsp: Implemented audio capture support.
|
|
a0ff2554
|
2016-08-07T01:48:38
|
|
winmm: Try to get full device names from the Windows Registry.
|
|
ff7df7e6
|
2016-08-06T23:05:02
|
|
winmm: Added a FIXME for truncated device names.
|
|
51d15233
|
2016-08-06T19:34:32
|
|
winmm: Implemented audio capture support.
|
|
4499e5bc
|
2016-08-06T03:45:45
|
|
disk audio: Make default i/o delay match what device is meant to be running at.
|
|
978df1ad
|
2016-08-06T03:39:15
|
|
disk audio: Implemented "capture" support, cleaned up some things.
|
|
73153901
|
2016-08-06T02:47:27
|
|
audio: Implemented buffer queueing for capture devices (SDL_DequeueAudio()).
|
|
e7347a40
|
2016-08-06T02:27:55
|
|
audio: SDL_ClearQueuedAudio() should free everything but two packets.
Otherwise, if you had a massive, one-time queue buildup, the memory from that
remains allocated until you close the device. Also, if you are just using a
reasonable amount of space, this would previously cause you to reallocate it
over and over instead of keeping a little bit of memory around.
|
|
9a331544
|
2016-08-05T04:23:32
|
|
nas: initial shot at audio capture support. Compiles, but not tested.
|
|
9b2a59ef
|
2016-08-05T02:04:48
|
|
audio: Changed OnlyHasDefaultInputDevice to OnlyHasDefaultCaptureDevice.
|
|
761a7978
|
2016-08-05T01:59:06
|
|
audio: changed some SDL_memset() calls to SDL_zero(), other minor corrections.
|
|
9b647727
|
2016-08-05T01:44:41
|
|
audio: Clean up some CloseDevice() interface details.
- It's now always called if device->hidden isn't NULL, even if OpenDevice()
failed halfway through. This lets implementation code not have to clean up
itself on every possible failure point; just return an error and SDL will
handle it for you.
- Implementations can assume this->hidden != NULL and not check for it.
- implementations don't have to set this->hidden = NULL when done, because
the caller is always about to free(this).
- Don't reset other fields that are in a block of memory about to be free()'d.
- Implementations all now free things like internal mix buffers last, after
closing devices and such, to guarantee they definitely aren't in use anymore
at the point of deallocation.
|
|
979de761
|
2016-08-05T01:44:15
|
|
audio: Removed internal SDL_audiomem.h and macros.
I think this was important for SDL 1.2 because some targets needed
special device memory for DMA buffers or locked memory buffers for use in
hardware interrupts or something, but since it just defines to SDL_malloc
and SDL_free now, I took it out for clarity's sake.
|
|
30a9139b
|
2016-08-04T11:51:17
|
|
arts: backed out audio capture support.
Turns out that libartsc isn't thread-safe, so if we run a capture and playback
device at the same time, it often crashes in arts's internal event loop.
We could throw mutexes around the read/write calls, but these are meant to
block, so one device could cause serious latency and stutter in the other.
Since this audio target isn't in high-demand (Ubuntu hasn't offered a libartsc
package for years), I'm just backing out the capture support. If someone needs
it, they can pull it out of the revision history.
|
|
20cd5e44
|
2016-08-03T16:54:10
|
|
dummy audio: Patched to compile.
|
|
17246ba9
|
2016-08-03T02:18:47
|
|
dummy audio: Implemented dummy audio capture support. :)
|
|
9dd8477a
|
2016-08-03T01:57:41
|
|
bsdaudio: first shot at audio capture support!
(untested, uncompiled...for now.)
|
|
d30a2f5a
|
2016-08-03T01:56:58
|
|
bsdaudio: this appears to be using the wrong variable...?
(We probably never noticed because this is meant to block until it fully
writes a buffer, and would only trigger an issue if we had a short write
that wasn't otherwise an error condition.)
|
|
ecbd625c
|
2016-08-03T01:53:59
|
|
arts: Patched to (maybe) compile.
|
|
a7dddacd
|
2016-08-03T01:01:44
|
|
arts: implemented audio capture support.
(completely untested! Not even compiled!!).
|
|
38f4b68c
|
2016-08-03T01:00:30
|
|
alsa: capture devices don't need a mixbuf allocated.
|
|
a9ef240c
|
2016-08-03T00:30:12
|
|
coreaudio: Implemented audio capture for iOS.
|
|
41e8f9ed
|
2016-08-02T15:06:40
|
|
alsa: Implemented audio capture support!
|
|
754efd43
|
2016-08-02T15:06:05
|
|
alsa: Cleaned up the 5.1 swizzle mess a little.
Shouldn't this be something ALSA handles for us with channel maps, so we can
just delete this code?
|
|
6bd1ec6b
|
2016-08-02T15:04:33
|
|
audio: a little more robustness in the capture device's thread.
|
|
d662bc04
|
2016-08-02T13:50:58
|
|
pulseaudio: Implemented audio capture support!
|
|
0d0f7080
|
2016-08-02T13:50:21
|
|
audio: implemented higher level infrastructure for running capture devices.
|
|
6d5c9c1e
|
2016-08-02T13:48:52
|
|
audio: Made some SDL_AudioDevice fields atomic.
This makes sure they're properly communicated to the audio threads.
|
|
67f2538c
|
2016-08-01T13:32:27
|
|
audio: changed some internal ints to be SDL_bools.
|
|
a94376c7
|
2016-08-01T11:47:02
|
|
nacl: unlock audio thread mutex when done with it.
|
|
c754662d
|
2016-08-01T11:45:45
|
|
audio: Make SDL_AudioDevice::shutdown an atomic value.
Just to make sure this get communicated to the audio thread properly.
|
|
015dd8dd
|
2016-08-01T00:20:47
|
|
audio: Implemented capture support for Mac OS X CoreAudio.
I don't know what iOS wants yet, so this code might work there, too...?
|
|
ee099750
|
2016-08-01T00:18:56
|
|
audio: Initial bits to enable audio capture support.
|
|
427472fe
|
2016-07-19T21:02:44
|
|
ALSA: Fixed adding wrong status to error message (thanks, romain145!).
Fixes Bugzilla #3364.
|
|
4a468739
|
2016-05-21T00:20:52
|
|
Removed Mac OS 10.5 support (bug #3137). Also fixed a warning about deprecated Carbon code when using SDL_audio (bug #3127, thanks Dominik!)
|
|
9b4db2b8
|
2016-04-12T18:11:36
|
|
Patched to compile on various platforms.
|
|
c61675dc
|
2016-04-12T16:45:10
|
|
threads: Move SDL's own thread creation to a new internal API.
This allows us to set an explicit stack size (overriding the system default
and the global hint an app might have set), and remove all the macro salsa
for dealing with _beginthreadex and such, as internal threads always set those
to NULL anyhow.
I've taken some guesses on reasonable (and tiny!) stack sizes for our
internal threads, but some of these might turn out to be too small in
practice and need an increase. Most of them are simple functions, though.
|
|
a581346f
|
2016-04-04T22:49:13
|
|
alsa: Make device enumeration robust against weird results with NULL strings.
|
|
1e8df9cd
|
2016-03-05T23:25:23
|
|
alsa: Implemented basic device detection.
This is kind of nasty, because ALSA reports dozens of "devices" that aren't
really things you'd ever want, or things that should be listed this way, but
the default path still works as before, and it at least allows these devices
to be available to apps.
This does not handle hotplugging yet. You get a device list at init time
and that's it.
|
|
9bdd1881
|
2016-01-27T23:20:23
|
|
PSP: Removed inlined copy of SDL_CalculateAudioSpec()'s functionality.
|
|
68a32728
|
2016-01-02T10:38:51
|
|
Fixed sed error on Mac OS X and updated copyright on a few last files
|
|
42065e78
|
2016-01-02T10:10:34
|
|
Updated copyright to 2016
|
|
8ddcc63a
|
2015-12-18T18:49:35
|
|
sdl:
xaudio2 is not linked against sdl but the sdk already handles dynamically loading (XAudio2Create is inlined and just loads a com object). Updated SDL_xaudio2.c
|
|
25abce51
|
2015-11-29T19:33:11
|
|
WinRT: added Win10/UWP (Universal Windows Platform) support
"UWP" appears to be Microsoft's new name for WinRT/Windows-Store APIs.
This set of changes updates SDL's WinRT backends to support the Win10 flavor
of WinRT. It has been tested on Win10 on a desktop. In theory, it should
also support Win10 on other devices (phone, Xbox One, etc.), however further
patches may be necessary.
This adds:
- a set of MSVC 2015 project files, for use in creating UWP apps
- modifications to various pieces of SDL, in order to compile via MSVC 2015 +
the Win10 API set
- enables SDL_Window resizing and programmatic-fullscreen toggling, when using
the WinRT backend
- WinRT README updates
|