Results 1 to 5 of 5

Thread: Phonon - Audio-Output-Problem

  1. #1
    Join Date
    Feb 2010
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Phonon - Audio-Output-Problem

    Hey,

    after many problems, I get phonon "working":

    When I click on an area, a 1-second-sound should be played.

    My problem is, that I get this warnings and a big latency (1 second or something like this), before playing the sound:

    Qt Code:
    1. WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface
    2. Qt Application(5432) Phonon::KdePlatformPlugin::createBackend: using backend: "Xine"
    To copy to clipboard, switch view to plain text mode 


    My Phonon-specific code is this:

    Qt Code:
    1. #include <phonon/audiooutput.h>
    2. #include <phonon/path.h>
    3. #include <phonon/mediaobject.h>
    4. #include <phonon/backendcapabilities.h>
    5.  
    6. // .....
    7.  
    8. Phonon::MediaObject *music =
    9. Phonon::createPlayer(Phonon::MusicCategory,
    10. Phonon::MediaSource("/home/fabi/Desktop/MobileDrumKit/MobileDrumKit/data/Music/15575_lewis_crash_bell.wav"));
    11. music->play();
    To copy to clipboard, switch view to plain text mode 

    I also tried to do this :

    Qt Code:
    1. QList<Phonon::AudioOutputDevice> audioOutputDevices =
    2. Phonon::BackendCapabilities::availableAudioOutputDevices();
    3. Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
    4.  
    5. audioOutput->setOutputDevice(audioOutputDevices[0]);
    To copy to clipboard, switch view to plain text mode 

    but no luck...

    Thanks in advance.

    Also, I want to know, how big the latency between clicking and hear the sound is usually.

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Phonon - Audio-Output-Problem

    Can you make the warning disappear by setting that application name?
    It's nice to be important but it's more important to be nice.

  3. The following user says thank you to axeljaeger for this useful post:

    nearlyNERD (8th May 2010)

  4. #3
    Join Date
    Feb 2010
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon - Audio-Output-Problem

    Yes, but only the first one.

    The second one and the high latency of 1 second is still here...

  5. #4
    Join Date
    Jun 2010
    Posts
    15
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Phonon - Audio-Output-Problem

    Also have this problem with latency

  6. #5
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Phonon - Audio-Output-Problem

    Well, the warning says something about the output engine used: "Xine". There has to be a way to select a different output engine. Try that to further boil down the problem to either the backend or the Qt frontend.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Multiple sound files in Phonon Audio
    By brent99 in forum Qt Programming
    Replies: 0
    Last Post: 8th March 2010, 21:26
  2. Reading audio AND video metadata from files (Phonon?)
    By garfunkel in forum Qt Programming
    Replies: 0
    Last Post: 1st March 2010, 07:32
  3. Phonon(video and audio separately)
    By Fastman in forum Qt Programming
    Replies: 3
    Last Post: 1st February 2010, 06:30
  4. QTCreator phonon accessing audio acquisition device
    By rahul2047 in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2009, 06:23
  5. Audio Recording with Phonon
    By Nemo in forum Qt Programming
    Replies: 4
    Last Post: 12th June 2008, 06:31

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.