getplayer
関連付けられた audioplayer
オブジェクトを作成
説明
例
オーディオの録音と再生の制御
録音セッションを開始し、レコーダーを一時停止してから、オーディオ クリップ全体の録音が終了するまでセッションを継続します。
オーディオ録音のオブジェクトを作成し、システムのマイクを使用して録音を開始します。
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)
入力引数
recorder
— オーディオ レコーダー オブジェクト
audiorecorder
オブジェクト
オーディオ レコーダー オブジェクト。audiorecorder
オブジェクトとして指定します。このオブジェクトを作成するには、関数 audiorecorder
を使用します。
バージョン履歴
R2006a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)