Mercurial > hg > ape
view listeningTest/pairComp/PCpush.m @ 15:24be5e9ce25b tip
Update README
author | Brecht De Man <brecht.deman@bcu.ac.uk> |
---|---|
date | Thu, 20 Sep 2018 12:23:20 +0200 |
parents | 5e72201496c8 |
children |
line wrap: on
line source
function PCpush(hf,but) dat=get(hf,'userdata'); noComb=dat.noComb; comb=dat.comb; ha=dat.ha; hb=dat.hb; butCol=dat.butCol; switch but case 1 % A set(ha,'backgroundcolor','r'); set(hb,'backgroundcolor',butCol); fidInd=['responses/' dat.sesDat.id,'_',dat.sesDat.sesScript]; %print 'A' fid=fopen(fidInd,'a'); fprintf(fid,'A'); playSound(dat.sesDat.cuSndList(comb(noComb,1))); case 2 % Stop () audioplayer(0,1); case 3 % B set(hb,'backgroundcolor','r'); set(ha,'backgroundcolor',butCol); fidInd=['responses/' dat.sesDat.id,'_',dat.sesDat.sesScript];%print 'B' fid=fopen(fidInd,'a'); fprintf(fid,'B'); playSound(dat.sesDat.cuSndList(comb(noComb,2))); end