Commit Graph

1013 Commits (a842446f62dc0d00773d41b932f4649b6bd3da5f)

Author SHA1 Message Date
Sam Lantinga a842446f62 Added support for 0-copy decode and display using D3D11
FIXME: We need a way to do this that doesn't involve reaching into the D3D11 texture internals
2023-10-10 03:32:46 -07:00
Sam Lantinga d830cd140b Added support for 0-copy decode and display using Apple VideoToolbox 2023-10-10 03:32:46 -07:00
Sam Lantinga 1bf913b29a Added support for 0-copy decode and display using VAAPI and EGL 2023-10-10 03:32:46 -07:00
Sam Lantinga ce8161e0cf Make sure we're building with ffmpeg 6.0 or newer 2023-10-10 03:32:46 -07:00
Sam Lantinga ed6381b68d Allow setting any number of sprites over the video
Default to no sprites over the video
2023-10-10 03:32:46 -07:00
Anonymous Maarten ebf5e08fa1 cmake: use *_STATIC_* variables when linking to a static ffmpeg 2023-10-10 03:32:46 -07:00
Sam Lantinga 88f2fb9dcf Added an example of video decoding with ffmpeg 2023-10-10 03:32:46 -07:00
Simon McVittie 04edb38cdf shape: Use SDL[Test]_ReadSurfacePixel
This avoids assuming that the pixels are suitably aligned for direct
access, which there's no guarantee that they are; in particular,
3-bytes-per-pixel RGB images are likely to have 3 out of 4 pixels
misaligned. On x86, dereferencing a misaligned pointer does what you
would expect, but on other architectures it's undefined whether it will
work, crash with SIGBUS, or silently give a wrong answer.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-10-10 03:23:20 -07:00
Anonymous Maarten 183606d3d4 testdrawchessboard: clean up renderer and window 2023-10-05 13:41:01 +02:00
Frank Praznik 64ec208479 Fix log message spelling 2023-10-02 19:47:39 -04:00
Frank Praznik 9111c5e178 tests: Disable mouse warp test under Wayland
Wayland does not allow warping the mouse pointer, thus these tests are unreliable and should be skipped.
2023-10-02 19:44:02 -04:00
Simon McVittie 6248472c0c test: Accept small numerical differences in more mathematical tests
We can't rely on irrational numbers like pi being represented exactly,
particularly when compiling for i386, where the i387 floating-point
interface carries out calculations in registers that have higher
precision than the actual double-precision variable. The 1980s were a
strange time.

Resolves: https://github.com/libsdl-org/SDL/issues/8311
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-09-28 09:37:12 -07:00
Anonymous Maarten f5886f11d0 cmake: let every test depends on pretest 2023-09-25 18:02:40 +02:00
Anonymous Maarten f45761908a Move check for SDL_Delay upper bounds to testtimer 2023-09-25 18:02:40 +02:00
Anonymous Maarten 474c8d0073 testautomation: don't do float equality tests 2023-09-25 18:02:40 +02:00
Anonymous Maarten 85e3099ba4 testautomation: only require accelated renderer with non-dummy video driver 2023-09-25 18:02:40 +02:00
Anonymous Maarten 0e955a9127 cmake: run testautomation with CTest 2023-09-25 18:02:40 +02:00
Ryan C. Gordon e0b0f9a36e
testaudio: Fix mouseover testing.
Not sure how this line got lost.
2023-09-20 17:02:44 -04:00
Ryan C. Gordon b656720bc6 loopwave: Use SDL_GetAudioStreamQueued() for more accurate results. 2023-09-20 10:15:03 -04:00
Anonymous Maarten 4c3e84897f testspriteminimal: make standalone by embedding icon.bmp 2023-09-19 17:58:25 +02:00
Anonymous Maarten 2a01f9dcb5 tests: plug leaks when running with --trackmem
(using SDL_VIDEO_DRIVER=x11/wayland on Linux)
2023-09-19 17:58:25 +02:00
Brick a62e62f97a Refactored SDL_audiocvt.c 2023-09-17 13:13:23 -07:00
Ryan C. Gordon 2f43f7bc53
audio: Allow querying of device buffer size. 2023-09-13 11:03:17 -04:00
Ryan C. Gordon 8b26e95f91
audio: Change SDL_AudioStreamCallback
Now it offers the total requested bytes in addition to the amount
immediately needed (and immediately needed might be zero if the stream
already has enough queued to satisfy the request.
2023-09-13 10:11:23 -04:00
Sam Lantinga cd633b9a88 Renamed SDL_IsAudioDevicePaused() to SDL_AudioDevicePaused()
This aligns with the SDL3 convention of removing "Is" from self-explanatory function names

Also improved some documentation in SDL_audio.h
2023-09-12 12:11:09 -07: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
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
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
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
Sam Lantinga 3a932141e4 Restore audio format binary compatibility with SDL 2.0 2023-09-04 10:16:53 -07: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
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
Brick 28b28bd8f4 Added audio_formatChange test 2023-09-01 14:38:45 -04:00
Brick 5394a805f4 Improved testaudiostreamdynamicresample
Tweaked color palette
2023-09-01 14:38:45 -04:00
Anonymous Maarten 1b03a2430a testsurround: fix order of arguments of callback 2023-08-28 00:12:59 +02:00
Ryan C. Gordon 58c859f64d audio: Rename SDL_GetAudioStreamBinding to SDL_GetAudioStreamDevice. 2023-08-27 16:54:30 -04:00
Ryan C. Gordon 1e775e0eef audio: Replace SDL_CreateAndBindAudioStream with SDL_OpenAudioDeviceStream.
This is meant to offer a simplified API for people that are either migrating
directly from SDL2 with minimal effort or just want to make noise without
any of the fancy new API features.

Users of this API can just deal with a single SDL_AudioStream as their only
object/handle into the audio subsystem.

They are still allowed to open multiple devices (or open the same device
multiple times), but cannot change stream bindings on logical devices opened
through this function.

Destroying the single audio stream will also close the logical device behind
the scenes.
2023-08-27 16:54:30 -04:00
Brick ea68bb8027 Add some additional checks to audio_convertAudio 2023-08-27 13:08:15 -07:00
Brick b1d63be538 Fixed audio_resampleLoss test 2023-08-27 13:08:15 -07:00
Sam Lantinga 34860b932b Fixed testautomation --filter pixels_allocFreeFormat 2023-08-25 08:06:08 -07: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 e6c878824c Fixed ResampleAudio interpolation factor calculation 2023-08-22 08:34:22 -04:00
Brick 4983638630 Misc audio tweaks/cleanup 2023-08-21 16:02:54 -04:00