ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
spectral.h
Go to the documentation of this file.
1#pragma once
2
3/* Existing buffer budgets in bytes, including NUL for text storage. */
4#define SPECTRAL_BAND_COUNT 4
5
7#include <stdbool.h>
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
32
38asciichat_error_t spectral_process(spectral_processor_t *processor, const float *input, float *output, size_t count);
40float spectral_pitch_hz(const spectral_processor_t *processor);
41const float *spectral_spectrum(const spectral_processor_t *processor, size_t *bins);
42
43#ifdef __cplusplus
44}
45#endif
Synchronized per-thread pending error stacks and value snapshots. SET_ERRNO pushes,...
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
static bool size_t gotel_query_t * out
Definition queries.h:8
void spectral_reset(spectral_processor_t *processor)
Definition spectral.c:46
asciichat_error_t spectral_process(spectral_processor_t *processor, const float *input, float *output, size_t count)
Definition spectral.c:279
void spectral_destroy(spectral_processor_t *processor)
Definition spectral.c:104
const float * spectral_spectrum(const spectral_processor_t *processor, size_t *bins)
Definition spectral.c:295
spectral_config_t spectral_default_config(int sample_rate)
Definition spectral.c:36
asciichat_error_t spectral_create(const spectral_config_t *config, spectral_processor_t **out)
Definition spectral.c:68
float spectral_pitch_hz(const spectral_processor_t *processor)
Definition spectral.c:301
struct spectral_processor spectral_processor_t
Definition spectral.h:15
#define SPECTRAL_BAND_COUNT
Definition spectral.h:4
For spectral config, this is the live record that ties sample_rate, fft_size, noise_gate,...
Definition spectral.h:19
float ratios[4]
Definition spectral.h:30
float crossovers[4 - 1]
Definition spectral.h:28
float thresholds_db[4]
Definition spectral.h:29
spectral processor keeps the values that move through the subsystem: config, forward,...
Definition spectral.c:17