MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / reset

Method reset

extlibs/soloud/src/audiosource/tedsid/sid.cpp:191–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void SIDsound::reset(void)
192{
193 volume = masterVolume;
194
195 lastByteWritten = 0;
196
197 for (int v=0; v<3; v++) {
198 voice[v].wave = WAVE_NONE;
199 voice[v].egState = EG_FROZEN;
200 voice[v].accu = voice[v].add = 0;
201 voice[v].freq = voice[v].pw = 0;
202 voice[v].envCurrLevel = voice[v].envSustainLevel = 0;
203 voice[v].gate = voice[v].ring = voice[v].test = 0;
204 voice[v].filter = voice[v].sync = false;
205 voice[v].muted = 0;
206 // Initial value of internal shift register
207 voice[v].shiftReg = 0x7FFFFC;
208 voice[v].envExpCounter = 0;
209 voice[v].envAttackAdd = voice[v].envDecaySub = voice[v].envReleaseSub = 0;
210 voice[v].envCounterCompare = RateCountPeriod[0];
211 voice[v].envCounter = 0x7fff;
212 }
213
214 filterType = FILTER_NONE;
215 filterCutoff = filterResonance = 0;
216
217 Vhp = Vbp = Vlp = 0;
218 setFilterCutoff();
219 setResonance();
220
221 dcDigiBlaster = 0;
222 clockDeltaRemainder = 0;
223}
224
225inline int SIDsound::getWaveSample(SIDVoice &v)
226{

Callers 3

dropMethod · 0.45
drop_allMethod · 0.45
shutdownMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected