ENTERPROC
の注意EnterProc
の関数アドレスを設定する方法が、FB2とFB3では違います。(Sample)
"SndCallBack"
ENTERPROC
gPlayOff = _ztrue
FN DisposeSndChannel(gSndChanPtr&)
EXITPROC
LOCAL MODE
LOCAL FN SetupChannel(whichSynth,InitParam)
DIM @sndPtr&,CB&,OSErr
sndPtr&=0:' set this to zero to start with
'FB2
'CB&=
LINE "SndCallBack":' this is how we specify a callback routine'
'FB3
CB&=
PROC "SndCallBack":' this is how we specify a callback routineOSErr=FN SNDNEWCHANNEL(sndPtr&,whichSynth,InitParam,CB&)
LONG IF OSErr<>_noErr:' make sure we didn't get an error
sndPtr&=0:' we return a zero
END IF
END FN=sndPtr&:' returns a sound channel pointer