Push button audio for GUI
Mostrar comentarios más antiguos
Hello,
I have a class which I need to create a GUI. I am new to MATLAB and could really use some help.
What I'm planning to do is when a push button is pressed, the audio file plays then stops. I pasted the part of the script below with the audio in it.
% --- Executes on button press in pushbutton3. Reset Button
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.listbox1,'Value',1)
set(handles.popupmenu1,'Value',1)
listbox1_Callback(hObject, eventdata, handles)
load handel;
player = audioplayer(y, Fs);
play(player);
popupmenu1_Callback(hObject, eventdata, handles)
_____________
Thanks!!
1 comentario
Deepu S S
el 9 de Jul. de 2021
bro can share the final code. i'm also new to matlab i need these kind of code please help me
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Audio and Video Data en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!