Pierluigi Bettitoni
"Intelligent Music Workstation", CD-ROM, Winter 1994
© IEEE Computer Society Press.


{This function writes a Cue Point}

Function W_CuePtEvt;

VAR
err : OSerr;
len : longint;
inttemp : integer;
BEGIN
err := WriteVarLen(FileRef, DeltaTime); {writes the DeltaTime}
IF err < > 0 THEN
BEGIN
FindWhichError(err);
W_CuePtEvt := err;
END;
len := 1;
inttemp := $FF; {means the beginning of a Meta Event}
err := FSWrite(FileRef, len, pointer(ORD4(@inttemp) + 1)); {writes 'FF'}
IF err < > 0 THEN
BEGIN
FindWhichError(err);
W_CuePtEvt := err;
END;
len := 1;
inttemp := $07; {type of this Meta Event}
err := FSWrite(FileRef, len, pointer(ORD4(@inttemp) + 1)); {writes '07'}
IF err < > 0 THEN
BEGIN
FindWhichError(err);
W_CuePtEvt := err;
END;
err := WriteVarLen(FileRef, ThisLength); {writes the amount of data bytes}
IF err < > 0 THEN
BEGIN
FindWhichError(err);
W_CuePtEvt := err;
END;
len := ThisLength;
err := FSWrite(FileRef, len, MetaPtr); {writes the text bytes}
IF err < > 0 THEN
BEGIN
FindWhichError(err);
W_CuePtEvt := err;
END;
END;{of W_CuePtEvt}


[ Index | Glossary | Main Paragraph ]