PlayOps.mesa
Last Edited by: Pier, May 4, 1984 11:58:31 am PDT
DIRECTORY
Window USING [Handle],
Rope USING [ROPE],
Basics USING [UnsafeBlock];
PlayOps: DEFINITIONS = {
PlayTuneProc: TYPE = PROCEDURE [
music: Rope.ROPE, file, random: BOOLEANFALSE, beepProc: BeepProc ← NIL, chunkSize: CARDINAL ← 75];
music is either a rope of muscial characters encoded via the Play encoding or, if file=TRUE, the name of a file to read for such a musical encoding. If random=TRUE, music is a random text string to be interpreted as music. A beepProc is a callback procedure, provided by the caller who knows how to make noises. This will be better implemented soon.
BeepProc: TYPE = PROC[beepFreq: CARDINAL, beepTime: CARDINAL]; --Hertz and millisecs
PlayString: PlayTuneProc;
PlayBlock: PROCEDURE [
musicBlock: Basics.UnsafeBlock, random: BOOLEANFALSE,
beepProc: BeepProc, --callback proc provided by caller
chunkSize: CARDINAL ← 75, quietFinish: BOOLEANTRUE
--wh: Window.Handle ← NIL--];
}.