## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### PMADDE Script Interface

To pipe a test script that already exists into the program, select Run Script File from the Options menu. [Artwork not shown]

Select the script file you want to pipe into the PMADDE program, and select OK. If the script file exists, the user interface of the PMADDE program is disabled and commands are accepted from the script file only. The following figure is an example of a PMADDE test script.

    ;*****************************************************
    ;**  Audio Device Driver Exerciser V 1.0
    ;**    Test Script File.
    ;*****************************************************
    BEGIN                 ;
    DEVICENAME AUDIO1$    ; device name
    GETHANDLER  AUDIOSH$  ; stream handler name
    GETHANDLER  FSSH      ;
    CREATE  3  2  3       ; Source ID, Target ID & Data type index
    SLEEP 1000            ; Sleep for 1000 milliseconds
    CREATE  3  2  3       ;
    SLEEP 1000            ;
    ASSOCIATE  1  WELCOM.WAV  ; stream number & Audio file
    SLEEP 1000            ;
    ASSOCIATE  2  PMADDE.WAV  ;
    SLEEP 1000            ;
    START  1  0           ; stream number & flag (0=Start, 1=Preroll)
    SLEEP 5000            ;
    START  2  0           ;
    END                   ;

The following information describes the syntax associated with the PMADDE script language.

Syntax Description

BEGIN Starts the script file.

DEVICENAME device name Specifies the physical device name.

CREATE hidSource hidTarget datatype Creates a data stream of datatype from hidSource to hidTarget. Select SpiCreate from the Data Stream menu to view the stream data types available. The data types listed correspond to a number beginning with 0. The second data type in the list is 1, the third is 2, and so on. To create a data stream from FSSH to AUDIOSH$ of data type PCM, 16-bit, 44 kHz, and mono, type the following:

    CREATE 4 2 3;

ASSOCIATE stream # filename Associates a data stream with a data object.

START stream# startflags Starts a data stream. The startflags can be one of the following:

PREROLL
START

STOP stream# stopflags Stops a data stream. The stopflags can be one of the following:

FLUSH
DISCARD
PAUSE

SEEK stream# mode units position Seeks to the specified position in the data stream using the specified units and specified mode.

DESTROY stream# Destroys the specified stream.

QRYTIME stream# Queries the stream time of the specified stream.

SLEEP sleepinterval Suspends execution of the script file for the duration of the

END Ends the script file.

You can also create a test script by recording your keystrokes to be piped into the PMADDE program at a later time. You must specify a name for the script file you want to create when starting the PMADDE program. If the script file exists, the user interface is disabled and commands are accepted from the script file only. If the script file specified does not already exist, all actions are recorded and a script file is created. For example, to create a script file named TEST.SCR, use the following syntax:

    PMADDE TEST.SCR logfile

Note: You must specify a logfile (for example, TEST.LOG) when creating a test script. If you are using the command-line interface to execute a test script that already exists, you must also specify a logfile.