Hello,
I wrote a GUI for sound recording. I have buttons for record, stop and play and a static box. When I click the play button, the static box displays "playing", and I am trying to set a timer to automatically change the static box to "ready to record" which the code attached. However it doesn't work. Can any one tell me what is the write way to set up a timer? Thank you!!
function playButtonPushed(app,~,~) app.readyLabel.String='recording playing' T = timer('StartDelay',3,'TimerFcn',@(~,~) set(app.readyLabel,'String' 'r')); start(T) sound(getaudiodata(app.AudioRecorder),app.AudioRecorder.SampleRate) end
Best Answer