org.tritonus.dsp.ais
Class AmplitudeAudioInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.sound.sampled.AudioInputStream
          extended by org.tritonus.share.sampled.convert.TAudioInputStream
              extended by org.tritonus.share.sampled.convert.TSynchronousFilteredAudioInputStream
                  extended by org.tritonus.dsp.ais.FloatAudioInputStream
                      extended by org.tritonus.dsp.ais.AmplitudeAudioInputStream
All Implemented Interfaces:
java.io.Closeable, FloatSampleInput

public class AmplitudeAudioInputStream
extends FloatAudioInputStream

Change amplitude of audio data.


Constructor Summary
AmplitudeAudioInputStream(AudioInputStream sourceStream)
           
AmplitudeAudioInputStream(AudioInputStream sourceStream, AudioFormat targetFormat)
           
 
Method Summary
 void setAmplitudeLinear(float fAmplitude)
          Set the amplitude.
 void setAmplitudeLog(float fAmplitude)
          Set the amplitude.
 
Methods inherited from class org.tritonus.share.sampled.convert.TSynchronousFilteredAudioInputStream
available, close, getChannels, getOriginalFormat, getOriginalStream, getSampleRate, isDone, mark, markSupported, read, read, read, read, reset, skip
 
Methods inherited from class org.tritonus.share.sampled.convert.TAudioInputStream
properties
 
Methods inherited from class javax.sound.sampled.AudioInputStream
getFormat, getFrameLength, read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmplitudeAudioInputStream

public AmplitudeAudioInputStream(AudioInputStream sourceStream)

AmplitudeAudioInputStream

public AmplitudeAudioInputStream(AudioInputStream sourceStream,
                                 AudioFormat targetFormat)
Method Detail

setAmplitudeLinear

public void setAmplitudeLinear(float fAmplitude)
Set the amplitude. The value passed here is the value the samples are multiplied with. So 1.0F means no change in amplitude. 2.0F doubles the amplitude. 0.5F cuts it to half, and so on. This is in contrast to setAmplitudeLog, where you can pass the amplitude change as dB values.


setAmplitudeLog

public void setAmplitudeLog(float fAmplitude)
Set the amplitude. The value passed here is in dB. So 0.0F means no change in amplitude. +6.0F doubles the amplitude. -6.0F cuts it to half, and so on. This is in contrast to setAmplitudeLinear(), where you can pass the amplitude change linear values.