OpenSpeech Browser

Getting Started
Architecture Description
Integration Guide

Copyright (c) 1998-2001 SpeechWorks International, Inc. All Rights Reserved.



VXIaudioPlayer

Audio Player Interface
o AP_BEGIN_END_SESSION_SUPPORTED
Macros to determine the availability of new methods
o VXIapResult
Result codes for interface methods
o VXIapPlayListNode
Definition of a play list node, used to deliver a linked list of audio for playback
o AP_EVENT_STARTING
Events returned from the Audio Player as detailed in the Audio Player interface description
o VXIapEventDataStatus
Event structure for returning detailed status information
o VXIapEventListener
Signature for the event handler called to report Audio Player events, as registered via RegisterEventListener( ).
o VXIapInterface
Audio Player interface for audio playback
Abstract interface for playing audio to the caller via a telephony interface, where the audio may be on-disk audio files, in-memory audio, or in-memory streaming audio.

The Audio Player interface must be implemented for each new underlying telephony interface, where this is frequently done by a third party integrator.

There is one Audio Player interface per telephony channel.

The following table summarizes the audio MIME content types that all Audio Player implementations should support (they typically support other MIME content types as well). The table after that summarizes the events delivered by Audio Player implementations.

audio/basic (VXI_MIME_ULAW) Raw (headerless) 8kHz 8-bit mono u-law [PCM] single channel audio (G.711)
audio/x-alaw-basic (VXI_MIME_ALAW) Raw (headerless) 8kHz 8-bit G.711 mono A-law [PCM] single channel audio (G.711)
audio/x-wav (VXI_MIME_WAV) WAV (RIFF header) 8kHz 8-bit mono u-law or A-law [PCM] single channel audio

AP_EVENT_STARTING Reports the Audio Player moved from the IDLE state to the PLAYING or STREAMING state. Delivered only for the first play node in a play or streaming play operation.
AP_EVENT_ERROR Reports the Audio Player encountered an error in playing a play node in the play list or a underlying telephony or I/O error. The error must have occurred after a call to VXIapTriggerPlay( ) or VXIapTriggerStreamingPlay( ) returned with a VXIap_RESULT_SUCCESS result code, never during one of those calls or after one of those calls return with an error. The Audio Player must be returned to an IDLE state (the play operation halted) prior to delivering this event as the user may immediately trigger additional play operations from within the event listener.

The event includes a result code that indicates the cause of the error and the playlist node that caused the error (when available).

AP_EVENT_WARNING Reports the Audio Player encountered a non-fatal error in playing a play node in the play list or a underlying telephony or I/O error that is recoverable. The error must have occurred after a call to VXIapTriggerPlay( ) or VXIapTriggerStreamingPlay( ) returned, never during one of those calls or after one of those calls return with an error. The warning has no implications on the current state, if the result of the warning is that the play operation completed an AP_EVENT_COMPLETED event must be delivered after this event (or an AP_EVENT_ERROR delivered instead).

The event includes a result code that indicates the cause of the error and the playlist node that caused the error (when available).

AP_EVENT_COMPLETED Reports that a play operation has terminated normally, either due to the output operation successfully completing or the play operation being stopped via TriggerStop( ). Audio Player implementations may also choose to automatically stop the play operation and return this event on hang-up, although this should only be done when this is automatic functionality within the underlying telephony library (the client is responsible for rapdily calling TriggerStop( ) when barge-in or hang-up occurs, which in most cases simplifies the Audio Player implementation by avoiding session control and audio source interactions).

The Audio Player must move from the PLAYING or STREAMING state to an IDLE state prior to delivering this event.

AP_EVENT_RESUME_STREAM Reports the Audio Player is ready to resume a streaming audio source that is currently paused, thus obtaining additional audio for the current streaming audio operation. The source was paused when an overflow occured while delivering audio for the streaming play operation (TriggerStreamingPlay( ) returned VXIap_RESULT_STREAM_OVERFLOW).

Version:
1.0

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.