KAudioPlayer Class Reference
This class provides one-shot-and-forget audio playing. More...
#include <kaudioplayer.h>
Inheritance diagram for KAudioPlayer:


Public Slots | |
void | play () |
Play function as slot. | |
Public Member Functions | |
KAudioPlayer (const QString &filename, QObject *parent=0, const char *name=0) | |
Constructor. | |
~KAudioPlayer () | |
Destructor. | |
Static Public Member Functions | |
void | play (const QString &filename) |
Static play function. |
Detailed Description
This class provides one-shot-and-forget audio playing.You will never know if what you wanted to play really got played.
It doesn't require linking any special libraries, as it operates over DCOP. In the current implementation, it only indirectly communicates with the aRts soundserver, using knotify as DCOP -> MCOP bridge.
Due to that fact, if you need "fast" response times, more control or feedback, use the MCOP interfaces rather than this.
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()));
Definition at line 55 of file kaudioplayer.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 33 of file kaudioplayer.cpp. References KStdAction::name(). |
|
Destructor.
Definition at line 39 of file kaudioplayer.cpp. |
Member Function Documentation
|
Static play function.
Definition at line 44 of file kaudioplayer.cpp. |
|
Play function as slot. Plays the soundfile given to the constructor. Definition at line 50 of file kaudioplayer.cpp. References KNotifyClient::userEvent(). |
The documentation for this class was generated from the following files: