DIRECTORY Booting USING [ RegisterProcs, CheckpointProc ], Process USING [ Detach, MsecToTicks, Pause ], Rope USING [ ROPE ], UserProfile USING [ Token ], VoiceRope USING [ GetByInterest, Handle, Open, Play, VoiceRope ], VoiceUtils USING [ MakeAtom ] ; PlayNoiseImpl: CEDAR PROGRAM IMPORTS Booting, Process, UserProfile, VoiceRope, VoiceUtils = { reallyBoot: BOOL_TRUE; didOurBest: BOOL; maxTime: CARDINAL _ 4000; PlayTheRollbackButton: Booting.CheckpointProc = TRUSTED { IF VoiceUtils.MakeAtom[UserProfile.Token["Finch.NoisyBoot", "false"]] # $true THEN RETURN; PlayAButton["Rollback"]; IF ~reallyBoot THEN rejection _ "Just pretending"; }; PlayAButton: PROC[name: Rope.ROPE] = TRUSTED { didOurBest _ FALSE; Process.Detach[FORK ReallyPlayAButton[name]]; FOR i: NAT IN [0..100) DO Process.Pause[Process.MsecToTicks[maxTime/100]]; IF didOurBest THEN EXIT; ENDLOOP; }; ReallyPlayAButton: PROC[name: Rope.ROPE] = { C: PROC[complaint: Rope.ROPE] = {NULL}; -- Don't bother complaining. handle: VoiceRope.Handle = VoiceRope.Open[Complain: C]; vr: VoiceRope.VoiceRope = VoiceRope.GetByInterest[handle: handle, class: "SysNoises", refID: name]; VoiceRope.Play[handle: handle, voiceRope: vr, wait: TRUE]; didOurBest _ TRUE; }; Booting.RegisterProcs[c: PlayTheRollbackButton, r: NIL, b: PlayTheRollbackButton]; }. ψPlayNoiseImpl.mesa Last Edited by: Swinehart, June 21, 1986 7:29:12 pm PDT Doug Terry, July 30, 1986 5:00:49 pm PDT Doug Terry, July 30, 1986 5:00:08 pm PDT Upgraded to use VoiceRope changes to: DIRECTORY, PlayNoiseImpl, ReallyPlayAButton Κβ˜J™™7Icode™(—J™šΟk ˜ Jšœœ#˜0Jšœœ ˜-Jšœœœ˜Jšœ œ ˜Jšœ œ2˜AJšœ œ ˜J˜J˜—šœœœ˜Jšœ9˜@J˜Jšœ œœ˜Jšœ œ˜Jšœ œ˜J˜šΟbœœ˜9šœK˜MJšœœ˜ —J˜Jšœ œ˜2J˜J˜—šΠbn œœ œœ˜.Jšœ œ˜Jšœœ˜-šœœœ ˜J˜0Jšœ œœ˜Jšœ˜—J˜J˜—šΟnœœ œ˜,Jš  œœœœΟc˜DJšœ7˜7Jšœc˜cJšœ4œ˜:Jšœ œ˜J˜J˜—Jšœ3œ˜RJ˜—J˜K™™(K™Kšœ Οr+™7—K™—…—"ό