org.tritonus.dsp.ais
Class AmplitudeAudioInputStream
java.lang.Object
java.io.InputStream
javax.sound.sampled.AudioInputStream
org.tritonus.share.sampled.convert.TAudioInputStream
org.tritonus.share.sampled.convert.TSynchronousFilteredAudioInputStream
org.tritonus.dsp.ais.FloatAudioInputStream
org.tritonus.dsp.ais.AmplitudeAudioInputStream
- All Implemented Interfaces:
- java.io.Closeable, FloatSampleInput
public class AmplitudeAudioInputStream
- extends FloatAudioInputStream
Change amplitude of audio data.
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AmplitudeAudioInputStream
public AmplitudeAudioInputStream(AudioInputStream sourceStream)
AmplitudeAudioInputStream
public AmplitudeAudioInputStream(AudioInputStream sourceStream,
AudioFormat targetFormat)
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.