Package org.freedesktop.gstreamer.audio
Class AudioChannelMixer
java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.audio.AudioChannelMixer
- All Implemented Interfaces:
Proxy
-
Constructor Summary
ConstructorsConstructorDescriptionAudioChannelMixer(MemorySegment address) Create a AudioChannelMixer proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoidfree()Free memory allocated bymix.booleanCheck if this AudioChannelMixer is in passthrough.static AudioChannelMixernew_(Set<AudioChannelMixerFlags> flags, AudioFormat format, int inChannels, Out<AudioChannelPosition> inPosition, int outChannels, Out<AudioChannelPosition> outPosition) Create a new channel mixer object for the given parameters.static AudioChannelMixernew_(AudioChannelMixerFlags flags, AudioFormat format, int inChannels, Out<AudioChannelPosition> inPosition, int outChannels, Out<AudioChannelPosition> outPosition) Create a new channel mixer object for the given parameters.static AudioChannelMixernewWithMatrix(Set<AudioChannelMixerFlags> flags, AudioFormat format, int inChannels, int outChannels, @Nullable MemorySegment[] matrix) Create a new channel mixer object for the given parameters.static AudioChannelMixernewWithMatrix(AudioChannelMixerFlags flags, AudioFormat format, int inChannels, int outChannels, @Nullable MemorySegment[] matrix) Create a new channel mixer object for the given parameters.voidsamples(@Nullable MemorySegment in, @Nullable MemorySegment out, int samples) In case the samples are interleaved,inandoutmust point to an array with a single element pointing to a block of interleaved samples.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
AudioChannelMixer
Create a AudioChannelMixer proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
-
Method Details
-
new_
public static AudioChannelMixer new_(Set<AudioChannelMixerFlags> flags, AudioFormat format, int inChannels, Out<AudioChannelPosition> inPosition, int outChannels, Out<AudioChannelPosition> outPosition) Create a new channel mixer object for the given parameters.- Parameters:
flags-GstAudioChannelMixerFlagsinChannels- number of input channelsinPosition- positions of input channelsoutChannels- number of output channelsoutPosition- positions of output channels- Returns:
- a new
GstAudioChannelMixerobject. Free with gst_audio_channel_mixer_free() after usage.
-
new_
public static AudioChannelMixer new_(AudioChannelMixerFlags flags, AudioFormat format, int inChannels, Out<AudioChannelPosition> inPosition, int outChannels, Out<AudioChannelPosition> outPosition) Create a new channel mixer object for the given parameters.- Parameters:
flags-GstAudioChannelMixerFlagsinChannels- number of input channelsinPosition- positions of input channelsoutChannels- number of output channelsoutPosition- positions of output channels- Returns:
- a new
GstAudioChannelMixerobject. Free with gst_audio_channel_mixer_free() after usage.
-
newWithMatrix
public static AudioChannelMixer newWithMatrix(Set<AudioChannelMixerFlags> flags, AudioFormat format, int inChannels, int outChannels, @Nullable MemorySegment[] matrix) Create a new channel mixer object for the given parameters.- Parameters:
flags-GstAudioChannelMixerFlagsinChannels- number of input channelsoutChannels- number of output channelsmatrix- channel conversion matrix, mout_channels. If identity matrix, passthrough applies. Ifnull, a (potentially truncated) identity matrix is generated.- Returns:
- a new
GstAudioChannelMixerobject. Free with gst_audio_channel_mixer_free() after usage. - Since:
- 1.14
-
newWithMatrix
public static AudioChannelMixer newWithMatrix(AudioChannelMixerFlags flags, AudioFormat format, int inChannels, int outChannels, @Nullable MemorySegment[] matrix) Create a new channel mixer object for the given parameters.- Parameters:
flags-GstAudioChannelMixerFlagsinChannels- number of input channelsoutChannels- number of output channelsmatrix- channel conversion matrix, mout_channels. If identity matrix, passthrough applies. Ifnull, a (potentially truncated) identity matrix is generated.- Returns:
- a new
GstAudioChannelMixerobject. Free with gst_audio_channel_mixer_free() after usage. - Since:
- 1.14
-
free
public void free()Free memory allocated bymix. -
isPassthrough
public boolean isPassthrough()Check if this AudioChannelMixer is in passthrough.Only N x N mix identity matrices are considered passthrough, this is determined by comparing the contents of the matrix with 0.0 and 1.0.
As this is floating point comparisons, if the values have been generated, they should be rounded up or down by explicit assignment of 0.0 or 1.0 to values within a user-defined epsilon, this code doesn't make assumptions as to what may constitute an appropriate epsilon.
- Returns:
trueis this AudioChannelMixer is passthrough.
-
samples
In case the samples are interleaved,inandoutmust point to an array with a single element pointing to a block of interleaved samples.If non-interleaved samples are used,
inandoutmust point to an array with pointers to memory blocks, one for each channel.Perform channel mixing on
inDataand write the result tooutData.inDataandoutDataneed to be informatandlayout.- Parameters:
in- input samplesout- output samplessamples- number of samples
-