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:
Mr.Blinky 2018-09-21 00:32:21 +02:00 committed by GitHub
parent 02aa13d078
commit 0de4b41588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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));