Package net.raphimc.audiomixer.util
Record Class FloatAudioFormat
java.lang.Object
java.lang.Record
net.raphimc.audiomixer.util.FloatAudioFormat
-
Constructor Summary
ConstructorsConstructorDescriptionFloatAudioFormat(float sampleRate, int channels) Creates an instance of aFloatAudioFormatrecord class.FloatAudioFormat(AudioFormat audioFormat) -
Method Summary
Modifier and TypeMethodDescriptionintchannels()Returns the value of thechannelsrecord component.final booleanIndicates whether some other object is "equal to" this one.floatframeCountToMillis(int frameCount) final inthashCode()Returns a hash code value for this object.intmillisToFrameCount(float millis) intmillisToSampleCount(float millis) intsampleCountToFrameCount(int sampleCount) floatsampleCountToMillis(int sampleCount) floatReturns the value of thesampleRaterecord component.toJavaPcmAudioFormat(int sampleSizeInBits) final StringtoString()Returns a string representation of this record class.withChannels(int channels) withSampleRate(float sampleRate)
-
Constructor Details
-
FloatAudioFormat
public FloatAudioFormat(float sampleRate, int channels) Creates an instance of aFloatAudioFormatrecord class.- Parameters:
sampleRate- the value for thesampleRaterecord componentchannels- the value for thechannelsrecord component
-
FloatAudioFormat
-
-
Method Details
-
withSampleRate
-
withChannels
-
millisToFrameCount
public int millisToFrameCount(float millis) -
frameCountToMillis
public float frameCountToMillis(int frameCount) -
millisToSampleCount
public int millisToSampleCount(float millis) -
sampleCountToMillis
public float sampleCountToMillis(int sampleCount) -
sampleCountToFrameCount
public int sampleCountToFrameCount(int sampleCount) -
toJavaAudioFormat
-
toJavaPcmAudioFormat
-
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 with '=='. -
sampleRate
public float sampleRate()Returns the value of thesampleRaterecord component.- Returns:
- the value of the
sampleRaterecord component
-
channels
public int channels()Returns the value of thechannelsrecord component.- Returns:
- the value of the
channelsrecord component
-