A memory playlist is a data structure in your application. It contains an array of simple, machine-like instructions, or commands, each of which has a fixed format consisting of a 32-bit operation code and three 32-bit operands.
Using playlist instructions, you can play audio objects in succession from one or more memory buffers. Instructions include branching to and returning from subroutines within the playlist. In addition, the playlist can be modified dynamically by the application while it is being played.
The MCI_OPEN_PLAYLIST flag is specified for the MCI_OPEN command message to indicate that the pszElementName field in the MCI_OPEN_PARMS data structure is a pointer to a memory playlist. The following table lists and describes the playlist instructions.
┌────────────────────┬────────────────────────────────────────┐ │Command │Description │ ├────────────────────┼────────────────────────────────────────┤ │BRANCH_OPERATION │Transfers control to another instruction│ │ │in the playlist. │ ├────────────────────┼────────────────────────────────────────┤ │CALL_OPERATION │Transfers control to the instruction │ │ │specified in Operand 2, saving the │ │ │number of the instruction following the │ │ │CALL_OPERATION for use on a │ │ │RETURN_OPERATION. │ ├────────────────────┼────────────────────────────────────────┤ │CUEPOINT_OPERATION │Causes a cue-point data record to be │ │ │entered into the data stream. │ ├────────────────────┼────────────────────────────────────────┤ │DATA_OPERATION │Specifies a data buffer to be played │ │ │from or recorded into. │ ├────────────────────┼────────────────────────────────────────┤ │EXIT_OPERATION │Indicates the end of the playlist. │ ├────────────────────┼────────────────────────────────────────┤ │LOOP_OPERATION │Controls iteration in a playlist. │ ├────────────────────┼────────────────────────────────────────┤ │MESSAGE_OPERATION │Returns a message to the application │ │ │during playlist processing. │ │ │MESSAGE_OPERATION statements can be used│ │ │by the application to trace specific │ │ │points during the execution of the │ │ │playlist processor. │ ├────────────────────┼────────────────────────────────────────┤ │NOP_OPERATION │Used as a placeholder. │ ├────────────────────┼────────────────────────────────────────┤ │RETURN_OPERATION │Transfers control to the playlist │ │ │instruction following the most recently │ │ │executed CALL_OPERATION. │ ├────────────────────┼────────────────────────────────────────┤ │SEMPOST_OPERATION │Causes the playlist processor to post an│ │ │event semaphore. The playlist processor│ │ │will call DosWaitEventSem. │ ├────────────────────┼────────────────────────────────────────┤ │SEMWAIT_OPERATION │Causes the playlist processor to wait on│ │ │a semaphore. The playlist processor will│ │ │call DosWaitEventSem. │ └────────────────────┴────────────────────────────────────────┘
Playlist Instructions
The commands and their descriptions (including operand information) follow:
BRANCH_OPERATION
Operand 1
An application can enable or disable a BRANCH_OPERATION by exchanging it with a NOP_OPERATION. Operands for a NOP_OPERATION are ignored.
CALL instructions may be nested up to 20 levels.
Operand 1
Operand 1
Note: The CUEPOINT instruction is ignored when used in a recording operation.
Operand 1
The current position in the buffer is particularly important after a recording operation, because this field contains the number of bytes of recorded data. The remaining bytes in the buffer are not valid.
The address range of a DATA statement cannot overlap the address range of any another DATA statement. However, the same DATA statement can be repeated.
Operand 1
Operand 1
It is the application's responsibility to see that iteration count values are what is required when switching from play to record, record to play, and when changing settings for the data (for example, bitspersample, samplespersec, and so on) with the set command. These commands cause the playlist stream to be destroyed and re-created, and the playlist to be reassociated as a new playlist with the playlist processor.
Operand 1
Note: This function is not intended to be used for timing of data production or consumption identified by previously interpreted instructions.
Operand 1
Operand 1
Operand 1
Operand 1