in my one of my callbacks, i load a wav file then plot it in an axes.
in another callback, i try to play the wav file but its not working.
please help, how can i play it??
function btnload_Callback(hObject, eventdata, handles)
[filename, pathname] = uigetfile('*.wav','Select Data File');
[y,fs] = wavread([pathname filename]);
axes(handles.axes1)
plot(y);
title('ORIGINAL AUDIO SIGNAL');
ylabel('t');
guidata(hObject, handles); %updates the handles
function btnplay1_Callback(hObject, eventdata, handles)
soundsc(y,fs);
If you need to maintain application data in GUIDE-generated GUIs, one way is to use the
handlesstructure which gets passed around to all callback functions: