Skip to content

Conversation

@zuazo
Copy link
Contributor

@zuazo zuazo commented Mar 2, 2024

PsychoPy Versions

2023.2.3, release, dev

Apparently in 2022.2.5 version it worked. The bug was introduced afterwards.

What OSes is your PsychoPy running on?

Ubuntu-20.4, Windows 10

Bug Description

This patch fixes an issue where selecting an audio device in PsychoPy Builder preferences is not being saved correctly. There is no way to change the audio device but to manually edit the user configuration.

This same issue has been described here before:

This was closed believing it is fixed in 2024.1.0/dev, but it is not.

Solution

  • The audioDevice preference must be a list for the PsychoPy's internal settings validation to pass. This fixes the Apply and OK buttons.
  • Additionally, it ensures self.audioDevDefault is updated to reflect the newly selected audio device, allowing the Apply button to function correctly.

This change allows the audio device to be correctly selected, saved, and utilized in experiments.

@codecov
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Merging #6299 (13d691e) into dev (187809e) will decrease coverage by 0.01%.
Report is 9 commits behind head on dev.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6299      +/-   ##
==========================================
- Coverage   51.88%   51.88%   -0.01%     
==========================================
  Files         334      334              
  Lines       61677    61679       +2     
==========================================
- Hits        32003    32002       -1     
- Misses      29674    29677       +3     
Components Coverage Δ
app ∅ <ø> (∅)
boilerplate ∅ <ø> (∅)
library ∅ <ø> (∅)
vm-safe library ∅ <ø> (∅)

@TEParsons
Copy link
Contributor

We marked as fixed because the audio device can now be specified in the Sound component itself, the pref is only used as a backup now, but didn't realise the pref was breaking the dialog! Thanks for finding & fixing this - I pulled down your branch to test and all seems fine.

@TEParsons TEParsons merged commit 7f3dba2 into psychopy:dev Mar 4, 2024
@peircej peircej added the 🐞 bug Issue describes a bug (crash or error) or undefined behavior. label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Issue describes a bug (crash or error) or undefined behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants