From kde-core-devel Sun Apr 02 00:05:36 2000 From: Stefan Westerfeld Date: Sun, 02 Apr 2000 00:05:36 +0000 To: kde-core-devel Subject: KAudioPlayer class X-MARC-Message: https://marc.info/?l=kde-core-devel&m=95463393605721 Hi! I've just added KAudioPlayer to libkdecore, so if you have something to port which uses the KAudio class from libmediatool, it should be really easy. An example of using this class is: KAudioPlayer::play("/var/share/foo.wav"); If you want to use signals & slots, you can do something like: KAudioPlayer player("/var/share/foo.wav"); connect(&button, SIGNAL(clicked()), &player, SLOT(play())); The way it works is 1. [ KDE App ] KAudioPlayer generates event with KNotifyClient 2. [ KDE App ] KNotifyClient sends this via DCOP to knotify 3. [ knotify ] Plays via SimpleSoundServer interface artsd provides via MCOP 4. [ artsd ] Loads the file (if not already in cache) and plays it That way, the applications won't get linked to MCOP libraries, and aRts won't get linked to libk*/libq*/libx*. Cu... Stefan -- -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany KDE Developer, project infos at http://space.twc.de/~stefan/kde *-