Class Hint.Audio.Device
- Namespace
- Sdl3Sharp
- Assembly
- Sdl3Sharp.dll
SDL_HINT_AUDIO_DEVICE_*
public static class Hint.Audio.Device
- Inheritance
-
Hint.Audio.Device
- Inherited Members
Properties
AppIconName
Gets a hint specifying an application icon name for an audio device
public static Hint AppIconName { get; }
Property Value
- Hint
A hint specifying an application icon name for an audio device
Remarks
Some audio backends (such as Pulseaudio and Pipewire) allow you to set an XDG icon name for your application. Among other things, this icon might show up in a system control panel that lets the user adjust the volume on specific audio streams instead of using one giant master volume slider. Note that this is unrelated to the icon used by the windowing system, which may be set with SDL_SetWindowIcon (or via desktop file on Wayland).
Setting this to "" or leaving it unset will have SDL use a reasonable default, "applications-games", which is likely to be installed. See https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html and https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html for the relevant XDG icon specs.
This hint should be set before .
- See Also
SampleFrames
Gets a hint controlling device buffer size
public static Hint SampleFrames { get; }
Property Value
- Hint
A hint controlling device buffer size
Remarks
This hint is an integer > 0, that represents the size of the device's buffer in sample frames (stereo audio data in 16-bit format is 4 bytes per sample frame, for example).
SDL3 generally decides this value on behalf of the app, but if for some reason the app needs to dictate this (because they want either lower latency or higher throughput AND ARE WILLING TO DEAL WITH what that might require of the app), they can specify it.
SDL will try to accommodate this value, but there is no promise you'll get the buffer size requested. Many platforms won't honor this request at all, or might adjust it.
This hint should be set before .
- See Also
StreamName
Gets a hint specifying an audio stream name for an audio device
public static Hint StreamName { get; }
Property Value
- Hint
A hint specifying an audio stream name for an audio device
Remarks
Some audio backends (such as PulseAudio) allow you to describe your audio stream. Among other things, this description might show up in a system control panel that lets the user adjust the volume on specific audio streams instead of using one giant master volume slider.
This hints lets you transmit that information to the OS. The contents of this hint are used while opening an audio device. You should use a string that describes your what your program is playing ("audio stream" is probably sufficient in many cases, but this could be useful for something like "team chat" if you have a headset playing VoIP audio separately).
Setting this to "" or leaving it unset will have SDL use a reasonable default: "audio stream" or something similar.
Note that while this talks about audio streams, this is an OS-level concept, so it applies to a physical audio device in this case, and not an SDL_AudioStream, nor an SDL logical audio device.
This hint should be set before .
- See Also
StreamRole
Gets a hint specifying an application role for an audio device
public static Hint StreamRole { get; }
Property Value
- Hint
A hint specifying an application role for an audio device
Remarks
Some audio backends (such as Pipewire) allow you to describe the role of your audio stream. Among other things, this description might show up in a system control panel or software for displaying and manipulating media playback/recording graphs.
This hints lets you transmit that information to the OS. The contents of this hint are used while opening an audio device. You should use a string that describes your what your program is playing (Game, Music, Movie, etc...).
Setting this to "" or leaving it unset will have SDL use a reasonable default: "Game" or something similar.
Note that while this talks about audio streams, this is an OS-level concept, so it applies to a physical audio device in this case, and not an SDL_AudioStream, nor an SDL logical audio device.
This hint should be set before .
- See Also