how can i use audioplayer command in my GUI to play an audio?

2 次查看(过去 30 天)
i want that when i press the play button(that i created in my GUI), a song plays. it is working fine with 'sound' command,but i want to use audioplayer command. please help.

回答(1 个)

Jan
Jan 2018-1-14
编辑:Jan 2018-1-14
Replace
sound(Y, FS, BITS)
by
S = audioplayer(Y, FS, BITS);
S.play();

Community Treasure Hunt

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

Start Hunting!

Translated by