Skip to content

Commit

Permalink
ensure unused channels remain silent
Browse files Browse the repository at this point in the history
  • Loading branch information
sverx committed Mar 29, 2024
1 parent 5a7d514 commit c74f03c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/PSGlib.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ PSGPlay:
ld (PSGMusicSubstringLen),a ; reset the substring len (for compression)
ld a,PSGLatch|PSGChannel0|PSGVolumeData|$0F ; latch channel 0, volume=0xF (silent)
ld (PSGMusicLastLatch),a ; reset last latch to chn 0 volume 0
ld a,$0F ; ensure unused channels remain silent
ld (PSGChan0Volume),a
ld (PSGChan1Volume),a
ld (PSGChan2Volume),a
ld (PSGChan3Volume),a
ld a,PSG_PLAYING
ld (PSGMusicStatus),a ; set status to PSG_PLAYING
ret
Expand Down

0 comments on commit c74f03c

Please sign in to comment.