summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KAudioPlayer.java
blob: 5ef378e5f9e498578c12301ff8c1ed4fdab8142b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQObject;
import org.kde.qt.TQObject;

/**

 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 retquire 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:
 <pre>
   KAudioPlayer.play("/var/share/foo.wav");
 </pre>
 If you want to use signals & slots, you can do something like:
 <pre>
   KAudioPlayer player("/var/share/foo.wav");
   connect(&button, SIGNAL("clicked()"), &player, SLOT("play()"));
 </pre>
 		@short    This class provides one-shot-and-forget audio playing.

*/
public class KAudioPlayer extends TQObject  {
	protected KAudioPlayer(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Constructor.
			@param filename Absolute path to the filename of the sound file to play
			@param parent A parent TQObject for this KAudioPlayer
			@param name An internal name for this KAudioPlayer
			 		@short    Constructor.
	*/
	public KAudioPlayer(String filename, TQObject parent, String name) {
		super((Class) null);
		newKAudioPlayer(filename,parent,name);
	}
	private native void newKAudioPlayer(String filename, TQObject parent, String name);
	public KAudioPlayer(String filename, TQObject parent) {
		super((Class) null);
		newKAudioPlayer(filename,parent);
	}
	private native void newKAudioPlayer(String filename, TQObject parent);
	public KAudioPlayer(String filename) {
		super((Class) null);
		newKAudioPlayer(filename);
	}
	private native void newKAudioPlayer(String filename);
	/**	
		 Play function as slot.
			 Plays the soundfile given to the constructor.
			 		@short    Play function as slot.
	*/
	public native void play();
	/**	
		 Static play function.
			@param filename Absolute path to the filename of the sound file to play.
		                if not absolute, goes off KDEDIR/share/sounds/ (preferred)
			 		@short    Static play function.
	*/
	public static native void play(String filename);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}