Jump to content

PLAY (CD/XA Commands)

From EDM2

The PLAY command starts playing audio.

Syntax

play object keywords

Syntax Diagram

PLAY ──── object ────┬───────────┬────┬──────────┬────┤
                     ├─ FROM pos─┤    ├─ WAIT ───┤
                     └─ TO pos ──┘    └─ NOTIFY ─┘

Parameters

object
Object associated with this media control interface command. The object can be one of the following:
  • Device type
  • Device name
  • Filename
  • Alias
FROM pos
The position to start playing. If FROM is omitted, the device starts playing at the current position. If the FROM position is greater than the end position of the disc, or if the FROM position is greater than the TO position, an error is returned.
TO pos
The position to stop playing. If TO is omitted, play stops at the end of the disc. If the TO position is greater than the length of the disc, it receives an MCIERR_OUTOFRANGE error.
WAIT
The command is executed synchronously. The function waits until the requested action is complete before returning to the application.
NOTIFY
The command is executed asynchronously, allowing control to be returned immediately to the application. When the requested action is complete, an MM_MCINOTIFY message is sent to the application window procedure.

Example Code

play cdxa from 10000 to 50000 wait