SDL_GetAudioPlaybackDevices() and SDL_GetAudioRecordingDevices() follow the SDL_GetStringRule

This commit is contained in:
Sam Lantinga
2024-07-18 08:26:29 -07:00
parent bb96320cc4
commit 8ca6caeda5
9 changed files with 23 additions and 30 deletions

View File

@@ -20,7 +20,7 @@ print_devices(SDL_bool recording)
const char *typestr = (recording ? "recording" : "playback");
int n = 0;
int frames;
SDL_AudioDeviceID *devices = recording ? SDL_GetAudioRecordingDevices(&n) : SDL_GetAudioPlaybackDevices(&n);
const SDL_AudioDeviceID *devices = recording ? SDL_GetAudioRecordingDevices(&n) : SDL_GetAudioPlaybackDevices(&n);
if (!devices) {
SDL_Log(" Driver failed to report %s devices: %s\n\n", typestr, SDL_GetError());
@@ -46,7 +46,6 @@ print_devices(SDL_bool recording)
}
SDL_Log("\n");
}
SDL_free(devices);
}
int main(int argc, char **argv)