Audio Output Streaming Overview

This document provides an overview of Audio Output Streaming.

Purpose

Audio Output Streaming is the interface to streaming sampled audio data to the low level audio controller part of the Multimedia Framework (MMF).

Audio Output Streaming Library Details

The DLL that provides the functionality and the library to which your code must link is identified below.

DLL LIB Short Description

mediaclientaudiostream.dll

mediaclientaudiostream.lib

These files are used for implementing Audio Output Streaming.

Architectural Relationship

How the Audio Output Streaming classes interact with other components of MMF is shown below:

Figure 1. Audio output streaming overview

Description

Streamed audio data is sent and received incrementally. This means:

  • sound clips sent to the low level audio controller (audio play) can be sent as they arrive rather than waiting until the entire clip is received.

    The user of the API should maintain the data fragments in a queue before sending them to the server. If the user attempts to send data faster than the server can receive it, the excess data fragments are maintained in another client side queue (invisible to the user), whose elements are references to the buffers passed to it. The server notifies the client using a callback each time it has received a data fragment. This indicates to the client that the data fragment can be deleted.

  • sound clips that are being captured by the low level audio controller (audio record) can be read incrementally without having to wait until audio capture is complete.

    The low level audio controller maintains the received buffers where it can place the audio data that is being captured. The client uses a read function to read the received data into destination descriptors.

The client is also notified (for audio play and record) when the stream is opened and available for use (opening takes place asynchronously), and when the stream is closed.

This API can only be used to stream audio data, with the data being stored or sourced from a descriptor. Client applications must ensure that the data is in 16 bit PCM format as this is the only format supported. The API does not support mixing. A priority mechanism is used to control access to the sound device by more than one client.

Key Audio Output Streaming Classes

The functionality provided by Audio Output Streaming is contained within the CMdaAudioOutputStream class.

Using Audio Output Streaming

Clients can use Audio Output Streaming to:

  • Open, set audio properties, write to and close the audio stream.