This is the relevant section of the present code which isnt working:
% Code that executes after component creation
function startupFcn(app)
status = 'Stopped';
end
% Button pushed function: PlayPauseButton
function PlayPauseButtonPushed(app, event)
if(status == 'Stopped')
[y, Fs] = audioread(app.FileLocationEditField.Value);
player = audioplayer(y, Fs);
play(player);
status = 'Playing';
elseif(status == 'Paused')
resume(player);
status = 'Playing';
elseif(status == 'Playing')
pause(player);
status = 'Paused';
end
end
% Button pushed function: STOPButton
function STOPButtonPushed(app, event)
stop(player);
status = 'Stopped';
end