Class AudioMixer

java.lang.Object
org.monte.media.anim.AudioMixer

public class AudioMixer extends Object
Mixes multiple audio tracks into a single 16-bit PCM stereo audio track.
  • 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 added
      startTime - the start time in seconds at which the audio samples are to be added to the audio track
      repeats - the number of repeats
      volume - 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()