×

Discussion Board

Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 49
  1. #16
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Play audio to uplink:: Solution

    sometimes the past experiences doesn't really help... Anyway, have been working with this problem quite awhile and getting all sorts of answers from out & inside Nokia, anyway nobody really seems to have good answers, so, like I usually say, when you want to get it done fast, you gotta do your research by yourself.

    Anyway, it appers that audio playing to the uplink can be achieved pretty easily and without any extra capabilities. I was testing this with all 13 that do not need any scpecial approval (and would be great if somebody could test and narrow it down to the minimal required set). So first define capabilities in your mmp file:

    CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData Location UserEnvironment PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ SwEvent SurroundingsDD

    And then the trick is not to use normal Audio player or recorder, but to use CDrmPlayerUtility. And I was testing it like this:

    iMdaAudioPlayerUtility = CDrmPlayerUtility::NewFilePlayerL(iFileName.iName, *this,80,(TMdaPriorityPreference)0x00060001);

    and in init coplete just call Play() and it plays the audio nicely to the uplink.

    yucca

  2. #17
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: play video/audio clips while talking in an active call

    Well, mine were different needs of course, and according to Nokia's tech support that was the only way..

  3. #18
    Nokia Developer Expert
    Join Date
    Jul 2003
    Location
    Vancouver, Canada
    Posts
    220

    Re: play video/audio clips while talking in an active call

    @symbianyucca: Looks like you have found the 'workaround'.

    I am trying to find out some more information on this 'restriction'. It doesn't make sense to me personally at the moment as I'd thought that if you have been trusted enough to been given the MultimediaDD capability that would be enough to behave as required. The second check for VendorID in this case seems odd. As i said, I am going to see if i can find some info on 'why' but that might take me sometime... if you really need a definitive asnswer you'll need to contact FN paid-for-support. (Us 'FN Experts' just donate our free time to FN to help the community, the same as you chaps do)

    About the workaround... The information I did find on the CDrmPlayerUtility is that it is a client/server wrapper that allows a user application with no capabitlies to play back DRM'd audio, by seperating the access to the 'decompressed' audio file from the user. Since the server side of this utlity is built with the Nokia VendorID it 'allows' the playback of audio when 'in-call', so confirms the FN position that you need on S60 a special vendor ID. I am not sure if this is a 'feature' or 'defect' and will be 'fixed' in future releases.

    As i have said, I persoanlly would hope this restriction of VendorID for audio playback is removed from future releases as it seems unessecary. Note: This is personal opinion, so not worth much in the scheme of things

    Hope this helps

  4. #19
    Regular Contributor
    Join Date
    Jul 2005
    Posts
    185

    Re: play video/audio clips while talking in an active call

    As i remember the audio can be played uplink using just the "good" old CMdaAudioPlayerUtility. Tested it only with prototypes though...

  5. #20
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    113

    Re: Play audio to uplink:: Solution

    Hi yucca,

    thanks for this workaround. However, here at my place this does not yet work like intended. I can not open the wav file. I have opened a new thread:
    http://discussion.forum.nokia.com/fo...958#post224958

    Do you mind having a short look into it?

    Many Thanks! Marcel

  6. #21
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    113

    Re: play video/audio clips while talking in an active call

    Yucca,

    I have worked around the -28 (see other thread) and now get -5 KErrNotSupported. I simply want to use your workaround to play to the uplink, and not really use drm'd content.

    Isn't it like this that I just can specify any normal WAV-File as my file/content to be played and it will be played? My wav file has no key nor is it registered on a drm db on the phone or any thing similar this.

    I hoped to be able to just play it with this drm player like I would do in the standard player. Did I miss something with that workaround?

    Best Regards, Marcel

  7. #22
    Regular Contributor
    Join Date
    Nov 2004
    Location
    California, USA
    Posts
    121

    Question Re: play video/audio clips while talking in an active call

    Hello,

    I was able to reproduce the results discussed on this thread with respect to CDrmPlayerUtility. That is, I can play a sound with NewFilePlayerL(). Since my sounds are stored as encrypted amr files, I want to load them into memory, decrypt them and pass it along to CDrmPlayerUtility. Simple enough, right? Use NewDesPlayerL() or NewDesReadOnlyPlayerL(). When I make this small substitution, a "User 23" panic is generated. [aside: for easy of reference a "User 23" is "This panic is raised when any operation that moves or copies data to an 8 bit variant descriptor, causes the length of that descriptor to exceed its maximum length."] My best guess is either

    1) I have a braino in the code below or
    2) the CDrmPlayerUtility class has a fixed size TBuf and a roughly 4k buffer is too big.

    Strangely, if I substitute "NewL(); OpenDesL()" for NewDesPlayerL()(see below), no panic is generated. Unforunately, I don't hear the sound either. :-(

    Can someone shed some light on this one?

    Thanks for your time and consideration,

    Sincerely,

    John

    // this testcase reads an AMR file(no encryption is involved) into memory
    // and pass it to CDrmPlayerUtility.

    TInt compareSize;
    RFs rfs;
    RFile myFile;

    User::LeaveIfError(rfs.Connect());
    User::LeaveIfError(myFile.Open(rfs,KShriekSoundFile,EFileStream|EFileRead));
    myFile.Size(compareSize);

    if (iCompareBuf)
    {
    delete iCompareBuf;
    iCompareBuf = NULL;
    }
    iCompareBuf = HBufC8::NewL(compareSize);
    TPtr8 comparePtr = iCompareBuf->Des();
    iCompareBuf->Des().FillZ();

    myFile.Read(comparePtr, compareSize);

    myFile.Close();
    rfs.Close();

    // fails - User 32
    // iPlayer = CDrmPlayerUtility::NewDesPlayerL(
    // comparePtr,
    // *this,
    // 80,
    // (TMdaPriorityPreference)0x00060001);
    iPlayer = CDrmPlayerUtility::NewL(
    *this,
    80,
    (TMdaPriorityPreference)0x00060001);
    iPlayer->OpenDesL(comparePtr);

  8. #23
    Registered User
    Join Date
    Oct 2006
    Posts
    1

    Re: play video/audio clips while talking in an active call

    hi,
    how to get the Notify when the call is coming or the other Audio is Playing,so that i can stop the Audio.

    with regards,
    jeff

  9. #24
    Registered User
    Join Date
    Nov 2006
    Posts
    1

    Re: Play audio to uplink:: Solution

    Quote Originally Posted by symbianyucca
    sometimes the past experiences doesn't really help... Anyway, have been working with this problem quite awhile and getting all sorts of answers from out & inside Nokia, anyway nobody really seems to have good answers, so, like I usually say, when you want to get it done fast, you gotta do your research by yourself.

    Anyway, it appers that audio playing to the uplink can be achieved pretty easily and without any extra capabilities. I was testing this with all 13 that do not need any scpecial approval (and would be great if somebody could test and narrow it down to the minimal required set). So first define capabilities in your mmp file:

    CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData Location UserEnvironment PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ SwEvent SurroundingsDD

    And then the trick is not to use normal Audio player or recorder, but to use CDrmPlayerUtility. And I was testing it like this:

    iMdaAudioPlayerUtility = CDrmPlayerUtility::NewFilePlayerL(iFileName.iName, *this,80,(TMdaPriorityPreference)0x00060001);

    and in init coplete just call Play() and it plays the audio nicely to the uplink.

    yucca
    Hi yucca,
    I tried your solution using exact code that you have posted, but it didn't work with me, I didn't hear any sound at uplink !!
    And i don't know what is the problem!!
    Do have any suggestions please?

    Thanks

  10. #25
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Play audio to uplink:: Solution

    It should really work as it is, could be that Nokia fixed their internal implementations, thus disabling this workaround, or could be that you are having some error in there.

    Anyway, what kind-of errors do you get it callback functions ?

    yucca

  11. #26
    Registered User
    Join Date
    Jul 2006
    Posts
    38

    Re: play video/audio clips while talking in an active call

    Hi all

    I have also tried the code but whenever in the debugger the control reaches the object creation i.e.

    TRAPD(err,iDrmPlayerUtility = DrmPlayerUtility::NewFilePlayerL(KSoundFile,*this,
    KAudioPriority,(TMdaPriorityPreference)KAudioPreference));

    where KSoundFile is:
    _LIT( KSoundFile, "C:\\data\\Sounds\\Digital\\SoundTest.amr");

    I get a "Kern-Exec 0" Panic. When I checked the SDK then I saw some DLL named "DRMAudioPlayer.lib" mentioned in the description of the CDRMPlayerUtility class, I could not find this lib anywhere. Do i require this lib too.

  12. #27
    Regular Contributor
    Join Date
    Nov 2004
    Location
    California, USA
    Posts
    121

    Re: play video/audio clips while talking in an active call

    Hello,

    Nokia has changed the behavior of this class with a minor firmware release.

    This is an alternative.
    http://www.forum.nokia.com/document/...S60_3rd_Ed.htm
    I haven't implemented it yet because I didn't feel it looks promising. It has more legalize than documentation. There is little correlation between it and the existing APIs. All of this leaves me with quality, feature and deployment concerns.

    -jk

  13. #28
    Registered User
    Join Date
    Jul 2006
    Posts
    38

    Question Re: play video/audio clips while talking in an active call

    Hi John

    Thanks for your reply, but I have got confirmations from many users that they have been able to play the audio to the upstream successfully, but I am not able to figure out where I am making the mistake. Did you ever get this error in your development process.
    Hope to hear back from u soon.

    Regards
    Nitin

  14. #29
    Regular Contributor
    Join Date
    Nov 2004
    Location
    California, USA
    Posts
    121

    Re: play video/audio clips while talking in an active call

    Hello Nitin,

    I do not see the contradiction. Yes, I was able to get it to work. Unfortunately, newer firmwares behave differently. It works on my E70. *#0000# says '1.0610.05.07 30-05-06 Rm-24 Nokia E70'. We testing on an early N73. It worked. In the US, cingular is deploying a new N73. I don't have the fireware handy but it doesn't work.

    -jk

  15. #30
    Registered User
    Join Date
    Jul 2006
    Posts
    38

    Arrow Re: play video/audio clips while talking in an active call

    Hi John

    I am using two handsets. I too have a N73 but its firmware is a bit revises. It
    reads :
    "V 3.0638.0.0.30 3010-2006 RM-133 Nokia N73(12)".

    The code does not work on this and neither on E61. If "firmware" is an issue than we can never say for sure that whether will the application be able to run successfully on all the 3rd edition handsets. It by some way mean all developers will have to use the capabilities or the Nokia PRO support to develop the applications. So irritating...

    BTW can you just describe a bit the way you implemented it in your application.

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •