CONNECTION: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:CONNECTION}} The CONNECTION command returns information about the device context connections. ==Syntax== <PRE> CONNECTION ---- object ----+-----------------------+--+---------+-- +-- QUERY -------------+ +- QUEUE -+ | NUMBER connector_number | | TYPE connector_type | +-- ALIAS device_alias --+ +----------+-----------------------------------..." |
(No difference)
|
Latest revision as of 21:08, 25 November 2025
The CONNECTION command returns information about the device context connections.
Syntax
CONNECTION ---- object ----+-----------------------+--+---------+--
+-- QUERY -------------+ +- QUEUE -+
| NUMBER connector_number |
| TYPE connector_type |
+-- ALIAS device_alias --+
+----------+-------------------------------------------------+
| WAIT |
+----------+
| NOTIFY |
+----------+
Keywords
- object
- Object associated with this media control interface command. The object can be one of the following:
- Device type
- Device name
- Filename
- Alias
- QUERY
- Queries the connection as defined by the NUMBER and TYPE item. If a connection exists, the alias of the connected device is returned. If no alias is defined, then a null string is returned. If QUERY and ALIAS are both specified, then the specified alias name is returned and assigned, if possible. See the ALIAS keyword for more information on possible errors.
- NUMBER connector_number
- Indicates the connector number to which this query applies. If this item is omitted, then the first connector is assumed. If the TYPE keyword is included, then the connector number is interpreted as a relative offset within the specified connector type.
- Note: This keyword is used in conjunction with the QUERY keyword.
- TYPE connector_type
- The type of connector to which the requested action applies. The following connector types are defined:
- Note: This keyword is used in conjunction with the QUERY keyword.
- MIDI stream: Digital input or output for a sequencer device. This data is typically streamed to an amplifier mixer device.
- CD stream: Digital output for a CD audio device capable of reading the data directly off of a disk. The data is typically streamed to an amplifier mixer device.
- wave stream: Digital input or output for a waveform audio device. The data is typically streamed to an amplifier mixer device.
- XA stream: Digital output for a CD-ROM/XA device. The data is typically streamed to an amplifier mixer device.
- amp stream: Digital input or output for an amplifier mixer device.
- headphones: The connector on the device which is labeled or is typically used to attach headphones to the device.
- speakers: The connector on the device which is labeled or is typically used to attach speakers to the device.
- microphone: The connector on the device which is labeled or is typically used to attach a microphone to the device.
- line in: The connector on the device which is labeled or is typically used to provide line level input to the device.
- line out: The connector on the device which is labeled or is typically used to provide line level output from the device.
- video in: The connector on the device which is labeled or is typically used to provide video input to the device.
- video out: The connector on the device which is labeled or is typically used to provide video output from the device.
- ALIAS device_alias
- Defines an alias for the device connected to the specified connector. If the alias already exists for another device the error MCIERR_DUPLICATE_ALIAS is returned. If the device connected to already has an alias the error MCIERR_CANNOT_ADD_ALIAS is returned.
- Note: This keyword is used in conjunction with the QUERY keyword.
- 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.
Remarks
The CONNECTION command returns information about the device context connections.
Example Code
open waveaudio alias wave shareable wait connection wave query type wave stream alias ampmix wait
The second command returns the alias name of the connected device ("ampmix").