×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    40

    How to control volume for the Audio file.

    Hi all,
    Can anyone please suggest me a way as to how to get the control of the phone settings volume to control playing the audio file, which is a type of "CMdaAudioPlayerUtility" class. Also through the sdk i can see there are few api's to manipulate volume for the audio files for e.g (GetVolume() and SetVolume() ). But not very sure of how to use them specially GetVolume().
    Thanks
    Rahul

  2. #2
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: How to control volume for the Audio file.

    Hi,

    take one nave volume control and display it while playing video. And in increase/decrease the integer when selecting up/down arrows and set this integer value as volume.

    regards,
    eswar

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    40

    Thumbs up Re: How to control volume for the Audio file.

    Hi all,
    Thanks a lot eswar for your quick reply. The informatio you shared will definitely be useful for us.
    But there can be an easy way to find out the device information(e.g. Volume level etc.. ) using the CSettingInfo class.
    folowing is the way using which i retrived the volume set within the device.

    TInt getVol;
    CSettingInfo* settings = CSettingInfo::NewL(NULL);
    TInt err = settings->Get(SettingInfo::ERingingVolume, getVol);
    if(err == KErrNone)
    {
    //Now the volume level within 'getVol' can be set accordingly our need
    }
    similar ways it can be done for other device details as well(while giving the exact enum type 'SettingInfo::ERingingVolume').
    Hopes that this information will be usefull for all of us.
    Rahul

  4. #4
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: How to control volume for the Audio file.

    Hi,

    i think it's useful only for ringing volume not changes the volume for videoplayer utility. anyway check it once.

    regards,
    eswar

  5. #5
    Registered User
    Join Date
    Feb 2005
    Posts
    40

    Re: How to control volume for the Audio file.

    Hi eswar,
    I am not very sure about whether it will work for video or not, but with audio it works fine.
    Sometimes it do gives MMFAudioClient 4 panic, Strangest thing is no description is available for it
    Also it appears when the TInt value passed to SetVolume(TInt) gets 10 or more .

  6. #6
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Pune
    Posts
    77

    Re: How to control volume for the Audio file.

    Hi ,
    I was also facing with same problem , I get MMFAudioClient 4
    & MMFAudioClient 2 When I use SetVolume MaxVolume function.

    My problem was solved
    I first open the file .
    then in callback function MapcInitComplete , I write my code .

    I think we have to open file first to resolve such kind of panic .
    Everything Is Impossible , Until Someone Does It !!!!

  7. #7
    Regular Contributor
    Join Date
    Sep 2004
    Posts
    90

    Re: How to control volume for the Audio file.

    So anybody knows what "MMFAudioClient 4 panic" means?
    I also get this sad panic (only on Nokia E61 - on FP1/FP2 it's working).
    Br
    Tobias

  8. #8
    Registered User
    Join Date
    Feb 2008
    Posts
    209

    Re: How to control volume for the Audio file.

    Quote Originally Posted by tobias_stoeger View Post
    So anybody knows what "MMFAudioClient 4 panic" means?
    I also get this sad panic (only on Nokia E61 - on FP1/FP2 it's working).
    Br
    Tobias
    hi Dude,
    i am also getting same error mfaudioclient2 ,actually i am getting error , when i am caling cmdaAudioplayerutility::Setvolume() function.

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: How to control volume for the Audio file.

    Quote Originally Posted by soni_neeraj View Post
    hi Dude,
    i am also getting same error mfaudioclient2 ,actually i am getting error , when i am caling cmdaAudioplayerutility::Setvolume() function.
    You just invoked an old thread which I am not sure if tobias will even be checking it again. For SetVolume make sure the value is in the range 0-10, and also the CMdaAudioPlayerUtility is initialized before calling this function.

    Cheers,
    Mayank

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: How to control volume for the Audio file.

    Actually CMdaAudioPlayerUtility::SetVolume is documented well in current SDK-s:
    - it states that the volume level has to be between 0 and CMdaAudioPlayerUtility::MaxVolume()
    - and it also says that you will get EMMFMediaClientBadArgument if you set nonsense. And a file search in epoc32\include shows that EMMFMediaClientBadArgument is 4 (found in Epoc32\include\mmf\common\mmfpaniccodes.h).

    Which part is the hard to read one in the SDK Help?

  11. #11
    Registered User
    Join Date
    Feb 2008
    Posts
    209

    Re: How to control volume for the Audio file.

    Quote Originally Posted by mayankkedia View Post
    You just invoked an old thread which I am not sure if tobias will even be checking it again. For SetVolume make sure the value is in the range 0-10, and also the CMdaAudioPlayerUtility is initialized before calling this function.

    Cheers,
    Mayank
    thanks for reply , yes i am initializing CMdaAudioPlayerUtility object before calling SetVolume function. and i am using range between 0-10.

  12. #12
    Registered User
    Join Date
    Feb 2008
    Posts
    209

    Re: How to control volume for the Audio file.

    Quote Originally Posted by sameer.chaudhari View Post
    Hi ,
    I was also facing with same problem , I get MMFAudioClient 4
    & MMFAudioClient 2 When I use SetVolume MaxVolume function.

    My problem was solved
    I first open the file .
    then in callback function MapcInitComplete , I write my code .

    I think we have to open file first to resolve such kind of panic .
    Hi dude,
    i am doing the same thing ,first i am opening the file and then in callback function i am calling Maxvolume(), so at this point i am geting Mmfaudioclient4 error.

    regards
    Neeraj

  13. #13
    Registered User
    Join Date
    Jan 2009
    Posts
    22

    Re: How to control volume for the Audio file.

    Hi,all!
    I get MMFAudioClient2 and MMFAudioClient4
    when I call GetMaxVolume and SetVolume functions
    after I invoke "iPalyerUility = CMdaAudioPlayerUtility::NewFilePlayerL(aFileName, *this);"

    But it works when I call these two functions in the callback function MapcInitComplete.
    Indeed, the SDK help tells that these two functions raises a CMdaAudioPlayerUtility 1 panic if the audio player utility is not initialised.

    So I think we have to call these two functions after the player utility object has been initialised completely, or panics will occur.And the function MapcInitComplete notifies us the completing of the object.

Similar Threads

  1. audio file play problem
    By himsymbian in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2008-03-14, 06:48
  2. Volume control
    By kaka631 in forum Symbian
    Replies: 2
    Last Post: 2005-07-24, 16:12
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. Replies: 0
    Last Post: 2002-06-10, 12:24
  5. Control The File Size
    By Nokia_Archive in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2002-05-14, 11:36

Posting Permissions

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