dsp.h(3)Bark

NAME

dsp.h - Bark real-time audio noise gate DSP primitives.

SYNOPSIS

Classes

struct bark_gate

Microphone RMS noise gate with fast attack, smooth decay, and hold timer.

Typedefs

typedef struct bark_gate bark_gate_t

Microphone RMS noise gate with fast attack, smooth decay, and hold timer.

Functions

void bark_gate_init (bark_gate_t *g, float sample_rate, float threshold)

Initialize a noise gate with sample rate (Hz) and linear RMS threshold.

void bark_gate_set_threshold (bark_gate_t *g, float threshold)

Update the linear RMS threshold of an initialized noise gate.

float bark_gate_slider_to_threshold (uint8_t slider_0_100)

Convert a UI slider value (0..100) into a perceptual linear RMS threshold.

float bark_gate_process_f32 (bark_gate_t *g, const float *in, float *out, size_t frames)

Process mono float32 PCM samples through the noise gate.

Detailed Description

Bark real-time audio noise gate DSP primitives.

Portable pure-C audio DSP primitives (zero platform dependencies).

Compiles identically on native desktop hosts, Bark guests, and browser WASM32.

Function Documentation

float bark_gate_process_f32 (bark_gate_t * g, const float * in, float * out, size_t frames)

Process mono float32 PCM samples through the noise gate.

Parameters

g Noise gate state.
in Input PCM buffer (frames samples).
out Output PCM buffer (may alias in).
frames Number of samples to process.

Returns

Peak amplitude observed in the processed block.

Author

Generated automatically by Doxygen for Bark from the source code.