justingardner / mgl

A suite of mex/m files for displaying psychophysics stimuli
http://justingardner.net/mgl
Other
18 stars 22 forks source link

mglInstallSound #88

Open CoreyPlate opened 1 year ago

CoreyPlate commented 1 year ago

mglInstallSound does not seem to work

The following example code from the help documentation was attempted:

           samplesPerSecond = 22000;
           t = 0:2*pi/(samplesPerSecond-1):2*pi;
           amplitude = 0.2;
           waveform(1,:) = amplitude * sin(440*t);
           waveform(2,:) = amplitude * sin(t*5*440/4);
           s = mglInstallSound(waveform,samplesPerSecond);
           mglPlaySound(s);

It returned the following error:

           (mglInstallSound) Failure to install sound waveform - giving up