jAudioFeatureExtractor.jAudioTools
クラス AudioMethodsPlayback

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

public class AudioMethodsPlayback
extends java.lang.Object

A holder class for static methods and internal classes relating to playing back audio recordings.

作成者:
Cory McKay

入れ子のクラスの概要
static class AudioMethodsPlayback.PlayThread
          A thread for playing an AudioInputStream directly to a SourceDataLine.
 
コンストラクタの概要
AudioMethodsPlayback()
           
 
メソッドの概要
static void playAudioInputStream(javax.sound.sampled.AudioInputStream audio_input_stream, javax.sound.sampled.SourceDataLine source_data_line)
          Plays the samples in the given AudioInputStream to the specified SourceDataLine.
static AudioMethodsPlayback.PlayThread playAudioInputStreamInterruptible(javax.sound.sampled.AudioInputStream audio_input_stream, javax.sound.sampled.SourceDataLine source_data_line)
          Plays the samples in the given AudioInputStream to the specified SourceDataLine.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AudioMethodsPlayback

public AudioMethodsPlayback()
メソッドの詳細

playAudioInputStreamInterruptible

public static AudioMethodsPlayback.PlayThread playAudioInputStreamInterruptible(javax.sound.sampled.AudioInputStream audio_input_stream,
                                                                                javax.sound.sampled.SourceDataLine source_data_line)
                                                                         throws java.lang.Exception
Plays the samples in the given AudioInputStream to the specified SourceDataLine.

The thread performing the playback is returned to the user, so the user has the option of interrupting it if he or she wishes.

Note that the same AudioFormat must be used by both the AudioInputStream and the SourceDataLine.

パラメータ:
audio_input_stream - The audio stream to be played.
source_data_line - Where the samples are to be played to.
例外:
java.lang.Exception - Throws an exception if the AudioFormat of the audio_input_stream parameter does not match that of the source_data_line parameter.

playAudioInputStream

public static void playAudioInputStream(javax.sound.sampled.AudioInputStream audio_input_stream,
                                        javax.sound.sampled.SourceDataLine source_data_line)
                                 throws java.lang.Exception
Plays the samples in the given AudioInputStream to the specified SourceDataLine.

This playback is not interruptible by the user, and will continue until the AudioInputStream is empty. The playAudioInputStreamInterruptible method should be called instead if the user wishes to be able to interrupt playback.

Note that the same AudioFormat must be used by both the AudioInputStream and the SourceDataLine.

パラメータ:
audio_input_stream - The audio stream to be played.
source_data_line - Where the samples are to be played to.
例外:
java.lang.Exception - Throws an exception if the AudioFormat of the audio_input_stream parameter does not match that of the source_data_line parameter.