GithubHelp home page GithubHelp logo

Comments (1)

az75014 avatar az75014 commented on June 19, 2024

The issue with pause/play causing the audio to go to the timestamp specified by seek(position) and then restart from the beginning may have to do with the play method having an extra step of seek(0) at the end? I can't quite figure out why this step is there. If you use ffpyplayer directly the toggle_pause() method works exactly like you expect -- as a toggle, there is no need to play around with seek() at all as it remembers the time stamp.

EDIT: If in my own code I build in a delay (e.g. via Clock.schedule_once) between play and seek(position) by triggering the seek() via the callback then it works fine -- I guess timing issues are causing the extra "seek(0)" to fall after my own code is doing seek(position)? Seems like a bug to me?

Code snippet from audio_ffpyplayer.py:

    def play(self):
        if self._state == 'playing':
            super(SoundFFPy, self).play()
            return
        if not self._ffplayer:
            self.load()
        self._ffplayer.toggle_pause()
        self._state = 'playing'
        self.state = 'play'
        super(SoundFFPy, self).play()
        self.seek(0)

from kivy.

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.