'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 Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by