|
22461383
|
2022-10-15T15:54:12
|
|
SDL_audiocvt: Respct the SDL_HINT_AUDIO_RESAMPLING_MODE hint
This implements using libsamplerate for the SDL_AudioCVT API.
This library was already being used for audio streams when this hint is
set.
|
|
65527537
|
2021-03-30T04:32:39
|
|
N3DS port (squashed)
A dedicated renderer using Citro3D would likely allow for better
much better graphical performances.
|
|
484d5fd6
|
2022-10-05T13:19:38
|
|
audio open: ensure 2 devices don't get the same id
|
|
8ff738f2
|
2022-07-26T12:40:47
|
|
audio: Report SDL_AUDIODEVICEREMOVED for unopened devices.
Unopened devices, if removed, now send SDL_AUDIODEVICEREMOVED events with
a `which` field set to zero. Apps can use this to decide if they need to
refresh a list of devices being shown in an options menu, etc.
It's safe to call SDL_CloseAudioDevice(0), so even if they try to clean
up this bogus id, it should be safe.
Fixes #5199.
|
|
f3008e4a
|
2022-07-20T19:08:31
|
|
audio: 3- and 5-channel formats are now supported
|
|
b299cb3d
|
2022-07-17T08:31:16
|
|
Added a utility function to calculate the next power of 2 for a value
|
|
90b86b13
|
2022-07-17T10:35:09
|
|
audio: Handle non-power-of-two spec.samples when unsupported
Fixes #3685
|
|
2f0816ad
|
2022-07-11T13:08:30
|
|
Add SDL_GetDefaultAudioInfo.
This API is supported on pipewire, pulseaudio, wasapi, and directsound.
Co-authored-by: Frank Praznik <frank.praznik@gmail.com>
|
|
e4a80875
|
2022-06-24T16:43:20
|
|
Initial Audio driver
|
|
abe38bca
|
2022-06-18T13:08:58
|
|
Support SDL_AUDIODRIVER set to "dsound", which was used by SDL 1.2
Fixes https://github.com/libsdl-org/SDL/issues/5818
|
|
adc68758
|
2022-06-17T10:22:28
|
|
Added SDL_copyp to avoid size mismatch when copying values (thanks @1bsyl!)
Closes https://github.com/libsdl-org/SDL/pull/5811
|
|
de019568
|
2022-04-09T23:43:57
|
|
audio: Prebake the resampler's kaiser table instead of doing it at runtime.
|
|
c1336b21
|
2022-04-17T12:43:32
|
|
hints: Make SDL_VIDEODRIVER and SDL_AUDIODRIVER formal hints.
They were just environment variables before.
Fixes #5528.
|
|
a70bb259
|
2022-01-20T13:16:03
|
|
drop handle parameter of OpenDevice
|
|
3939ef72
|
2022-01-19T17:23:53
|
|
cleanup SDL_GetAudioDeviceSpec
- drop unnecessary hascapture check
- call SDL_InvalidParamError and return -1 in case the index is out of range
- do not zfill SDL_AudioSpec
- adjust documentation to reflect the behavior
|
|
113109f8
|
2022-01-19T17:18:47
|
|
cleanup SDL_GetAudioDeviceName
- drop unnecessary hascapture check
- call SDL_InvalidParamError in case the index is out of range
|
|
c9e8d157
|
2022-01-19T12:59:35
|
|
re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory II.
|
|
1043dd8c
|
2022-01-19T12:58:04
|
|
adjust handling of iscapture
- drop iscapture parameter of OpenDevice
- use SDL_bool for iscapture
|
|
60deadba
|
2022-01-17T17:22:30
|
|
re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory
|
|
4a17612b
|
2022-01-17T12:04:32
|
|
get rid of BeginLoopIteration
|
|
0770c582
|
2022-01-17T11:48:26
|
|
get rid of PrepareToClose
|
|
e0236c02
|
2022-01-23T01:28:36
|
|
audio: Removed an unnecessary commented-out line.
|
|
0dda8a7f
|
2022-01-17T11:21:01
|
|
cleanup init functions of audio
- use SDL_bool if possible
- assume NULL/SDL_FALSE filled impl
- skip zfill of current_audio at the beginning of SDL_AudioInit (done before the init() calls)
|
|
6fcfcc3d
|
2022-01-17T11:00:03
|
|
get rid of SkipMixerLock
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
38cfe25b
|
2021-11-22T16:39:56
|
|
Remove 'malloc' from comment
|
|
d31251b0
|
2021-11-21T22:30:48
|
|
use SDL's functions version inplace of libc version
|
|
b6e8651a
|
2021-11-20T15:31:21
|
|
Audio 6.1 should be allowed now (see #4974)
|
|
704edf63
|
2021-11-12T17:07:22
|
|
audio: Fix crash calling SDL_OpenAudio() after SDL_AudioInit() fails
The SDL_WasInit() checks don't work when using SDL_AudioInit() directly,
which is exactly what audio_initOpenCloseQuitAudio() in testautomation
does.
|
|
7d90df0e
|
2021-08-29T15:24:23
|
|
Restore previous behavior of empty SDL_AUDIODRIVER trying all drivers.
The recent change to make SDL_AUDIODRIVER support comma-separated lists
broke the previous behavior where an SDL_AUDIODRIVER that was empty
behaved the same as if it was not set at all. This old behavior was
necessary to paper over differences in platforms where SDL_setenv may
or may not actually delete the env var if an empty string is specified.
This patch just adds a simple check to ensure SDL_AUDIODRIVER is not
empty before using it, restoring the old interpretation of the empty
var.
|
|
3261f7f6
|
2021-08-26T16:15:30
|
|
audio: Support "pulse" as an alias for "pulseaudio"
Originally, SDL 1.2 used "pulse" as the name for its PulseAudio driver.
While it now supports "pulseaudio" as well for compatibility with SDL
2.0 [1], there are still scripts and distro packages which set
SDL_AUDIODRIVER=pulse [2]. While it's possible to remove this in most
circumstances or replace it with "pulseaudio" or a comma-separated list,
this may still conflict if the environment variable is set globally and
old binary builds of SDL 1.2 (e.g. packaged with older games) are being
used.
To fix this on SDL 2.0, add a hardcoded check for "pulse" as an audio
driver name, and replace it with "pulseaudio". This mimics what SDL 1.2
does (but in reverse). Note that setting driver_attempt{,_len} is safe
here as they're reset correctly based on driver_attempt_end on the next
loop.
[1] https://github.com/libsdl-org/SDL-1.2/commit/d9514097846381cd30fe08df65dbdd48de92a058
[2] https://bugzilla.opensuse.org/show_bug.cgi?id=1189778
|
|
a0af7ce7
|
2021-08-10T15:05:49
|
|
OSS is no longer the preferred audio backend on modern UNIX systems
Fixes https://github.com/libsdl-org/SDL/issues/4207
|
|
25f9ed87
|
2021-08-10T13:10:36
|
|
audio: Fix false positives in driver name comparison
Without this change, driver names don't get matched correctly;
for example "a" can get matched with "alsa" since it only checks
whether the string matches up to the length of the requested
driver name.
|
|
45de0a1d
|
2021-04-02T06:28:10
|
|
Support comma-separated lists in SDL_AUDIODRIVER
|
|
f1fab24e
|
2021-04-15T21:00:00
|
|
AAudio: add bootstrap in SDL_audio.c
|
|
9d294f1f
|
2021-03-27T00:53:10
|
|
audio: Allow AudioStreamGet to return 0 in RunAudio.
While we should normally expect _something_ from the stream based on the
AudioStreamAvailable check, it's possible for a device change to flush the
stream at an inconvenient time, causing this function to return 0.
Thing is, this is harmless. Either data will be NULL and the result won't matter
anyway, or the data buffer will be zeroed out and the output will just be
silence for the brief moment that the device change is occurring. Both scenarios
work themselves out, and testing on Windows shows that this behavior is safe.
|
|
2d64e37e
|
2020-11-02T18:09:43
|
|
Initial rebase of xerpi's port
|
|
67e8522d
|
2021-02-27T17:37:25
|
|
Add SDL_GetAudioDeviceSpec.
This API is supported by pipewire, pulseaudio, coreaudio, wasapi, and disk.
|
|
ac8a3fda
|
2021-03-03T20:33:20
|
|
fix prepare_audiospec() possibly missing a bad SDL_AUDIO_CHANNELS env.
|
|
adc0a931
|
2021-02-24T14:08:08
|
|
audio: Move Pipewire bootstrap after Jack
Move the Pipewire audio driver below others in the list so it won't be mistakenly initialized when it's not the system mixer.
|
|
2f0b99a7
|
2021-02-13T11:56:05
|
|
audio: Add Pipewire playback/capture sink
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
d2723875
|
2020-10-14T23:01:06
|
|
os2: integrate the port into main tree.
|
|
554037a6
|
2020-09-26T09:30:08
|
|
audio: fix popping sounds caused by signed/unsigned conversion
When converting audio from signed to unsigned values of vice-versa
the silence value chosen by SDL was the value of the device, not
of the stream that the data was being put into. After conversion
this would lead to a very high or low value, making the speaker
jump to a extreme positon, leading to an audible noise whenever
creating, destroying or playing scilence on a device that reqired
such conversion.
|
|
4bb95e84
|
2020-02-11T16:14:02
|
|
Implemented OpenSL-ES audio recording on Android
|
|
f30ef6ed
|
2020-01-21T17:40:16
|
|
audio: Fixed a '//' style comment.
|
|
dbe5c14b
|
2020-01-21T15:49:37
|
|
audio: Calculate a legitimate SDL_AudioSpec::silence in SDL_LoadWAV_RW().
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
aef1ed4a
|
2019-09-25T15:40:27
|
|
audio: Set (something close to) the correct silence value for U16 audio.
Partially fixes Bugzilla #4805.
|
|
7a47c292
|
2019-07-31T01:22:02
|
|
Fix bug 4746 - introduce SDL_zeroa macro.
|
|
723d0143
|
2019-06-04T17:32:15
|
|
Fixed bug 4171 - SDL_GetQueuedAudioSize is broken with WASAPI
Cameron Gutman
I was trying to use SDL_GetQueuedAudioSize() to ensure my audio latency didn't get too high while streaming data in from the network. If I get more than N frames of audio queued, I know that the network is giving me more data than I can play and I need to drop some to keep latency low.
This doesn't work well on WASAPI out of the box, due to the addition of GetPendingBytes() to the amount of queued data. As a terrible hack, I loop 100 times calling SDL_Delay(10) and SDL_GetQueuedAudioSize() before I ever call SDL_QueueAudio() to get a "baseline" amount that I then subtract from SDL_GetQueuedAudioSize() later. However, because this value isn't actually a constant, this hack can cause SDL_GetQueuedAudioSize() - baselineSize to be < 0. This means I have no accurate way of determining how much data is actually queued in SDL's audio buffer queue.
The SDL_GetQueuedAudioSize() documentation says: "This is the number of bytes that have been queued for playback with SDL_QueueAudio(), but have not yet been sent to the hardware." Yet, SDL_GetQueuedAudioSize() returns > 0 value when SDL_QueueAudio() has never been called.
Based on that documentation, I believe the current behavior contradicts the documented behavior of this function and should be changed in line with Boris's patch.
I understand that exposing the IAudioClient::GetCurrentPadding() value is useful, but a solution there needs to take into account what of that data is silence inserted by SDL and what is actual data queued by the user with SDL_QueueAudio(). Until that happens, I think the best approach is to remove the GetPendingBytes() call until SDL is able to keep track of queued data to make sense of it. This would make SDL_GetQueuedAudioSize() possible to use accurately with WASAPI.
|
|
f3e76ea1
|
2019-05-23T13:47:30
|
|
Use the OpenSL ES audio driver by default on Android, as it has the lowest latency.
|
|
6a3356ab
|
2019-03-25T12:24:38
|
|
Backed out changeset cec31de4e126
This was meant to migrate CoreAudio onto the same SDL_RunAudio() path that
most other audio drivers are on, but it introduced a bug because it doesn't
deal with dropped audio buffers...and fixing that properly just introduces
latency.
I might revisit this later, perhaps by reworking SDL_RunAudio to allow for
this sort of API better, or redesigning the whole subsystem or something, I
don't know. I'm not super-thrilled that this has to exist outside of the usual
codepaths, though.
Fixes Bugzilla #4481.
|
|
7dc92a76
|
2019-01-12T12:18:44
|
|
Initial Android OpenSL ES implementation, contributed by ANTA
|
|
d23c2f07
|
2019-01-10T18:05:56
|
|
Fixed bug 3930 - Android, set thread priorities and names
SDLActivity thread priority is unchanged, by default -10 (THREAD_PRIORITY_VIDEO).
SDLAudio thread priority was -4 (SDL_SetThreadPriority was ignored) and is now -16 (THREAD_PRIORITY_AUDIO).
SDLThread thread priority was 0 (THREAD_PRIORITY_DEFAULT) and is -4 (THREAD_PRIORITY_DISPLAY).
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
04cbf132
|
2018-10-10T15:20:56
|
|
audio: All device names reported by SDL must be unique.
This means that if you have two devices named "Soundblaster Pro" in your
machine, one will be reported as "Soundblaster Pro" and the other as
"Soundblaster Pro (2)".
This makes it so you can't into a position where one of your devices can't
be opened because another is sitting on the same name.
|
|
0378529e
|
2018-10-10T14:55:24
|
|
audio: clean_out_device_list() already sets this flag to false for us.
|
|
f5a21ebf
|
2018-10-09T20:12:43
|
|
Added support for surround sound and float audio on Android
|
|
b2518761
|
2018-10-01T09:47:10
|
|
commit c6b28f46b8116552ec2b38d1d3c8535df28ba7a1
Author: Anthony Pesch <inolen@gmail.com>
Date: Fri May 4 20:21:21 2018 -0400
Added SDL_AUDIO_ALLOW_SAMPLES_CHANGE flag enabling users of SDL_OpenAudioDevice to get
the sample size of the actual hardware buffer vs having a stream created to handle the
delta
|
|
56f44cfa
|
2018-08-07T13:04:15
|
|
audio: Deal with device shutdown more carefully.
This would cause problems in various ways, but specifically triggers an
assert when you close a WASAPI capture device in an app running over RDP.
Related to (but not the actual bug) in Bugzilla #3924.
|
|
f521b22e
|
2018-04-23T22:07:56
|
|
Added SDL_THREAD_PRIORITY_TIME_CRITICAL
|
|
dc8b55e5
|
2018-04-16T02:11:09
|
|
coreaudio: Use the standard SDL audio thread instead of spinning a new one.
Fixes corner cases, like the audio callback not firing if the device is
disconnected, etc.
|
|
40b27fd5
|
2018-02-12T17:00:00
|
|
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.
|
|
90e72bf4
|
2018-01-30T18:08:34
|
|
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
|
|
e3cc5b2c
|
2018-01-03T10:03:25
|
|
Updated copyright for 2018
|
|
351d6d47
|
2017-12-06T12:24:32
|
|
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
|
|
1a3b95a1
|
2017-09-21T02:51:14
|
|
audio: Replaced the resampler. Again.
This time it's using real math from a real whitepaper instead of my previous
amateur, fast-but-low-quality attempt. The new resampler does "bandlimited
interpolation," as described here: https://ccrma.stanford.edu/~jos/resample/
The output appears to sound cleaner, especially at high frequencies, and of
course works with non-power-of-two rate conversions.
There are some obvious optimizations to be done to this still, and there is
other fallout: this doesn't resample a buffer in-place, the 2-channels-Sint16
fast path is gone because this resampler does a _lot_ of floating point math.
There is a nasty hack to make it work with SDL_AudioCVT.
It's possible these issues are solvable, but they aren't solved as of yet.
Still, I hope this effort is slouching in the right direction.
|
|
d619d885
|
2017-08-28T21:42:39
|
|
Fixed bug 3662 - Error message when using the audio conversion setup without an initialized audio subsystem is a bit vague
Simon Hug
This issue actually raises the question if this API change (requirement of initialized audio subsystem) is breaking backwards compatibility. I don't see the documentation saying it is needed in 2.0.5.
|
|
8e7998e1
|
2017-08-27T19:10:30
|
|
Fixed bug 3710 - SDL_OpenAudio(desired, obtained) doesn't update desired's size when obtained is NULL
David Ludwig
I've created a new set of patches. I am happy to create more, if it would help.
One version only copies 'size'.
A second version copies both 'size' and 'silence'. When looking over the documentation for SDL_OpenAudio in SDL_audio.h, it mentioned that both 'size' and 'silence' were things that SDL_OpenAudio would calculate.
Regarding *both* patches, I did notice that SDL 1.2 appears to have always modified desired's size and silence fields. The SDL wiki, at https://wiki.libsdl.org/SDL_OpenAudio#Remarks , does note:
|
|
96305832
|
2017-08-11T10:21:19
|
|
Fixed bug 3702 - Clear error messages of SDL_LoadObject for optional libraries
Simon Hug
Some code in SDL loads libraries with SDL_LoadObject to get more information or use newer APIs. SDL_LoadObject may fail, set an error message and SDL will continue with some fallback code. Since SDL will overwrite the error or exit the function with a return value that indicates success, the error form SDL_LoadObject for the optional stuff might as well be cleared right away.
|
|
d9039f23
|
2017-06-08T13:27:58
|
|
jack: Initial shot at a JACK audio target.
http://jackaudio.org/
Fixes Bugzilla #2163.
(with several more commits following to improve this code.)
|
|
a7fc2822
|
2017-05-24T19:56:59
|
|
audio: rename bsd target to netbsd.
Apparently this is no longer a generic BSD audio target, and hasn't been for
years, so rename it for NetBSD.
|
|
4073a669
|
2017-05-18T15:33:17
|
|
audio: One more callbackspec fix (thanks, Simon!).
|
|
226541cb
|
2017-04-26T01:43:40
|
|
audio: another wrong struct that causes NULL pointer crash (thanks, Simon!).
Fixes Bugzilla #3632.
|
|
7382cebb
|
2017-04-20T21:25:29
|
|
audio: Fix audio queue functions to use new spec structure.
Using the old spec structure causes the audio queueing functions to fail
due to bad callback pointers being checked.
|
|
d20d426c
|
2017-04-18T22:17:40
|
|
Fix crash in SDL audio thread, by Juha Kuikka
Wrong audio spec structure was populated with the internal callback, causing the audio thread to call a NULL pointer.
|
|
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.
|
|
c4d54504
|
2017-03-14T07:16:56
|
|
differentiate between capture / playback audio thread names
|
|
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.
|
|
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.
|
|
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.
|
|
ede5c734
|
2017-01-24T19:38:01
|
|
Generalized the audio resampling hint for other resampling methods in the future
|
|
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.
|
|
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).
|
|
a41103b1
|
2017-01-09T05:59:30
|
|
audio: Patched to compile if linking directly to libsamplerate.
|
|
35166609
|
2017-01-08T14:28:44
|
|
audio: Patched to compile with libsamplerate support (again).
|
|
19e937fc
|
2017-01-08T14:18:03
|
|
audio: libsamplerate loading now happens once at init time.
|
|
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.
|
|
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!).
|
|
f07a1a5a
|
2017-01-05T21:31:02
|
|
emscriptenaudio: Reworked to use SDL_AudioStream.
|
|
3761b5f6
|
2017-01-05T20:11:19
|
|
Fixed a few compiler warnings.
|
|
30178a9b
|
2017-01-05T19:29:38
|
|
audio: Added SDL_AudioStream. Non-power-of-two resampling now works!
|
|
45b774e3
|
2017-01-01T18:33:28
|
|
Updated copyright for 2017
|