You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The call to engine_timer_expired is in update_clocks(), but as that is called with the number of samples before the stepped call to m_chip.generate, the results will probably not match hardware as apparently one timer is tied to Key Down.
voidupdate_clocks(intcycles) {
m_busy_timer=std::max(0, m_busy_timer- (64*cycles));
for (inti=0; i<2; ++i) {
if (m_timers[i] >0) {
m_timers[i] =std::max(0, m_timers[i] - (64*cycles));
if (m_timers[i] <= 0) {
m_engine->engine_timer_expired(i);
}
}
}
}
...
voidgenerate(int16_t*output, uint32_tnumsamples) {
ints=0;
intls, rs;
update_clocks(numsamples);
for (uint32_ti=0; i<numsamples; i++) {
m_chip.generate(&opm_out);
ls=opm_out.data[0];
rs=opm_out.data[1];
if (ls<-32768) ls=-32768;
if (ls>32767) ls=32767;
if (rs<-32768) rs=-32768;
if (rs>32767) rs=32767;
output[s++] =ls;
output[s++] =rs;
}
}
The text was updated successfully, but these errors were encountered:
The call to
engine_timer_expired
is inupdate_clocks()
, but as that is called with the number of samples before the stepped call tom_chip.generate
, the results will probably not match hardware as apparently one timer is tied to Key Down.The text was updated successfully, but these errors were encountered: