Skip to content

ENH: Allow non-WASAPI audio devices#6922

Merged
peircej merged 1 commit intopsychopy:devfrom
zeyus-research:feature/audio_backend_ptb_allow_non_WASAPI
Oct 25, 2024
Merged

ENH: Allow non-WASAPI audio devices#6922
peircej merged 1 commit intopsychopy:devfrom
zeyus-research:feature/audio_backend_ptb_allow_non_WASAPI

Conversation

@zeyus
Copy link
Copy Markdown
Contributor

@zeyus zeyus commented Oct 18, 2024

We need to use ASIO drivers for a particular hardware soundcard, so I have compiled a custom pyaudio + psychtoolbox with ASIO support, but psychopy filters out non-WASAPI audio devices.

This adds a config option that on windows allows you to use ASIO (or WDM-KS if you would even want to).

The default for prefs.hardware['audioWASAPIOnly'] is True for windows, False otherwise.

This isn't necessarily useful for anything outside of edge cases like ours, but I can imagine that more than one research group uses ASIO low-latency hardware with multi-channel output support.

On a separate note, if it's useful, I can make another PR with some modifications I made to SoundPTB to allow for an arbitrary number of output channels (not just mono or stereo), we use 3-channel output (left, right and a Manchester Encoded trigger channel to a trigger box).

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 50.71%. Comparing base (fcc9a04) to head (7a0b6cf).
Report is 32 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6922   +/-   ##
=======================================
  Coverage   50.71%   50.71%           
=======================================
  Files         333      333           
  Lines       61685    61688    +3     
=======================================
+ Hits        31285    31287    +2     
- Misses      30400    30401    +1     
Components Coverage Δ
app ∅ <ø> (∅)
boilerplate ∅ <ø> (∅)
library ∅ <ø> (∅)
vm-safe library ∅ <ø> (∅)

@peircej peircej requested review from mdcutone and removed request for mdcutone October 18, 2024 14:20
@peircej peircej merged commit c015311 into psychopy:dev Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants