Results 1 to 4 of 4

Thread: Change volume of AudioOutput

  1. #1
    Join Date
    Sep 2009
    Location
    Tilburg, The Netherlands
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Change volume of AudioOutput

    Hi,

    I'm planning to use the Qt Multimedia framework to output raw audio data. I have several sources of which I want to change the volume independently, during playback.
    Do I need to scale the raw data myself to do this, or is there an easier way?

    I need the code run on linux(desktop and mobile) and windows.

    thanks, Hans

  2. #2
    Join Date
    Feb 2010
    Location
    Sydney, Australia
    Posts
    111
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Change volume of AudioOutput

    One way to do this would be to have each MediaObject linked to its own AudioOutput (using createPath) and then you could adjust the volume of each AudioOutput.

    I'm trying to link a number of MediaObjects to the same AudioOutput so that I can control the volume of a number of sources with one VolumeSlider linked to the AudioOutput. I can't get it working though - do you know if that's possible?

    BTW. I'm on Qt 4.6.2.

  3. #3
    Join Date
    Sep 2009
    Location
    Tilburg, The Netherlands
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Change volume of AudioOutput

    hi,

    yes that is what I ended up doing. My problem was (originally) that I couldn't use phonon since I had raw audio data not a wave file. Therefor I wanted to use the lower level QtMultimedia module (which has no volume control). In the end I just created a class which could turn the raw data into a wave file (i.e. create the propper headers and file structure) in memory.

    As for you'r problem with multiple AudioOutputs. I think it should work, but I never got around testing that. I had to put the project on hold due to a very busy period in my study. Maybe you should create a new thread and post some more details of your problem there.

  4. #4
    Join Date
    Feb 2010
    Location
    Sydney, Australia
    Posts
    111
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Change volume of AudioOutput

    Hi snah

    Good that you managed to get your problem sorted out.

    I have already created a thread where I explain the problem I'm having, but I haven't heard anything back yet. I would have thought that the way I'm trying to use Phonon would be very common, so I'm surprised that there isn't more about this problem on the web and that I haven't got a response yet.

    I've been advised by a guy who used to work on Phonon to get in touch with the mailing list kde-multimedia@kde.org. Hopefully I'll have more luck there.

Similar Threads

  1. Sound Volume
    By anafor2004 in forum Qt for Embedded and Mobile
    Replies: 7
    Last Post: 2nd February 2011, 06:03
  2. How do I access the system volume?
    By comwiz7 in forum Qt Programming
    Replies: 1
    Last Post: 10th May 2009, 22:46
  3. How to get the Volume name from QFileDialog?
    By vishal.chauhan in forum Qt Programming
    Replies: 0
    Last Post: 30th August 2008, 12:28
  4. Volume control for Windows XP
    By probine in forum Qt Programming
    Replies: 2
    Last Post: 30th May 2007, 06:18
  5. Volume Render
    By showhand in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2006, 10:04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.