guitfx/sust.h

32 lines
473 B
C
Raw Normal View History

2024-12-08 20:02:05 +01:00
#pragma once
#include <stdbool.h>
#include <stddef.h>
enum sust_mode {
MODE_Sustain = 0,
MODE_Sostenuto = 1
};
struct sust {
enum sust_mode mode;
bool playing;
size_t start_idx;
size_t idx;
size_t buf_len;
float * record_buf;
float * play_buf;
};
void sust_init( struct sust * sust );
void sust_swap( struct sust * sust );
void sust_process(
struct sust * sust,
size_t frame_size,
float const * in,
float * out
);