Class AudioOutputInterface

  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.phonon.AudioOutputInterface
All Implemented Interfaces:

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);
    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 Class Summary
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
Field Summary
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
Constructor Summary
          This is an overloaded method provided for convenience.
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.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership

Constructor Detail


public AudioOutputInterface()
This is an overloaded method provided for convenience.

Method Detail


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() .


public abstract boolean setOutputDevice(int arg__1)


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:


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: