Windows Media Format SDK banner art
PreviousNext

IMDSPDeviceControl::Record

The Record method begins recording from the device’s external record input at the current seek position. The IMDSPDeviceControl::Seek method must be called first.

Syntax

HRESULT Record(
  _WAVEFORMATEX*  pFormat
);

Parameters

  pFormat

[in]  Pointer to a _WAVEFORMATEX structure containing the format in which the data must be recorded.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Description
E_BUSY The device is already performing an operation.
WMDM_E_NOTSUPPORTED The record function is not implemented on this device.
E_FAIL An unspecified error occurred.

Remarks

This method is used to invoke both device recording (recording of an audio track to be stored on the media device) and streaming audio recording (streaming in audio data from a record input connector on the media device to be recorded on the computer). The IMDSPDeviceControl::Seek method determines which form of recording occurs.

Some devices do not support either type of recording. The IMDSPDeviceControl::GetCapabilities method must be called before you start recording. If an unsupported type of recording is attempted, this method  returns WMDM_E_NOTSUPPORTED.

The pFormat parameter can be supplied to specify an audio data format for recording. To determine the formats supported by the device, see IMDSPDevice::GetFormatSupport. If the pFormat parameter is set to NULL, the device records audio data in the default format.

When you use device recording, you must enumerate the storage medium contents to find the new object after the record operation is completed.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.