Jump to content

STATUS (CD Audio Commands)

From EDM2

The STATUS command retrieves current operational information and hardware states from the CD audio device.

Syntax

STATUS ── object ──┬─ CHANNELS ───┬─ TRACK number ─┬──┬──────────┬───┤
                   ├─ COPYPERMITTED ───────────────┤  ├─ WAIT   ─┤
                   ├─ CURRENT TRACK ───────────────┤  └─ NOTIFY ─┘
                   ├─ LENGTH ─────┬─ TRACK number ─┤
                   ├─ MEDIA PRESENT ───────────────┤
                   ├─ MODE ────────────────────────┤
                   ├─ NUMBER OF TRACKS ────────────┤
                   ├─ POSITION ───┬─ IN TRACK ─────┤
                   │              └─ TRACK number ─┘
                   ├─ PREEMPHASIS ┬─ TRACK number ─┤
                   ├─ READY ───────────────────────┤
                   ├─ START POSITION ──────────────┤
                   ├─ TIME FORMAT ─────────────────┤
                   ├─ TYPE ───────┬─ TRACK number ─┤
                   └─ VOLUME ──────────────────────┘

Keywords

object
The device type, name, filename, or alias.
CHANNELS [TRACK number]
Returns the number of audio channels.
COPYPERMITTED [TRACK number]
Returns TRUE if digital copying is allowed for the track.
CURRENT TRACK
Returns the index of the track currently being accessed or played.
LENGTH [TRACK number]
Returns the total length of the disc or the specific track.
MEDIA PRESENT
Returns TRUE if a disc is in the drive.
MODE
Returns the device state: not ready, stopped, playing, seeking, recording, paused, or other.
NUMBER OF TRACKS
Returns the total number of tracks available on the media.
POSITION [IN TRACK | TRACK number]
POSITION returns the total absolute position. IN TRACK returns position relative to track start. TRACK number returns the start position of that track.
PREEMPHASIS [TRACK number]
Returns TRUE if the track was recorded with high-frequency pre-emphasis.
READY
Returns TRUE if the device is powered on and capable of receiving commands.
TIME FORMAT
Returns the current time format (e.g., ms, tmsf).
TYPE [TRACK number]
Returns the track category: audio, data, or other.
VOLUME
Returns the volume level as a string format "left:right" (e.g., "90:90").
WAIT
Executes synchronously. Required to receive the return string.
NOTIFY
Executes asynchronously and sends an MM_MCINOTIFY message.

Purpose

The STATUS command is essential for UI feedback, allowing applications to display track progress, verify if a disc is inserted, or check if a track is data-only (to avoid playing noise).

Example

status cdaudio mode wait
*(Returns the current state, such as "playing" or "stopped")*