Table of Contents

Class Hint.Audio

Namespace
Sdl3Sharp
Assembly
Sdl3Sharp.dll

SDL_HINT_AUDIO_*

public static class Hint.Audio
Inheritance
Hint.Audio
Inherited Members

Properties

Category

Gets a hint controlling the audio category on iOS and macOS

public static Hint Category { get; }

Property Value

Hint

A hint controlling the audio category on iOS and macOS

Remarks

The hint can be set to the following values:

  • "ambient"Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
  • "playback"Use the AVAudioSessionCategoryPlayback category

For more information, see Apple's documentation: https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html.

This hint should be set before .

See Also

Channels

Gets a hint controlling the default audio channel count

public static Hint Channels { get; }

Property Value

Hint

A hint controlling the default audio channel count

Remarks

If the application doesn't specify the audio channel count when opening the device, this hint can be used to specify a default channel count that will be used. This defaults to "1" for recording and "2" for playback devices.

This hint should be set before .

See Also

Driver

Gets a hint that specifies an audio backend to use

public static Hint Driver { get; }

Property Value

Hint

A hint that specifies an audio backend to use

Remarks

By default, SDL will try all available audio backends in a reasonable order until it finds one that can work, but this hint allows the app or user to force a specific driver, such as "pipewire" if, say, you are on PulseAudio but want to try talking to the lower level instead.

This hint should be set before SDL is initialized.

See Also

Format

Gets a hint controlling the default audio format

public static Hint Format { get; }

Property Value

Hint

A hint controlling the default audio format

Remarks

If the application doesn't specify the audio format when opening the device, this hint can be used to specify a default format that will be used.

The hint can be set to the following values:

  • "U8"Unsigned 8-bit audio
  • "S8"Signed 8-bit audio
  • "S16LE"Signed 16-bit little-endian audio
  • "S16BE"Signed 16-bit big-endian audio
  • "S16"Signed 16-bit native-endian audio (default)
  • "S32LE"Signed 32-bit little-endian audio
  • "S32BE"Signed 32-bit big-endian audio
  • "S32"Signed 32-bit native-endian audio
  • "F32LE"Floating point little-endian audio
  • "F32BE"Floating point big-endian audio
  • "F32"Floating point native-endian audio

This hint should be set before .

See Also

Frequency

Gets a hint controlling the default audio frequency

public static Hint Frequency { get; }

Property Value

Hint

A hint controlling the default audio frequency

Remarks

If the application doesn't specify the audio frequency when opening the device, this hint can be used to specify a default frequency that will be used. This defaults to "44100".

This hint should be set before .

See Also

IncludeMonitors

Gets a hint that causes SDL to not ignore audio "monitors"

public static Hint IncludeMonitors { get; }

Property Value

Hint

A hint that causes SDL to not ignore audio "monitors"

Remarks

This is currently only used by the PulseAudio driver.

By default, SDL ignores audio devices that aren't associated with physical hardware. Changing this hint to "1" will expose anything SDL sees that appears to be an audio source or sink. This will add "devices" to the list that the user probably doesn't want or need, but it can be useful in scenarios where you want to hook up SDL to some sort of virtual device, etc.

The hint can be set to the following values:

  • "0"Audio monitor devices will be ignored (default)
  • "1"Audio monitor devices will show up in the device list

This hint should be set before SDL is initialized.

See Also