필터 지우기
필터 지우기

Sound in GUI

조회 수: 2 (최근 30일)
Camilla
Camilla 2012년 2월 4일
I could play music in my GUI with the function "soundsc", because I've tried using audioplayer, but it didn't work.The real problem is that I'd like to be able to pause and resume my track as I want pushing the same button. I've already tried with
if isrunnig/isplaying(a)
pause(a)
elseif resume(a)
end
but it still doesn't work! What can I do?
Thanks
  댓글 수: 1
Jan
Jan 2012년 2월 4일
What exactly is "a"? What does not work with AUDIOPLAYER?

댓글을 달려면 로그인하십시오.

답변 (1개)

Daniel Shub
Daniel Shub 2012년 2월 6일
You have not provided much information. It seems like your function works with soundsc but not with audioplayer. I am guessing your function also works with sound. If not, it is a scaling issue. My guess as to why it does not work with audioplayer is that you are not saving the audioplayer object (again guessing it is your variable "a") anywhere and then when you function/callback exits the audioplayer gets deleted.

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by