Ｉtry to play wav by CMdaAudioOutputStream like this.
This code is copy from S60 Platform: Sound Mixer Example.
In this way can play the wav sound successfully, But after called "iStream->Open( &iSet )" the midi play with no sound (no error display).
CMdaAudioOutputStream* iStream = NULL;
iStream = CMdaAudioOutputStream::NewL( *this );
iStream->Open( &iSet );
I play midi in two ways.
CMidiClientUtility* m_pMidi = NULL;
m_pMidi = CMidiClientUtility::NewL(*this);
The 2th way (CMdaAudioPlayerUtility) can play wav and midi file, but can't play both at the same time. When playing the midi,the wav sound play in silent, and in "void MapcPlayComplete(TInt aError)" aError = -14
CMdaAudioPlayerUtility * m_piAudioPlayer = NULL;
m_piAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(fullName2, *this);
//In callback MapcInitComplete
void ZengGameSound::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration)
if (aError == KErrNone)
m_piAudioPlayer->SetVolume(m_piAudioPlayer->MaxVolume() / 3);
System wide error code -14 : a requested resource is already in exclusive use.
A system wide error code indicates an error in the environment, or in
user input from which a program may recover.
const TInt KErrInUse=(-14);