## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### MCI_AUDIO_CONTROL Field - usIOCtlRequest

usIOCtlRequest (USHORT) IOCtl request to be executed. The defined values for this field are:

AUDIO_CHANGE (0) Enables an application to change adapter characteristics. It is issued while the audio device is open. The characteristics contained in the MCI_AUDIO_CHANGE structure such as input source can be changed by this request.

Note: AUDIO_CHANGE requests have the potential to break the data flow. Some audio devices might require that input, output, and monitor selections be performed prior to starting a change operation.

To change an adapter's characteristics, the desired values should be placed in the respective fields and the request issued. Notice that all possible combinations of these fields are not necessarily supported by the device driver. Invalid combinations result in an error returned by AUDIO_CHANGE.

The effects of issuing this request can vary for each requested change. If a given field is to remain unchanged, set that field to AUDIO_IGNORE (-1).

AUDIO_START (1) Initiates the flow of audio data to or from the adapter. It also causes the internal position and timing values to be set to the value contained in ulPosition. Therefore, an immediate call to AUDIO_BUFFER returns a position value equal to the ulPosition value specified in AUDIO_ START. The audio device must be opened and initialized (through OPEN and AUDIO_INIT requests) before calling AUDIO_START. Otherwise, an error is returned.

There is no pbRequestInfo field for AUDIO_START.

AUDIO_STOP (2) Stops the current activity in progress on the audio device. For example, if the device was recording, the recording activity would be stopped. This operation does not change the current configuration (such as sampling rate, input source, and so forth) of the device; it simply terminates the current operation. Consequently, it also stops data flow between the device driver and the application. Any data left in the buffers is discarded. Notice that the Write buffers can be drained using the AUDIO_WAIT request. Use the AUDIO_PAUSE operation instead of AUDIO_STOP if the operation must be resumed at the point it left off.

The ulPosition value is used to specify when the stop is to occur. A value of less than the current position or 0 results in an immediate execution of the stop.

There is no pbRequestInfo field for AUDIO_STOP.

AUDIO_PAUSE (3) Used to suspend all data flow between the application and the adapter. This request does not flush the kernel buffers or the adapter buffers. Data flow can be resumed by using AUDIO_RESUME. If recording, data is lost during the time that the device driver is paused.

The pbRequestInfo value is used to specify when the pause is to occur. A value of less than the current position results in an immediate pause.

There is no pbRequestInfo field for AUDIO_PAUSE.

AUDIO_RESUME (4) Used to resume the flow of data that was suspended by AUDIO_PAUSE. Notice that an ulPosition value of non-zero is not currently defined and should not be used.

There is no pbRequestInfo field for AUDIO_RESUME.