MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / StoreWaves

Method StoreWaves

Source/InstCompiler.cpp:136–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136int CInstCompilerN163::StoreWaves(const CInstrumentN163 &inst, CChunk &chunk) const {
137 int Count = inst.GetWaveCount();
138 int Size = inst.GetWaveSize();
139
140 // Number of waves
141 // chunk.StoreByte(Count);
142
143 // Pack samples
144 for (int i = 0; i < Count; ++i)
145 for (int j = 0; j < Size; j += 2)
146 chunk.StoreByte(inst.GetSample(i, j) | (inst.GetSample(i, j + 1) << 4));
147
148 return Count * Size / 2;
149}

Callers 1

CreateInstrumentListMethod · 0.80

Calls 4

GetWaveCountMethod · 0.80
GetWaveSizeMethod · 0.80
StoreByteMethod · 0.80
GetSampleMethod · 0.45

Tested by

no test coverage detected