Commit Graph

13167 Commits (3a752ce650724f8e4a557210c9a86986115f3a21)

Author SHA1 Message Date
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
Ryan C. Gordon 22afa5735f
audio: FreeDeviceHandle should pass the whole device, for convenience. 2023-07-30 11:56:03 -04:00
Ryan C. Gordon 9e3c5f93e0
coreaudio: Change `_this` to `device` 2023-07-30 11:56:03 -04:00
Ryan C. Gordon e969160de0
audio: unset a freed variable to NULL 2023-07-30 11:56:03 -04:00
Ryan C. Gordon 1fc01b0300
audio: Try to definitely have a default device set up. 2023-07-30 11:56:03 -04:00
Ryan C. Gordon b60a56d368
audio: take first reported device if no default was specified. 2023-07-30 11:56:02 -04:00
Ryan C. Gordon a8323ebe68
audio: Better handling of ProvidesOwnCallbackThread backends. 2023-07-30 11:56:02 -04:00
Ryan C. Gordon 1dffb72c1d
pipewire: Hooked up default device change notifications. 2023-07-30 11:56:02 -04:00
Ryan C. Gordon a93fcf2444
audio: fixed flushed stream reporting bytes but not being able to get them.
This would happen when you had ~1 frame of audio left in the stream, and
resampling needs would cause this to not be enough to produce audio.

But since we're already flushed, we can just add silence padding to let the
app extract these last bits.
2023-07-30 11:56:02 -04:00
Ryan C. Gordon ad6c1781fc
pulseaudio: Minor cleanups. 2023-07-30 11:56:02 -04:00
Ryan C. Gordon cfc8a0d17d
pipewire: First shot at moving to the new SDL3 audio interfaces.
This needs a little work still, but it mostly works.
2023-07-30 11:56:01 -04:00
Ryan C. Gordon 13202642a3
aaudio: Fixed capitialization, plus some minor cleanups. 2023-07-30 11:56:01 -04:00
Ryan C. Gordon 3e9991b535
audio: Make sure we don't write to a NULL pointer.
(This _probably_ never happens in the current codebase, but just in case.)
2023-07-30 11:56:01 -04:00
Ryan C. Gordon 943351affb
pulseaudio: GetDefaultAudioInfo isn't a thing anymore. 2023-07-30 11:56:01 -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
Ryan C. Gordon 3a02eecced
test: Update testsurround for SDL3 audio API. 2023-07-30 11:56:00 -04:00
Ryan C. Gordon e1c78718d4
test: testaudiocapture is updated for the SDL3 audio API. 2023-07-30 11:56:00 -04:00
Ryan C. Gordon f48cb716c2
pulseaudio: a couple minor tweaks. 2023-07-30 11:55:59 -04:00
Ryan C. Gordon dac25fe9eb
audio: Seperate audio capture into Wait/Read operations.
Before it would just block in read operations, but separating this out
matches what output devices already do, and also lets us separate out the
unlocked waiting part from the fast part that holds the device lock.
2023-07-30 11:55:59 -04:00
Ryan C. Gordon 3e10c0005d
audio: Capture devices should respect logical device pausing. 2023-07-30 11:55:59 -04:00
Ryan C. Gordon 7e700531c5
audio: Allow SDL_OpenAudioDevice to accept a NULL spec.
This means "I don't care what format I get at all" and will just use
the device's current (and/or default) format.

This can be useful, since audio streams cover the differences anyhow.
2023-07-30 11:55:59 -04:00
Ryan C. Gordon bb1cbbd33a
test: Update testaudioinfo for SDL3 audio API. 2023-07-30 11:55:58 -04:00
Ryan C. Gordon 883aee32c5
audio: Let default formats differ for output and capture devices. 2023-07-30 11:55:58 -04:00