Results 1 to 3 of 3

Thread: Connect Multiple MediaObjects to One AudioOutput

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

    Default Connect Multiple MediaObjects to One AudioOutput

    Is it possible to connect two or more MediaObjects directly to one AudioOutput? My application has a volume control which affect the volume of all the application's sounds. But I have a two MediaObjects and I can't find a way get them both to use the same AudioOutput. It seems that the second time I call createPath the first path is being disconnected.

    I found this article which mentions that implicit mixing of MediaObject audio sources is no longer possible and that there "will" be a mixing object that will make mixing audio sources possible. Did this ever happen? I find no reference to this in the documentation (I'm on Qt 4.6.2).

    Anyone achieved this before? Anyone got any insight?

  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: Connect Multiple MediaObjects to One AudioOutput

    Has anyone created or worked on a Qt application that has more than one potential notification sound and managed to get them playing simultaneously? I would have imagined that this would be quite common, especially for games.

    Is there another solution that someone can think of? Maybe I should create a new MediaObject and AudioOutput each time a sound needs to be played, using createPath. This would allow the sounds to be played at the same time, even two of the same sound to be played at the same time (desirable behaviour). I would need to call deleteLater() on MediaObject::finished(). I would also need to connect the application-wide VolumeSlider to each active AudioOutput somehow, which will be tricky seeing that the VolumeSlider does not emit any signals when it's been changed.

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

    Default Re: Connect Multiple MediaObjects to One AudioOutput

    It seems to be generally accepted, according to this thread (see quote below), that KDE multimedia framework is currently not capable of mixing sounds:

    Wearing my kdegames author hat, I must say that one requirement we have
    there is the ability not only to get sounds playing very fast when they
    are triggered, but also something that would help us preload short
    samples and have them ready for playback (without streaming), combined
    with the ability to mix several layers of these samples with a
    background track. There are no good solutions for this problem yet
    afaik. KDE Edu could also benefit from something like this.
    I'm glad that I found the reference to games as a game is a great example of where mixing sounds together would be required.

    As KDE uses Qt, I assume that this also means that Phonon is not capable of mixing sounds.

    If anyone knows differently, please let me know.

Similar Threads

  1. Change volume of AudioOutput
    By snah in forum Qt Programming
    Replies: 3
    Last Post: 1st December 2010, 21:41
  2. Phonon::AudioOutput changes UI?
    By snah in forum Qt Programming
    Replies: 2
    Last Post: 14th August 2010, 17:59
  3. Replies: 2
    Last Post: 12th June 2010, 02:21
  4. QSqlDatabase - How to connect to multiple database?
    By cutie.monkey in forum Qt Programming
    Replies: 4
    Last Post: 10th March 2010, 12:03
  5. Replies: 4
    Last Post: 10th November 2006, 15:38

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.