[Qt-jambi-interest] Standalone Phonon?

Erwin Mueller devent.ml at deventm.org
Sat Aug 22 16:10:10 CEST 2009


Hi,
it is possible to use only Phonon of Qt Jambi with a Swing application? I just 
tried it but I get some errors and I'm not sure if it's correct.

I try it like that:

		QApplication app = new QApplication(new String[0]);

		QApplication.setApplicationName(Thread.currentThread().toString());
		File outputFile = new File("/tmp/toneplayer2513521231115613486wav");

		MediaObject mediaObject = new MediaObject(app);
		mediaObject.setCurrentSource(new MediaSource(outputFile
				.getAbsolutePath()));
		AudioOutput audioOutput = new AudioOutput(Category.MusicCategory, app);
		Path path = Phonon.createPath(mediaObject, audioOutput);

		mediaObject.play();

		QApplication.exec();

I get the warnings:
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin 
could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin 
could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin 
could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin 
could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin 
could not be loaded 
WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no 
objectName ) to  Phonon::AudioOutput ( no objectName ). 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin 
could not be loaded 

And there is no sound. I tried the MediaPlayer demo and it works with my wav-
file. I added in the classpath qtjambi-4.5.2_01.jar and qtjambi-linux32-
gcc-4.5.2_01.jar, using Eclipse.

So, my first question is that possible, using Phonon in a Swing app? And the 
second, why I get the warnings?

Thank you very much.
-- 
Erwin Mueller, erwin.mueller at deventm.org
http://www.global-scaling-institute.de/
http://www.deventm.org



More information about the Qt-jambi-interest mailing list