Results 1 to 2 of 2

Thread: Play a section of an audio file (phonon)

  1. #1
    Join Date
    Aug 2015
    Qt products
    Qt4 Qt5
    Unix/X11 Windows

    Default Play a section of an audio file (phonon)

    Hi All,
    Is there a way to tell a Phonon::MediaObject to play part of an audio file? I can use 'seek' to tell it to start at a certain time, but I'd also like to be able to tell it to stop at a certain time. I tried setting the tick interval and connecting MediaObject::tick to MediaObject:ause, but the delay is too long on that (about 0.15 seconds).

    I'm using PyQt 4.6.2 (Qt 4.6.2), which I realize is a bit old, but it's all that's available to me.

  2. #2
    Join Date
    Aug 2015
    Qt products

    Default Re: Play a section of an audio file (phonon)

    Don't have a solution but FWIW...

    I have a program that does exactly as you describe: set the tickinterval to 10mS and stop the playing when a predetermined end time is reached. The play lengths are at most a few seconds, sometimes less than 1S. This worked fine in Fedora-15 / PyQt-4.8.6 / Qt-4.7.4. But after upgrading my system to Fedora 21 / PyQt-4.11.3 / Qt 4.8.6 I now see the same effect that you do: the tick handler function seems to be called, by eye-balling output of a print statement in it, every 150mS or so despite the tickinterval setting.

    I hope someone can suggest a solution for this.

Similar Threads

  1. Replies: 0
    Last Post: 19th September 2011, 10:11
  2. how to play audio file in qml
    By hema in forum Newbie
    Replies: 0
    Last Post: 10th August 2011, 10:57
  3. Replies: 3
    Last Post: 3rd April 2011, 11:57
  4. Phonon won't play audio file
    By kar in forum Qt Programming
    Replies: 5
    Last Post: 29th October 2010, 01:41
  5. Replies: 0
    Last Post: 5th August 2008, 10:54

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.