Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Obtaining system volume/mute settings.
Forum Updated to NodeBB v4.3 + New Features

Obtaining system volume/mute settings.

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cdonham
    wrote on last edited by
    #1

    I am running Qt 5.2.1. I am using QAudioOutput to play music for my Android application.

    On my tablet, if I mute the system sound and then run my application, sound plays.
    If I turn the system volume down to something very quiet and the run my application, sound plays at the default setting for the application.

    I would like my application to honor the system settings for volume (is it set on mute or vibrate? what is the system volume?). I understand that I cannot change these settings from my application within Qt (see, for example, "Change System Volume":https://qt-project.org/forums/viewthread/17839) -- that's fine.

    My question is not how do I change the system settings, but rather how do I simply obey them? Its problematic that someone might play my game in a meeting having muted the system sound and find that instead my game starts blaring music !

    I can google how to write the java code to try to get access to the settings for my android application (see, for example, "AudioManager":http://developer.android.com/reference/android/media/AudioManager.html). But using Qt, my goal is to by OS agnostic and be able to run under Windows as well. So my hope is that there is some way I am missing to sample the system state within Qt rather than having to make my own, OS dependent solution.

    Suggestions? Is there some way to do this within Qt that I am missing?

    Thanks.

    Chris

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved