Nokia N97 SDK
Example Applications Guide

AudioStreaming Example

1. About this Example
2. Architecture
3. Design and Implementation


1. About this Example

Audio Streaming Example demonstrates the use of Audio Streaming API that provides functionality for recording audio stream into a buffer, and playback of the audio buffer.Also, the recorded audio stream can be saved into a file and further loaded to be played again.Sample files can be PCM encoded or AMR-NB-encoded audio files. This application is designed to run in both S60 2nd Edition and S60 3rd Edition devices.

List the functionalities of the application:

1.1 APIs demonstrated

1.2 Prerequisites

Audio Streaming API is part of the Symbian Multimedia Framework (MMF) and supported from S60 2nd Edition onwards.User is expected to have an acquaintance with the Symbian Multimedia Framework.

1.3 Running this example

Ensure the following points before building this example.
MOBILE DEVICE (S60 3rd Edition)
Ensure that the sample.aud/amr files located at /AudioStreamExample/data have been copied to /epoc32/winscw/c/system/Apps/audiostream/ in your SDK installation directory

MOBILE DEVICE (S60 2nd Edition)
Ensure that the sample.aud/amr files located at /AudioStreamExample/data have been copied to /epoc32/winscw/c/system/Apps/audiostream/ in your SDK installation directory

EMULATOR (S60 3rd Edition)
Ensure that the sample.aud/amr files located at /AudioStreamExample/data have been copied to /epoc32/winscw/c/private/e01ff1c3/ in your SDK installation directory

EMULATOR (S60 2nd Edition)
Ensure that the sample.aud/amr files located at /AudioStreamExample/data have been copied to /epoc32/winscw/c/system/Apps/audiostream/ in your SDK installation directory

2. Architecture

Audio streaming example follows traditional Symbian OS Control-based architecture. CAudioStreamEngine is engine class which, inherits from MMdaAudioInputStreamCallback and MMdaAudioOutputStreamCallback. CAudioStreamEngine class defines audio functions (Play, Record, LoadFile, Stop) and the callback functions to get the error status of the audio operations.

AUDIOSTREAM_ENGINE.JPG

3. Design and Implementation

3.1 Capabilities

Since this example implements recording functionality, program is defined with the UserEnvironment capability.
The program capabilities are defined in the AudioStream_s60_3rd_ed.mmp file: CAPABILITY UserEnvironment

3.2 Features

The heart of this application is CAudioStreamEngine class, which inherits MMdaAudioInputStreamCallback and MMdaAudioOutputStreamCallback. CAudioStreamEngine implements CMdaAudioInputStream for input stream (Recording) and CMdaAudioOutputStream for output stream(Playing). The important functionalities of example are discussed below.

3.3 MMP Files

This example has two mmp files, in order to support both S60 2.X and S60 3.X versions of S60 platform

© Nokia 2009

Back to top