|
Last change
on this file since 151 was 2, checked in by Dmitry A. Kuminov, 16 years ago |
|
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
|
File size:
740 bytes
|
| Line | |
|---|
| 1 | #include <QtGui>
|
|---|
| 2 |
|
|---|
| 3 | #include <phonon/audiooutput.h>
|
|---|
| 4 | #include <phonon/mediaobject.h>
|
|---|
| 5 | #include <phonon/volumeslider.h>
|
|---|
| 6 |
|
|---|
| 7 | int main(int argv, char **args)
|
|---|
| 8 | {
|
|---|
| 9 | QApplication app(argv, args);
|
|---|
| 10 | app.setApplicationName("Volume slider tester");
|
|---|
| 11 |
|
|---|
| 12 | Phonon::MediaObject *mediaObject = new Phonon::MediaObject;
|
|---|
| 13 | mediaObject->setCurrentSource(QString("/home/gvatteka/Music/Lumme-Badloop.ogg"));
|
|---|
| 14 |
|
|---|
| 15 | //! [0]
|
|---|
| 16 | Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory);
|
|---|
| 17 | Phonon::createPath(mediaObject, audioOutput);
|
|---|
| 18 |
|
|---|
| 19 | Phonon::VolumeSlider *volumeSlider = new Phonon::VolumeSlider;
|
|---|
| 20 | volumeSlider->setAudioOutput(audioOutput);
|
|---|
| 21 | //! [0]
|
|---|
| 22 |
|
|---|
| 23 | mediaObject->play();
|
|---|
| 24 |
|
|---|
| 25 | volumeSlider->show();
|
|---|
| 26 |
|
|---|
| 27 | return app.exec();
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.