ailiaAudioGetLinerFilterZiCoef method

int ailiaAudioGetLinerFilterZiCoef(
  1. Pointer<Void> dst_zi,
  2. Pointer<Void> n_coef,
  3. Pointer<Void> d_coef,
  4. int dst_n,
  5. int n_coef_n,
  6. int d_coef_n,
)

~japanese @brief フィルタ処理用の初期遅延係数を算出します @param dst_zi 出力する初期遅延状態のポインタ、float 型、要素数 dst_n (dst_n >= max(n_coef_n,d_coef_n)-1) @param n_coef フィルタ分子係数のポインタ、float 型、要素数 n_coef_n @param d_coef フィルタ分母係数のポインタ、float 型、要素数 d_coef_n @param dst_n 出力先の確保要素数 (dst_n >= max(n_coef_n,d_coef_n)-1) @param n_coef_n フィルタ分子係数の要素数 @param d_coef_n フィルタ分母係数の要素数 @return 成功した場合は \ref AILIA_STATUS_SUCCESS 、そうでなければエラーコードを返す。 @details 一般に、得られた係数に入力信号の先頭を乗じたものを、初期遅延状態として ailiaAudioLinerFilter() に与えます。 dst_nはmax(n_coef_n,d_coef_n)-1が必要となります。 不足の場合は、確保分だけ出力します。 超える部分は、0で埋めます。 n_coef_nとd_coef_nは大きいほうを基準とし、不足分は0でパディングします。

~english @brief Calculate the initial delay coefficients for filtering @param dst_zi pointer to the output (initial delay coefficients), of float format, and of length dst_n (dst_n >= max(n_coef_n,d_coef_n)-1) @param n_coef pointer to the numerator coefficients of the filter, of float format, and length n_coef_n @param d_coef pointer to the denominator coefficients of the filter, of float format, and length d_coef_n @param dst_n size, in number of samples, reserved in the output buffer (dst_n >= max(n_coef_n,d_coef_n)-1) @param n_coef_n number of numerator coefficients of the filter @param d_coef_n number of denominator coefficients of the filter @return In case of success, \ref AILIA_STATUS_SUCCESS , and else an error code is returned. @details These initial delay coefficients dst_zi, once multiplied with the early values of the signal, can be passed as initial delayed values, the zi argument, to ailiaAudioLinerFilter() . Of the dst_n reserved length of the output buffer, the length used is max(n_coef_n,d_coef_n)-1. If dst_n is less than that, only the corresponding first values are output. If dst_n is larger, the remaining is filled with 0. The largest of n_coef_n and d_coef_n is taken as reference and zeros are added for padding where necessary.

Implementation

int ailiaAudioGetLinerFilterZiCoef(
  ffi.Pointer<ffi.Void> dst_zi,
  ffi.Pointer<ffi.Void> n_coef,
  ffi.Pointer<ffi.Void> d_coef,
  int dst_n,
  int n_coef_n,
  int d_coef_n,
) {
  return _ailiaAudioGetLinerFilterZiCoef(
    dst_zi,
    n_coef,
    d_coef,
    dst_n,
    n_coef_n,
    d_coef_n,
  );
}