Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
This page was last modified 12:30, 9 October 2008.

CS001131 - Adding source location effects to the audio player

From Forum Nokia Wiki



ID CS001131 Creation date October 9, 2008
Platform S60 3rd Edition Tested on devices Nokia N95
Category Symbian C++ Subcategory Audio


Keywords (APIs, classes, methods, functions): CSourceLocation

Overview

The S60 platform has several audio enhancement APIs that can be used to modify the audio experience. One of them is the CSourceLocation API. This API makes the audio source's location for the listener appear to change.

This snippet can be self-signed.

Preconditions

The audio player must be fully constructed before constructing the instance of the API. This can be done with the following lines of code:

iMdaAudioPlayerUtility =
   CMdaAudioPlayerUtility::NewFilePlayerL(aFileName,
                                          *this,
                                          EMdaPriorityNormal,
                                          EMdaPriorityPreferenceTimeAndQuality);

MMP file

The following capabilities and libraries are required:

CAPABILITY NONE

LIBRARY SourceLocationEffect.lib

HEADER SourceLocationBase.h


Source file

First you need to construct the reverb utility instance:

iSource = CSourceLocation::NewL( *iMdaAudioPlayerUtility );

To set the source location effect on, you need to set the X,Y, and Z coordinates for the source, and then enable and apply the effect to the player.

iSource->SetLocationCartesianL(iSourcePositionX,
                                 iSourcePositionY,
                                 iSourcePositionZ);
    
  if(!iSource->IsEnabled())
           iSource->EnableL(); 
  	
   iSource->ApplyL();

You can also and a 3D effect by using a timer that periodically changes the coordinates of the effect.

To set the source location effect off, call the following line of code:

iSource->DisableL();


Test application

AudioEfects.zip


See also

CS001130 - Adding doppler effects to the audio player

CS001132 - Adding listener's location effects to the audio player

CS001133 - Adding bass boost to the audio player

CS001134 - Adding stereo widening to the audio player

CS001135 - Adding reverb to the audio player

CS001136 - Adding equalizer to the audio player

Related Discussions
Thread Thread Starter Forum Replies Last Post
Bypassing compression fmang Mobile Java Media (Graphics & Sounds) 1 2007-05-03 12:24
RTimer::Inactivity() davidmaxwaterman General Symbian C++ 6 2007-03-08 09:24
URGENT! What is a problem about audio recording with nokia 6020 (midp 2.0 cldc 1.1)? zehdopulo Mobile Java Media (Graphics & Sounds) 1 2007-01-20 20:59
请问ogg格式可以实现在线流媒体播放吗 flashwade Symbian 4 2008-09-03 05:29
MP3 player cindul General Symbian C++ 0 2004-12-30 06:10
 
Powered by MediaWiki
RDF Facets: qfnZtopicQUqfnTopicZaudioQ qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX