Skip to content

Strange issue with Sound Component with variable based duration #2446

@frankgasking

Description

@frankgasking

Testing on PsychoPy 3.1.0 Win 32 Py2.7 edition (Running on Windows 10, 64-bit)

I've found a very strange and critical bug with the Sound Component which has been introduced in the 3.1.0 release (as detailed above).

Basically, if you set the actual duration of the sound as an actual number, then everything works fine. But if you attempt to set the duration with a variable/python code, then it seems to not generate the "frameRemains" attribute and check against this to see if the sound should stop. It just checks against the duration, which means if the duration and start is the same, then it seems to start and stop the sound at the same time.

It's not noticeable if the sound starts from 0 seconds, as the calculation works fine and has enough time to play before stopping, but if you bump it up to 2 on the start time - then you'll notice it.

Attached is a demonstration - first part is with the variable and a 2 second starting point. Second part shows the same, but with the duration hard-coded.

AudioTest.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions