How to play a file repeatedly?
lists at astrojar.org.uk
Fri Mar 12 13:11:40 GMT 2004
I want to play a sound file repeatedly, starting it again as soon as it has
finished playing. I have got it working by calling the following code each
time it finishes playing:
mPlayObject = factory.createPlayObject(audioFile, true);
and in the checkAudioPlay() method,
However, this reloads the file every time, which in the case of a network file
is an undesirable overhead. I tried the following when the play was complete:
Arts::poTime t0((long)0, (long)0, 0, string());
Arts::poTime current = mPlayObject->currentTime();
if (current.seconds || current.ms)
but it results in a long gap (typically 5 seconds) between plays, which for a
very short sound file is unacceptable.
How can I play a file repeatedly without gaps and without reloading each time?
More information about the kde-multimedia