DevSound Overview

This document provides an overview of DevSound.

Purpose

DevSound provides a common API for all audio functionality.

DevSound library details

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

DLL LIB Short Description

mmfdevsound.dll

mmfdevsound.lib

These files are used for implementing DevSound.

Architectural relationship

Shown below is a representation of how DevSound interacts with the MMF Controller Framework and other components:

Figure 1. DevSound and related components

DevSound uses the following components:

  • Client - DevSound can be used by the following clients:

    • applications

    • device creator library.

  • MMF Controller Framework

    For audio playing, recording, and conversion, the MMF client APIs interact with the lower levels of the MMF, the controller framework. The controller framework helps to manage the interface to DevSound and provides controller plug-ins for playing, recording, and converting audio data. The controller framework has two main classes RMMFController and CMMFController .

  • Controller Plug-in

    Depending on the functionality required by the client, the MMF controller framework loads the appropriate controller plug-ins. The plug-ins perform the required operations by communicating with DevSound and/or DevVideo, codecs and hardware.

    Custom controller plug-ins can be written to extend the MMF framework. For more information, see How to write a controller plug-in .

  • Audio Policy

    The Audio Policy component manages requests to access the audio hardware. For example, if DevSound needs to acquire the hardware for playing audio, it makes a request to the Audio Policy component. Depending on the priority of the request, the Audio Policy component grants or denies access to the hardware. DevSound must obey the Audio Policy.

  • Codecs

    DevSound uses codecs to convert multimedia data between different encodings.

    Custom codec plug-ins can be written. For more information, see How to write a codec plug-in .

  • Hardware Device API

    For audio functionality, the CMMFHwDevice plug-in class acts as the DevSound interface to the audio processing hardware.

Description

DevSound provides the interface between the Symbian platform and the audio processing hardware for all audio functionality. DevSound is responsible for providing access to audio resources, configuring audio hardware, and audio playback and recording.

Key DevSound classes

The DevSound API comprises the following classes:

  • CMMFDevSound is the class which forms the DevSound API.

  • MDevSoundObserver provides callbacks to users of the DevSound API. It serves as the method of communication between a client and DevSound. For example, MDevSoundObserver handles completion and cancellation requests for audio playing, recording, and conversion.

Using DevSound

DevSound offers the following main functions which can be used by DevSound clients:

  • Audio Settings

    DevSound can be used to initialise and configure hardware devices, for example, set microphone gain and stereo balance.

  • Audio Play

    DevSound can be used to play buffered audio data.

  • Audio Record

    DevSound can be used to record audio data.

  • Audio Convert

    DevSound can be used to convert the type, sample rate and format of audio data.

  • Tone Play

    DevSound can play a single tone, tone sequence or Dual Tone Multi-Frequency (DTMF) string.