Code Monkey home page Code Monkey logo

Comments (3)

fengalin avatar fengalin commented on May 28, 2024

Getting position from the pipeline's clock is up to 4x faster than calling get_position.
There are still noticeable hangs in the waveform rendering, so any field borrowing or mutex in the listener & tracker should be avoided when possible.

from media-toc.

fengalin avatar fengalin commented on May 28, 2024

It turns out that cairo stroke is the time consuming part.
Stroking each segment individually is faster than stroking the whole waveform.
Next step: stroke as part of the double buffering mechanism... no surprise!
See: https://www.cairographics.org/threaded_animation_with_cairo/

Note: it would be great if we could draw incrementally in the same way as with current implementation in WaveformBuffer.update_samples. This would require being able to drop the beginning of the graphic and add a new part.

from media-toc.

fengalin avatar fengalin commented on May 28, 2024

Not totally satisfactory yet, but at least current state is such that the code in media-toc tries hard to minimize the time spent locking the UI thread and reduces the offset between the actual audio playback position and the waveform rendering.

from media-toc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.