ViewVoiceRopeImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Doug Terry, April 9, 1986 9:48:04 pm PST
Swinehart, June 25, 1986 11:31:26 am 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, voiceRopeDBInstance: Rope.ROPENIL, localName: Rope.ROPENIL] RETURNS [] ~ {
handle ← VoiceRope.Open[voiceRopeDBName, voiceRopeDBInstance, localName];
};
Record: PUBLIC PROC [] RETURNS [voiceRope: ID] ~ {
voiceRope ← VoiceRope.Record[handle].ropeID;
};
Play: PUBLIC PROC [refID: Rope.ROPENIL, refIDType: Rope.ROPENIL, voiceRope: IDNIL, queueIt: BOOLTRUE, failOK: BOOLFALSE, wait: BOOLFALSE] RETURNS [] ~ {
VoiceRope.Play[handle, Vr[voiceRope], queueIt, failOK];
};
Stop: PUBLIC PROC [] RETURNS [] ~ {
VoiceRope.Stop[handle];
};
Retain: PUBLIC PROC [voiceRope: ID, refID: Rope.ROPE, refIDType: Rope.ROPE] RETURNS [] ~ {
VoiceRope.Retain[handle, Vr[voiceRope], refID, refIDType];
};
Forget: PUBLIC PROC [refID: Rope.ROPE, refIDType: Rope.ROPE] RETURNS [] ~ {
VoiceRope.Forget[handle, refID, refIDType];
};
Cat: PUBLIC PROC [vr1, vr2, vr3, vr4, vr5: ID ← NIL] RETURNS [new: ID] ~ {
new ← VoiceRope.Cat[handle, Vr[vr1], Vr[vr2], Vr[vr3], Vr[vr4], Vr[vr5]].ropeID;
};
Substr: PUBLIC PROC [vr: ID, start: INT ← 0, len: INTLAST[INT]] RETURNS [new: ID] ~ {
new ← VoiceRope.Substr[handle, Vr[vr], start, len].ropeID;
};
Replace: PUBLIC PROC [vr: ID, start: INT ← 0, len: INTLAST[INT], with: ID ← NIL] RETURNS [new: ID] ~ {
new ← VoiceRope.Replace[handle, Vr[vr], start, len, Vr[with]].ropeID;
};
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]]];
};
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