|
028716e7
|
2017-03-30T16:33:47
|
|
wasapi: deal with default device changes, and more robust failure recovery.
|
|
c85c57a0
|
2017-03-29T14:23:39
|
|
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.
|
|
266816b4
|
2017-03-26T21:00:19
|
|
Removed newlines from error messages.
|
|
6814f5db
|
2017-03-14T07:20:14
|
|
ALSA driver improvements:
* alsa hotplug thread is low priority
* give a chance for other threads to catch up when audio playback is not progressing
* use nonblocking for alsa audio capture
There is a bug with SDL hanging when an audio capture USB device is removed, because poll never returns
|
|
c4d54504
|
2017-03-14T07:16:56
|
|
differentiate between capture / playback audio thread names
|
|
ca0bf151
|
2017-03-03T16:38:17
|
|
Fix some more compiler warnings on armcc.
|
|
d526b8a1
|
2017-03-02T13:33:04
|
|
Some patches to make SDL compile with armcc (ARM's C compiler).
|
|
a4249b48
|
2017-02-26T00:56:13
|
|
Patched to compile on C89 compilers.
|
|
3b9e4d0a
|
2017-02-26T00:39:22
|
|
audio: Try to keep callbacks firing at normal pace when device is lost.
|
|
a366c35f
|
2017-02-26T00:12:33
|
|
audio: run the audio callback even if device was lost.
We will throw away the data anyhow, but some apps depend on the callback
firing to make progress; testmultiaudio.c, if nothing else, is an example
of this.
Capture also will now fire the callback in these conditions, offering nothing
but silence.
Apps can check SDL_GetAudioDeviceStatus() or listen for the
SDL_AUDIODEVICEREMOVED event if they want to gracefully deal with
an opened audio device that has been unexpectedly lost.
|
|
5728cb20
|
2017-02-26T00:10:02
|
|
audio: Make sure the disk and dummy targets are the last ones we try to init.
|
|
71a4e8ed
|
2017-02-23T12:10:02
|
|
Stop CoreAudio from doing expensive audio rate conversion
|
|
cfcec57f
|
2017-02-19T21:05:09
|
|
Fixed comment.
|
|
e8677a1b
|
2017-02-17T02:25:37
|
|
audio: Added basic WAVE_FORMAT_EXTENSIBLE support to .wav loader.
This is just enough to get you through a file that just used the extended
header for float or int data. It doesn't handle all the other things that
you expect from this header, like 24-bit samples inside a 32-bit container
or speaker masks.
|
|
1ed41d6d
|
2017-02-14T03:12:09
|
|
Patched to compile on Windows.
|
|
6046fd4c
|
2017-02-14T03:03:27
|
|
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.
|
|
e5fc93ba
|
2017-02-13T16:59:02
|
|
audio: Don't wrap bootstrap declarations in preprocessor macros.
They are harmless and ignored if we don't actually link against them. The
preprocessor checks elsewhere if they're actually used.
|
|
ad9c702f
|
2017-02-13T16:56:41
|
|
audio: SDL_AudioStream's *_sample_frame_size should be in bytes, not bits.
Fixes failures where SDL_AudioStreamGet() incorrectly thinks it got a partial
sample frame request.
|
|
175f1e8f
|
2017-02-13T16:55:00
|
|
audio: Added a ThreadDeinit() method to match ThreadInit.
Not used by any targets at the moment, but will be shortly!
|
|
886736a2
|
2017-02-11T16:38:16
|
|
Fixed bug 3584 - Small stack size for audio callback thread
Walter van Niftrik
We have found that since SDL 2.0.5 the audio callback thread is created with a very small stack size. In our application this is leading to stack overflows.
We believe there is a bug at http://hg.libsdl.org/SDL/file/391fd532f79e/src/audio/SDL_audio.c#l1132, where the is_internal_thread flag appears to be inverted.
|
|
107c19da
|
2017-02-09T06:01:14
|
|
Log the error returned by XAudio2Create()
|
|
ede5c734
|
2017-01-24T19:38:01
|
|
Generalized the audio resampling hint for other resampling methods in the future
|
|
47e2f4e9
|
2017-01-24T20:30:48
|
|
audio: libsamplerate can't resample in-place; make space for a copy if needed.
|
|
c7f9dcb6
|
2017-01-24T15:52:22
|
|
audio: Offer a hint for libsamplerate quality/speed tradeoff.
This defaults to the internal SDL resampler, since that's the likely default
without a system-wide install of libsamplerate, but those that need more can
tweak this.
|
|
1da3a337
|
2017-01-24T10:09:29
|
|
audio: Fix static analysis concerns about a dead assignment.
|
|
8f627c1c
|
2017-01-24T00:51:33
|
|
audio: Make sure SDL_AudioStream's work buffer is 16-byte aligned, for SIMD.
Note the giantic FIXME, though!
|
|
17dcee20
|
2017-01-24T00:17:40
|
|
audio: Streams now resample in-place. Removed second allocated buffer.
|
|
b5eeab77
|
2017-01-24T00:08:24
|
|
audio: allow stereo Sint16 resampling fast path in SDL_AudioStream.
This currently favors libsamplerate over the fast path (quality over speed),
but I'm not sure that's the correct approach, as there may be surprising
changes in performance metrics depending on what packages are available on
a user's system. That being said, currently, the only thing with access to
SDL_AudioStream is an SDL audio device's thread, and it might be mostly idle
otherwise, so maybe this is generally good.
|
|
a80cb672
|
2017-01-24T00:03:36
|
|
audio: Fixed off-by-one error in upsampling.
|
|
dad07f96
|
2017-01-23T16:45:50
|
|
audio: Resampler now special-cases stereo and mono processing.
Turns out that iterating from 0 to channels-1 was a serious performance hit!
These cases now tend to match or beat the original audio resampler's speed!
|
|
8ce6ddf1
|
2017-01-23T16:42:47
|
|
audio: Fixed incorrect pointer in SDL_ResampleCVT_si16_c2().
Forgot to update this when we changed this to process in-place. Whoops!
|
|
ecdc6c12
|
2017-01-23T12:14:28
|
|
audio: Fixed copy/paste bug in float32->sint16/SSE2 scalar leftover code.
|
|
4b8f3546
|
2017-01-23T12:06:10
|
|
audio: Fix same bug as last commit, but for _mm_bslli_si128 vs _mm_slli_si128.
|
|
fab45018
|
2017-01-23T12:02:02
|
|
audio: use _mm_srli_si128 instead of _mm_bsrli_si128.
They're the same thing (one is generally a #define of the other), but some
toolchains don't offer the 'b' version.
|
|
3594bf8e
|
2017-01-23T01:05:44
|
|
audio: Wired up new SSE code to build system.
|
|
64056e81
|
2017-01-23T00:57:19
|
|
audio: Added SSE3 implementation of SDL_ConvertStereoToMono().
|
|
8855daac
|
2017-01-22T23:48:15
|
|
audio: Make the simple resampler operate in-place.
This allows us to avoid an extra copy, allocate less memory and reduce cache
pressure. On the downside: we have to do a lot of tapdancing to resample the
buffer in reverse when the output is growing.
|
|
202ab30c
|
2017-01-22T20:27:48
|
|
audio: Special case for resampling stereo AUDIO_S16SYS audio data.
This is a fairly common case, so we avoid the conversion to/from float here.
|
|
a7f86f2f
|
2017-01-22T20:18:59
|
|
audio: don't cast to double in SDL_ConvertStereoToMono().
It's expensive and (hopefully) unnecessary. If this becomes an overflow
problem, we could multiply both values by 0.5f before adding them, but let's
see if we can get by without the extra multiplication first.
|
|
83454c82
|
2017-01-20T16:26:24
|
|
audio: removed conditional from simple resampler's inner loop.
We never seem to overflow the source buffer now; this might have been a
leftover from a bug that was covered by Vitaly's fixes?
Removing this conditional makes the resampler 10-20% faster. Left an
assert in there for debug builds, in case this still happens.
|
|
9b99265a
|
2017-01-19T20:19:37
|
|
Fixed mingw64 32-bit build, which does have the correct structure definitions
|
|
5cb1ca55
|
2017-01-18T11:57:27
|
|
Fixed building with mingw32
|
|
3e1679c8
|
2017-01-18T02:11:56
|
|
audio: Several fixes to "simple" resampler (thanks, Vitaly!).
Fixes Bugzilla #3551.
|
|
57182930
|
2017-01-16T00:58:28
|
|
audio: Implemented SIMD support for audio data type converters.
This currently adds an SSE2 implementation (but it's #ifdef'd out for now,
until it's hooked up to the configure script and such).
|
|
1e66d457
|
2017-01-15T05:01:59
|
|
audio: Some fixes to the audio data type converter code.
Removed some needless things ("len / sizeof (Uint8)"), and made sure the
int32 -> float code uses doubles to avoid working with large integer values
in a 32-bit float.
|
|
bf11cd50
|
2017-01-09T20:37:52
|
|
Fixed bug 3552 - Building SDL in release mode fails under VS 2017 RC
Lukasz Biel
Tried to compile SDL2 using newest version of VS.
Got:
SDL_audiocvt.obj : error LNK2019: unresolved external symbol memcpy referenced in function SDL_ResampleCVT
1>E:\Users\dotPo\Lib\SDL\VisualC\x64\Release\SDL2.dll : fatal error LNK1120: 1 unresolved externals
whole compilation process: http://pastebin.com/eWDAvBce
Steps to reproduce:
clone http://hg.libsdl.org/SDL using tortoise hg,
open SDL\VisualC\SDL.sln,
when promted if should retarget solution click ok,
select release x64 build type,
Build/Build Solution
attempt 2, using Visual Studio cmake support:
open folder SDL\
select release x64 build type,
run CMake\Build CMakeLists.txt
build fails
When switched to debug build type, buils succeeds in both cases.
VS 2017 is still beta.
|
|
23020f92
|
2017-01-09T16:31:57
|
|
audio: Don't ever use libsamplerate in the SDL_AudioCVT codepath.
It causes audio pops if you're converting in chunks (and needs to
allocate/initialize/free on each convert). We'll either adjust this interface
when we break ABI for 2.1 to make this usable, or publish the SDL_AudioStream
API for those that want a streaming solution.
In the meantime, the "simple" resampler produces "good enough" audio without
pops and doesn't have to be initialized, so that'll do for now on the
SDL_AudioCVT interface.
|
|
063c9d40
|
2017-01-09T06:00:58
|
|
audio: Replaced older resamplers in SDL_AudioCVT with the new ones.
|
|
a41103b1
|
2017-01-09T05:59:30
|
|
audio: Patched to compile if linking directly to libsamplerate.
|
|
38854e03
|
2017-01-08T16:18:49
|
|
audio: Improvements in channel conversion code.
|
|
35166609
|
2017-01-08T14:28:44
|
|
audio: Patched to compile with libsamplerate support (again).
|
|
d005dc21
|
2017-01-08T14:23:15
|
|
audio: Patched to compile with libsamplerate support.
|
|
19e937fc
|
2017-01-08T14:18:03
|
|
audio: libsamplerate loading now happens once at init time.
|
|
98cc9d10
|
2017-01-08T14:17:09
|
|
Fixed coding style on a function signature.
|
|
61a3ba30
|
2017-01-07T17:09:14
|
|
Replaced a few single-line "//" comments.
|
|
df25258a
|
2017-01-06T20:43:53
|
|
Added configure and cmake support for libsamplerate
|
|
c5825b69
|
2017-01-06T21:23:51
|
|
audio: Don't call a NULL function pointer when clearing audio streams.
(Partially?) fixes Bugzilla #3547.
|
|
cbe44f7f
|
2017-01-06T02:16:26
|
|
Added support for using libsamplerate to do audio resampling
|
|
37f404fb
|
2017-01-06T00:47:42
|
|
Fixed confusion between Ryan's new audio stream and the audio buffer we were calling stream in the callback
|
|
748f4605
|
2017-01-06T03:38:14
|
|
audio: Add an assert to make sure non-streaming audio uses good buffer sizes.
|
|
345c5989
|
2017-01-06T03:15:27
|
|
haiku: Patched to compile.
|
|
3443dc19
|
2017-01-05T23:53:46
|
|
Don't do any audio conversion if none is necessary
|
|
b3e8db80
|
2017-01-06T01:07:34
|
|
audio: rename fake_stream to work_buffer.
It's more than an alternative for when the OS can't provide a DMA buffer, now.
|
|
992124d4
|
2017-01-06T01:02:58
|
|
audio: Fixed SDL_AudioStreamGet() function parameters.
There was a draft of this where it did audio conversion into the final buffer,
if there was enough room available past what you asked for, but that interface
got removed, so the parameters didn't make sense (and we were using the
wrong one in any case, too!).
|
|
99fc1ef9
|
2017-01-06T00:56:29
|
|
naclaudio: Untested attempt to migrate to SDL_AudioStream.
|
|
115d0ce7
|
2017-01-06T00:50:01
|
|
haikuaudio: Untested attempt to get this working with SDL_AudioStream.
|
|
1a90c72d
|
2017-01-06T00:49:35
|
|
emscriptenaudio: don't get stuck in infinite loop if SDL_AudioStreamPut fails.
|
|
f07a1a5a
|
2017-01-05T21:31:02
|
|
emscriptenaudio: Reworked to use SDL_AudioStream.
|
|
3761b5f6
|
2017-01-05T20:11:19
|
|
Fixed a few compiler warnings.
|
|
4aa9e369
|
2017-01-05T19:45:57
|
|
Patched to compile on some compilers.
|
|
52130bde
|
2017-01-05T19:30:45
|
|
diskaudio: Use SDL_Log, not fprintf.
|
|
30178a9b
|
2017-01-05T19:29:38
|
|
audio: Added SDL_AudioStream. Non-power-of-two resampling now works!
|
|
f12ab8f2
|
2017-01-05T19:12:20
|
|
audio: More effort to improve and simplify audio resamplers.
|
|
45b774e3
|
2017-01-01T18:33:28
|
|
Updated copyright for 2017
|
|
2ba66d05
|
2016-12-31T16:21:55
|
|
Fixed bug 3535 - Misplaced comment #if/#endif closure comment
Coriiander
This notice is about a misplaced comment.
Often times when we use an #if #endif sequence, the #endif is followed by a comment to indicate what #if statement it belonged to. The SDL_xaudio2.c file contains a misplaced comment, as follows (I stripped the other comments):
#ifdef __GNUC__
# define SDL_XAUDIO2_HAS_SDK 1
#elif defined(__WINRT__)
# define SDL_XAUDIO2_HAS_SDK
#include "SDL_xaudio2.h"
#else
#if 0
#include <dxsdkver.h>
#if (!defined(_DXSDK_BUILD_MAJOR) || (_DXSDK_BUILD_MAJOR < 1284))
# pragma message("Your DirectX SDK is too old. Disabling XAudio2 support.")
#else
# define SDL_XAUDIO2_HAS_SDK 1
#endif
#endif
#endif /* 0 */
That final /* 0 */ should be moved one line up. Like this (I tabbed it out for you to make it more clear):
|
|
9492492d
|
2016-12-26T01:56:52
|
|
Fixed bug 3516 - fix build on illumos
Sylvain
trivial patch to fix the build on illumos
-Werror=declaration-after-statement
https://gist.github.com/wiedi/15b71456667f7aa2a7f8815663723bb3
|
|
b2f6c4c1
|
2016-12-19T11:15:53
|
|
Fixed bus error when converting 16-bit to float for non-integral-multiple sample rates
|
|
366c77a9
|
2016-12-18T20:17:33
|
|
audio: fixed one more incorrectly-hardcoded value in the resamplers.
|
|
f956df23
|
2016-12-17T16:15:24
|
|
audio: fixed arbitrary upsampling (thanks, Sylvain!).
This was a leftover of simplifying the resamplers down from autogenerated
code; I forgot to make something that the generator hardcoded into something
variable.
Fixes Bugzilla #3507.
|
|
c0231875
|
2016-12-06T12:23:17
|
|
audio: Fixed compiler warnings.
|
|
a0e003ee
|
2016-12-06T02:23:54
|
|
Refactored the audio queueing code to a generic SDL_DataQueue interface.
This is not a public API (at the moment), but we will be needing this for
other internal things soon.
|
|
8b960d4e
|
2016-12-06T02:20:58
|
|
Added SDL_VARIABLE_LENGTH_ARRAY so this #ifdef is localized to one place.
|
|
26f05ecb
|
2016-12-02T02:25:12
|
|
Fixed missing prototypes on Android, patch from Sylvain
|
|
52827361
|
2016-11-23T10:51:44
|
|
directsound: fixed compiler warnings.
|
|
36156335
|
2016-11-20T21:34:54
|
|
Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
|
|
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.
|