Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2009-11-12 22:38:15
Size: 1103
Editor: SheenaSmith
Comment: create page, add content
Revision 2 as of 2009-11-15 02:15:35
Size: 1286
Editor: SheenaSmith
Comment: edit content
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Use this function to get the human-readable name of a specific audio device. Use this function to get the name of a specific audio device.
Line 16: Line 16:
||'''index'''||the index of the audio device; the value ranges from 0 to 1 - [[SDL_GetNumAudioDevices]]()||
||'''iscapture'''||non-0 to specify a device that has recording capability||
Line 18: Line 20:

The string returned by this function is UTF-8 encoded, read-only, and managed internally. You are not to free it. If you need to keep the string for any length of time, you should make your own copy of it, as it will be invalid next time any of several other SDL functions is called.
The name of the audio device at the requested index.
Line 27: Line 28:
Must be a value between 0 and (number of audio devices-1).
O
nly valid after successfully initializing the audio subsystem.
The values returned by this function reflect the latest call to [[SDL_GetNumAudioDevices]](); recall that function to redetect available hardware.
This function is only valid after successfully initializing the audio subsystem.
The values returned by this function reflect the latest call to [[SDL_GetNumAudioDevices]](); re-call that function to re-detect available hardware.
Line 31: Line 31:
The string returned by this function is UTF-8 encoded, read-only, and managed internally. You are not to free it. If you need to keep the string for any length of time, you should make your own copy of it, as it will be invalid next time any of several other SDL functions is called.

SDL_GetAudioDeviceName

Use this function to get the name of a specific audio device.

Syntax

const char * SDL_GetAudioDeviceName (int index,
                                     int iscapture)

Function Parameters

index

the index of the audio device; the value ranges from 0 to 1 - SDL_GetNumAudioDevices()

iscapture

non-0 to specify a device that has recording capability

Return Value

The name of the audio device at the requested index.

Code Examples

You can add your code example here

Remarks

This function is only valid after successfully initializing the audio subsystem. The values returned by this function reflect the latest call to SDL_GetNumAudioDevices(); re-call that function to re-detect available hardware.

The string returned by this function is UTF-8 encoded, read-only, and managed internally. You are not to free it. If you need to keep the string for any length of time, you should make your own copy of it, as it will be invalid next time any of several other SDL functions is called.

None: SDL_GetAudioDeviceName (last edited 2016-04-15 22:07:37 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit