Discussion Board

Results 1 to 13 of 13
  1. #1
    Regular Contributor prakashsainani's Avatar
    Join Date
    Jul 2003
    Posts
    63
    Hi there,

    I wonder if anyone can help me in using CMMFDevSound for recording the downlink audio during phone-call. I am trying it this way:
    iDevSound->InitializeL(*this,KUidMdaTelephonySoundDevice,EMMFStateRecording);

    It initialises without error but gives problem when I call the RecordInitL(). I think the device policy is not allowing access to my application. Do let me know if someone can do it.


    Also does neone know about any document describing 6.1 MediaServer architecture. I understand it had Audio hardware interface plug-in, but are there any known API like DevSound for 6.1 I know about RMdaDevSound. But I do not know which driver to load. Can someone help me with this.

    Thanks in adavnce.

    /prakash
    Last edited by prakashsainani; 2005-03-15 at 14:09.

  2. #2
    Registered User ykasidit's Avatar
    Join Date
    Jan 2004
    Location
    The surburbs of Bangkok, Thailand
    Posts
    135
    Hello,

    I tried the code above on 6210 navigator and it encountered -1 (notfound) since the InitializeL... Any experts can help?
    Liberate yourself from the enslavement of World Monopoly!

  3. #3
    Super Contributor nital_shah's Avatar
    Join Date
    Jun 2008
    Posts
    593
    may be u can down load the API from here..

  4. #4
    Super Contributor nital_shah's Avatar
    Join Date
    Jun 2008
    Posts
    593
    while calling your function from main class...
    Here CInputsteamThread Class is your Recording Class

    inputstream = CInputStreamThread::NewL();
    RFs& iFs = CEikonEnv::Static()->FsSession();
    TInt err = iAudioFileStream.Replace(iFs, GetFilePath(), EFileWrite|EFileStream);
    if(err == KErrNone)
    {
    for (int i = 0; i < KAMRHeaderLength; i++)
    {
    iAudioFileStream.WriteUint8L(KAMRNBHeader[i]);
    }
    }
    inputstream->SetFileHandle(&iAudioFileStream);
    inputstream->iDelay = 400;
    inputstream->Initialize();
    write this code in your main class where u wish to start your recording from... u need not call the Record() function.. it will b called automatically..

    and for your Record() in Recording Class...
    void CInputStreamThread::Record()
    {
    if(iStreamStatus != EReady)
    return;
    iTotalBytesSaved = 0;
    iMMFDevSound->SetGain(iMMFDevSound->MaxGain());
    iMMFDevSound->RecordInitL();
    iStreamStatus = ERecording;
    }
    if m helping u in right direction, den u can ask me further cz i have implemented the same..

  5. #5
    Registered User ykasidit's Avatar
    Join Date
    Jan 2004
    Location
    The surburbs of Bangkok, Thailand
    Posts
    135
    Hello nital_shah,

    Thanks for your help!

    However, I already had success with the normal recording to a wav file but it has sound coming from microphone too.

    The problem is that: how to record from phone downlink only - no mix from microphone - when using CMMFDevSound.

    I understand that this should be set in the InitializeL() function, right? What UID to use to specify only the downlink? I already tried KUidMdaTelephonySoundDevice but it had a problem.

    Thanks!
    Liberate yourself from the enslavement of World Monopoly!

  6. #6
    Super Contributor paipeng's Avatar
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721
    Is the problem solved with "CMMFDevSound" by recording audio from gsm downlink?


    I am trying to use APS to do it. But also only audio from microphone.


    Now I am searching a solution about it.


    Thanks in advanced.


    Pai
    Symbian && Android && iPhoneOS

  7. #7
    Nokia Developer Champion vineet.jain's Avatar
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,841
    hi...well to be honest i have not left any of the ways to record only the downlink, but failed in all, tried recording the downlink using all API's like CMdaAudioRecorder, CMMFDevSound, APS n all, but didn't succeded, it records both the voices, uplink as well as downlink.

  8. #8
    Registered User ykasidit's Avatar
    Join Date
    Jan 2004
    Location
    The surburbs of Bangkok, Thailand
    Posts
    135
    I still cant find a direct way to get only downlink too.

    Indirect ways are possible - depending on your application. If it's not a real consumer application and you have control of the deploy situation - then you can record from downlink only:

    - on S60 3rd FP1 you can mute the microphone.

    - you cant mute mic in FP2 (you can mute to uplink - other side doesn't hear but mic sound still gets into recording) - but you can physically attach a "handsfree" with the microphone physically cut off - same downlink-only recording effect.

    Hope this helps!
    Liberate yourself from the enslavement of World Monopoly!

  9. #9
    Regular Contributor nadis's Avatar
    Join Date
    Feb 2009
    Posts
    108
    Hi, ykasidit.
    What do you mean by saying "but you can physically attach a "handsfree" with the microphone physically cut off" ?
    I need your help.

  10. #10
    Registered User ykasidit's Avatar
    Join Date
    Jan 2004
    Location
    The surburbs of Bangkok, Thailand
    Posts
    135
    Hello nadis,

    I mean buy a cheap wired hands-free set and cut (open the mirophone box, cut with a scissor or use a soldering gun to melt the lead that connects the microphone piece out) the microphone out, when you attach it to the phone, there will be no sound entering what you want to record from downlink or play to uplink.
    Liberate yourself from the enslavement of World Monopoly!

  11. #11
    Regular Contributor nadis's Avatar
    Join Date
    Feb 2009
    Posts
    108
    Oh, no.
    That's so unacceptable.
    BTW, is it possible to play audio files on uplink using APS but disable sounds from mic ?
    Just think about playing, not recording.

  12. #12
    Registered User ykasidit's Avatar
    Join Date
    Jan 2004
    Location
    The surburbs of Bangkok, Thailand
    Posts
    135
    Haha, sorry, these ways are probably only acceptable for non-consumer custom/engineering applications.

    I never tried APS because my target device was fp2 (and fp1).

    If only uplink, you can mute the microphone from software (tested on fp1) then call the media player app to play your file - sound gets to the uplink. Again, muting the microphone might not be acceptable to most consumer apps too.

    For mute the microphone (doesnt work on fp2) use phone client extension api:

    //for s60 3rd initial or fp1

    param aMute = ETrue would mute, EFalse would stop the mute

    TRAPD(err,

    _LIT( KPhCltExtLib, "PhoneClientExt.dll" );
    RLibrary iLibrary;
    CPhCltExtFactory* iFactory = NULL; // Factory class for creating command handler
    User::LeaveIfError( iLibrary.Load( KPhCltExtLib ) ); // Load PhoneClientExt dll
    TInt res = 0; TInt err=0;
    TRAP(err,res = iLibrary.Lookup( 1 )());
    if ( !err )
    {// Factory creation was successful.
    iFactory = reinterpret_cast< CPhCltExtFactory * >( res );}

    CPhCltCommandHandler* iCommandHandler = NULL;
    if ( iFactory )
    {// Factory creation was successful, create Command Handler.
    iCommandHandler = iFactory->CPhCltCommandHandlerLD();
    }
    RPhCltServer iPhoneClient;
    User::LeaveIfError ( iPhoneClient.Connect() ); //connect to Phone Server
    iCommandHandler->Open( iPhoneClient );

    // For Muting microphone volume
    TRequestStatus status;
    iCommandHandler->MuteMicrophone( status,aMute);
    User::WaitForRequest(status);

    );
    Liberate yourself from the enslavement of World Monopoly!

  13. #13
    Regular Contributor nadis's Avatar
    Join Date
    Feb 2009
    Posts
    108
    Yeah, it's feasible on FP1, now I'm struggling with FP2.

Similar Threads

  1. Replies: 5
    Last Post: 2010-06-04, 10:28
  2. VoIP and wi-fi power-save mode
    By ng1234 in forum VoIP
    Replies: 6
    Last Post: 2009-07-06, 13:05
  3. CMMFDevSound record and play with PCM16
    By vvsnaresh in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2008-05-30, 11:49
  4. Using Audio Proxy Server to play only (not play and record)
    By rob_savageminds in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2007-09-04, 12:11
  5. Half Duplex Audio Streaming
    By subhrajyotisaha in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-05-25, 04:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved