Quote:
Originally Posted by Coagulus
Glad you've found that. Thought i was going loopy. Next question is can a sound effect be forced into one only though. (My next game. which I'm about half way through coding already, uses 3 channels again.)
|
This should be possible with my converted version of the library. Look at the example I included:
Code:
WBStartup
INCLUDE "ptplayer_inc.bb2"
MTInstall 1 ; Install the CIA MOD player routine (1=PAL,0=NTSC)
LoadBank 0,"playingw.mod",2 ; Load a module into chipmem
addrMod.l=Bank(0) ; Get the pointer to the module
DEFTYPE .sfx clap ; Create a sfx instance
LoadSound 0,"909Clap.iff" ; Load a sound
; Initialize a sfx for ptplayer
SFXInit{&clap,0,64,-1,1} ; {*pointer.sfx, sound_index, volume, channel (-1=best), priority (>0) }
MTInit 0,0 ; Initialize a module from bank 0, start position = 0
MTPlay On ; Start playing the module
While Joyb(0)<2
VWait
If Joyb(0)=1
MTPlayFX &clap
EndIf
Wend
MTEnd ; Stop playing the current mod
MTRemove ; Remove the CIA MOD player routine
End
Here is the link to the library with the example:
http://eab.abime.net/showpost.php?p=...9&postcount=64