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 Details

    • run

      void run(AudioFormatInfo info, Set<AudioPackFlags> flags, @Nullable byte @Nullable [] dest, @Nullable byte @Nullable [] data, int length)
      Unpacks length samples from the given data of format info. The samples will be unpacked into dest which each channel interleaved. dest should at least be big enough to hold length * channels * size(unpack_format) bytes.
      Parameters:
      info - a GstAudioFormatInfo
      flags - GstAudioPackFlags
      dest - a destination array
      data - pointer to the audio data
      length - the amount of samples to unpack.
    • upcall

      default void upcall(MemorySegment info, int flags, MemorySegment dest, MemorySegment data, int length)
      The upcall method is called from native code. The parameters are marshaled and run(AudioFormatInfo, Set, byte[], byte[], int) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, int, MemorySegment, MemorySegment, int) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer