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
Catch failed mixer init in legacy backend #541
Comments
Hi Sebastiaan, When trying to fix this for the Psychopy back-end as well by changing openexp/_canvas/psycho.py
to
I think I discovered pygame.mixer is also initialized by sampler (even when not using a sampler item).
Shall I make a pull request for removing
from openexp/_canvas/psycho.py? Or do you think this will break something on Mac OS or Ubuntu systems? |
Thanks for looking into this. Yes, I don't see why initializing the mixer in the PsychoPy canvas is necessary, or even makes sense. So feel free to remove it. As a suggestion (which is not relevant if you're going to remove the init altogether), it's always better to specify which |
Removed `pygame.mixer.init()` as it is initialized by *openexp.sampler._legacy.init_sound()*. This further fixes open-cogsci#541
OK. great! > Done! You think it would be safe to remove this for the expyriment back-end two? Deleting:
And if you want me to make a pull-request for that; on what branch? |
Set audiosystem_autostart to *False*. This skips the `mixer.init()' in [_experiment_control.py ](https://github.com/smathot/expyriment/blob/master/expyriment/control/_experiment_control.py#L303) as it is initialized by openexp.sampler._legacy.init_sound(). This further fixes open-cogsci#541
Set audiosystem_autostart to *False*. This skips the `mixer.init()' in [_experiment_control.py ](https://github.com/smathot/expyriment/blob/master/expyriment/control/_experiment_control.py#L303) as it is initialized by openexp.sampler._legacy.init_sound(). This further fixes #541
Set audiosystem_autostart to *False*. This skips the `mixer.init()' in [_experiment_control.py ](https://github.com/smathot/expyriment/blob/master/expyriment/control/_experiment_control.py#L303) as it is initialized by openexp.sampler._legacy.init_sound(). This further fixes #541
Currently, a
pygame.error
sometimes occurs when callingpygame.mixer()
. This prevents running the experiment, but could easily be caught to at least allow for soundless experiments.The text was updated successfully, but these errors were encountered: