ViewVoiceRopeImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Doug Terry, October 9, 1986 8:28:35 pm PDT
Solely to use ViewRec for testing voice ropes.
DIRECTORY
Rope, ViewVoiceRope, VoiceRope;
ViewVoiceRopeImpl: CEDAR PROGRAM
IMPORTS VoiceRope
EXPORTS ViewVoiceRope
~ BEGIN OPEN ViewVoiceRope;
handle: VoiceRope.Handle;
Open: PUBLIC PROC [voiceRopeDBName: Rope.ROPENIL, localName: Rope.ROPENIL] RETURNS [] ~ {
handle ← VoiceRope.Open[voiceRopeDBName: voiceRopeDBName, localName: localName];
};
Record: PUBLIC PROC [] RETURNS [voiceRope: ID] ~ {
voiceRope ← Id[VoiceRope.Record[handle]];
};
Play: PUBLIC PROC [voiceRope: ID, queueIt: BOOLTRUE, failOK: BOOLFALSE, wait: BOOLFALSE] RETURNS [] ~ {
VoiceRope.Play[handle, Vr[voiceRope], queueIt, failOK, wait];
};
Stop: PUBLIC PROC [] RETURNS [] ~ {
VoiceRope.Stop[handle];
};
Retain: PUBLIC PROC [vr: ID, class: Rope.ROPE, refID: Rope.ROPE, other: Rope.ROPENIL] RETURNS [] ~ {
VoiceRope.Retain[handle, Vr[vr], class, refID, other];
};
Forget: PUBLIC PROC [vr: ID, class: Rope.ROPE, refID: Rope.ROPE] RETURNS [] ~ {
VoiceRope.Forget[handle, Vr[vr], class, refID];
};
GetByInterest: PUBLIC PROC [--handle: Handle ← NIL,-- class: Rope.ROPE, refID: Rope.ROPE] RETURNS [voiceRope: ID] ~ {
voiceRope ← Id[VoiceRope.GetByInterest[handle, class, refID]];
};
Cat: PUBLIC PROC [vr1, vr2, vr3, vr4, vr5: ID ← NIL] RETURNS [new: ID] ~ {
new ← Id[VoiceRope.Cat[handle, Vr[vr1], Vr[vr2], Vr[vr3], Vr[vr4], Vr[vr5]]];
};
Substr: PUBLIC PROC [vr: ID, start: INT ← 0, len: INTLAST[INT]] RETURNS [new: ID] ~ {
new ← Id[VoiceRope.Substr[handle, Vr[vr], start, len]];
};
Replace: PUBLIC PROC [vr: ID, start: INT ← 0, len: INTLAST[INT], with: ID ← NIL] RETURNS [new: ID] ~ {
new ← Id[VoiceRope.Replace[handle, Vr[vr], start, len, Vr[with]]];
};
Length: PUBLIC PROC [vr: ID] RETURNS [len: INT] ~ {
len ← VoiceRope.Length[handle, Vr[vr]];
};
DescribeRope: PUBLIC PROC [vr: ID, minSilence: INT ← -1] RETURNS [noise: VoiceRope.IntervalSpecs] ~ {
noise ← VoiceRope.DescribeRope[handle, Vr[vr], minSilence];
};
Vr: PROC [id: ID] RETURNS [vr: VoiceRope.VoiceRope] ~ {
IF id = NIL THEN vr ← NIL
ELSE vr ← NEW[VoiceRope.VoiceRopeInterval ← [id, 0, LAST[INT]]];
};
Id: PROC [vr: VoiceRope.VoiceRope] RETURNS [id: ID] ~ {
IF vr = NIL THEN id ← "NIL"
ELSE id ← vr.ropeID;
};
END.
Doug Terry, April 1, 1986 4:30:06 pm PST
changes to: DIRECTORY, ViewVoiceRopeImpl, IMPORTS, EXPORTS, ~, Open, Record, Play, Stop, Retain, Forget, Cat, Substr, Replace, Length
Doug Terry, April 1, 1986 4:30:33 pm PST
changes to: DIRECTORY, ViewVoiceRopeImpl, IMPORTS, EXPORTS, ~, Open, Record, Play, Stop, Retain, Forget, Cat, Substr, Replace, Length, END
Doug Terry, April 9, 1986 8:50:58 pm PST
changes to: Record, Play, Cat, Substr, Replace, Length, DescribeRope, Retain, Vr
Doug Terry, April 9, 1986 9:48:04 pm PST
changes to: Vr
Doug Terry, June 16, 1986 11:40:32 am PDT
changes to: Play, Retain, Forget
Doug Terry, June 17, 1986 1:49:00 pm PDT
changes to: GetByInterest, Cat
Doug Terry, July 1, 1986 9:56:21 am PDT
changes to: Open, GetByInterest
Doug Terry, October 9, 1986 8:28:35 pm PDT
changes to: Record, GetByInterest, Cat, Substr, Replace, Vr, Id