Record Class ChannelContext
java.lang.Object
java.lang.Record
de.mrjulsen.dragnsounds.core.data.ChannelContext
public record ChannelContext(com.mojang.blaze3d.audio.Channel channel, int source, long soundId, int sampleSize, Consumer<Integer> pumpBuffers)
extends Record
A simple wrapper for
Channel
which contains additional data relevant for manipulation.-
Constructor Summary
ConstructorDescriptionChannelContext
(com.mojang.blaze3d.audio.Channel channel, int source, long soundId, int sampleSize, Consumer<Integer> pumpBuffers) Creates an instance of aChannelContext
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.blaze3d.audio.Channel
channel()
Returns the value of thechannel
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thepumpBuffers
record component.int
Returns the value of thesampleSize
record component.long
soundId()
Returns the value of thesoundId
record component.int
source()
Returns the value of thesource
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ChannelContext
public ChannelContext(com.mojang.blaze3d.audio.Channel channel, int source, long soundId, int sampleSize, Consumer<Integer> pumpBuffers) Creates an instance of aChannelContext
record class.- Parameters:
channel
- the value for thechannel
record componentsource
- the value for thesource
record componentsoundId
- the value for thesoundId
record componentsampleSize
- the value for thesampleSize
record componentpumpBuffers
- the value for thepumpBuffers
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
channel
public com.mojang.blaze3d.audio.Channel channel()Returns the value of thechannel
record component.- Returns:
- the value of the
channel
record component
-
source
public int source()Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
soundId
public long soundId()Returns the value of thesoundId
record component.- Returns:
- the value of the
soundId
record component
-
sampleSize
public int sampleSize()Returns the value of thesampleSize
record component.- Returns:
- the value of the
sampleSize
record component
-
pumpBuffers
Returns the value of thepumpBuffers
record component.- Returns:
- the value of the
pumpBuffers
record component
-