How do i repeat an audio file?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Vincenzo Catanza
el 15 de Nov. de 2018
Respondida: Frederik Bjørn Christensen
el 6 de En. de 2021
I am running a song through a while loop but once the song has finished its interval it doesn't keep repeating itself. Any help would be much appreciated!
a = true;
while(a == true)
play(song1)
end
0 comentarios
Respuestas (2)
Walter Roberson
el 16 de Nov. de 2018
If song1 is an audioplayer object, then you can
while true
playblocking(song1);
end
But another approach with audioplayer objects would be to use
song1.StopFcn = @(src, event) play(src);
play(song1)
0 comentarios
Frederik Bjørn Christensen
el 6 de En. de 2021
Just use repmat to repeat the audiofile :)
0 comentarios
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!