'pause' not working properly

조회 수: 1 (최근 30일)
C Meek
C Meek 2011년 12월 1일
Hi everyone,
Simply, I have two files x and y that I wish to play one after another, with a pause of around 5 seconds in between:
soundsc(x, SR) pause(5) soundsc(y, SR)
The files do play one after the other, but there is not a 5 second pause. It works fine when I set it to pause() instead of pause(n).
Seems a bit fussy, but any ideas?
Thanks

채택된 답변

Daniel Shub
Daniel Shub 2011년 12월 1일
The sound and soundsc functions return immediately. Therefore you need a longer pause.
pause(5+length(x)/SR)
  댓글 수: 1
C Meek
C Meek 2011년 12월 1일
Excellent, thanks!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by