ISpAudio (Windows CE 5.0)
This interface represents a real-time audio stream, such as those connected to a live microphone or telephone line. ISpAudio methods allow control over the real-time behavior of the stream. IStream read and write methods are used to transfer data to and from an object.
When to Implement
The following list shows what implements this interface:
- SpMMAudioIn
- SpMMAudioOut
This interface should be implemented when the audio input or output source is not a standard windows Multimedia device. It is expected to supply an infinite amount of data and therefore its state should not change externally to SAPI. For the majority of uses, it will not be necessary to implement an object providing this interface. An example of where this may be needed would be to provide a telephony audio device or to perform echo cancellation of audio output on the input.
The Telephony API (TAPI) provides a mechanism to treat a telephony device as a Windows multimedia device allowing the use of the SAPI provided multimedia audio objects. If this implements a real-time audio input or output object and runs in a desktop or graphical environment, support may be needed for volume (see SPDUI_AudioVolume) and audio properties (see SPDUI_AudioProperties) UI. The SAPI best-coding practice for implementing the UI is have the object inherit from ISpTokenUI. This will enable applications (including the Speech Control Panel) to display the UI in a simple and consistent manner.
Methods
The following table lists methods for the ISpAudio interface.
Method | Description |
---|---|
EventHandle | Returns a Win32 event handle that applications can use to wait for status changes in the I/O stream. |
GetBufferInfo | Passes back the audio stream buffer information. |
GetBufferNotifySize | Retrieves the audio stream buffer size information. |
GetDefaultFormat | Passes back the default audio format. |
GetStatus | Passes back the status of the audio device. |
SetBufferInfo | Sets the audio stream buffer information. |
SetBufferNotifySize | Sets the audio stream buffer size information. |
SetFormat | Sets the format of the audio device. |
SetState | Sets the state of the audio device. |
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.
See Also
Send Feedback on this topic to the authors