Intervoice.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Swinehart, January 31, 1986 7:11:13 pm PST
DIRECTORY Rope USING [ROPE];
Intervoice: CEDAR DEFINITIONS = {
For now, procedures for managing recorded voice; later, intend to launder FinchSmarts routines for telephone management and include them here.
Handle: TYPE=REF HandleRec;
HandleRec: TYPE;
Open: PROC [
If tunesDBName, tunesDBInstance, or localName is omitted, a default based on the user profile choice of Thrush Server is invented. If Complain is omitted, Log.Problem[...$Finch] is used. See VoiceDB for meaning of the names.
tunesDBName: Rope.ROPENIL,
tunesDBInstance: Rope.ROPENIL,
localName: Rope.ROPENIL,
Complain: PROC[complaint: Rope.ROPE] ← NIL
]
RETURNS[handle: Handle];
In all the routines that follow, if handle is omitted, one will be invented using all the defaults.
Record: PROC[handle: Handle←NIL] RETURNS [voiceFileID: Rope.ROPE];
Records a tune, registers it in the VoiceDB, returns its ID.
NIL return value indicates that something went wrong.
Play: PROC[
handle: Handle←NIL,
Play a specified utterance.
refID: Rope.ROPENIL, refIDType: Rope.ROPENIL, voiceFileID: Rope.ROPENIL,
Either refID or voiceFileID must be NIL; if refID#NIL, refIDType must be non-NIL
queueIt: BOOLTRUE, -- play after all other record/playback requests are satisfied.
failOK: BOOLFALSE, -- playing is optional; leave connection open if tune doesn't exist.
wait: BOOLFALSE -- wait until things appear to be started properly, or have failed
];
N.B.: System noises, like Beeps and intolerably cute rollback tunes are indexed in the refsToTunesDB database as refID's like "beep", "rollback", and so on, under the refIDType "SysNoises"
Stop: PROC[handle: Handle];
Stops any recording or playback in progress.
Retain: PROC [
Existence of refID retains interest in voiceFileID until corresponding Forget.
Creator is assumed to be logged-in user.
handle: Intervoice.Handle,
voiceFileID: Rope.ROPE,
refID: Rope.ROPE,
refIDType: Rope.ROPE
];
Forget: PROC [
Remove refID from database, eliminating its interest in any voiceFileID's
Creator is assumed to be logged-in user.
handle: Intervoice.Handle,
refID: Rope.ROPE,
refIDType: Rope.ROPE
];
}.
Swinehart, January 30, 1986 9:34:42 am PST
Created from WalnutVoiceImpl routines; voice message facilities, without Walnut specifics