void CFilmReel2Container::CreateSoundPlayerL()
{
iSoundPlayer = (STATIC_CAST(CAknAppUi*,CEikonEnv::Static()->AppUi()))->KeySounds();
if ( iSoundPlayer )
{
iSoundPlayer->AddAppSoundInfoListL( R_CAMERA_SNAP_SOUND );
}
}
void CFilmReel2Container::PlaySnapSound( )
{
CreateSoundPlayerL();
if ( iSoundPlayer )
{
iSoundPlayer->PlaySound( KSnapSoundId );
}
}
rss中:
#define KCameraSoundFile "Z:\\system\\sounds\\digital\\Camera1a_2_8kHz.wav"
#define KSnapSoundId 2
RESOURCE AVKON_SOUND_INFO_LIST r_camera_snap_sound
{
list =
{
AVKON_SOUND_INFO
{
sid = KSnapSoundId;
priority = EAvkonKeyClickPriority;
preference = EAknAudioPrefCamera;
file = KCameraSoundFile;
}
};
}