psychopy.org | Reference | Downloads | Github

Calling Psychtoolbox Audio 2 different way

Hi all,

Currently Psychtoolbox audio is the recommended audio backend to use. There are 2 ways to call it:

from psychtoolbox import audio
stream = audio.Stream(freq=fs, channels=2)
from psychopy import prefs
prefs.hardware['audioLib'] = ['PTB']
from psychopy import sound

Both methods work. Is there a difference between these two methods (other than having the option of using a different audio backend)? Any input is greatly appreciated.

Have a good day,

Noah