×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    QMediaPlayer volume issue

    Hello everyone.

    I hope this is the right place to post this.
    I am using QMediaPlayer to play local media or radio streams, but i have an issue with the volume of the playback when i try to increase it. It simply jumps from the lower value directly to the higher one, as opposed to the case when i decrease the volume. In this case the volume decreases nice and smoothly, in a continuous manner, as one would expect. I am using a simple qslider for the volume, and i have connected the signal valueChanged (or sliderMoved, etc) Does any one know anything about this, why is the volume jumping when the volume is increased, and how could be fixed ?

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: QMediaPlayer volume issue

    What value you are passing to setVolume () API?
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    256

    Re: QMediaPlayer volume issue

    Have you set the tracking of the slider?

    yourslider.setTracking(true);

    since the class reference says:

    valueChanged() Emitted when the slider's value has changed. The tracking() determines whether this signal is emitted during user interaction.

  4. #4
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    Re: QMediaPlayer volume issue

    Yes, i have definitely checked the tracking checkbox of the volume slider. The weird thing is that when I move the slider "down", to decrease the volume, everything runs as it should. Trying to increase the volume, would trigger however the jump of the volume.
    @kkrish. The value sent to the setVolume is of course the one returned by the valueChanged signal of the slider.

    I don't know, but i am leaning to believe that it may be a bug of the qmediaplayer, because by chance i picked a simple player from the store, and that one exhibits the exact very same behavior. Volume decrease works perfectly, however volume increase is subjected to the same jump from low to high volume. For now I have removed the volume slider, and i am using the volume hardware keys only, but i would really like to add the volume slider back.

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    256

    Re: QMediaPlayer volume issue

    Have you debuged which is the problem, not getting the new value or setVolume not setting the value properly?

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    Re: QMediaPlayer volume issue

    I am not sure i quite understand your point. The values coming from the slider are varying right, as the debug shows, but the actual volume doesn't, when the volume is being increased. I guess then that something happens after the setVolume call was made.

  7. #7
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: QMediaPlayer volume issue

    Can you share your test app? I would like to see it further.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  8. #8
    Registered User
    Join Date
    Nov 2011
    Posts
    80

    Re: QMediaPlayer volume issue

    Quote Originally Posted by geco0ol View Post
    It simply jumps from the lower value directly to the higher one, as opposed to the case when i decrease the volume. In this case the volume decreases nice and smoothly, in a continuous manner, as one would expect.
    I see the same issue on one of my apps. Sliding to a lower volume works smooth, but sliding to a higher volume stutters. For me it seems, setting a higher volume takes a lot of CPU time for a short while and the ui isn't responsive in this time. Looks like a bug. BTW, i'm using Phonon instead of QMediaPlayer.

  9. #9
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    Re: QMediaPlayer volume issue

    @kkrish. I appreciate ! I will set up a little test project and send it over to you. Saddly my nokia 701 was stolen, and right now i cannot set up the test project (It's not running on the simulator). It will take around a week or two until i will get another one. In the mean while i have tested the issue on meego harmattan 1.2, and the issue doesn't seem to be present as well. Based on this, on my unconfirmed suppositions (i also noticed an occasional sluggishness while dragging the slider up) and Johnny_b's claims, i am now thinking that it may be related to CPU temporary extra load. What i cannot buy though, is the reason for which this is happening only on volume up.
    Last edited by geco0ol; 2012-03-21 at 20:13. Reason: typo

  10. #10
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: QMediaPlayer volume issue

    Hi geco0ol,

    The issue is strange to me also. So I though to look into it.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  11. #11
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    Re: QMediaPlayer volume issue

    Hey kkrish

    As promised, after getting a new nokia 701, i was able to setup a very simple and basic project, which exhibits the same behavior as my project. If you agree i will send the test project to your yahoo email listed in your profile, as i cannot attach the test project to this post.

    Regards,
    I am looking forward to hear news from your investigation.

  12. #12
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: QMediaPlayer volume issue

    Hi,

    Yes, Please send your test code at my gmail id kkrish121@gmail.com
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  13. #13
    Registered User
    Join Date
    Apr 2009
    Posts
    506

    Re: QMediaPlayer volume issue

    HI gecoOol

    it would be nice to see the code
    I suspect that you have data bind loop. ie signal from changed volume makes your slider moves and moving slider changes volume and so on

    I'm using QMediaPlayer on Symbain/Harmattan and never observe such issue, so its probably slider's issue
    To check this you can put debug output near volume changing method of QMediaPlayer instance and check what values comes to the method

    regards
    Symbian & Qt developer. http://vladest.org

  14. #14
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    Re: QMediaPlayer volume issue

    Hey vladest

    I don't think it is the case with the loop. As explained, when lowering the volume everything runs perfect. When increasing the volume, the values shown in the debug are varying continuously as one would expect, yet the volume jumps. Give me an email address, and i can send you the test project.

  15. #15
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: QMediaPlayer volume issue

    Hi geco0ol,

    I run the code which you have sent and it is running very smooth without an issue on Nokia E7 Belle.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

Similar Threads

  1. QMediaPlayer lag
    By dgptapov in forum [Archived] Qt Mobility Project
    Replies: 1
    Last Post: 2012-01-19, 10:08
  2. QMediaPlayer on N8
    By abashir in forum [Archived] Qt Mobility Project
    Replies: 7
    Last Post: 2011-07-12, 05:03

Posting Permissions

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