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 Phonon.MediaObject using PySide.phonon.Phonon.createPath() . To start playback, you call PySide.phonon.Phonon.MediaObject.play() on the media object.
mediaObject = Phonon.MediaObject(self) mediaObject.setCurrentSource(Phonon.MediaSource("/mymusic/barbiegirl.wav")) audioOutput = Phonon.AudioOutput(Phonon.MusicCategory, self) path = Phonon.createPath(mediaObject, audioOutput)The class supports changing the PySide.phonon.Phonon::AudioOutput.volume() . It is also possible to mute the sound.
To find out what Phonon.AudioOutputDevice s are available for AudioOutput , you can call BackendCapabilities.availableAudioOutputDevices() . A default device is selected by the backend, but it is possible to set the device to be used with PySide.phonon.Phonon::AudioOutput.setOutputDevice() . The PySide.phonon.Phonon::AudioOutput.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 .
Note that the default values of properties are dependent on the backend.
See also
Phonon.VolumeSlider Music Player Example BackendCapabilities Phonon Module
Parameters: |
|
---|
Creates a new AudioOutput that defines output to the system default device with the {Phonon::Category::}{ NoCategory } category
See also
Phonon.categoryToString() PySide.phonon.Phonon::AudioOutput.outputDevice()
Return type: | PySide.phonon.Phonon.Category |
---|
Returns the category of this output.
See also
Phonon.AudioOutput.AudioOutput()
Return type: | PySide.QtCore.bool |
---|
This property tells whether the output is muted.
Muting the output has the same effect as calling setVolume(0.0).
Parameters: | arg__1 – PySide.QtCore.bool |
---|
Return type: | unicode |
---|
This is the name that appears in Mixer applications that control the volume of this output.
Return type: | PySide.phonon.Phonon::AudioOutputDevice |
---|
This property holds the (hardware) destination for the output.
The default device is determined by the Phonon.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
PySide.phonon.Phonon::AudioOutput.outputDeviceChanged()
Parameters: | newAudioOutputDevice – PySide.phonon.Phonon::AudioOutputDevice |
---|
Parameters: | mute – PySide.QtCore.bool |
---|
This property tells whether the output is muted.
Muting the output has the same effect as calling setVolume(0.0).
Parameters: | newName – unicode |
---|
This is the name that appears in Mixer applications that control the volume of this output.
Parameters: | newAudioOutputDevice – PySide.phonon.Phonon::AudioOutputDevice |
---|---|
Return type: | PySide.QtCore.bool |
Parameters: | newVolume – PySide.QtCore.qreal |
---|
This is the current loudness of the output.
(it is using Stevens’ law to calculate the change in voltage internally).
See also
PySide.phonon.Phonon::AudioOutput.volumeDecibel()
Parameters: | newVolumeDecibel – PySide.QtCore.qreal |
---|
This is the current volume of the output in decibel.
0 dB means no change in volume, -6dB means an attenuation of the voltage to 50% and an attenuation of the power to 25%, -inf dB means silence.
See also
PySide.phonon.Phonon::AudioOutput.volume()
Return type: | PySide.QtCore.qreal |
---|
This is the current loudness of the output.
(it is using Stevens’ law to calculate the change in voltage internally).
See also
PySide.phonon.Phonon::AudioOutput.volumeDecibel()
Parameters: | newVolume – PySide.QtCore.qreal |
---|
Return type: | PySide.QtCore.qreal |
---|
This is the current volume of the output in decibel.
0 dB means no change in volume, -6dB means an attenuation of the voltage to 50% and an attenuation of the power to 25%, -inf dB means silence.
See also
PySide.phonon.Phonon::AudioOutput.volume()