17 Wave(
const char* dbg);
18 Wave(
const int16_t* pcm,
size_t count);
60 std::vector<WaveSampleLoop>
loop;
65 void save(
const char* path)
const;
71 struct AdpcHdrMono final {
77 struct AdpcHdrStereo final {
79 int16_t prevFrames1[2];
80 int16_t prevFrames0[2];
83 struct AdpcChannel final {
86 int32_t prevFrames[2];
89 struct AdpcState final {
90 int32_t cachedFrames[MAX_CACHED_FRAMES];
91 uint32_t cachedFrameCount;
92 AdpcChannel channel[2];
95 void implRead(Riff &input);
96 void implParse(Riff &input);
98 size_t decodeAdpcm(Tempest::MemReader& rd,
const size_t framesToRead,
99 uint16_t blockAlign, uint16_t channels, int16_t* pBufferOut);
100 size_t decodeAdpcmBlock(Tempest::MemReader& rd,
const size_t framesToRead,
101 uint16_t blockAlign, uint16_t channels, int16_t* pBufferOut);
102 int32_t decodeADPCMFrame(AdpcChannel& msadpcm, int32_t nibble);