play sound

play sound

Hi to all,
I am trying to play a sound. I want to cue the subject when to make a response, and also to let them know when their response has been accepted.  So, actually, two different sounds.  

I have these two .wav files I picked out that I like (but can  be flexible and play another type of file if that works better.)

I found  a post from mark.chevillet as well as a reply from Mario, and tried this out:

%% sample code

InitializePsychSound(1);
freq = 48000; % as per Mario's suggestion!
nrchannels = 1;
pahandle1 = PsychPortAudio('Open', [], [], 3, freq, nrchannels);
filename1 = 'fx000.wav';
wavedata1 = wavread(filename1);
PsychPortAudio('FillBuffer', pahandle1, wavedata1,0);

%% end of sample code

but I then get this error:

>> PsychPortAudio('FillBuffer', pahandle1, wavedata1,0);
PTB-ERROR: Audio device 0 has 1 output channels, but provided matrix has non-matching number of 5536 rows.
Error in function FillBuffer:   Usage error
Number of rows of audio data matrix doesn't match number of output channels of selected audio device.

??? Usage:

underflow = PsychPortAudio('FillBuffer', pahandle, bufferdata [, streamingrefill=0);

I know that I am trying to do something quite simple (I used to just use Snd!) and am probably making this too hard.   Can someone set us straight? 

Dawn & Amber