44#ifdef PIPEWIRE_BACKEND
46#elif defined(WASAPI_BACKEND)
48#elif defined(COREAUDIO_BACKEND)
51#error "Unknown or unsupport audio backend"
82 return std::make_tuple(
172 return std::make_tuple(
constexpr auto member(std::string_view key, T Class::*ptr)
int device_id
System identifier for the associated device (-1 for default)
static constexpr auto describe()
uint32_t channels
Number of discrete channels in this set.
bool enabled
Whether this channel set is active in the stream.
std::string device_name
Human-readable identifier for the associated device.
Configuration for input or output data channels.
DitherMethod dither
Dithering algorithm for format conversions.
uint32_t buffer_size
Number of samples per processing block.
static constexpr auto describe()
bool measure_latency
Whether to measure and report actual stream latency.
ChannelConfig input
Configuration for input signal channels (disabled by default)
uint32_t sample_rate
Number of samples processed per second (Hz)
AudioFormat
Defines the binary representation of audio sample data.
@ FLOAT64
64-bit floating point representation (-1.0 to 1.0)
@ INT16
16-bit integer representation (-32768 to 32767)
@ INT32
32-bit integer representation (-2147483648 to 2147483647)
@ INT24
24-bit integer representation (-8388608 to 8388607)
@ FLOAT32
32-bit floating point representation (-1.0 to 1.0)
ChannelConfig output
Configuration for output signal channels.
bool verbose_logging
Whether to output detailed diagnostic information.
AudioFormat format
Selected audio backend implementation.
StreamPriority
Processing priority levels for the audio stream.
@ NORMAL
Standard resource priority.
@ LOW
Minimal resource priority.
@ REALTIME
Maximum resource priority with timing guarantees.
@ HIGH
Elevated resource priority.
StreamPriority priority
System resource priority for audio processing.
uint32_t get_num_channels() const
Retrieves the number of output channels.
bool use_callback
Whether to use callback-based processing (vs.
DitherMethod
Noise shaping algorithms for quantization error mitigation.
@ SHAPED
Psychoacoustically optimized noise shaping.
@ GAUSSIAN
Normal (bell curve) distribution.
@ TRIANGULAR
Weighted triangular distribution.
@ RECTANGULAR
Uniform random distribution.
@ NONE
No dithering applied.
bool handle_xruns
Whether to handle buffer underrun/overrun conditions.
uint32_t get_total_channels() const
Calculates the total number of active channels across all directions.
double buffer_count
Number of buffers in the processing queue (0 for system default)
std::unordered_map< std::string, std::any > backend_options
Backend-specific configuration parameters.
double stream_latency_ms
Target latency for stream processing in milliseconds.
bool non_interleaved
Channel organization mode (true: planar, false: interleaved)
bool auto_convert_format
Whether to automatically convert between sample formats.
Comprehensive configuration for digital audio stream processing.