Class (GI Struct)

GstAudio-1.0GstAudioAudioResamplerAbstractSince 1.10

GstAudio.AudioResampler is a structure which holds the information required to perform various kinds of resampling filtering.

1.10

Index

Constructors

Properties

Methods

  • Get the number of input frames that would currently be needed to produce out_frames from resampler.

    Parameters

    • out_frames: number

      number of input frames

    Returns number

    The number of input frames needed for producing out_frames of data from resampler.

  • Get the maximum number of input samples that the resampler would need before producing output.

    Returns number

    the latency of resampler as expressed in the number of frames.

  • Get the number of output frames that would be currently available when in_frames are given to resampler.

    Parameters

    • in_frames: number

      number of input frames

    Returns number

    The number of frames that would be available after giving in_frames as input to resampler.

  • Perform resampling on in_frames frames in in and write out_frames to out.

    In case the samples are interleaved, in and out must point to an array with a single element pointing to a block of interleaved samples.

    If non-interleaved samples are used, in and out must point to an array with pointers to memory blocks, one for each channel.

    in may be null, in which case in_frames of silence samples are pushed into the resampler.

    This function always produces out_frames of output and consumes in_frames of input. Use gst_audio_resampler_get_out_frames() and gst_audio_resampler_get_in_frames() to make sure in_frames and out_frames are matching and in and out point to enough memory.

    Parameters

    • _in: any

      input samples

    • in_frames: number

      number of input frames

    • out: any

      output samples

    • out_frames: number

      number of output frames

    Returns void

  • Update the resampler parameters for resampler. This function should not be called concurrently with any other function on resampler.

    When in_rate or out_rate is 0, its value is unchanged.

    When options is null, the previously configured options are reused.

    Parameters

    • in_rate: number

      new input rate

    • out_rate: number

      new output rate

    • options: Structure

      new options or null

    Returns boolean

    true if the new parameters could be set