Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompositeAudioClip not compute duration #2209

Open
CorrM opened this issue Aug 2, 2024 · 0 comments
Open

CompositeAudioClip not compute duration #2209

CorrM opened this issue Aug 2, 2024 · 0 comments
Labels
bug Issues that report (apparent) bugs.

Comments

@CorrM
Copy link

CorrM commented Aug 2, 2024

The __init__ function should look something like that:

        if not any([(e is None) for e in ends]):
            self.duration = max(ends)
            self.end = max(ends)
        elif not any([(d is None) for d in [c.duration for c in self.clips]]):
            self.duration = max([c.duration for c in self.clips])
            self.end = self.duration

because the docs for clips are:

clips
      List of audio clips, which may start playing at different times or
      together. If all have their ``duration`` attribute set, the
      duration of the composite clip is computed automatically.
@CorrM CorrM added the bug Issues that report (apparent) bugs. label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs.
Projects
None yet
Development

No branches or pull requests

1 participant