Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Multi-channel audio playback

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: gafgafgaf (05 Jun 2007)
Last edited: hamishwillee (20 Oct 2011)

Multimedia application or game developers may want to play multiple sound effects at the same time. Using CMdaAudioOutputStream class, it is possible to set up multi-channel sound playback with low latency. The linked sample application implements multi-channel audio playback. It plays a sound sample every time user selects Options -> Play menu option.


Design overview

  • The application uses client-server framework. The server is responsible to maintain a sound stream ( CMdaAudioOutputStream) and mix pre-loaded samples.
  • The server thread is created in the same process as the client to make sound sample access fast. (Client is responsible to maintain sound samples.)


Server class that is responsible to create a server session. See Client-Server Framework to learn more about Client-Server infrastructure.


Owns a CMdaAudioOutputStream and constantly mixes sound samples. Implements MMdaAudioOutputStreamCallback interface. CMultiChannelSoundServerSession provides steam data every time CMdaAudioOutputStream requests it.


Client side helper class to access server functions conveniently. See Client-Server Framework to learn more about Client-Server infrastructure.


Represents one sound channel. It mixes the sample to the stream.


Represents one sound sample. The sample must be in 8 bit PCM format.


Responsible to manage sound channels. If all the channels are being used while a new sample is being attempted to play, then it reuses the channel that is started playing sample earliest.


This is the API for the sound system's client. It sets up multi-channel sound system, loads sound samples and allows its clients to initiate playback.


This page was last modified on 20 October 2011, at 04:19.
56 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.