|
ce5da5d5
|
2022-11-16T21:47:43
|
|
Don't compare pointer against '0', but NULL
|
|
ec58a817
|
2022-10-05T19:26:09
|
|
Fixes made in response to running a static code analyzer under MS Windows.
Most of these are probably harmless, but the changes to SDL_immdevice.c and SDL_pixels.c appear to have fixed genuine bugs.
SDL_audiocvt.c: By separating the calculation of the divisor, I got rid of the suspicion that dividing a double by an integer led to loss of precision.
SDL_immdevice.c: Added a missing test, one that could have otherwise led to dereferencing a null pointer.
SDL_events.c, SDL_gamecontroller.c, SDL_joystick.c, SDL_malloc.c, SDL_video.c: Made it clear the return values weren't used.
SDL_hidapi_shield.c: The size is zero, so nothing bad would have happened, but the SDL_memset() was still being given an address outside of the array's range.
SDL_dinputjoystick.c: Initialize local data, just in case IDirectInputDevice8_GetProperty() isn't guaranteed to write to it.
SDL_render_sw.c: drawstate.viewport could be null (as seen on line 691).
SDL.c: SDL_MostSignificantBitIndex32() could return -1, though I don't know if you want to cope with that (what I did) or SDL_assert() that it can't happen.
SDL_hints.c: Replaced boolean tests on pointer values with comparisons to NULL.
SDL_pixels.c: Looks like the switch is genuinely missing a break!
SDL_rect_impl.h: The MacOS static checker pointed out issues with the X comparisons that were handled by assertions; I added assertions for the Y comparisons.
SDL_yuv.c, SDL_windowskeyboard.c, SDL_windowswindow.c: Checked error-result returns.
|
|
6801d676
|
2022-11-16T09:52:33
|
|
Revert "pulseaudio: Only use PA_STREAM_ADJUST_LATENCY if buffer isn't super small."
This reverts commit d8b1ef42aee52dad4ac3de69795ca2e8d2fd7704.
This turned out to be unnecessary (it was a problem on the user's system,
not an SDL bug).
Reference Issue #6121.
|
|
d8b1ef42
|
2022-11-15T22:18:51
|
|
pulseaudio: Only use PA_STREAM_ADJUST_LATENCY if buffer isn't super small.
Fixes #6121.
|
|
85aa9b8b
|
2022-11-11T13:47:36
|
|
wasapi: Favor the system resampler again, for now.
Reference Issue #5538.
|
|
b0dc6709
|
2022-11-07T14:26:48
|
|
coreaudio: Don't use deprecated kAudioObjectPropertyElementMaster symbol.
Fixes #6449.
|
|
5dc93451
|
2022-11-06T20:49:37
|
|
JANITORIAL : Correct some more spelling mistakes (#6489)
|
|
78f97108
|
2022-11-05T10:38:33
|
|
audio: Avoid accumulation errors in resampler.
Fixes #6391.
|
|
61f3662c
|
2022-10-30T08:34:47
|
|
SDL_QSA_AUDIO.C: Correct spelling mistake
occured -> occurred
|
|
e7ab581d
|
2022-10-19T09:14:16
|
|
coreaudio: Dispose of AudioQueue before waiting on the thread.
Otherwise the thread might block for a long time (more than 10 seconds!).
It's not clear to me why this happens, or why its safe to do this with a
resource that's still in use, but we have, until recently, always
disposed of the AudioQueue first, so changing back is probably okay.
Also changed the disposal to allow in-flight buffers to reach hardware;
otherwise you lose the last little bit of audio that's already been queued
but not played, which you can hear clearly in the loopwave test program.
Fixes #6377.
|
|
f4e3af15
|
2022-10-17T07:23:40
|
|
Simplify OSS test by removing OpenBSD specific location of the soundcard.h header
OpenBSD has long since stopped using OSS. Remove checking for OpenBSD specific header.
|
|
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
|
|
e41942e8
|
2022-10-05T13:36:25
|
|
fix compilation error SDL_coreaudio mixing declarations and code
|
|
e6640ef2
|
2022-09-30T14:53:07
|
|
coreaudio: Possibly fixed another shutdown race condition.
Reference Issue #6159.
|
|
40893821
|
2022-09-29T10:33:07
|
|
coreaudio: Add support for SDL_GetDefaultAudioInfo (#6277)
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
|
|
f6565c32
|
2022-09-28T09:27:45
|
|
coreaudio: Remove redundant variable.
|
|
411582c7
|
2022-09-28T09:22:17
|
|
coreaudio: Don't crash on shutdown in a race condition.
Fixed #6159.
|
|
b9e3cae5
|
2022-08-26T16:58:21
|
|
Add more valid configurations to PS2 audio driver
|
|
5b4b4fa1
|
2022-08-14T12:01:56
|
|
Decrease audio thread priority when created
|
|
f1390780
|
2022-08-02T15:25:44
|
|
Fix use after free when removing Windows audio device
|
|
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.
|
|
8c51cae7
|
2022-07-23T14:56:04
|
|
audio/aaudio, audio/openslES: fix -Wdeclaration-after-statement errors
Fixes https://github.com/libsdl-org/SDL/issues/5950
|
|
f3008e4a
|
2022-07-20T19:08:31
|
|
audio: 3- and 5-channel formats are now supported
|
|
45c3b59d
|
2022-07-20T17:23:42
|
|
audio: Turn off DEBUG_CONFIG logging again.
|
|
bec721f0
|
2022-07-20T17:22:41
|
|
audio: Fixed dst pointer on channel conversions that grow in-place.
|
|
9f56c7cf
|
2022-07-20T16:39:19
|
|
audio: Remove 5.1->X SIMD converters, add SSE mono->stereo.
The 5.1 versions didn't use the new algorithm, and making that new
algorithm work took so many permutes that it was significantly slower
than just using the scalar versions.
However, mono-to-stereo is an extremely common conversion, and it's
trivial to accelerate it with plain SSE, so that was added!
|
|
b83ae9f2
|
2022-07-19T22:40:51
|
|
audio: Replaced some debug-printfs with debug-SDL_Logs. :)
|
|
49ec8db5
|
2022-07-19T22:04:49
|
|
audio: Generate the channel converter code from a program.
|
|
f06cc3e9
|
2022-07-19T22:03:56
|
|
audio: "SL" means "surround left" not "side left", etc.
|
|
5a0c8198
|
2022-07-19T22:03:02
|
|
audio: Add channel convert filter _after_ choosing an SIMD version.
|
|
fe160840
|
2022-07-19T16:04:48
|
|
audio: LOG_DEBUG_CONVERT should use SDL_Log, not fprintf(stderr).
|
|
25727790
|
2022-07-19T02:16:08
|
|
audio: first attempt at rewriting the channel converters.
This is not ready for production use!
|
|
b700a326
|
2022-07-20T07:01:10
|
|
audio, pipewire: fix signatures of pw_get_library_version and pw_init.
Reference issue: https://github.com/libsdl-org/SDL/issues/5938
|
|
6e210d37
|
2022-07-20T07:01:10
|
|
audio, pipewire: pipewire_version_xx globals out of dynamic loading
Fixes build with --disable-pipewire-shared
Reference issue: https://github.com/libsdl-org/SDL/issues/5938
|
|
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
|
|
a09d62e4
|
2022-07-15T23:45:56
|
|
directsound: Remove redundant SubFormat copy
|
|
c5e408ae
|
2022-07-15T11:31:59
|
|
directsound: For channel counts > 2, generate a dwChannelMask for CreateSoundBuffer
|
|
fff34f63
|
2022-07-15T09:46:53
|
|
windows: SDL_IMMDevice needed more deinit code from the Win32 path.
Fixes #5919
|
|
37aecda2
|
2022-07-14T11:38:51
|
|
pipewire: Use PW_KEY_TARGET_OBJECT to specify stream connection nodes
Pipewire 0.3.44 introduced PW_KEY_TARGET_OBJECT, which is to be used to specify target connection nodes for streams. This parameter takes either a node path (PW_KEY_NODE_NAME) or serial number (PW_KEY_OBJECT_SERIAL) to specify a target node. The former is used in this case since the path is already being retrieved and stored for other purposes.
The target_id parameter in pw_stream_connect() is now deprecated and should always be PW_ID_ANY when PW_KEY_TARGET_OBJECT is used.
|
|
36d8460c
|
2022-07-11T16:59:23
|
|
pipewire: Dynamically allocate the buffer for node strings
Calculate and allocate the buffer for the IO node name and path strings dynamically instead of using arbitrary sized static buffers.
|
|
996cea31
|
2022-07-11T15:15:48
|
|
pipewire: Update default audio devices during runtime
Make the default device metadata node persist for the lifetime of the hotplug loop so the default source/sink devices will be updated if they change during runtime.
|
|
60da11f0
|
2022-07-11T14:31:20
|
|
pipewire: Remove deprecated configuration key
With Pipewire now requiring a minimum version 0.3.24, the PW_KEY_CONTEXT_PROFILE_MODULES value is no longer required for legacy compatability and can be safely removed.
|
|
ecfbdce6
|
2022-07-11T13:09:48
|
|
pipewire: Require version 0.3.24 or newer at runtime
|
|
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>
|
|
ae105ae1
|
2022-07-10T12:59:33
|
|
windows: Move IMMDevice work to common file, implement DirectSound enumeration support
|
|
4aad594a
|
2022-07-08T16:17:46
|
|
Update SDL_qsa_audio.c
Fix qnx platform compile error, change SDL_Bool to SDL_bool.
|
|
6c536afd
|
2022-06-27T15:43:17
|
|
Fix C89 declaration for macOS modules.
Since Clang 14, `-Wdeclaration-after-statement` is enforced on every
standard.
|
|
e4a80875
|
2022-06-24T16:43:20
|
|
Initial Audio driver
|
|
3b191580
|
2022-06-27T17:19:39
|
|
Windows GDK Support (#5830)
* Added GDK
* Simplfied checks in SDL_config_wingdk.h
* Added testgdk sample
* Added GDK readme
* Fixed error in merge of SDL_windows.h
* Additional GDK fixes
* OpenWatcom should not export _SDL_GDKGetTaskQueue
* Formatting fixes
* Moved initialization code into SDL_GDKRunApp
|
|
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
|
|
dc62fec5
|
2022-05-20T21:07:25
|
|
audio: Fix locking in backends that manage their own callback threads.
Otherwise you might get a race where an app pauses the device, but
the audio callback still manages to run after the pause is in place.
|
|
501a4991
|
2022-05-05T18:44:32
|
|
Add clang-format on/off comments where necessary.
Comments were added in places where INDENT-ON/OFF comments are. Places
like stdlib's asm don't need it as clang-format doesn't try to indent it.
|
|
0cca71a8
|
2022-05-18T22:12:05
|
|
Use SDLCALL for callbacks in public APIs
|
|
29694869
|
2022-04-28T15:56:52
|
|
audio: Revert one of the resampler optimizations.
This is the one that splits the "left wing" into two for loops to
bubble out the conditional that decides if it should read from the
left padding or the input buffer.
I still believe the optimization is good, but the basic logic of it
was incorrect, and needs to be reexamined and fixed before going
back into revision control.
|
|
5066910b
|
2022-04-10T13:44:01
|
|
audio: Make pregenerated resampler kaiser filter more precise.
|
|
111c3add
|
2022-04-10T13:23:51
|
|
audio: Resampler optimizations.
- Calculate `j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING` once per loop
iteration since we use it multiple times.
- Do the left-wing loop in two sections: while `srcframe < 0` and then
the remaining calculations when `srcframe >= 0`. This bubbles a conditional
out of every iteration of a tight loop, giving us a boost. We could
_probably_ do this to the right-wing loop too, but it's less straightforward
there.
- The real win: Use floats instead of doubles. This almost doubles the speed
of the entire function on Intel CPUs, and for embedded things without
hardware-level support for doubles, the speedup is enormous. This in
theory might reduce audio quality, though, and I had to put a check in
place to avoid a division-by-zero that we avoided at higher precision, but
this is likely to be worth keeping for at least the Sony PSP and other
smaller platforms, if not everyone.
|
|
de019568
|
2022-04-09T23:43:57
|
|
audio: Prebake the resampler's kaiser table instead of doing it at runtime.
|
|
f6eb4b07
|
2022-04-26T13:14:15
|
|
pulseaudio: Feed audio data in response to write callbacks.
Instead of waiting until the entire buffer from the SDL callback is ready
to be accepted by PulseAudio, we use pa_stream_set_write_callback and
feed some portion of the buffer as callbacks come in asking for more.
This lets us remove the halving of the buffer size during device open,
and also (hopefully) solves several strange hangs that happen in unusual
circumstances.
Fixes #4387
Fixes #2262
|
|
9e264b92
|
2022-04-18T09:20:47
|
|
Certain audio drivers, like the RME "Pro" Audio driver, have resampling quality issues when using WASAPI.
We'll use SDL's resampling algorithm so we have consistent quality between platforms and drivers.
Fixes https://github.com/libsdl-org/SDL/issues/5538
|
|
c1336b21
|
2022-04-17T12:43:32
|
|
hints: Make SDL_VIDEODRIVER and SDL_AUDIODRIVER formal hints.
They were just environment variables before.
Fixes #5528.
|
|
727eef70
|
2022-04-09T10:12:49
|
|
audio: SDL_ConvertStereoToMono_SSE3 missed an unaligned load.
|
|
178ac196
|
2022-03-29T23:48:08
|
|
Vita: add audio capture support
|
|
aec86ba8
|
2022-03-26T15:31:33
|
|
emscriptenaudio: proxy calls to main thread
|
|
4fe7b2cb
|
2022-03-24T11:00:43
|
|
static analysis: Fixed several complaints from codechecker.
There are still some pending Objective-C specific issues.
Reference issue #4600.
|
|
0af2db6f
|
2022-03-23T19:04:29
|
|
Vita: support audio format fallback
|
|
24ffcbd9
|
2022-03-20T17:23:34
|
|
audio: Set error message on dsp init failure.
if SDL_EnumUnixAudioDevices() fails to find any devices,
set an error message on the exit path. Without this,
SDL_Init() could fail without any message available
in SDL_GetError().
|
|
a485ffc3
|
2022-03-19T09:50:22
|
|
Fix "SDL_FALSE is not defined" runtime error for emscripten.
|
|
fbbd0270
|
2022-03-18T23:10:19
|
|
Fix "SDL_TRUE is not defined" runtime error for emscripten.
|
|
01bfde45
|
2022-03-17T12:22:18
|
|
simplify SetDSerror
- no need to keep the error in a static variable
- always print the error code
- reduce the required stack-size
- reduce the number of snprintf calls (and code size)
|
|
2c6a9c51
|
2022-03-16T09:36:43
|
|
minor optimization (SDL_audiocvt.c)
|
|
5905696e
|
2022-03-15T23:10:04
|
|
SDL_audiocvt.c: minor cleanup.
|
|
7c421fec
|
2022-03-14T05:55:41
|
|
SDL_audiocvt.c: Don't byteswap 8-bit streams
Otherwise, this results an assert on big endian machines when attenpting to use SDL_LoadWAV_RW function to load 8-bit WAV files.
|
|
08d27dfd
|
2022-02-22T15:27:30
|
|
SDL_openslES.c: Detect float support in runtime and use it
Allow using of the float output type on newer Android devices, but keep PCM16 output on older
Closes #5358
|
|
228db352
|
2022-02-08T13:29:40
|
|
audio: pipewire: Tidy up formatting
|
|
9da9e85c
|
2022-02-08T12:59:01
|
|
audio: pipewire: Reset all hotplug values and pointers on shutdown
Ensure that all hotplug variables and pointers are reset to NULL or their original value when shutting down.
|
|
5b36a527
|
2022-02-08T12:30:28
|
|
audio: pipewire: Remove redundant locks
The io_list_check_add() and io_list_remove() functions are only ever called from within the Pipewire thread loop, so the locks are redundant. io_list_sort() is called from within a lock in the device detection function, so those additional locks are redundant as well.
|
|
48b4d1c4
|
2022-02-08T12:20:52
|
|
audio: pipewire: Convert atomic hotplug conditional variables to SDL_bool
The hotplug loop condition variables are always guarded by the loop mutex while the loop is running, so they don't need to be atomic.
|
|
53091e36
|
2022-02-02T12:30:34
|
|
audio: pipewire: Remove the hard upper bound on rates and buffer sizes
Remove the hard upper limit of 8192 samples and instead use the buffer sizes provided by Pipewire to determine the size of the intermediate input buffer and whether double buffering is required for output streams. This allows for higher latency streams to potentially avoid double-buffering in the output case, and we can guarantee that the intermediate input buffer will always be large enough to handle whatever Pipewire may deliver.
As the buffer size calculations occur in a callback in the Pipewire processing thread itself, the stream readiness check has been modified to wait on two distinct flags set when the buffers have been configured and when the stream is ready and running.
|
|
66866249
|
2022-02-02T11:09:02
|
|
audio: pipewire: Condition variable doesn't need to be atomic
The condition variable is guarded by a mutex, so no need for it to be atomic.
|
|
0b34f180
|
2022-01-30T12:00:55
|
|
audio: pipewire: Don't double free properties on init failure
The context and stream creation functions will destroy the passed properties object on failure, so no need to do it manually.
The pw_properties_free() function pointer is no longer needed, so it can be removed.
|
|
a5c610b0
|
2022-01-08T12:28:02
|
|
revert 'Changed to use 0xFE instead of 0xFF for better sound quality.'
|
|
a70bb259
|
2022-01-20T13:16:03
|
|
drop handle parameter of OpenDevice
|
|
47ddb04e
|
2022-01-20T12:31:02
|
|
cleanup/sync the main loop of *_OpenDevice functions to pick audio format II.
|
|
2eafe434
|
2022-01-20T12:18:59
|
|
cleanup/sync the main loop of *_OpenDevice functions to pick audio format
|
|
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
|
|
f91211eb
|
2022-01-19T14:51:42
|
|
cleanup WASAPI_PrepDevice
- reorganize the loop which checks for the right wave-format
- use the return value of UpdateAudioStream
- ensure SetError is called in SDL_NewAudioStream
|
|
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
|
|
ebdd5366
|
2022-01-17T16:26:02
|
|
use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
|
|
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
|