cleanup: drop the vendored psychopy-sounddevice fallback, use PTB everywhere - #336
Merged
pellet merged 2 commits intoAug 29, 2026
Merged
Conversation
pellet
force-pushed
the
cleanup/remove-psychopy-sounddevice
branch
6 times, most recently
from
August 29, 2026 13:10
9441069 to
7b35b90
Compare
…rywhere Psychtoolbox 3.0.22.2 ships a universal2 macOS wheel, so PTB now works on Apple Silicon and the Darwin/arm64 sounddevice branch is dead weight. Removes the vendored plugin copy and its git dependency. psychtoolbox stays explicit (>=3.0.20) because the pinned psychopy fork still carries the old `psychtoolbox<3.0.20; platform_machine!='arm64'` constraint; requirements.txt records why, and when it can go.
pellet
force-pushed
the
cleanup/remove-psychopy-sounddevice
branch
from
August 29, 2026 13:18
7b35b90 to
53f8824
Compare
pellet
marked this pull request as ready for review
August 29, 2026 23:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
psychtoolbox3.0.22.2 ships amacosx_11_0_universal2wheel, so PTB (Psychtoolbox) runs onApple Silicon and the Darwin/arm64 sounddevice fallback in
eegnb/experiments/__init__.pyis nolonger needed. This drops it, the vendored
psychopy-sounddevicecopy and its git dependency;every platform now takes the same PTB path.
The fallback had stopped working regardless. PsychoPy 2026.x resolves the backend from the
psychopy.sound.backendsentry-point group, and the plugin declares its entry point under theolder
psychopy.soundgroup — soSound.backendstayed'ptb'the whole time, whileplugins.loadPlugin()kept returningTrue.Two follow-ons in
tests/test_run_experiments.py:audio_libdefaulted to'sounddevice', andthe
sound.getDevices()assert raisedAttributeError(2026.x removed it alongsidesound.setDevice) — it now goes throughSpeakerDevice.getAvailableDevices(). The condacffientry existed only for python-sounddevice#397; cffi still arrives via
soundfileas a prebuiltwheel on every supported platform.
psychtoolboxis listed explicitly, scoped toplatform_machine == "arm64". The psychopy forkpinned here predates upstream dropping
psychtoolbox<3.0.20; platform_machine != "arm64"in2026.2.0, so on Apple Silicon it requests no PTB at all (3.0.19.14 has no arm64 wheel) and a
transitive dependency installs nothing. The marker is the exact complement of the fork's, so
every other platform keeps resolving through the fork's own
<3.0.20; an unscoped>=3.0.20conflicts with it head-on. The line can go once the psychopy pin reaches upstream >=2026.2.0.
Worth knowing on macOS and Windows: PTB 3.0.20+ introduced paid licensing for its prebuilt
binaries on those platforms (psychtoolbox.net). Linux is unaffected.
Verified on macOS arm64:
import eegnb.experimentsselectspsychopy.sound.backend_ptbandconstructs a
Sound; the auditory-oddball config path asserts cleanly.