mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 13:15:10 +00:00
cleanup SDL_GetAudioDeviceSpec
- drop unnecessary hascapture check - call SDL_InvalidParamError and return -1 in case the index is out of range - do not zfill SDL_AudioSpec - adjust documentation to reflect the behavior
This commit is contained in:
@@ -500,9 +500,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
|
||||
* hardware.
|
||||
*
|
||||
* `spec` will be filled with the sample rate, sample format, and channel
|
||||
* count. All other values in the structure are filled with 0. When the
|
||||
* supported struct members are 0, SDL was unable to get the property from the
|
||||
* backend.
|
||||
* count.
|
||||
*
|
||||
* \param index the index of the audio device; valid values range from 0 to
|
||||
* SDL_GetNumAudioDevices() - 1
|
||||
|
||||
Reference in New Issue
Block a user