add a sample preview button (hopefully)

the next commit will be about normalizing sample rate
This commit is contained in:
tildearrow 2021-12-21 13:06:14 -05:00
parent 6ee4e33b89
commit 48f4f5835b
4 changed files with 82 additions and 11 deletions

View file

@ -92,13 +92,21 @@ class DivEngine {
String configFile;
String lastError;
struct SamplePreview {
int sample;
unsigned int pos;
SamplePreview():
sample(-1),
pos(0) {}
} sPreview;
short vibTable[64];
blip_buffer_t* bb[2];
blip_buffer_t* bb[3];
size_t bbInLen;
int temp[2], prevSample[2];
short* bbIn[2];
short* bbOut[2];
int temp[3], prevSample[3];
short* bbIn[3];
short* bbOut[3];
size_t totalProcessed;
@ -155,6 +163,9 @@ class DivEngine {
// reset playback state
void syncReset();
// trigger sample preview
void previewSample(int sample);
// get config path
String getConfigPath();