furnace/src/engine/sample.h

42 lines
881 B
C
Raw Normal View History

#include "../ta-utils.h"
struct DivSample {
String name;
2022-01-27 21:52:06 +00:00
int length, rate, centerRate, loopStart, loopOffP;
2021-05-11 20:26:38 +00:00
signed char vol, pitch;
2022-02-03 04:17:16 +00:00
// valid values are:
// - 0: ZX Spectrum overlay drum (1-bit PCM)
// - 1: 1-bit NES DPCM
// - 4: BRR
// - 5: raw ADPCM-A
// - 6: raw ADPCM-B
// - 8: 8-bit PCM
// - 16: 16-bit PCM
2021-05-11 20:26:38 +00:00
unsigned char depth;
short* data;
unsigned int rendLength, adpcmRendLength, rendOff, rendOffP, rendOffContiguous;
short* rendData;
2021-12-10 09:22:13 +00:00
unsigned char* adpcmRendData;
2021-12-18 06:03:59 +00:00
bool save(const char* path);
DivSample():
name(""),
length(0),
rate(32000),
2022-01-27 21:52:06 +00:00
centerRate(8363),
2022-01-15 22:54:21 +00:00
loopStart(-1),
2022-01-24 22:13:47 +00:00
loopOffP(0),
vol(0),
pitch(0),
depth(16),
data(NULL),
rendLength(0),
2021-12-11 03:51:50 +00:00
adpcmRendLength(0),
2021-12-11 04:41:00 +00:00
rendOff(0),
rendOffP(0),
rendOffContiguous(0),
2021-12-10 09:22:13 +00:00
rendData(NULL),
adpcmRendData(NULL) {}
~DivSample();
};