Audacity 3.2.0
|
#include <cassert>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <wx/types.h>
Go to the source code of this file.
Classes | |
struct | fifo_t |
struct | filter_t |
struct | one_pole_t |
struct | filter_array_t |
struct | reverb_t |
Macros | |
#define | M_LN10 2.30258509299404568402 /* log_e 10 */ |
#define | array_length(a) (sizeof(a)/sizeof(a[0])) |
#define | dB_to_linear(x) exp((x) * M_LN10 * 0.05) |
#define | midi_to_freq(n) (440 * pow(2,((n)-69)/12.)) |
#define | FIFO_SIZE_T size_t |
#define | FIFO_MIN 0x4000 |
#define | fifo_read_ptr(f) fifo_read(f, (FIFO_SIZE_T)0, NULL) |
#define | lsx_zalloc(var, n) var = (float *)calloc(n, sizeof(*var)) |
#define | filter_advance(p) if (--(p)->ptr < (p)->buffer) (p)->ptr += (p)->size |
#define | filter_delete(p) free((p)->buffer) |
Functions | |
static void | fifo_clear (fifo_t *f) |
static void | fifo_clear_and_zero (fifo_t *f) |
static void * | fifo_reserve (fifo_t *f, FIFO_SIZE_T n) |
static void * | fifo_write (fifo_t *f, FIFO_SIZE_T n, void const *data) |
static void * | fifo_read (fifo_t *f, FIFO_SIZE_T n, void *data) |
static void | fifo_delete (fifo_t *f) |
static void | fifo_create (fifo_t *f, FIFO_SIZE_T item_size) |
static float | comb_process (filter_t *p, float const *input, float const *feedback, float const *hf_damping) |
static float | allpass_process (filter_t *p, float const *input) |
static float | one_pole_process (one_pole_t *p, float i0) |
static void | one_pole_init (filter_array_t *p, double rate, double fc_highpass, double fc_lowpass) |
static void | filter_array_allocate (filter_array_t *p, double rate, double scale, double offset) |
static void | filter_t_resize (filter_t *p, size_t newSize) |
static void | filter_array_init (filter_array_t *p, double rate, double scale, double offset) |
static void | filter_array_create (filter_array_t *p, double rate, double scale, double offset) |
static void | filter_array_process (filter_array_t *p, size_t length, float const *input, float *output, float const *feedback, float const *hf_damping, float const *gain) |
static void | filter_array_delete (filter_array_t *p) |
static void | filter_t_resize_resetting (filter_t *p, size_t newSize) |
static void | filter_t_resize_preserving (filter_t *p, size_t newSize) |
static void | reverb_allocate (reverb_t *p, double sample_rate_Hz, size_t buffer_size, float **out) |
static void | reverb_set_simple_params (reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double reverberance, double hf_damping, double tone_low, double tone_high) |
static void | reverb_init (reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double room_scale, double reverberance, double hf_damping, double pre_delay_ms, double stereo_depth, double tone_low, double tone_high) |
static void | reverb_create (reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double room_scale, double reverberance, double hf_damping, double pre_delay_ms, double stereo_depth, double tone_low, double tone_high, size_t buffer_size, float **out) |
static void | reverb_process (reverb_t *p, size_t length) |
static void | reverb_delete (reverb_t *p) |
static void | reverb_clear (reverb_t *p) |
Variables | |
static const size_t | comb_lengths [] = {1116, 1188, 1277, 1356, 1422, 1491, 1557, 1617} |
static const size_t | allpass_lengths [] = {225, 341, 441, 556} |
static const size_t | stereo_adjust = 12 |
#define array_length | ( | a | ) | (sizeof(a)/sizeof(a[0])) |
Definition at line 28 of file Reverb_libSoX.h.
#define dB_to_linear | ( | x | ) | exp((x) * M_LN10 * 0.05) |
Definition at line 29 of file Reverb_libSoX.h.
#define FIFO_MIN 0x4000 |
Definition at line 32 of file Reverb_libSoX.h.
#define fifo_read_ptr | ( | f | ) | fifo_read(f, (FIFO_SIZE_T)0, NULL) |
Definition at line 33 of file Reverb_libSoX.h.
#define FIFO_SIZE_T size_t |
Definition at line 31 of file Reverb_libSoX.h.
#define filter_advance | ( | p | ) | if (--(p)->ptr < (p)->buffer) (p)->ptr += (p)->size |
Definition at line 35 of file Reverb_libSoX.h.
#define filter_delete | ( | p | ) | free((p)->buffer) |
Definition at line 36 of file Reverb_libSoX.h.
#define lsx_zalloc | ( | var, | |
n | |||
) | var = (float *)calloc(n, sizeof(*var)) |
Definition at line 34 of file Reverb_libSoX.h.
#define M_LN10 2.30258509299404568402 /* log_e 10 */ |
Definition at line 19 of file Reverb_libSoX.h.
#define midi_to_freq | ( | n | ) | (440 * pow(2,((n)-69)/12.)) |
Definition at line 30 of file Reverb_libSoX.h.
|
static |
Definition at line 132 of file Reverb_libSoX.h.
References filter_advance, and filter_t::ptr.
Referenced by filter_array_process().
|
static |
Definition at line 122 of file Reverb_libSoX.h.
References filter_advance, filter_t::ptr, and filter_t::store.
Referenced by filter_array_process().
|
static |
Definition at line 46 of file Reverb_libSoX.h.
References fifo_t::begin, and fifo_t::end.
Referenced by fifo_create(), fifo_reserve(), and reverb_clear().
|
static |
Definition at line 51 of file Reverb_libSoX.h.
References fifo_t::allocation, fifo_t::begin, fifo_t::data, and fifo_t::end.
Referenced by reverb_init().
|
static |
Definition at line 108 of file Reverb_libSoX.h.
References fifo_t::allocation, fifo_t::data, fifo_clear(), FIFO_MIN, and fifo_t::item_size.
Referenced by reverb_allocate().
|
static |
Definition at line 103 of file Reverb_libSoX.h.
References fifo_t::data, and staffpad::vo::free().
Referenced by reverb_delete().
|
static |
Definition at line 91 of file Reverb_libSoX.h.
References fifo_t::begin, fifo_t::data, fifo_t::end, FIFO_SIZE_T, and fifo_t::item_size.
Referenced by reverb_process().
|
static |
Definition at line 58 of file Reverb_libSoX.h.
References fifo_t::allocation, fifo_t::begin, fifo_t::data, fifo_t::end, fifo_clear(), FIFO_MIN, and fifo_t::item_size.
Referenced by fifo_write().
|
static |
Definition at line 83 of file Reverb_libSoX.h.
References fifo_reserve(), and fifo_t::item_size.
Referenced by ReverbBase::Instance::InstanceProcess(), and reverb_init().
|
static |
Definition at line 176 of file Reverb_libSoX.h.
References filter_array_t::allpass, allpass_lengths, array_length, filter_t::buffer, filter_array_t::comb, comb_lengths, lsx_zalloc, filter_t::ptr, filter_t::size, and stereo_adjust.
Referenced by reverb_allocate().
|
static |
Definition at line 220 of file Reverb_libSoX.h.
References filter_array_t::allpass, allpass_lengths, array_length, filter_t::buffer, filter_array_t::comb, comb_lengths, lsx_zalloc, filter_t::ptr, filter_t::size, and stereo_adjust.
|
static |
Definition at line 261 of file Reverb_libSoX.h.
References filter_array_t::allpass, allpass_lengths, array_length, filter_array_t::comb, comb_lengths, and filter_delete.
Referenced by reverb_delete().
|
static |
Definition at line 198 of file Reverb_libSoX.h.
References filter_array_t::allpass, allpass_lengths, array_length, filter_array_t::comb, comb_lengths, filter_t_resize(), and stereo_adjust.
Referenced by reverb_init().
|
static |
Definition at line 240 of file Reverb_libSoX.h.
References filter_array_t::allpass, allpass_lengths, allpass_process(), array_length, filter_array_t::comb, comb_lengths, comb_process(), filter_array_t::one_pole, and one_pole_process().
Referenced by reverb_process().
|
static |
Definition at line 369 of file Reverb_libSoX.h.
References filter_t_resize_preserving(), and filter_t_resize_resetting().
Referenced by filter_array_init().
|
static |
Definition at line 293 of file Reverb_libSoX.h.
References filter_t::buffer, filter_t::ptr, and filter_t::size.
Referenced by filter_t_resize().
|
static |
Definition at line 283 of file Reverb_libSoX.h.
References filter_t::buffer, filter_t::ptr, filter_t::size, and filter_t::store.
Referenced by filter_t_resize().
|
static |
Definition at line 160 of file Reverb_libSoX.h.
References one_pole_t::a1, one_pole_t::b0, one_pole_t::b1, M_PI, and filter_array_t::one_pole.
Referenced by reverb_set_simple_params().
|
static |
Definition at line 143 of file Reverb_libSoX.h.
References one_pole_t::a1, one_pole_t::b0, one_pole_t::b1, one_pole_t::i1, and one_pole_t::o1.
Referenced by filter_array_process().
|
static |
Definition at line 390 of file Reverb_libSoX.h.
References reverb_t::chan, fifo_create(), filter_array_allocate(), reverb_t::input_fifo, lsx_zalloc, and reverb_t::out.
Referenced by reverb_create().
|
static |
Definition at line 511 of file Reverb_libSoX.h.
References allpass_lengths, array_length, reverb_t::chan, comb_lengths, fifo_clear(), one_pole_t::i1, reverb_t::input_fifo, and filter_array_t::one_pole.
Referenced by ReverbBase::Instance::RealtimeSuspend().
|
static |
Definition at line 474 of file Reverb_libSoX.h.
References reverb_allocate(), and reverb_init().
Referenced by ReverbBase::Instance::InstanceInit().
|
static |
Definition at line 501 of file Reverb_libSoX.h.
References reverb_t::chan, fifo_delete(), filter_array_delete(), staffpad::vo::free(), reverb_t::input_fifo, and reverb_t::out.
Referenced by Reverb_priv_ex::~Reverb_priv_ex().
|
static |
Definition at line 439 of file Reverb_libSoX.h.
References reverb_t::chan, fifo_clear_and_zero(), fifo_write(), filter_array_init(), reverb_t::initializedWithZeroDepth, reverb_t::input_fifo, and reverb_set_simple_params().
Referenced by ReverbBase::Instance::RealtimeProcess(), and reverb_create().
|
static |
Definition at line 491 of file Reverb_libSoX.h.
References reverb_t::chan, reverb_t::feedback, fifo_read(), fifo_read_ptr, filter_array_process(), reverb_t::gain, reverb_t::hf_damping, reverb_t::initializedWithZeroDepth, reverb_t::input_fifo, and reverb_t::out.
Referenced by ReverbBase::Instance::InstanceProcess().
|
static |
Definition at line 411 of file Reverb_libSoX.h.
References reverb_t::chan, dB_to_linear, reverb_t::feedback, reverb_t::gain, reverb_t::hf_damping, midi_to_freq, and one_pole_init().
Referenced by ReverbBase::Instance::RealtimeProcess(), and reverb_init().
|
static |
Definition at line 152 of file Reverb_libSoX.h.
Referenced by filter_array_allocate(), filter_array_create(), filter_array_delete(), filter_array_init(), filter_array_process(), and reverb_clear().
|
static |
Definition at line 151 of file Reverb_libSoX.h.
Referenced by filter_array_allocate(), filter_array_create(), filter_array_delete(), filter_array_init(), filter_array_process(), and reverb_clear().
|
static |
Definition at line 152 of file Reverb_libSoX.h.
Referenced by filter_array_allocate(), filter_array_create(), and filter_array_init().