How play part of a sound file?

Matthias Kretz kretz at
Fri Oct 5 12:39:02 BST 2007


first you should go to instead of The 
documentation you were looking at was "Generated on Fri Oct 6 00:29:29 2006"

Regarding your question: the current API is not meant for any exact timings 
(which is also impossible with xine at least). But if close to 3000ms/8000ms 
is good enough for you you can do the following:

m_media = new MediaObject;
AudioOutput *out = new AudioOutput(Phonon::MusicCategory, m_media);
Phonon::createPath(m_media, out);
connect(m_media, SIGNAL(tick(qint64)), SLOT(tick(qint64)));


void tick(qint64 position)
  if (position > 7900) {

On Friday 05 October 2007, Erik wrote:
> I need to play a part of a sound file, for example from 3000 ms to 8000
> ms. I looked at the documentation at
> [
>non/html/classPhonon_1_1AudioPlayer.html] without finding what I was looking
> for. There is "void seek (qint64 ms)", so I suppose I could call
> "seek(3000); play()" but that does not tell it to stop at 8000 ms.

Matthias Kretz (Germany)                            <><
MatthiasKretz at, kretz at,
Matthias.Kretz at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>
-------------- next part --------------
kde-multimedia mailing list
kde-multimedia at

More information about the kde-multimedia mailing list