Problem with SetAudioDeviceMode

Login to reply to this topic.
Tue, 2008-04-01 08:51
Joined: 2008-03-24
Forum posts: 4

Hi All!

I try to answer for telephone call by playing wav-file to phone line on the Nokia 6680. This is my code:
in CallHandler.cpp

void CCallHandler::RunL()
{
....
case RCall::EStatusRinging:
{
iCall.AnswerIncomingCall();
break;
}
....
iNotify->IncomingCall(iDialedNumber);
}
in AppView.cpp
void IncomingCall(TName aCallName)
{
...
if (iRecorderAdapter)
{
iLabel->SetTextL(aCallName);
iRecorderAdapter->PlayL();
}
...
}
and in recorderadapter.cpp:

void CRecorderAdapter::PlayL()
{
// Play through the device speaker
/*iMdaAudioRecorderUtility->
SetAudioDeviceMode( CMdaAudioRecorderUtility::ETelephonyOrLocal );
*/
iMdaAudioRecorderUtility->
SetAudioDeviceMode( CMdaAudioRecorderUtility::ETelephonyNonMixed );

// Set maximum volume for playback
iMdaAudioRecorderUtility->SetVolume( iMdaAudioRecorderUtility->MaxVolume() );

// Set the playback position to the start of the file
iMdaAudioRecorderUtility->SetPosition( TTimeIntervalMicroSeconds( 0 ) );

iMdaAudioRecorderUtility->PlayL();
}

But it doesn't work. I tried to use different params in the method SetAudioDeviceMode but result is the same.

Where is a problem?


Tue, 2008-04-01 09:29
Joined: 2007-09-15
Forum posts: 61
Re: Problem with SetAudioDeviceMode

Can you please clarify what exactly you are trying to achieve and what exactly is the problem, is the code crashing? if yes, then at which line... did you trap the event and get the notification?

As per the SDK docs
ETelephonyNonMixed :
When recording, the audio source is the telephony downlink and is not mixed with the device microphone.
When playing, the audio sample data is played to the telephony uplink and is not mixed with the device speaker.

Now it will depend what exactly you are trying to do.

Tue, 2008-04-01 10:21
Joined: 2008-03-24
Forum posts: 4
Re: Problem with SetAudioDeviceMode

The code is NOT crashing. I get notification.

My problem is that the audio sample data is NOT played to the telephony uplink

  • Login to reply to this topic.