Commit Graph

14729 Commits (945162c6d90ea8c76ae5dd994413c4ec7b73d6d8)

Author SHA1 Message Date
Sam Lantinga 1d1c6e6305 Turn off COREAUDIO debug logging by default 2023-09-11 09:03:48 -07:00
Frank Praznik 52efefca04 wayland: Fix drag offer leak
The data device leave function is intended for drag offers, not selections, and the function as was previously written was a no-op.
2023-09-09 18:49:47 -04:00
Ryan C. Gordon 3a992af446 audio: Added a postmix callback to logical devices.
You can see it in action in testaudio by mousing over a logical device; it
will show a visualizer for the current PCM (whatever is currently being
recorded on a capture device, or whatever is being mixed for output on
playback devices).

Fixes #8122.
2023-09-09 16:26:37 -04:00
Simon McVittie 7207bdce5d render: Enable clipping for zero-sized rectangles
Battle for Wesnoth apparently relies on being able to disable rendering
of UI elements by setting the clip rectangle to be empty.

Resolves: https://github.com/libsdl-org/SDL/issues/6896
Fixes: 00f05dcf "render: only enable clipping when the rectangle is valid"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-09-09 11:12:55 -07:00
Anonymous Maarten 22d81fb3e9 cmake: use MSVC_RUNTIME_LIBRARY to force MT 2023-09-09 19:14:12 +02:00
Anonymous Maarten a2e17852d9 cmake: make sure SDL_GetPrefPath is run before testfilesystem
60 seconds timeout ought to be sufficient.
2023-09-08 09:05:58 -04:00
Anonymous Maarten 2fb266e0a4 ci: run tests in parallel 2023-09-08 09:05:58 -04:00
Ryan C. Gordon ad1313e751
testaudio: Patched to compile.
(this was a piece of PR #8213 that accidentally creeped into main.)
2023-09-07 16:03:49 -04:00
Ryan C. Gordon 5747ddc012
testaudio: Clean up some messy memory management. 2023-09-07 10:50:11 -04:00
Ryan C. Gordon fafbea1ced
audio: Move internal float32 mixing to a simplified function 2023-09-07 10:48:04 -04:00
Ryan C. Gordon 116b0ec977
include: minor tweak to audio API documentation 2023-09-07 10:45:45 -04:00
Ryan C. Gordon fb13770353
include: Replaced old Bugzilla URL. 2023-09-07 10:44:30 -04:00
Ryan C. Gordon 38c8fc05c5
audio: Remove ChooseMixStrategy.
This is adds complexity and fragility for small optimization wins.

The biggest win is the extremely common case of a single stream providing
the only output, so we'll check for that and skip silencing/mixing/converting.

Otherwise, just use a single mixer path.
2023-09-07 10:44:30 -04:00
Anonymous Maarten b00cbd76aa wikiheaders.pl: create Unsupported.md file with list of functions undocumented in either the headers or the wiki 2023-09-06 15:51:08 -04:00
Frank Praznik 37e1fc3b58 wayland: Ensure that the toplevel window is recreated when switching decoration modes
If a compositor tries to change the decoration mode when initially creating a window, the hidden flag might not yet be unset if the decoration mode is changed during the initial roundtrip in Wayland_ShowWindow(). As hiding the window destroys the decoration manager object, the hidden flag check is unnecessary, as the decoration configuration listener will never be entered when the window is hidden.
2023-09-06 13:35:44 -04:00
Brick f2ca9a615b Added SDL_AUDIO_FRAMESIZE 2023-09-05 17:56:58 -07:00
Brick 53122593f8 Added SDL_AUDIO_BYTESIZE 2023-09-05 17:56:58 -07:00
SDL Wiki Bot 544351c98e Sync SDL3 wiki -> header 2023-09-05 21:19:16 +00:00
Sam Lantinga 2e7d2b94eb Clarify that SDL_BlitSurface() ignores the width and height in dstrect 2023-09-05 14:18:43 -07:00
Makarenko Oleg a2c1984d37
Detect Simagic wheel bases as wheels (#8198)
Simagic DirectDrive wheel bases have the same vendor + product id's
2023-09-04 12:11:13 -07:00
Ozkan Sezer 1d8dfbb223 avoid type redefinition errors after PR/8181 2023-09-04 21:29:40 +03:00
Oleg 266b91d2fd Detect Logitech G923 Playstation as wheel
G923 have two different versions - Xbox version is already present in the wheel list, but not the PS version.
2023-09-04 11:05:28 -07:00
Oleg cde67ea49a Detect Logitech PRO Racing Wheel for Xbox (PC mode) as wheel
Logitech PRO Racing Wheel have two different versions - for Playstation and Xbox. Vendor + Product ID for Playstation version already present in SDL sources, but not an Xbox version
2023-09-04 11:01:17 -07:00
Sam Lantinga 3a932141e4 Restore audio format binary compatibility with SDL 2.0 2023-09-04 10:16:53 -07:00
Anonymous Maarten e85206ffd8 wikiheaders.pl: add --rev= option to pass revision string
This way, git is not required anymore to calculate the git revision
2023-09-04 18:56:00 +02:00
Sam Lantinga 233789b0d1 Audio types have the same naming convention as other SDL endian types, e.g. [S|U][BITS][LE|BE]
Native endian types have no LE/BE suffix
2023-09-04 09:48:44 -07:00
SDL Wiki Bot 36b5f3e35c Sync SDL3 wiki -> header 2023-09-04 14:47:15 +00:00
Brick 0e552761b7 Renamed AudioStreamSpeed to AudioStreamFrequencyRatio 2023-09-04 07:46:18 -07:00
Brick 47bcb078f5 Fixed some incorrect SDL_AUDIO_F32 uses 2023-09-04 07:46:18 -07:00
Brick 2833f2e7b5 Fixed OOB access in audio_convertAccuracy test 2023-09-04 07:46:18 -07:00
SDL Wiki Bot 8387fae698 Sync SDL3 wiki -> header 2023-09-03 15:11:13 +00:00
Frank Praznik 8321813452 docs: Add note about Wayland application icons
Wayland doesn't support programmatically setting the app icon, so note this restriction and specify that a desktop entry file that points to the desired icon image is required.
2023-09-03 11:10:29 -04:00
Sam Lantinga 825d344756 Make sure that the same timestamp is used for all PS5 events from the same packet 2023-09-01 17:49:39 -07:00
Brick 9c1430324c Removed SDL_dataqueue 2023-09-01 14:38:45 -04:00
Brick 28b28bd8f4 Added audio_formatChange test 2023-09-01 14:38:45 -04:00
Brick a59152688a Try and avoid overflow when handling very large audio streams 2023-09-01 14:38:45 -04:00
Brick 5394a805f4 Improved testaudiostreamdynamicresample
Tweaked color palette
2023-09-01 14:38:45 -04:00
Brick e55844274d Added SDL_(Get|Set)AudioStreamSpeed 2023-09-01 14:38:45 -04:00
Brick 43c3c5736d Track the formats of data in an SDL_AudioStream 2023-09-01 14:38:45 -04:00
Brick 337fed3df6 Tweaked ResampleFrame_SSE
Use _mm_unpack(lo|hi)_ps instead of _mm_shuffle_ps
2023-09-01 14:38:45 -04:00
Ryan C. Gordon fd7cd91dc9
audio: Mix multiple streams in float32 to prevent clipping.
This only does this work if actually mixing; if the physical device only
has a single stream bound to it, it'll just write the data to the hardware
without the extra drama.

Fixes #8123.
2023-08-31 23:46:33 -04:00
Ryan C. Gordon 9097573e37
audio: Choose a mixing strategy on each iteration.
Currently it's SILENCE (just zero out the mix buffer), COPYONE (one stream
writes directly into the hardware's buffer), or MIX (everything gets mixed
together before sending to the hardware).

Devices that aren't doing anything result in SILENCE. Devices playing
one thing result in COPYONE.

This lets the two most common states take what are likely significantly
faster approaches.

There will likely be some other strategies later (like when we offer a
postmix callback, etc).
2023-08-31 14:47:06 -04:00
Sam Lantinga bbe2e012a2 Don't provide the SDL3 header path
The recommended way to include SDL.h is #include <SDL3/SDL.h>, and having both paths available was confusing for people trying to port to SDL3.

Thanks for the feedback!
https://github.com/exult/exult/issues/379#issuecomment-1701066992
2023-08-31 11:41:37 -07:00
Sam Lantinga c17a35f096 Fixed typo 2023-08-31 09:32:39 -07:00
Sam Lantinga 4f72255eb1 Fixed README.md link 2023-08-31 09:31:56 -07:00
Sam Lantinga e0ab597549 Simplified SDL_main.h migration notes
Thanks for the feedback!
https://github.com/exult/exult/issues/379#issuecomment-1701066992
2023-08-31 09:29:59 -07:00
Sam Lantinga d44bde61e5 Added SDL migration information to the top level README.md
Thanks for the feedback!
https://github.com/exult/exult/issues/379#issuecomment-1701066992
2023-08-31 09:28:54 -07:00
Jeremy Demeule 6ff31e10cf
metal: Add hint to select low power device instead of the default one (#8182)
On some system like MacBook Pro Intel with AMD card, asking for the default device will always return the AMD GPU.
This is not an issue for 99% of the case when the renderer context is here to provide the maximum performance level like for game.
However, for video application using GPU for 1 quad and 1 texture, using the discrete GPU for that lead to an important power consumption (4 to 8W), heat increase, and fan noise.
With this patch, I successfully amend ffplay to only use the integrated GPU (i.e. the Intel one), instead of the discrete GPU (i.e. the AMD one).
2023-08-31 01:23:45 -07:00
Sam Lantinga 8a8aed477d Make sure that we process touch events that position the mouse
Fixes https://github.com/libsdl-org/SDL/issues/8176
2023-08-30 21:31:19 -07:00
SDL Wiki Bot f84c87f204 Sync SDL3 wiki -> header 2023-08-31 03:26:13 +00:00