blob: b9d1f2976e39609ab9fe10009aa9c3ca5fa370ec (
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
|
#include <QtGui>
#include <phonon/phononnamespace.h>
#include <phonon/audiooutput.h>
#include <phonon/seekslider.h>
#include <phonon/mediaobject.h>
#include <phonon/volumeslider.h>
#include <phonon/backendcapabilities.h>
#include <phonon/effect.h>
#include <phonon/effectparameter.h>
#include <phonon/objectdescriptionmodel.h>
#include <QList>
int main(int argv, char **args)
{
QApplication app(argv, args);
//![0]
QList<Phonon::EffectDescription> effectDescriptions =
Phonon::BackendCapabilities::availableAudioEffects();
//![1]
QList<Phonon::AudioOutputDevice> audioOutputDevices =
Phonon::BackendCapabilities::availableAudioOutputDevices();
//![1]
foreach (Phonon::EffectDescription effectDescription, effectDescriptions) {
Phonon::Effect *effect = new Phonon::Effect(effectDescription);
// ... Do something with the effect, like insert it into a media graph
}
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
audioOutput->setOutputDevice(audioOutputDevices[0]);
//![0]
return app.exec();
}
|