jAudioFeatureExtractor.jAudioTools
クラス AudioMethodsRecording

java.lang.Object
  上位を拡張 jAudioFeatureExtractor.jAudioTools.AudioMethodsRecording

public class AudioMethodsRecording
extends java.lang.Object

A holder class for static methods and internal classes relating to recording audio.

作成者:
Cory McKay

入れ子のクラスの概要
static class AudioMethodsRecording.RecordThread
          A thread for recording from a given TargetDataLine into a ByteArrayOutputStream.
static class AudioMethodsRecording.RecordToFileThread
          A thread for recording from a given TargetDataLine into an audio file belonging to one of a number of types.
 
コンストラクタの概要
AudioMethodsRecording()
           
 
メソッドの概要
static AudioMethodsRecording.RecordThread recordByteArrayOutputStream(javax.sound.sampled.TargetDataLine target_data_line)
          Records the samples coming in on the given TargetDataLine to a ByteArrayOutputStream.
static AudioMethodsRecording.RecordToFileThread recordToFile(javax.sound.sampled.TargetDataLine target_data_line, java.io.File file_to_save_to, javax.sound.sampled.AudioFileFormat.Type file_type)
          Records the samples coming in on the given TargetDataLine to the given file.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AudioMethodsRecording

public AudioMethodsRecording()
メソッドの詳細

recordByteArrayOutputStream

public static AudioMethodsRecording.RecordThread recordByteArrayOutputStream(javax.sound.sampled.TargetDataLine target_data_line)
                                                                      throws java.lang.Exception
Records the samples coming in on the given TargetDataLine to a ByteArrayOutputStream. Returns the thread that can be stopped and from which the samples can be extracted. Useful for real-time recording.

パラメータ:
target_data_line - Where the samples are being recorded from.
戻り値:
The thread that performs the recording.
例外:
java.lang.Exception - Throws an exception if the parameter is null.

recordToFile

public static AudioMethodsRecording.RecordToFileThread recordToFile(javax.sound.sampled.TargetDataLine target_data_line,
                                                                    java.io.File file_to_save_to,
                                                                    javax.sound.sampled.AudioFileFormat.Type file_type)
                                                             throws java.lang.Exception
Records the samples coming in on the given TargetDataLine to the given file. Returns the thread that can be stopped when recording is complete. Useful for real-time recording.

パラメータ:
target_data_line - The source of the audio to be recorded.
file_to_save_to - The file to save the audio to.
file_type - The type of audio file to save to.
戻り値:
The thread that performs the recording.
例外:
java.lang.Exception - Throws an exception if the target_data_line parameter is null or if the given file cannot be written to.