bmn
26th September 2012, 13:56
Hello,
while I did get Phonon to loop sound from a wav file, I'm observing in the Visual Studio output window that every time the sound is played, 6 threads appear to started and ended (six!). What I'm doing to play back is this:
audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
mediaObject = new Phonon::MediaObject(this);
Phonon::createPath(mediaObject, audioOutput);
connect(mediaObject, SIGNAL(aboutToFinish()), SLOT(doTheLoop()));
then
mediaObject->stop();
mediaObject->clearQueue();
mediaObject->setCurrentSource(absPath);
mediaObject->play();
and in the doTheLoop slot:
if (m_loop)
mediaObject->enqueue(*m_loop);
Why would it use so many threads, and how can I change that?
Secondly, is it possible to play multiple sounds at the same time?
Context: Qt 4.8.1, Windows 7 x64/86, Visual Studio 2010
while I did get Phonon to loop sound from a wav file, I'm observing in the Visual Studio output window that every time the sound is played, 6 threads appear to started and ended (six!). What I'm doing to play back is this:
audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
mediaObject = new Phonon::MediaObject(this);
Phonon::createPath(mediaObject, audioOutput);
connect(mediaObject, SIGNAL(aboutToFinish()), SLOT(doTheLoop()));
then
mediaObject->stop();
mediaObject->clearQueue();
mediaObject->setCurrentSource(absPath);
mediaObject->play();
and in the doTheLoop slot:
if (m_loop)
mediaObject->enqueue(*m_loop);
Why would it use so many threads, and how can I change that?
Secondly, is it possible to play multiple sounds at the same time?
Context: Qt 4.8.1, Windows 7 x64/86, Visual Studio 2010