Interface AudioFormatUnpack
- All Superinterfaces:
FunctionPointer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Generated("org.javagi.JavaGI")
public interface AudioFormatUnpack
extends FunctionPointer
Functional interface declaration of the AudioFormatUnpack callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidrun(AudioFormatInfo info, Set<AudioPackFlags> flags, @Nullable byte @Nullable [] dest, @Nullable byte @Nullable [] data, int length) Unpackslengthsamples from the given data of formatinfo.The samples will be unpacked intodestwhich each channel interleaved.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, int, MemorySegment, MemorySegment, int)method.default voidupcall(MemorySegment info, int flags, MemorySegment dest, MemorySegment data, int length) Theupcallmethod is called from native code.
-
Method Details
-
run
void run(AudioFormatInfo info, Set<AudioPackFlags> flags, @Nullable byte @Nullable [] dest, @Nullable byte @Nullable [] data, int length) Unpackslengthsamples from the given data of formatinfo.The samples will be unpacked intodestwhich each channel interleaved.destshould at least be big enough to holdlength* channels * size(unpack_format) bytes.- Parameters:
info- aGstAudioFormatInfoflags-GstAudioPackFlagsdest- a destination arraydata- pointer to the audio datalength- the amount of samples to unpack.
-
upcall
default void upcall(MemorySegment info, int flags, MemorySegment dest, MemorySegment data, int length) Theupcallmethod is called from native code. The parameters are marshaled andrun(AudioFormatInfo, Set, byte[], byte[], int)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, int, MemorySegment, MemorySegment, int)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-