Borrar filtros
Borrar filtros

'pause' not working properly

2 visualizaciones (últimos 30 días)
C Meek
C Meek el 1 de Dic. de 2011
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

Respuesta aceptada

Daniel Shub
Daniel Shub el 1 de Dic. de 2011
The sound and soundsc functions return immediately. Therefore you need a longer pause.
pause(5+length(x)/SR)

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by