2022-01-19 09:32:40 +00:00
|
|
|
#ifndef _WAVETABLE_H
|
|
|
|
#define _WAVETABLE_H
|
|
|
|
#include "safeWriter.h"
|
2022-01-21 23:17:05 +00:00
|
|
|
#include "dataErrors.h"
|
2022-01-19 09:32:40 +00:00
|
|
|
|
2021-05-11 20:08:08 +00:00
|
|
|
struct DivWavetable {
|
2022-01-09 08:52:41 +00:00
|
|
|
int len, min, max;
|
2022-01-11 08:16:32 +00:00
|
|
|
int data[256];
|
2021-05-28 07:02:54 +00:00
|
|
|
|
2022-01-19 09:32:40 +00:00
|
|
|
void putWaveData(SafeWriter* w);
|
2022-01-21 23:17:05 +00:00
|
|
|
DivDataErrors readWaveData(SafeReader& reader, short version);
|
2022-01-19 09:32:40 +00:00
|
|
|
bool save(const char* path);
|
2021-05-28 07:02:54 +00:00
|
|
|
DivWavetable():
|
2022-01-09 08:52:41 +00:00
|
|
|
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;
|
|
|
|
}
|
2021-05-28 07:02:54 +00:00
|
|
|
}
|
2021-05-11 20:08:08 +00:00
|
|
|
};
|
2022-01-19 09:32:40 +00:00
|
|
|
|
|
|
|
#endif
|