|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.phonon.Effect
public class Effect
The Effect class is used to transform audio streams. An effect is a media node which is inserted into a path between a MediaObject
and an audio output node, for instance, an AudioOutput
. The Effect transforms the media stream on that path.
Examples may include simple modifiers, such as fading or pitch shifting, and more complex mathematical transformations. You can query the backend for available effects with BackendCapabilities::availableAudioEffects()
. Note that the effects available is dependent on the underlying system (DirectDraw, GStreamer, or QuickTime).
In order to use an effect, insert it into the path as follows:
Path path = Phonon::createPath(...); Effect *effect = new Effect(this); path.insertEffect(effect);The effect will immediately begin applying its transformations on the path. To stop it, remove the Effect from the path.
To create an effect, you use the EffectDescription class, which you get from availableAudioEffects()
. We give a code example below.
List<EffectDescription> effectDescriptions = BackendCapabilities.availableAudioEffects(); EffectDescription effectDescription = effectDescriptions.get(4); Path path = Phonon.createPath(mediaObject, audioOutput); Effect effect = new Effect(effectDescription); path.insertEffect(effect);An effect can have one or more parameters, which let you alter how the effect works, for instance, by specifying the depth of a reverb effect. See the
EffectParameter
class description for details. Phonon also provides EffectWidget
, which lets the user modify the parameters of an effect an the fly, e.g., with comboboxes.
EffectWidget
.
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 |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
Effect(EffectDescription description)
Constructs a new effect object with the given description and parent object. |
|
Effect(EffectDescription description,
QObject parent)
Constructs a new effect object with the given description and parent object. |
Method Summary | |
---|---|
EffectDescription |
description()
Returns the description of this effect. |
java.util.List |
inputPaths()
Returns the paths that inputs multimedia to this media node. |
boolean |
isValid()
Returns true if the backend provides an implementation of this class; otherwise returns false. |
java.util.List |
outputPaths()
Returns the paths to which this media node outputs media. |
java.util.List |
parameters()
Returns a list of parameters that this effect provides to control its behavior. |
java.lang.Object |
parameterValue(EffectParameter arg__1)
Returns the value of the given effect parameter. |
void |
setParameterValue(EffectParameter arg__1,
java.lang.Object value)
Sets the given effect parameter to the specified value. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
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 |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public Effect(EffectDescription description)
The EffectDescription object determines the type of the effect.
Phonon::BackendCapabilities::availableAudioEffects()
, and
public Effect(EffectDescription description, QObject parent)
The EffectDescription object determines the type of the effect.
Phonon::BackendCapabilities::availableAudioEffects()
, and
Method Detail |
---|
public final EffectDescription description()
public final java.util.List inputPaths()
outputPaths()
.
public final boolean isValid()
This does not guarantee that instances of the class works as expected, but that the backend has implemented the functionality for this class. For instance, Qt's GStreamer backend will return true for instances of the AudioOutput
class, even if there is a problem with GStreamer and it could not play sound.
public final java.util.List outputPaths()
inputPaths()
.
public final java.lang.Object parameterValue(EffectParameter arg__1)
parameters()
. setParameterValue()
, and EffectParameter
.
public final java.util.List parameters()
EffectParameter
, and EffectWidget
.
public final void setParameterValue(EffectParameter arg__1, java.lang.Object value)
Parameters for an effect are returned by parameters()
. You can check which QVariant::Type
an EffectParameter
takes with the EffectParameter::type()
function.
parameterValue()
, and EffectParameter
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |