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: