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. Thanks for all your past and future contributions.

Detecting audio device availability using Symbian C++

From Wiki
Jump to: navigation, search

Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (14 Apr 2004)
Last edited: hamishwillee (14 Jun 2013)


Detecting the availability of the audio device


How can I detect when other audio is being played by the system or by another application? How can I test if the audio device is currently busy avoiding an audio conflict situation?


There is no direct way to check it, but it is possible to try playing a test sample (tone 20 KHz, priority = EMdaPriorityMin, duration = 0 ms). If the return error code is KErrInUse, that media server is being used.
Note: There is a chance that another media client reserves the audio device after making the check.
Example code for tone playback is in the S60 SDK Sound example.

This page was last modified on 14 June 2013, at 04:58.
23 page views in the last 30 days.