mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 01:29:28 +00:00
fixed zsound pcm player example
This commit is contained in:
parent
8f9a0a244a
commit
43c7b935df
@ -24,6 +24,7 @@ zsound_lib:
|
||||
|
||||
const ubyte digi_bank = 1
|
||||
const uword digi_address = $a000
|
||||
const ubyte zcm_DIGITAB_size = 8 ; header size
|
||||
|
||||
sub start() {
|
||||
txt.print("zsound pcm digi demo program!\n")
|
||||
@ -33,6 +34,11 @@ zsound_lib:
|
||||
return
|
||||
}
|
||||
|
||||
cx16.rambank(digi_bank)
|
||||
; initialize header pointer of the zcm to point to actual sample data
|
||||
poke(digi_address+2, digi_bank)
|
||||
pokew(digi_address, digi_address+zcm_DIGITAB_size)
|
||||
|
||||
pcm_init()
|
||||
txt.print("playing digi! hit enter to stop.\n")
|
||||
pcm_trigger_digi(digi_bank, digi_address)
|
||||
|
@ -36,7 +36,7 @@ zsound_lib:
|
||||
romsub $0850 = zsm_clearcallback() clobbers(A)
|
||||
romsub $0853 = zsm_get_music_speed() clobbers(A) -> uword @XY
|
||||
|
||||
const ubyte song_bank = 1
|
||||
const ubyte song_bank = 4
|
||||
const uword song_address = $a000
|
||||
|
||||
sub start() {
|
||||
@ -46,7 +46,7 @@ zsound_lib:
|
||||
txt.print("?can't load song\n")
|
||||
return
|
||||
}
|
||||
cx16.rambank(1) ; ram bank to default
|
||||
cx16.rambank(song_bank)
|
||||
|
||||
zsm_init()
|
||||
zsm_setcallback(&end_of_song_cb)
|
||||
|
Loading…
Reference in New Issue
Block a user