How do i call the recorded audio into another push button and compress it in GUI.
1 回表示 (過去 30 日間)
古いコメントを表示
Muhammad Talha Bashir
2021 年 6 月 17 日
コメント済み: Muhammad Talha Bashir
2021 年 6 月 17 日
I want to call this 'myrec1' in pushbutton 2 and compress it. the resultant is to be displayed on axes2.
0 件のコメント
採用された回答
Geoff Hayes
2021 年 6 月 17 日
Muhammad - you can either extract the data from the plot (from handles.axes1) or just save the recorded data to the handles object in the first push button callback. Try
function pushbutton1_Callback(hObject, eventdata, handles)
% your code from above
% save to the handles object
handles.myrec1 = myrec1
guidata(hObject, handles); % <--- You need this to save the updated handles structure
Your second callback would look something like
function pushbutton1_Callback(hObject, eventdata, handles)
if isfield(handles, 'myrec1')
% compress the data
audioData = handles.myrec1;
% plot
end
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Audio I/O and Waveform Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!