ReXGlue SDK
Loading...
Searching...
No Matches
rex::apu Namespace Reference

Classes

class  AudioSettings
struct  AudioStats
class  IAudioDriver
class  IAudioSystem

Typedefs

using AudioFill = MoveOnlyFunction<void(std::span<f32> samples, u32 channels)>
using AudioFrame = std::span<const f32, kAudioFrameSamples>

Enumerations

enum class  AudioStreamID : u32

Variables

constexpr memory::Tag kAPU {4}
constexpr u32 kAudioFrameChannels = 6
constexpr u32 kAudioChannelSamples = 256
constexpr u32 kAudioSampleRate = 48000
constexpr u32 kAudioFrameSamples = kAudioFrameChannels * kAudioChannelSamples

Detailed Description

The audio driver interface and its configuration.

Typedef Documentation

◆ AudioFill

using rex::apu::AudioFill = MoveOnlyFunction<void(std::span<f32> samples, u32 channels)>

Fills the samples the device is about to play. The device calls it from its own thread.

Parameters
samplesInterleaved 48 kHz f32 in host byte order, written in full.

◆ AudioFrame

using rex::apu::AudioFrame = std::span<const f32, kAudioFrameSamples>

One frame in host byte order, channels in the order FL, FR, C, LFE, SL, SR.

Variable Documentation

◆ kAPU

memory::Tag rex::apu::kAPU {4}
inlineconstexpr

The tag of audio emulation and the audio drivers. The audio provider names it "APU".

◆ kAudioFrameChannels

u32 rex::apu::kAudioFrameChannels = 6
inlineconstexpr

A submitted frame holds 6 channels one after another, 256 samples each at 48 kHz.