<> <> <> <<>> <> <<>> DIRECTORY Rope, ViewVoiceRope, VoiceRope; ViewVoiceRopeImpl: CEDAR PROGRAM IMPORTS VoiceRope EXPORTS ViewVoiceRope ~ 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 _ Id[VoiceRope.Record[handle]]; }; <<>> 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] ~ { 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: INT _ LAST[INT]] RETURNS [new: ID] ~ { new _ Id[VoiceRope.Substr[handle, Vr[vr], start, len]]; }; <<>> Replace: PUBLIC PROC [vr: ID, start: INT _ 0, len: INT _ LAST[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. <> <> <> <> <> <> <<>> <> <> <> <> <> <> <> <> <> <> <<>>