com.trolltech.qt.phonon
Class AudioOutputInterface
java.lang.Object
com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.phonon.AudioOutputInterface
- All Implemented Interfaces:
- QtJambiInterface
public abstract class AudioOutputInterface
- extends QtJambiObject
The AudioOutput
class is used to send data to audio output devices. The AudioOutput
class plays sound over a sound device. The audio output needs to be connected to a MediaObject
using createPath(). To start playback, you call play()
on the media object.
Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
mediaObject->setCurrentSource(Phonon::MediaSource("/mymusic/barbiegirl.wav"));
Phonon::AudioOutput *audioOutput =
new Phonon::AudioOutput(Phonon::MusicCategory, this);
Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);
The class supports changing the volume()
. It is also possible to mute the sound. To find out what AudioOutputDevices are available for AudioOutput
, you can call BackendCapabilities::availableAudioDevices(). A default device is selected by the backend, but it is possible to set the device to be used with setOutputDevice()
. The outputDeviceChanged()
signal will be emitted if the device changes.
If an error occurs with the playback, for instance, if no valid output device is found, the media object will receive a stateChanged() signal with the ErrorState
.
See also:
Phonon::VolumeSlider
, Music Player Example, BackendCapabilities, and Phonon Module.
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
currentSender |
Method Summary |
abstract int |
outputDevice()
This property holds the (hardware) destination for the output. |
abstract boolean |
setOutputDevice(int arg__1)
|
abstract void |
setVolume(double arg__1)
This is the current loudness of the output. |
abstract double |
volume()
This is the current loudness of the output. |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AudioOutputInterface
public AudioOutputInterface()
- This is an overloaded method provided for convenience.
outputDevice
public abstract int outputDevice()
- This property holds the (hardware) destination for the output.
The default device is determined by the Category
and the global configuration for that category. Normally you don't need to override this setting - letting the user change the global configuration is the right choice. You can still override the device though, if you have good reasons to do so.
- See also:
outputDeviceChanged()
.
setOutputDevice
public abstract boolean setOutputDevice(int arg__1)
setVolume
public abstract void setVolume(double arg__1)
- This is the current loudness of the output.
(it is using Stevens' law to calculate the change in voltage internally).
- See also:
- volumeDecibel.
volume
public abstract double volume()
- This is the current loudness of the output.
(it is using Stevens' law to calculate the change in voltage internally).
- See also:
- volumeDecibel.