Commit Graph

14414 Commits (da8fc70a83cf6b76d5ea75c39928a7961bd163d3)

Author SHA1 Message Date
Sam Lantinga bd088c2f99 Revert "Clarify whether an audio function expects a physical or logical device ID"
This reverts commit 506a133d84.

Physical and logical audio devices are intended to be interchangeable at the API level.
2023-08-27 13:42:20 -07:00
Brick 82e481b520 Added --randmem test parameter 2023-08-27 13:08:15 -07:00
Brick ea68bb8027 Add some additional checks to audio_convertAudio 2023-08-27 13:08:15 -07:00
Brick f8286df167 Fixed ResampleFrame_SSE doing unnecessary work 2023-08-27 13:08:15 -07:00
Brick b1d63be538 Fixed audio_resampleLoss test 2023-08-27 13:08:15 -07:00
Sam Huang c191d6c306 Better Win32 transparent window support 2023-08-27 13:06:42 -07:00
Ozkan Sezer 923d612ca1 hidapi: sync macOS code with mainstream.
this merges mainstream commit 4009466d59c41f (mainstream PR/611)
2023-08-27 22:33:32 +03:00
Ozkan Sezer 363f4fa9c1 avoid type redefinition errors after commit ee806597b9.
(Reference issue: https://github.com/libsdl-org/SDL/issues/8142)
2023-08-27 22:22:10 +03:00
Sam Lantinga 615824a806 Updated documentation now that SDL_GetAudioDevices() has been split into separate functions for output and capture devices 2023-08-26 17:30:57 -07:00
Sam Lantinga 506a133d84 Clarify whether an audio function expects a physical or logical device ID 2023-08-26 17:03:01 -07:00
Ozkan Sezer 3b1d1e4e31 hidapi: sync the hidraw changes with mainstream
Apply mainstream commit 8a4de63b (mainstream PR/601) to our hidapi.
The patch is a direct apply of the mentioned commit, with one sdl-
specific part guarded by HIDAPI_IGNORE_DEVICE adapted accordingly.
2023-08-26 08:09:10 -07:00
Ozkan Sezer f617918e0a cmake: check linkage to libusb too, instead of libusb.h presence only.
avoids false positives when using a cross-toolchain file
2023-08-26 17:03:42 +02:00
Brick 041dbd6b5f Fixed GetResamplerAvailableOutputFrames
Non-euclidean division is a pain
2023-08-26 09:04:47 -04:00
Ryan C. Gordon b49d0a607e
x11: Avoid including full Vulkan headers.
This dramatically improves compile times of the X11 backend.

Reference Issue #8142.
2023-08-25 19:45:45 -04:00
Ryan C. Gordon 4d2f9f3a32
yuv_rgb: Comment out unused code.
This drops literal seconds off compiling this one C file!

Reference Issue #8142.
2023-08-25 19:42:46 -04:00
Ryan C. Gordon 3c3486e2ac
wayland: Don't include full Vulkan headers when not necessary.
Reference Issue #8142.
2023-08-25 19:42:08 -04:00
Ryan C. Gordon f066bbe98a
x11: Don't include system headers twice.
SDL_x11dyn.h also handles this.
2023-08-25 19:41:18 -04:00
Ozkan Sezer d86d02bbbf updated dynapi after SDL_GDKGetDefaultUser addition 2023-08-25 19:03:32 +03:00
Sam Lantinga 4355f9cec5 Fixed warning C4389: '!=': signed/unsigned mismatch 2023-08-25 08:49:49 -07:00
Sam Lantinga 5755de07a6 Fixed build warnings 2023-08-25 08:45:33 -07:00
Sam Lantinga 0f80d47bbd Fixed thread-safety warning 2023-08-25 08:21:54 -07:00
Sam Lantinga ee806597b9 Removed SDL_vulkan_internal.h from SDL_sysvideo.h
Reference: https://github.com/libsdl-org/SDL/issues/8142
2023-08-25 08:18:29 -07:00
Sam Lantinga 34860b932b Fixed testautomation --filter pixels_allocFreeFormat 2023-08-25 08:06:08 -07:00
Ethan Lee 6f8a6a31ca gdk: GetBasePath should be a UTF8 version of Win32 GetBasePath 2023-08-25 10:47:16 -04:00
SDL Wiki Bot e30e5c77e6 Sync SDL3 wiki -> header 2023-08-25 14:42:25 +00:00
Ethan Lee c0cd8c8142 gdk: Add SDL_GDKGetDefaultUser, SDL_GetPrefPath implementation 2023-08-25 10:40:16 -04:00
Brick 106abce69f Refactored GetAudioStreamDataInternal buffer handling
The final conversion step should now always go straight into the output buffer.
2023-08-25 08:43:56 -04:00
Brick e44f54ec54 Avoid using hex-floats 2023-08-25 08:43:56 -04:00
Brick 5b696996cd Added ResampleFrame_SSE 2023-08-25 08:43:56 -04:00
Brick 958b3cfaea Tweaked and enabled audio_convertAudio test 2023-08-25 08:43:56 -04:00
Brick 7dbb9b65b1 audio_convertAccuracy: Shuffle the data in case of a bad SIMD implementation 2023-08-25 08:43:56 -04:00
Brick f6a4080ff5 audio_resampleLoss: Add support for multiple channels 2023-08-25 08:43:56 -04:00
Brick 4f894e748e audio_resampleLoss: SDL_GetAudioStreamData now returns the correct length 2023-08-25 08:43:56 -04:00
Brick ab83f75bb9 Make sure GetAudioStreamDataInternal is called with a valid length 2023-08-25 08:43:56 -04:00
Brick 6a73f74b6b Rebuild full ResamplerFilter (left wing + right wing) at runtime 2023-08-25 08:43:56 -04:00
Brick 0c15ce0060 Add a missing int cast 2023-08-25 08:43:56 -04:00
Brick b74ee86b1d Optimized ResampleAudio, with special cases for 1 and 2 channels
This would also benefit from some SIMD, since it's just a bunch of multiply-adds
2023-08-25 08:43:56 -04:00
Brick fba6e1e3d3 Removed ResamplerFilterDifference
It takes 1 extra multiply to calculate the correct interpolation,
but I think the improvement in cache locality (and binary size) outweighs that.
2023-08-25 08:43:56 -04:00
Brick 9f7a22fa45 Removed 64-bit handling from AudioConvertByteswap 2023-08-25 08:43:56 -04:00
Brick 1f5327a9fb Removed future_buffer, left_padding, and right_padding from SDL_AudioStream 2023-08-25 08:43:56 -04:00
Brick 71ad52d6db Lowered SDL_GetAudioStreamData to 32 KB
No particular reason for this number, but 1 MB was a bit silly
2023-08-25 08:43:56 -04:00
Sam Lantinga 69aec8c915 Fixed the report format for the Razer Wolverine V2 Pro 2023-08-24 11:37:50 -07:00
Sam Lantinga 7c2669c9d9 Accept key events from any source
This allows TV remotes to navigate SDL applications (with source HDMI)

Fixes https://github.com/libsdl-org/SDL/issues/8137
2023-08-24 10:09:02 -07:00
Sam Lantinga 1e9d314482 Updated to Android minSdkVersion 19 and targetSdkVersion 34
This is updated to meet the latest requirements for apps on the Google Play store
2023-08-24 08:23:06 -07:00
Sam Lantinga 8924d0d927 Added missing function prototype for SDL_WriteS64BE() 2023-08-23 21:19:25 -07:00
Sam Lantinga 845f3c7450 Fixed mismatch between stdlib calloc() and SDL free()
Fixes https://github.com/libsdl-org/SDL/issues/8145
2023-08-23 14:49:29 -07:00
Ryan C. Gordon fb79211732
emscriptenaudio: Fire the capture silence_callback at an interval.
Previously it was using setTimeout, not setInterval, so it would only fire
once, which was obviously a mistake.
2023-08-23 16:12:30 -04:00
Ryan C. Gordon 5191b20541
emscriptenaudio: Don't bother undefining things about to be unreachable.
Since the top-level table is getting undefined, all the things in it will
be unreachable and eligible for garbage collection without explicitly
nulling them out.
2023-08-23 16:11:08 -04:00
Ryan C. Gordon fd75a4ca05
emscriptenaudio: Deal with blocked audio devices better.
Now, if the AudioContext starts in a "suspended" state, because the browser
blocked it from playing by default, we we run the audio "thread" in a timer
and throw away the generated audio. Once the AudioContext is allowed to
resume, we clear this timer.

The end result is that the app will continue to drain its audio queue
instead of consuming more memory over time (and, if it relies on an audio
callback to make progress, continue to run!), with the effect that the
page is merely silent but otherwise functioning as intended.

Once the user interacts with the page and the browser permits the the
AudioContext to run for real, audio should still be in sync, instead of
just starting to play audio that might now be at least several seconds behind.
2023-08-23 14:32:23 -04:00
Ryan C. Gordon 981b8a337a
emscriptenaudio: Remove unnecessary functions. 2023-08-23 14:32:23 -04:00