Browse code

update for C++17 compliance, update to latest 2sf, add WINE cross-compile makefiles

Adam Higerd authored on 2021/02/11 15:36:17
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,21 @@
1
+#ifndef ADPCMDECODER_H
2
+#define ADPCMDECODER_H
3
+
4
+#include <vector>
5
+#include <cstdint>
6
+
7
+class AdpcmDecoder
8
+{
9
+private:
10
+  int16_t predictor;
11
+  int8_t index;
12
+
13
+public:
14
+  AdpcmDecoder(int16_t initialPredictor, int16_t initialStep);
15
+  int16_t getNextSample(uint8_t value);
16
+
17
+  std::vector<int16_t> decode(const std::vector<char>& data, uint32_t offset = 0, uint32_t length = 0);
18
+  static std::vector<int16_t> decodeFile(const std::vector<char>& data, uint32_t offset = 0, uint32_t length = 0);
19
+};
20
+
21
+#endif