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"
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"
To copy to clipboard, switch view to plain text mode
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();
#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();
To copy to clipboard, switch view to plain text mode
I also tried to do this :
QList<Phonon::AudioOutputDevice> audioOutputDevices =
Phonon::BackendCapabilities::availableAudioOutputDevices();
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
audioOutput->setOutputDevice(audioOutputDevices[0]);
QList<Phonon::AudioOutputDevice> audioOutputDevices =
Phonon::BackendCapabilities::availableAudioOutputDevices();
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
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.
Bookmarks