BasicSoundOutputDemo([repetitions=0][, wavfilename][, device])
Demonstrates very basic use of the Psychtoolbox sound output driver
PsychPortAudio(). PsychPortAudio is a better, more reliable, more accurate
replacement for the old Psychtoolbox SND() function and other means of
sound output in Matlab like sound(), soundsc(), wavplay(), audioplayer()
This demo only demonstrates normal operation, not the low-latency mode.
Other demos and tests for low-latency and high precision timing output do that.
follow soon. If you need low-latency, make sure to read “help
InitializePsychSound” carefully or contact the forum.
Testing for low-latency mode showed that sub-millisecond accurate sound
onset and < 10 msecs latency are possible on Linux, OSX and Windows with some
repetitions = Number of repetitions of the sound. Zero = Repeat forever
(until stopped by keypress), 1 = Play once, 2 = Play twice, ….
wavfilename = Name of a .wav sound file to load and playback. Otherwise
the good ol’ handel.mat file (part of Matlab) is used.
device = Device index of sound card to use.
The demo just loads and plays the soundfile, waits for a keypress to stop
it, then quits.