Record Class AudioFilter.Chain
java.lang.Object
java.lang.Record
com.codinglitch.simpleradio.radio.AudioFilter.Chain
- Enclosing class:
AudioFilter
-
Constructor Summary
ConstructorsConstructorDescriptionChain(float[] audio, AudioEffect... effects) Creates an instance of aChainrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloat[]audio()Returns the value of theaudiorecord component.effects()Returns the value of theeffectsrecord component.final booleanIndicates whether some other object is "equal to" this one.<E extends AudioEffect>
Efinal inthashCode()Returns a hash code value for this object.short[]process(short[] data) Applies the effect chain to the provided data.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Chain
Creates an instance of aChainrecord class.- Parameters:
audio- the value for theaudiorecord componenteffects- the value for theeffectsrecord component
-
-
Method Details
-
process
public short[] process(short[] data) Applies the effect chain to the provided data.- Parameters:
data- The audio data to apply the effect to- Returns:
- The processed data
-
get
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
audio
public float[] audio()Returns the value of theaudiorecord component.- Returns:
- the value of the
audiorecord component
-
effects
Returns the value of theeffectsrecord component.- Returns:
- the value of the
effectsrecord component
-