home *** CD-ROM | disk | FTP | other *** search
- on InitSnd
- mixDown(1, 0)
- mixDown(2, 0)
- PlaySound(1, "Silence", 0, 0)
- PlaySound(2, "Silence", 0, 0)
- end
-
- on PlayBackSnds
- global BackSnds, PlayBS
- if PlayBS then
- set SndPlay to random(4)
- PlaySound(2, BackSnds(mget, SndPlay), 0, 0)
- end if
- end
-
- on PlaySound chan, sndName, wait, fade
- global moviePath, chanvols, Cnt
- if sndName <> "Silence" then
- put "PlaySound: file=", moviePath & "sounds:" & sndName && "Chan:" & chan
- end if
- set Vol to chanvols(mget, chan)
- if fade = 0 then
- set the volume of sound chan to 0
- sound stop chan
- else
- if soundBusy(chan) then
- repeat with i = 0 to Vol
- set the volume of sound chan to Vol - i
- set i to i + 50
- end repeat
- sound stop chan
- end if
- end if
- if the machineType = 256 then
- sound playFile chan, moviePath & "sounds\" & sndName
- else
- sound playFile chan, moviePath & "sounds:" & sndName
- end if
- if fade = 0 then
- set the volume of sound chan to Vol
- else
- set i to 1
- repeat while i < Vol
- set the volume of sound chan to i
- set i to i + 10
- end repeat
- end if
- if wait = 1 then
- repeat while soundBusy(chan)
- if the controlDown then
- set Cnt to 1
- sound stop chan
- end if
- go(the frame)
- end repeat
- end if
- end
-
- on keySound sound
- global Instruct
- if Instruct <> 1 then
- cursor(4)
- end if
- if the machineType = 256 then
- PlaySound(1, "NavVocal\" & sound, 1, 1)
- else
- PlaySound(1, "NavVocal:" & sound, 1, 1)
- end if
- if Instruct <> 1 then
- cursor(-1)
- end if
- end
-
- on CardSound sound
- global author, Cnt
- cursor(4)
- if author = "Foster" then
- if the machineType = 256 then
- PlaySound(1, "3word\Foster\" & sound, 1, 1)
- else
- PlaySound(1, "3word:Foster:" & sound, 1, 1)
- end if
- else
- if the machineType = 256 then
- PlaySound(1, "3word\Waite\" & sound, 1, 1)
- else
- PlaySound(1, "3word:Waite:" & sound, 1, 1)
- end if
- end if
- set Cnt to 0
- cursor(-1)
- end
-
- on MixUp chan, amnt
- set curr to the volume of sound chan
- if soundBusy(chan) then
- repeat with i = 1 to amnt - curr
- set the volume of sound chan to curr + i
- end repeat
- end if
- end
-
- on mixDown chan, amnt
- set curr to the volume of sound chan
- if soundBusy(chan) then
- repeat with i = 1 to curr - amnt
- set the volume of sound chan to curr - i
- end repeat
- end if
- end
-