org.kde.koala

Class KAudioPlayer

public class KAudioPlayer extends QObject

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()"));
 

UNKNOWN: This class provides one-shot-and-forget audio playing.

Constructor Summary
protected KAudioPlayer(Class dummy)
KAudioPlayer(String filename, QObject parent, String name)
Constructor.
KAudioPlayer(String filename, QObject parent)
KAudioPlayer(String filename)
Method Summary
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
QMetaObjectmetaObject()
voidplay()
Play function as slot.
static voidplay(String filename)
Static play function.

Constructor Detail

KAudioPlayer

protected KAudioPlayer(Class dummy)

KAudioPlayer

public KAudioPlayer(String filename, QObject parent, String name)
Constructor.

Parameters: filename Absolute path to the filename of the sound file to play parent A parent QObject for this KAudioPlayer name An internal name for this KAudioPlayer

UNKNOWN: Constructor.

KAudioPlayer

public KAudioPlayer(String filename, QObject parent)

KAudioPlayer

public KAudioPlayer(String filename)

Method Detail

className

public String className()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

metaObject

public QMetaObject metaObject()

play

public void play()
Play function as slot. Plays the soundfile given to the constructor.

UNKNOWN: Play function as slot.

play

public static void play(String filename)
Static play function.

Parameters: filename Absolute path to the filename of the sound file to play. if not absolute, goes off KDEDIR/share/sounds/ (preferred)

UNKNOWN: Static play function.