29 explicit TsxParser(std::span<const uint8_t> file);
31 [[nodiscard]] std::vector<int8_t>&&
stealOutput() {
return std::move(output); }
32 [[nodiscard]] std::optional<FileType>
getFirstFileType()
const {
return firstFileType; }
33 [[nodiscard]]
const std::vector<std::string>&
getMessages()
const {
return messages; }
85 std::array<char, 0x10> label;
101 void processBlock10(
const Block10& b);
102 void processBlock11(
const Block11& b);
103 void processBlock12(
const Block12& b);
104 void processBlock13(
const Block13& b);
105 void processBlock15(
const Block15& b);
106 void processBlock20(
const Block20& b);
107 void processBlock21(
const Block21& b);
108 void processBlock30(
const Block30& b);
109 void processBlock32(
const Block32& b);
110 void processBlock35(
const Block35& b);
111 void processBlock4B(
const Block4B& b);
113 void writeSample(uint32_t tStates, int8_t value);
114 void writePulse(uint32_t tStates);
115 void writePulses(uint32_t count, uint32_t tStates);
116 void writeSilence(
int s);
118 template<
typename T> std::span<const T> get(
size_t count);
119 template<
typename T>
const T& get();
121 [[noreturn]]
void error(std::string msg)
const;
125 std::vector<int8_t> output;
126 std::vector<std::string> messages;
127 std::optional<FileType> firstFileType;
130 std::span<const uint8_t> buf;
133 float accumBytes = 0.f;
134 int8_t currentValue = 127;