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
Ryan C. Gordon
62cf24eeb9
pulseaudio: Listen for server events in addition to sources and sinks.
...
This gets us default device change notifications more efficiently, presumably.
2023-07-30 11:55:58 -04:00
Ryan C. Gordon
924f370bd7
pulseaudio: Fix deadlock in HotplugThread.
...
If we wait for context subscription to finish, we might miss the signal
telling us to terminate the thread...this can happen if an app initializes
the audio subsystem and then quits immediately.
So just go right into the main loop of the thread; the subscription will
finish when it finishes and then events will flow.
2023-07-30 11:55:58 -04:00
Ryan C. Gordon
5d4e9e5f80
test: Updated testaudiostreamdynamicresample to SDL3 audio API.
2023-07-30 11:55:58 -04:00
Ryan C. Gordon
f883b9fc64
test: Updated testaudiohotplug to SDL3 audio API.
2023-07-30 11:55:57 -04:00
Ryan C. Gordon
2be5f726d4
audio: Removed debug logging.
2023-07-30 11:55:57 -04:00
Ryan C. Gordon
323ecce123
docs: Added migration note about SDL_AUDIODEVICEREMOVED.
2023-07-30 11:55:57 -04:00
Ryan C. Gordon
47b0321ebf
test: Removed loopwavequeue.c; obsolete in SDL3.
2023-07-30 11:55:57 -04:00
Ryan C. Gordon
0e5a1d4f29
pulseaudio: Removed debug logging.
2023-07-30 11:55:57 -04:00
Ryan C. Gordon
f598626e46
test: loopwave shouldn't use an audiostream callback.
2023-07-30 11:55:56 -04:00
Ryan C. Gordon
eee407caf8
docs: migration guide note that SDL_LoadWAV has a different return type.
2023-07-30 11:55:56 -04:00