Fixed interrupt glitch in ATMlib.play() p2
Disabled timer/counter 4 overflow interrupt at beginning of play() to prevent bad sounds from being played when song is changed while playing
This commit is contained in:
parent
02aa13d078
commit
0de4b41588
|
@ -109,6 +109,7 @@ static inline const byte *getTrackPointer(byte track) {
|
||||||
|
|
||||||
|
|
||||||
void ATMsynth::play(const byte *song) {
|
void ATMsynth::play(const byte *song) {
|
||||||
|
TIMSK4 = 0b00000000;// ensure interrupt is disabled
|
||||||
cia_count = 1;
|
cia_count = 1;
|
||||||
// cleanUp stuff first
|
// cleanUp stuff first
|
||||||
memset(channel, 0, sizeof(channel));
|
memset(channel, 0, sizeof(channel));
|
||||||
|
|
Loading…
Reference in New Issue