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

Unable to add sound for opengl renderer #2144

Open
k4pran opened this issue Oct 3, 2021 · 0 comments
Open

Unable to add sound for opengl renderer #2144

k4pran opened this issue Oct 3, 2021 · 0 comments
Labels
issue:bug Something isn't working... For use in issues opengl Concerning the OpenGL renderer.

Comments

@k4pran
Copy link
Collaborator

k4pran commented Oct 3, 2021

Description of bug / unexpected behavior

When going through cairo's tests the below one failed that was testing sound, it doesn't seem to have implemented some of cairo's logic to add sound to a movie file.

I was trying to run the following test with opengl:

def test_add_sound(using_opengl_renderer, tmpdir):
    # create sound file
    sound_loc = Path(tmpdir, "noise.wav")
    f = wave.open(str(sound_loc), "w")
    f.setparams((2, 2, 44100, 0, "NONE", "not compressed"))
    for _ in range(22050):  # half a second of sound
        packed_value = struct.pack("h", 14242)
        f.writeframes(packed_value)
        f.writeframes(packed_value)

    f.close()

    scene = Scene()
    scene.add_sound(sound_loc)

Which results in

AttributeError: 'OpenGLRenderer' object has no attribute 'time'

Expected behavior

How to reproduce the issue

Code for reproducing the problem
class Example(Scene):
    def construct(self):
        self.add_sound("path/to/soundfile")

Additional media files

Images/GIFs

Logs

Terminal output
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR

System specifications

System Details
  • OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)):
  • RAM:
  • Python version (python/py/python3 --version):
  • Installed modules (provide output from pip list):
PASTE HERE
LaTeX details
  • LaTeX distribution (e.g. TeX Live 2020):
  • Installed LaTeX packages:
FFMPEG

Output of ffmpeg -version:

PASTE HERE

Additional comments

@k4pran k4pran added issue:bug Something isn't working... For use in issues opengl Concerning the OpenGL renderer. labels Oct 3, 2021
@MrDiver MrDiver moved this to 🆕 New in Dev Board Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue:bug Something isn't working... For use in issues opengl Concerning the OpenGL renderer.
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant