MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / gmext_write_delta

Function gmext_write_delta

src/Engine/GMCat.cpp:104–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104static inline void gmext_write_delta (std::vector<unsigned char> &midi,
105 unsigned int delta)
106{
107 unsigned char data[4];
108 unsigned int i = 0;
109
110 delta &= ((1<<28)-1);
111 do {
112 data[i++] = delta & 0x7F;
113 delta >>= 7;
114 } while (delta > 0);
115
116 while (--i)
117 midi.push_back(data[i] | 0x80);
118
119 midi.push_back(data[0]);
120}
121
122static inline void gmext_write_tempo_ev (std::vector<unsigned char> &midi,
123 unsigned int tempo)

Callers 2

gmext_write_sequenceFunction · 0.85
gmext_write_midiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected