[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    KAudioPlayer class
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2000-04-02 0:05:36
[Download RAW message or body]

   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 *-

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic