hi, all
i use CMdaAudioPlayerUtility for play multimedia
and play .mp3 file find no sound ,
i think symbian engine is ripe module because engine code is work well for another symbian c++ program
play give me some idea !!
thank you!!
hi, all
i use CMdaAudioPlayerUtility for play multimedia
and play .mp3 file find no sound ,
i think symbian engine is ripe module because engine code is work well for another symbian c++ program
play give me some idea !!
thank you!!
CPlayerEngine::CPlayerEngine()
: iState(ENotReady)
{
iMdaAudioPlayerUtility = CMdaAudioPlayerUtility::NewL(*this);
iCurrentVolume = 5;
}
void CPlayerEngine::PlayL(const TDesC& aFileName)
{
if ( aFileName != KNullDesC )
{
iBufFileName.Zero();
iBufFileName.Copy(aFileName);
TParse parse;
parse.Set(aFileName, NULL, NULL);
StopL();
iMdaAudioPlayerUtility->OpenFileL(aFileName);
}
}
void CPlayerEngine::PlayL()
{
if ( (iState == EReadyToPlay) || (iState == EPause) || (iState == EDailling))
{
iMdaAudioPlayerUtility->SetVolumeRamp(TTimeIntervalMicroSeconds(1500000));
iMdaAudioPlayerUtility->Play();
iState = EPlaying;
}
}
void CPlayerEngine::StopL()
{
if(iMdaAudioPlayerUtility && iState == EPlaying)
{
iMdaAudioPlayerUtility->Stop();
iMdaAudioPlayerUtility->Close();
iState = EReadyToPlay;
}
}
void CPlayerEngine::MapcInitComplete( TInt aError,
const TTimeIntervalMicroSeconds& aDuration )
{
iState = (aError ? ENotReady : EReadyToPlay);
if ( aError )
InitCompleteFailed(aError);
else
InitCompleteSucceed();
}
void CPlayerEngine::InitCompleteSucceed()
{
PlayL();
}
the engine is ok, i find my problem the Volume is set so low