Final Platform Layer 1.0.0
Loading...
Searching...
No Matches
fplAudioSettings Struct Reference

Stores audio settings, such as format, device info, callbacks, backend, etc. More...

#include <final_platform_layer.h>

Data Fields

fplAudioBackendType backend
 The targeted backend.
fpl_audio_client_read_callbackclientReadCallback
 The callback for retrieving audio data from the client.
void * clientUserData
 User data pointer for client read callback.
fpl_b32 manualLoad
 Manual loading the audio system by fplAudioInit() and unload using fplAudioRelease().
fplSpecificAudioSettings specific
 Specific settings.
fpl_b32 startAuto
 Start playing of audio samples after platform initialization automatically.
fpl_b32 stopAuto
 Stop playing of audio samples before platform release automatically.
fplAudioDeviceInfo targetDevice
 The target device.
fplAudioFormat targetFormat
 The target format.

Detailed Description

Stores audio settings, such as format, device info, callbacks, backend, etc.

The targetFormat field describes the desired audio format. During fplPlatformInit / fplAudioInit the platform probes backends in a tier-based order, keeping sample rate sacred until the very last tier:

  1. Exact match: (sampleRate, channels, type).
  2. Sample rate + channels match, type relaxed against the fallback type table.
  3. Sample rate + type match, channels relaxed against the fallback channels table.
  4. Sample rate match only, channels and type relaxed.
  5. Full fallback: rate, channels and type all relaxed.
  6. Backend-native: every backend is offered a blank format and may pick whatever its own internal default is (e.g. OSS uses /dev/dsp's reported capabilities). This is the very-last resort when no tier above produced a match.

Definition at line 6461 of file final_platform_layer.h.

Field Documentation

◆ backend

fplAudioBackendType fplAudioSettings::backend

The targeted backend.

Definition at line 6473 of file final_platform_layer.h.

◆ clientReadCallback

fpl_audio_client_read_callback* fplAudioSettings::clientReadCallback

The callback for retrieving audio data from the client.

Definition at line 6469 of file final_platform_layer.h.

◆ clientUserData

void* fplAudioSettings::clientUserData

User data pointer for client read callback.

Definition at line 6471 of file final_platform_layer.h.

◆ manualLoad

fpl_b32 fplAudioSettings::manualLoad

Manual loading the audio system by fplAudioInit() and unload using fplAudioRelease().

Definition at line 6479 of file final_platform_layer.h.

◆ specific

fplSpecificAudioSettings fplAudioSettings::specific

Specific settings.

Definition at line 6467 of file final_platform_layer.h.

◆ startAuto

fpl_b32 fplAudioSettings::startAuto

Start playing of audio samples after platform initialization automatically.

Definition at line 6475 of file final_platform_layer.h.

◆ stopAuto

fpl_b32 fplAudioSettings::stopAuto

Stop playing of audio samples before platform release automatically.

Definition at line 6477 of file final_platform_layer.h.

◆ targetDevice

fplAudioDeviceInfo fplAudioSettings::targetDevice

The target device.

Definition at line 6465 of file final_platform_layer.h.

◆ targetFormat

fplAudioFormat fplAudioSettings::targetFormat

The target format.

Definition at line 6463 of file final_platform_layer.h.


The documentation for this struct was generated from the following file: