I want to know what capability a device support, such as sample rate, channels, before I create the CMdaAudioOutputStream instance and call SetAudioPropertiesL(). I found one way list below:

//Get the cap of audio device.
MMemSet(&m_devAudioCap, 0,sizeof(TMMFCapabilities));
CMMFDevSound* dev = MNull;
CMV2DevSoundObserver* pDevObs = MNull;

dev = CMMFDevSound::NewL();
pDevObs = new CMV2DevSoundObserver();
if(pDevObs || dev)
{
dev->InitializeL(*pDevObs, EMMFStatePlaying);
m_devAudioCap = dev->Capabilities();
}
if(dev)
delete dev;
if(pDevObs)
delete pDevObs;


It's pity I used the Multi Media Framework(It's unavailable in UIQ 2.0). So this code is not independence with symbian SDK and UIQ. If you have a good way or clue, I'm appreciate you can tell me. Thank you very much.