×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55

    Problem with SetVolume and Audio playback

    Hey all,
    I'm using the CMdaAudioOutputStream class, together with the MMdaAudioOutputStreamCallback listener class, to play some regular PCM audio. However for some reason, when I call SetVolume() on the class, the MaoscPlayComplete() function gets called with an error code "-13", which seems to correspond to "KErrDied".

    Does anyone know what would cause this error to occur? The audio plays back without problem otherwise, only when SetVolume() is called does it show up.

    Thanks a lot.

    d.

  2. #2
    Registered User
    Join Date
    Nov 2005
    Location
    California, USA
    Posts
    33

    Re: Problem with SetVolume and Audio playback

    According to Nokia's samples this error occurs when a cellular call comes and takes over the local audio device.

  3. #3
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55

    Re: Problem with SetVolume and Audio playback

    Hello troyanker,
    that certainly makes sense, but unfortunately that's not the case with my problem. Unless the phone is receiving an inordinate number of calls every time I run my program, something else is going on. I seem to get this error just about every time I call SetVolume() in my program, even if this is within a span of a couple of minutes, when I rerun the program.

    Could there be some other cause as well, possibly related to the phone's hardware or firmware perhaps?

    d.

  4. #4
    Registered User
    Join Date
    Nov 2005
    Location
    California, USA
    Posts
    33

    Re: Problem with SetVolume and Audio playback

    Are you testing on real hardware or emulator? What version of SDK?

  5. #5
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55

    Re: Problem with SetVolume and Audio playback

    Hello Troyanker,
    I'm seeing this on the phone itself. It's a Nokia 6680. I'm compiling using Series 60 2nd Edition FP2, Symbian v8.0a.

    d.

  6. #6
    Registered User
    Join Date
    Nov 2005
    Location
    California, USA
    Posts
    33

    Re: Problem with SetVolume and Audio playback

    I do not have any useful suggestions other then to check that the value you pass to SetVolume() is less than equal to MaxVolume()

  7. #7
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55

    Re: Problem with SetVolume and Audio playback

    Hello Troyanker,
    yeah, this is really a strange problem.
    I had already been checking the input values to SetVolume() to make sure they weren't invalid.
    Here's something more that's even more loopy. I got hold of another 6680 phone and tried the exact same program (no changes or rebuilds) on this second phone with the same data. There were no problems with calling SetVolume() to change the volume. No crashes, freezes, or returned error codes. Everything worked fine.

    d.

  8. #8
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    55

    Re: Problem with SetVolume and Audio playback

    Hello all,
    I finally figured out the problem. In this case the problem wasn't with the "SetVolume" function per se. Rather this reason is due to a quirk of the Nokia 6680.
    All Nokia phones allow you to have some sort of sound or tone play when you push a button. For some reason, with the 6680, when you push a button and the tone plays, this sound playback can interfere with the audio device on the phone, and cause a Symbian program that's using the audio device at the time to receive an abort code.
    To resolve this, I turned off the button tones so that a user could push buttons to change the volume of the audio playback without any problems. You can also set the phone to use the "Silent" profile, which automatically includes turning off the button tones. I have dealt with more than a few Nokia Symbian phones, and this is the first time I've actually encountered this issue. If anyone knows of any other phones which also suffer from this, feel free to post and let everyone know.

    d.

  9. #9
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    113

    Re: Problem with SetVolume and Audio playback

    Hi Troyanker,

    Quote Originally Posted by troyanker
    According to Nokia's samples this error occurs when a cellular call comes and takes over the local audio device.
    I am interested in information about KErrDied specifically in combination with outgoing calls. Can you specify which Nokia sample you are referring to, or can you even suggest a specific nokia document to me?

    Many thanks, Marcel

  10. #10
    Registered User
    Join Date
    Jun 2006
    Location
    London
    Posts
    22

    Re: Problem with SetVolume and Audio playback

    drakest1,

    Code:
    Hello all,
    I finally figured out the problem. In this case the problem wasn't with the "SetVolume" function per se. Rather this reason is due to a quirk of the Nokia 6680.
    All Nokia phones allow you to have some sort of sound or tone play when you push a button. For some reason, with the 6680, when you push a button and the tone plays, this sound playback can interfere with the audio device on the phone, and cause a Symbian program that's using the audio device at the time to receive an abort code.
    To resolve this, I turned off the button tones so that a user could push buttons to change the volume of the audio playback without any problems. You can also set the phone to use the "Silent" profile, which automatically includes turning off the button tones. I have dealt with more than a few Nokia Symbian phones, and this is the first time I've actually encountered this issue. If anyone knows of any other phones which also suffer from this, feel free to post and let everyone know.
    
    d.
    Interesting to read about the button tones. I have something to add to this though. Even I have been using few Nokia phones and initially I was getting the same weird problem with SetVolume() on 6630, but it works fine perfectly on 6620. I've built the app against Symbian 6.1 /v1.2 SDK.

    I definitely will have to try disabling the button tones. Currently am away from my development environment, but will do so as soon as I get a chance.

    Kishore.

  11. #11
    Registered User
    Join Date
    Nov 2008
    Posts
    10

    Smile Re: Problem with SetVolume and Audio playback

    KErrDied caused when another process having higher priority takes over the audio device from the process that is using the device now. Set Higher priority may solve the problem.

  12. #12
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Problem with SetVolume and Audio playback

    Hi Mike,

    It's really great to see new contributors helping out and answering questions! In future though, your efforts will be more appreciated if you answer the more recent posts - this one was from 2006.

    Depending on the phone, exactly the same error can be indicated by KErrInUse, or KErrAccessDenied, these two are more common on more recent devices.

    Sorcery

Posting Permissions

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