pzvuk = new Phonon::MediaObject(this);
.
.
.
void MainWindow::zvuk1()
{
pzvuk->setCurrentSource(Phonon::MediaSource("/home/alen/QtSDK/writer/suma.wav"));
ozvuk = new Phonon::AudioOutput(Phonon::MusicCategory, this);
path = Phonon::createPath(pzvuk, ozvuk);
connect(pzvuk, SIGNAL(aboutToFinish()), this, SLOT(ponoviZ()));
pzvuk->play();
}
void MainWindow::zvuk2(){
pzvuk->setCurrentSource(Phonon::MediaSource("/home/alen/QtSDK/writer/oluja.wav"));
ozvuk = new Phonon::AudioOutput(Phonon::MusicCategory, this);
path = Phonon::createPath(pzvuk, ozvuk);
connect(pzvuk, SIGNAL(aboutToFinish()), this, SLOT(ponoviZ()));
pzvuk->play();
}
void MainWindow::zvuk3(){
pzvuk->setCurrentSource(Phonon::MediaSource("/home/alen/QtSDK/writer/ocean.wav"));
ozvuk = new Phonon::AudioOutput(Phonon::MusicCategory, this);
path = Phonon::createPath(pzvuk, ozvuk);
connect(pzvuk, SIGNAL(aboutToFinish()), this, SLOT(ponoviZ()));
pzvuk->play();
}
pzvuk = new Phonon::MediaObject(this);
.
.
.
void MainWindow::zvuk1()
{
pzvuk->setCurrentSource(Phonon::MediaSource("/home/alen/QtSDK/writer/suma.wav"));
ozvuk = new Phonon::AudioOutput(Phonon::MusicCategory, this);
path = Phonon::createPath(pzvuk, ozvuk);
connect(pzvuk, SIGNAL(aboutToFinish()), this, SLOT(ponoviZ()));
pzvuk->play();
}
void MainWindow::zvuk2(){
pzvuk->setCurrentSource(Phonon::MediaSource("/home/alen/QtSDK/writer/oluja.wav"));
ozvuk = new Phonon::AudioOutput(Phonon::MusicCategory, this);
path = Phonon::createPath(pzvuk, ozvuk);
connect(pzvuk, SIGNAL(aboutToFinish()), this, SLOT(ponoviZ()));
pzvuk->play();
}
void MainWindow::zvuk3(){
pzvuk->setCurrentSource(Phonon::MediaSource("/home/alen/QtSDK/writer/ocean.wav"));
ozvuk = new Phonon::AudioOutput(Phonon::MusicCategory, this);
path = Phonon::createPath(pzvuk, ozvuk);
connect(pzvuk, SIGNAL(aboutToFinish()), this, SLOT(ponoviZ()));
pzvuk->play();
}
To copy to clipboard, switch view to plain text mode
Bookmarks