Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Matlab でサウンド コマンドを使用してサウンドを再生しています。次のコマンドを実行する前に、サウンドの再生が終了するまでプログラムを待機させたいと考えています。どうすればいいですか?
>>tic >>sound(signal,Fs) >>wait?? >>b=toc
audioplayer 関数を使用できます。
%Create player object player = audioplayer(signal, Fs); %play sound play(player) while( strcmp(player.running,'on') ) { % Waiting for sound to finish }