ajout effets audio
This commit is contained in:
1 parent
f8a79b08bf
commit
44a43828f1
14 files changed
+541
-6
No files matched your search
@@ -0,0 +1,42 @@
|
||||
#ifndef FX_REVERB_H
|
||||
#define FX_REVERB_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define FX_REVERB_NUM_COMBS 8U
|
||||
#define FX_REVERB_NUM_ALLPASS 4U
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
float room_size; /* 0.0 a 1.0 */
|
||||
float damping; /* 0.0 (brillant) a 1.0 (etouffe) */
|
||||
float mix; /* 0.0 (sec) a 1.0 (100% reverbere) */
|
||||
} FxReverbParams;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float *buffer;
|
||||
uint32_t size;
|
||||
uint32_t idx;
|
||||
float filter_store;
|
||||
} FxCombState;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float *buffer;
|
||||
uint32_t size;
|
||||
uint32_t idx;
|
||||
} FxAllpassState;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FxCombState combs[FX_REVERB_NUM_COMBS];
|
||||
FxAllpassState allpass[FX_REVERB_NUM_ALLPASS];
|
||||
} FxReverbState;
|
||||
|
||||
void FxReverb_Init(FxReverbState *state, FxReverbParams *params);
|
||||
float FxReverb_Process(FxReverbState *state, const FxReverbParams *params, float input);
|
||||
|
||||
#endif /* FX_REVERB_H */
|
||||
Reference in new issue
Block a user