1083 Commits

Author SHA1 Message Date
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
Brick
d2b9c8b80d Fixed maths in testaudiostreamdynamicresample (and just show the actual scale) 2023-08-21 16:02:54 -04:00
Brick
b9541b9eab Improved ResampleAudio
* filterindex2 was off-by-one
* Generate ResamplerFilter using doubles
* Transpose ResamplerFilter to improve access patterns
2023-08-21 16:02:54 -04:00
Brick
cdaa19869d Track offset within the current sample when resampling 2023-08-21 16:02:54 -04:00
Brick
300d1ec3ed Added audio_convertAccuracy test 2023-08-14 15:07:18 -04:00
Brick
32cecc2eac Fixed assertion in audio_convertAudio 2023-08-14 15:07:18 -04:00
Anonymous Maarten
6607a3cfac Disable cache in python http server
Co-authored-by: Érico Porto <ericoporto2008@gmail.com>
2023-08-14 03:50:06 +02:00
Anonymous Maarten
a5d9db0cd0 cmake: build tests for UWP 2023-08-12 17:37:52 +02:00
Anonymous Maarten
ea8757a748 Make testaudiostreamdynamicresample compatible with emscripten 2023-08-12 17:37:20 +02:00
Anonymous Maarten
1a7a74fb2e cmake: build emscripten tests as html page 2023-08-12 17:37:20 +02:00
Anonymous Maarten
64d570f027 Add minimal http server for emscripten test apps 2023-08-12 17:37:20 +02:00
Ryan C. Gordon
f290c85b22
testaudiocapture: Make sure we convert captured audio to output format.
Fixes #8114.
2023-08-11 16:52:23 -04:00
Simon McVittie
efe15588d5 Relabel back paddles as left or right
The sequence order of the four paddles is not obvious, with SDL and Xbox
controllers swapping the order of P2 and P3 relative to each other.
If we group them into left and right, then it becomes more obvious.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-09 11:03:30 -07:00
Ryan C. Gordon
1022fd6e04
testaudio: the test framework opens an audio device at startup; close it.
Not opening a device at all would be more desirable, though.
2023-08-08 21:42:48 -04:00
Simon McVittie
55cf1abaa6 test: Don't flag testsurround as suitable for non-interactive use
According to #8088 it has no value as an automated test, and by
default it takes long enough to hit the default test timeout.

Resolves: #8088
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-08 08:45:57 -07:00
Sam Lantinga
b903ccf945 SDL_rwops read/write functions return size_t again
The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.

The functions to read sized datatypes now return SDL_bool so you can detect read errors.

Fixes https://github.com/libsdl-org/SDL/issues/6729
2023-08-07 20:36:21 -07:00
Brick
c03f5b4b69 Fixed rounding up in SDL_PrintFloat
This wasn't caught by the 9.9999999 case, because that value is actually just equal to 10.0
2023-08-07 14:15:19 -07:00
Ryan C. Gordon
e7d56dd0b2
audio: Renamed new API SDL_UnpauseAudioDevice to SDL_ResumeAudioDevice. 2023-08-05 19:20:14 -04:00
Ryan C. Gordon
be5f66c84e
testaudio: Fixed soundboard icon, which had a colorkey issue. 2023-08-03 21:35:38 -04:00
Ryan C. Gordon
5ca3c50bf0
testaudio: Fix compiler warning. 2023-08-02 15:23:37 -04:00
Ryan C. Gordon
1b1f02c5aa
testaudio: Apparently compilers don't like this possibly being NULL now...? 2023-08-02 15:07:40 -04:00
Ryan C. Gordon
2de9253b6c
test: Added testaudio 2023-08-02 15:02:32 -04:00
Ryan C. Gordon
0eda582160
testaudiostreamdynamicresample: Load sample.wav correctly. 2023-07-30 23:00:52 -04:00
Ryan C. Gordon
b0edd23c00
testsurround: Log available audio output devices at the start. 2023-07-30 11:57:30 -04:00
Ryan C. Gordon
54af687210
testautomation_audio.c: Patched to compile. :/ 2023-07-30 11:56:40 -04:00
Ryan C. Gordon
5e82090662
testautomation_audio.c: Apparently we aren't updating test code for C99 atm. 2023-07-30 11:56:40 -04:00
Ryan C. Gordon
66bcee2ca9
testaudiostreamdynamicresample.c: Fixed MSVC compiler warning. 2023-07-30 11:56:38 -04:00
Ryan C. Gordon
c58d95c343
wasapi: Reworked for new SDL3 audio API, other win32 fixes.
The WinRT code has _also_ be updated, but it has not been
tested or compiled, yet.
2023-07-30 11:56:35 -04:00
Ryan C. Gordon
00ed6f8827
test: Fixed compiler warnings for unused vars. 2023-07-30 11:56:08 -04:00
Ryan C. Gordon
11dfc4d737
test: Update testautomation_audio for SDL3 audio API. 2023-07-30 11:56:00 -04:00
Ryan C. Gordon
29afc2e42b
test: Update testresample for SDL3 audio API. 2023-07-30 11:56:00 -04:00