furnace/src/engine/wavetable.h

23 lines
409 B
C
Raw Normal View History

2022-01-19 09:32:40 +00:00
#ifndef _WAVETABLE_H
#define _WAVETABLE_H
#include "safeWriter.h"
#include "dataErrors.h"
2022-01-19 09:32:40 +00:00
struct DivWavetable {
int len, min, max;
2022-01-11 08:16:32 +00:00
int data[256];
2022-01-19 09:32:40 +00:00
void putWaveData(SafeWriter* w);
DivDataErrors readWaveData(SafeReader& reader, short version);
2022-01-19 09:32:40 +00:00
bool save(const char* path);
DivWavetable():
len(32),
min(0),
max(31) {
2022-01-11 08:16:32 +00:00
for (int i=0; i<256; i++) {
2021-12-27 20:21:38 +00:00
data[i]=i;
}
}
};
2022-01-19 09:32:40 +00:00
#endif