Class AudioMixer
java.lang.Object
org.monte.media.anim.AudioMixer
Mixes multiple audio tracks into a single 16-bit PCM stereo audio track.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(AudioInputStream in, Rational startTime, int repeats, float volume, int pan) Adds the provided audio samples to the audio track of the mixer.intintbyte[]
-
Constructor Details
-
AudioMixer
public AudioMixer()
-
-
Method Details
-
add
public void add(AudioInputStream in, Rational startTime, int repeats, float volume, int pan) throws IOException Adds the provided audio samples to the audio track of the mixer.- Parameters:
in- the audio samples to be addedstartTime- the start time in seconds at which the audio samples are to be added to the audio trackrepeats- the number of repeatsvolume- the desired audio volume. The valid range of values is 0.0 to Float.MAX_VALUE.pan- the desired stereo pan (or balance). Supported values are -1: left only, 0: left and right,- Throws:
IOException
-
getSampleCount
public int getSampleCount() -
getMaxAbsoluteValue
public int getMaxAbsoluteValue() -
toByteArray
public byte[] toByteArray()
-