Results 1 to 2 of 2

Thread: Replot large wav file data

  1. #1
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Replot large wav file data

    Hi,

    I am plotting a .wav file using qwt5.2 svn. The file is around 1 minute long. The number of data points are around 10 lakh points. I am trying to move a marker around 100 ms (replot every 100 ms) to synchronize with the audio. Somehow the marker is moving very slowly.

    Any suggestions on how I should call replot and setrawdata.

    Sample code

    tick(qint64 time)
    {
    indicator_x1[0] = ((time / (double)1000))* Audio->getSampleRate();
    indicator_x1[1] = indicator_x1[0];
    indicator_x2[0] = -1;
    indicator_x2[1] = +1;
    curve->setRawData(indicator_x1, indicator_x2,2); // This statement seems to be the problem.
    qwtPlot->replot();

    }


    regards
    sachin.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,195
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Replot large wav file data

    Quote Originally Posted by Sachtech View Post
    I am trying to move a marker around 100 ms (replot every 100 ms) to synchronize with the audio. Somehow the marker is moving very slowly.
    When the marker is the only thing, that is moving you should cache the scene below the marker in a pixmap. If you implement the marker with a QwtPlotPicker, you don't have to implement the cache yourself, otherwise overload QwtPlot::drawItems().

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    Sachtech (6th January 2009)

Similar Threads

  1. data is not appending to the file
    By sudheer in forum Qt Tools
    Replies: 2
    Last Post: 3rd April 2008, 12:39
  2. Getting sound data from a wave file
    By ko9 in forum Qt Programming
    Replies: 1
    Last Post: 12th October 2007, 11:23
  3. FSWriteFork in MAC OS to write data to a file.
    By vishal.chauhan in forum General Programming
    Replies: 5
    Last Post: 2nd July 2007, 06:48
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. Transferring data input from a Widget to a cpp file
    By Ahmad in forum Qt Programming
    Replies: 1
    Last Post: 10th March 2007, 09:59

Bookmarks

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.