PDA

View Full Version : Phonon - Audio-Output-Problem



nearlyNERD
5th May 2010, 16:44
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:


WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface
Qt Application(5432) Phonon::KdePlatformPlugin::createBackend: using backend: "Xine"


My Phonon-specific code is this:


#include <phonon/audiooutput.h>
#include <phonon/path.h>
#include <phonon/mediaobject.h>
#include <phonon/backendcapabilities.h>

// .....

Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory,
Phonon::MediaSource("/home/fabi/Desktop/MobileDrumKit/MobileDrumKit/data/Music/15575_lewis_crash_bell.wav"));
music->play();

I also tried to do this :


QList<Phonon::AudioOutputDevice> audioOutputDevices =
Phonon::BackendCapabilities::availableAudioOutputD evices();
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;

audioOutput->setOutputDevice(audioOutputDevices[0]);

but no luck...

Thanks in advance.

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

axeljaeger
6th May 2010, 19:22
Can you make the warning disappear by setting that application name?

nearlyNERD
8th May 2010, 00:27
Yes, but only the first one.

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

Nickolay
18th July 2010, 12:22
Also have this problem with latency

axeljaeger
19th July 2010, 10:52
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.