Interface OPDecodeCBFuncI

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.lwjgl.system.libffi.FFICIF CIF  
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void callback​(long ret, long args)  
      default org.lwjgl.system.libffi.FFICIF getCallInterface()  
      int invoke​(long _ctx, long _decoder, long _pcm, long _op, int _nsamples, int _nchannels, int _format, int _li)
      Called to decode an Opus packet.
      • Methods inherited from interface org.lwjgl.system.CallbackI

        address
    • Field Detail

      • CIF

        static final org.lwjgl.system.libffi.FFICIF CIF
    • Method Detail

      • getCallInterface

        default org.lwjgl.system.libffi.FFICIF getCallInterface()
        Specified by:
        getCallInterface in interface org.lwjgl.system.CallbackI
      • callback

        default void callback​(long ret,
                              long args)
        Specified by:
        callback in interface org.lwjgl.system.CallbackI
      • invoke

        int invoke​(long _ctx,
                   long _decoder,
                   long _pcm,
                   long _op,
                   int _nsamples,
                   int _nchannels,
                   int _format,
                   int _li)
        Called to decode an Opus packet.

        This should invoke the functional equivalent of multistream_decode or multistream_decode_float, except that it returns 0 on success instead of the number of decoded samples (which is known a priori).

        Parameters:
        _ctx - the application-provided callback context
        _decoder - the decoder to use to decode the packet
        _pcm - the buffer to decode into.

        This will always have enough room for _nchannels of _nsamples samples, which should be placed into this buffer interleaved.

        _op - the packet to decode. This will always have its granule position set to a valid value.
        _nsamples - the number of samples expected from the packet
        _nchannels - the number of channels expected from the packet
        _format - the desired sample output format. This is either DEC_FORMAT_SHORT or DEC_FORMAT_FLOAT.
        _li - the index of the link from which this packet was decoded
        Returns:
        a non-negative value on success, or a negative value on error.

        Any error codes should be the same as those returned by multistream_decode or multistream_decode_float. Success codes are as follows:

        • 0: Decoding was successful. The application has filled the buffer with exactly _nsamples* _nchannels samples in the requested format.
        • DEC_USE_DEFAULT: No decoding was done. libopusfile should do the decoding by itself instead.