mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
Add SDL_GetAudioDeviceSpec.
This API is supported by pipewire, pulseaudio, coreaudio, wasapi, and disk.
This commit is contained in:
@@ -266,7 +266,7 @@ io_list_check_add(struct io_node *node)
|
||||
spa_list_append(&hotplug_io_list, &node->link);
|
||||
|
||||
if (SDL_AtomicGet(&hotplug_events_enabled)) {
|
||||
SDL_AddAudioDevice(node->is_capture, node->name, PW_ID_TO_HANDLE(node->id));
|
||||
SDL_AddAudioDevice(node->is_capture, node->name, &node->spec, PW_ID_TO_HANDLE(node->id));
|
||||
}
|
||||
|
||||
dup_found:
|
||||
@@ -768,7 +768,7 @@ PIPEWIRE_DetectDevices()
|
||||
io_list_sort();
|
||||
|
||||
spa_list_for_each (io, &hotplug_io_list, link) {
|
||||
SDL_AddAudioDevice(io->is_capture, io->name, PW_ID_TO_HANDLE(io->id));
|
||||
SDL_AddAudioDevice(io->is_capture, io->name, &io->spec, PW_ID_TO_HANDLE(io->id));
|
||||
}
|
||||
|
||||
SDL_AtomicSet(&hotplug_events_enabled, 1);
|
||||
|
||||
Reference in New Issue
Block a user