[Qt-interest] Phonon lag on mouse move
Chris Hudson
Chris_Hudson at ieee.org
Sun Aug 22 04:11:19 CEST 2010
Hello,
I'm using Qt 4.6.3. I have an issue where I use Signals and Slots to connect
a button clicked event to clear the current screen and pop a new one. Inside
this slot, the first action is a call to play a sound effect. I have a need
to possibly play many sound effects in a short amount of time, so I am using
a circular array of phonon media objects.
The sound effect seems to play instantly and fine in most cases, but if I
actively move my cursor after I click the button, the page loads fine, but
the sound effect seems to get delayed (it seems to play _exactly_ after the
page is done fading in, actually). It almost seems the play call gets pushed
behind fade-in call. If I remove the fade-in, I don't notice the delay.
Is there a reason for this particular behavior or does it seem like I'm
implementing things incorrectly? I am a bit new to Qt.
As a side note, I also noticed the same problem for anything that I'm using
where I'm playing a sound && calling something that invokes a chunk of
paintEvents.
My only guess would be that calling the mediaObject->play() is handled by
Phonon on another thread, and my call to fade in takes place before Phonon
gets the chance to hop back in the main thread, then has to wait on the fade
to finish. This is probably a completely incorrect guess. I'm not sure why
it would require me to move my cursor to notice the issue. Any and all help
is greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100821/86a19fa6/attachment.html
More information about the Qt-interest-old
mailing list