playing a nonstop audio file
조회 수: 2(최근 30일)
표시 이전 댓글
how can i play an audio file without stopping kinda like a loop in app designer
[y,Fs] = audioread(app.files);
sound(y,Fs)
this will just play it once
댓글 수: 0
답변(1개)
jibrahim
2022년 9월 6일
afr = dsp.AudioFileReader('speech_dft.mp3','PlayCount',Inf);
adw = audioDeviceWriter('SampleRate', afr.SampleRate);
while ~isDone(afr)
audio = afr();
adw(audio);
end
댓글 수: 5
참고 항목
범주
Find more on Audio and Video in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!