Commit Graph

13490 Commits (64fee85c69b89011ec2d912f357b4ba8ae9cd3f6)

Author SHA1 Message Date
Ryan C. Gordon 0b6255551e
test: Fixed incorrect SDL_OpenAudioDevice call in testautomation. 2023-07-30 11:56:37 -04:00
Ryan C. Gordon 107fd941cd
vitaaudio: Clean up correctly in CloseDevice. 2023-07-30 11:56:37 -04:00
Ryan C. Gordon 9fa4a6ef87
netbsdaudio: Minor fix. 2023-07-30 11:56:36 -04:00
Ryan C. Gordon b0d89868c6
n3dsaudio: Updated (but untested!) for SDL3 audio API. 2023-07-30 11:56:36 -04:00
Ryan C. Gordon ba27176106
vitaaudio: Untested attempt to move Vita audio to SDL3's audio API. 2023-07-30 11:56:36 -04:00
Ryan C. Gordon 0b58e96d9e
wasapi: Patched WinRT to compile. 2023-07-30 11:56:36 -04:00
Ryan C. Gordon d6b4f48488
visualc: Turn on multiprocessor compilation. 2023-07-30 11:56:35 -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 dc04f85646
audio: whoops, that should be an int. 2023-07-30 11:56:35 -04:00
Ryan C. Gordon be0dc630b7
audio: Fixed incorrect assertion 2023-07-30 11:56:35 -04:00
Ryan C. Gordon 77b3fb06ee
directsound: First shot at updating for SDL3 audio API.
This does an enormous amount of work in SDL_immdevice.c to simplify and
clean up that interface, while moving some of its responsibilities to the
higher level SDL_audio.c. I hope I saw the whole picture here, and this
wasn't foolhardy of me.

WASAPI has not been updated for these changes, or for SDL3 at all, yet. As
such, it continues to be broken for now. It will be updated soon.

This code compiles with my cross compiler, but hasn't been built with
Visual Studio, or tested in any form, so there might be obvious fixes
following along shortly.
2023-07-30 11:56:35 -04:00
Ryan C. Gordon 4399b71715
audio: Generalize how backends can lookup an SDL_AudioDevice. 2023-07-30 11:56:34 -04:00
Ryan C. Gordon 2fb122fe46
audio: backends now "find" instead of "obtain" devices by handle.
Every single case of this didn't want the device locked, so just looking
it up without having to immediately unlock it afterwards is better here.

Often these devices are passed on to other functions that want to lock them
themselves anyhow (disconnects, default changes, etc).
2023-07-30 11:56:34 -04:00
Ryan C. Gordon c3f5a5fc72
dummyaudio: SDL3ify style 2023-07-30 11:56:34 -04:00
Ryan C. Gordon 7d65ff86e2
diskaudio: Adjusted for later SDL3 audio API redesign changes. 2023-07-30 11:56:34 -04:00
Ryan C. Gordon 4ba9c2eade
dummyaudio: Configurable delay, other SDL3 API fixes. 2023-07-30 11:56:33 -04:00
Ryan C. Gordon fb395d3ad7
sndio: Updated to the SDL3 audio API. 2023-07-30 11:56:32 -04:00
Ryan C. Gordon 1a55282051
dsp: Some minor logic fixes 2023-07-30 11:56:11 -04:00
Ryan C. Gordon 6bc85577d7
netbsdaudio: Updated for SDL3 audio API. 2023-07-30 11:56:10 -04:00
Ryan C. Gordon 0f6e59312b
netbsdaudio: Removed email address from source code.
Not to diminish their contribution, but I'm about to tear this code up
and would rather the bug reports go to the SDL project.
2023-07-30 11:56:10 -04:00
Ryan C. Gordon 51ae78c0af
haikuaudio: Updated for SDL3 audio API. 2023-07-30 11:56:10 -04:00
Ryan C. Gordon fc7ed18ca1
emscriptenaudio: don't forget to finalize the audio thread 2023-07-30 11:56:10 -04:00
Ryan C. Gordon 4233c41ce2
pulseaudio: Removed unnecessary variable. 2023-07-30 11:56:10 -04:00
Ryan C. Gordon a0528cd5ed
emscriptenaudio: Updated for SDL3 audio API. 2023-07-30 11:56:09 -04:00
Ryan C. Gordon 79cc29ba35
wave: Don't check if format->channels > INT_MAX, it's a Uint16. 2023-07-30 11:56:09 -04:00
Ryan C. Gordon 1bfe97c235
pspaudio: Updated for SDL3 audio API.
However, this still blocks in PlayDevice and leaves WaitDevice as a no-op,
which isn't ideal, since the device lock is held during PlayDevice.

