PlayOps.mesa
Last Edited by: Pier, May 4, 1984 11:58:31 am PDT
Last Edited by: Swinehart, July 30, 1984 2:55:07 pm PDT
DIRECTORY
Window USING [Handle],
Rope USING [ROPE],
Basics USING [UnsafeBlock];
PlayOps: DEFINITIONS = {
PlayTuneProc:
TYPE =
PROCEDURE [
music: Rope.ROPE, file, random: BOOLEAN ← FALSE, 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, notify: BOOL←FALSE, pause: BOOL←FALSE]; --Hertz and millisecs
PlayString: PlayTuneProc;
PlayBlock:
PROCEDURE [
musicBlock: Basics.UnsafeBlock, random: BOOLEAN ← FALSE,
beepProc: BeepProc, --callback proc provided by caller
chunkSize: CARDINAL ← 75, quietFinish: BOOLEAN ← TRUE
--wh: Window.Handle ← NIL--];
}.