Package builder.resid

Klasse SampleMixer.LinearFadingSampleMixer

java.lang.Object
builder.resid.SampleMixer.DefaultSampleMixer
builder.resid.SampleMixer.LinearFadingSampleMixer
Alle implementierten Schnittstellen:
SampleMixer, IntConsumer
Umschließende Schnittstelle:
SampleMixer

public static class SampleMixer.LinearFadingSampleMixer extends SampleMixer.DefaultSampleMixer
Extends SampleMixer with linear fade-in/fade-out feature to smoothly increase/decrease volume. TODO implement logarithmic type?
Autor:
ken
  • Verschachtelte Klassen - Übersicht

    Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen builder.resid.SampleMixer

    SampleMixer.DefaultSampleMixer, SampleMixer.LinearFadingSampleMixer, SampleMixer.NoOpSampleMixer
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    private long
    Fade-in/fade-out time in clock ticks.
    private long
    Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    private long
    Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    private long
    Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    private long
    Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    private long
    Fade-in/fade-out time in clock ticks.
    private long
    Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    private long
    Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    private long
    Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    private long
    Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    private int
    Currently configured volume level.
    private int
    Currently configured volume level.

    Von Klasse geerbte Felder builder.resid.SampleMixer.DefaultSampleMixer

    volumeL, volumeR
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    LinearFadingSampleMixer(IntBuffer audioBufferL, IntBuffer audioBufferR)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    accept(int sample)
     
    void
    setFadeIn(long fadeIn)
    Set fade-in time.
    void
    setFadeOut(long fadeOut)
    Set fade-out time.
    void
    setVolume(int volumeL, int volumeR)
     

    Von Klasse geerbte Methoden builder.resid.SampleMixer.DefaultSampleMixer

    clear, setDelay

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Von Schnittstelle geerbte Methoden java.util.function.IntConsumer

    andThen
  • Felddetails

    • fadeInClocks

      private long fadeInClocks
      Fade-in/fade-out time in clock ticks.
    • fadeOutClocks

      private long fadeOutClocks
      Fade-in/fade-out time in clock ticks.
    • maxVolL

      private int maxVolL
      Currently configured volume level.
    • maxVolR

      private int maxVolR
      Currently configured volume level.
    • fadeInStepL

      private long fadeInStepL
      Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    • fadeInStepR

      private long fadeInStepR
      Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    • fadeOutStepL

      private long fadeOutStepL
      Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    • fadeOutStepR

      private long fadeOutStepR
      Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    • fadeInValL

      private long fadeInValL
      Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    • fadeInValR

      private long fadeInValR
      Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    • fadeOutValL

      private long fadeOutValL
      Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
    • fadeOutValR

      private long fadeOutValR
      Fade-in/fade-out clock steps until next volume change and current fade-in and fade-out counters for left and right speaker.
  • Konstruktordetails

    • LinearFadingSampleMixer

      LinearFadingSampleMixer(IntBuffer audioBufferL, IntBuffer audioBufferR)
  • Methodendetails

    • setFadeIn

      public void setFadeIn(long fadeIn)
      Set fade-in time. Increase volume from zero to the maximum.
      Parameter:
      fadeIn - fade-in time in clock ticks
    • setFadeOut

      public void setFadeOut(long fadeOut)
      Set fade-out time. Decrease volume from the maximum to zero.
      Parameter:
      fadeOut - fade-out time in clock ticks
    • setVolume

      public void setVolume(int volumeL, int volumeR)
      Angegeben von:
      setVolume in Schnittstelle SampleMixer
      Setzt außer Kraft:
      setVolume in Klasse SampleMixer.DefaultSampleMixer
    • accept

      public void accept(int sample)
      Angegeben von:
      accept in Schnittstelle IntConsumer
      Setzt außer Kraft:
      accept in Klasse SampleMixer.DefaultSampleMixer