Ideally, this should be fixed.
2023-07-30 11:56:09 -04:00
Ryan C. Gordon 121a2dce15
audio: Make sure `device->hidden` is NULL after CloseDevice 2023-07-30 11:56:09 -04:00
Ryan C. Gordon 3d6ba0cafd
ps2audio: Removed free of buffer that hasn't been allocated yet. 2023-07-30 11:56:08 -04:00
Ryan C. Gordon 00ed6f8827
test: Fixed compiler warnings for unused vars. 2023-07-30 11:56:08 -04:00
Ryan C. Gordon 6f12f68ec9
ps2audio: SDL3ified the style 2023-07-30 11:56:08 -04:00
Ryan C. Gordon 4993743a02
ps2audio: Renamed `_this` to `device` 2023-07-30 11:56:08 -04:00
Ryan C. Gordon 74568cdb2b
ps2audio: Updated (but untested) for SDL3 audio API. 2023-07-30 11:56:08 -04:00
Ryan C. Gordon c83b68ef26
jack: renamed `_this` to `device`. 2023-07-30 11:56:07 -04:00
Ryan C. Gordon 3f4f004794
audio: Remove an assertion that no longer makes sense.
One may happen to call SDL_AudioThreadFinalize when thread_alive is not set.
2023-07-30 11:56:07 -04:00
Ryan C. Gordon 86243b2589
jack: Use ProvidesOwnCallbackThread.
We were firing a semaphore from the JACK-provided thread to otherwise work
within the standard SDL2 device thread, but there's no need for this in SDL3.
2023-07-30 11:56:07 -04:00
Ryan C. Gordon 18906a32b8
jack: First shot at updating for SDL3 audio API. 2023-07-30 11:56:07 -04:00
Ryan C. Gordon a2b488359e
dsp: Removed debug logging 2023-07-30 11:56:06 -04:00
Ryan C. Gordon 6fd71185cd
dsp: Updated for new SDL3 audio API. 2023-07-30 11:56:06 -04:00
Ryan C. Gordon 3482d1215a
alsa: Don't ever block in CaptureFromDevice. 2023-07-30 11:56:06 -04:00
Ryan C. Gordon 65d296ef1a
audio: Use SDL_powerof2 instead of reinventing it. 2023-07-30 11:56:06 -04:00
Ryan C. Gordon 409b544505
alsa: Updated for new SDL3 audio API 2023-07-30 11:56:06 -04:00
Ryan C. Gordon 0999a090a7
audio: More tweaking of `device->thread_alive` 2023-07-30 11:56:05 -04:00
Ryan C. Gordon f94ffd6092
audio: Fixed logic error 2023-07-30 11:56:05 -04:00
Ryan C. Gordon 4deb2970c9
alsa: Renamed `_this` to `device` 2023-07-30 11:56:05 -04:00
Ryan C. Gordon 0fb9e4baae
audio: Remove no-longer-used SupportsNonPow2Samples 2023-07-30 11:56:05 -04:00
Ryan C. Gordon c653e57768
coreaudio: rewritten for SDL3 audio redesign! 2023-07-30 11:56:04 -04:00
Ryan C. Gordon 533777eff5
audio: SDL_sysaudio.h comment conversion. 2023-07-30 11:56:04 -04:00
Ryan C. Gordon 8473e522e0
audio: unify device thread naming. 2023-07-30 11:56:04 -04:00
Ryan C. Gordon 258bc9efed
audio: PlayDevice now passes the buffer, too, for convenience. 2023-07-30 11:56:04 -04:00
Ryan C. Gordon e518149d14
audio: Fixed locking in SDL_AudioDeviceDisconnected 2023-07-30 11:56:03 -04:00