isplaying
再生が進行中かどうか判断する
説明
例
録音セッションを開始し、レコーダーを一時停止してから、オーディオ クリップ全体の録音が終了するまでセッションを継続します。
オーディオ録音のオブジェクトを作成し、システムのマイクを使用して録音を開始します。
recObj = audiorecorder;
record(recObj);
disp('Recording in progress now ...')
Recording in progress now ...
録音を一時停止し、audiorecorder
オブジェクトのステータスを確認します。関数 isrecording
は、録音が進行中の場合は 1
を返し、録音が進行中でない場合は 0
を返します。
pause(recObj); isrecording(recObj)
ans = logical 0
これまでに録音したオーディオを再生します。
playerObj= getplayer(recObj); play(playerObj);
録音セッションを続行する前に、audioplayer
オブジェクトのステータスを確認します。関数 isplaying
は、再生が進行中の場合は 1
を返し、再生が進行中でない場合は 0
を返します。
isplaying(playerObj)
ans = logical 0
次に、録音を再開し、さらなるオーディオを audiorecorder
オブジェクトに取得します。
resume(recObj)
オーディオ クリップを終了させるには、より多くの素材を録音した後で、録音を停止します。
stop(recObj)
audiorecorder
オブジェクトからオーディオ クリップ全体を取得して、再生します。
playerObj= getplayer(recObj) play(playerObj)
入力引数
オーディオ プレーヤー オブジェクト。audioplayer
オブジェクトとして指定します。
audioplayer
オブジェクトを作成するには、関数 audioplayer
を使用します。
バージョン履歴
R2006a で導入
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)