ViewVoiceRopeImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Doug Terry, July 1, 1986 9:56:21 am PDT
~
BEGIN OPEN ViewVoiceRope
;
handle: VoiceRope.Handle;
Open:
PUBLIC
PROC [voiceRopeDBName: Rope.
ROPE ←
NIL, localName: Rope.
ROPE ←
NIL]
RETURNS [] ~ {
handle ← VoiceRope.Open[voiceRopeDBName: voiceRopeDBName, localName: localName];
};
Record:
PUBLIC
PROC []
RETURNS [voiceRope: ID] ~ {
voiceRope ← VoiceRope.Record[handle].ropeID;
};
Play:
PUBLIC
PROC [voiceRope:
ID, queueIt:
BOOL←
TRUE, failOK:
BOOL←
FALSE, wait:
BOOL←
FALSE]
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.
ROPE ←
NIL]
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] ~ {
vr: VoiceRope.VoiceRope ← VoiceRope.GetByInterest[handle, class, refID];
voiceRope ← IF vr = NIL THEN NIL ELSE vr.ropeID;
};
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:
INT ←
LAST[
INT]]
RETURNS [new: ID] ~ {
new ← VoiceRope.Substr[handle, Vr[vr], start, len].ropeID;
};
Replace:
PUBLIC
PROC [vr: ID, start:
INT ← 0, len:
INT ←
LAST[
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]]];
};
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