ailiaAudioGetNonSilentPos method

int ailiaAudioGetNonSilentPos(
  1. Pointer<Int> dst_start_pos,
  2. Pointer<Int> dst_length,
  3. Pointer<Void> src,
  4. int sample_n,
  5. int win_n,
  6. int hop_n,
  7. double thr_db
)

~japanese @brief 信号の入力前後の無音域を除いた領域を検出します @param dst_start_pos 有音域の先頭サンプル位置出力先ポインタ、int 型 @param dst_length 有音域の長さ出力先ポインタ、int 型 @param src 入力データのポインタ、float 型、要素数 sample_n @param sample_n 入力データのサンプル数 @param win_n 1フレームに含むサンプル数 @param hop_n フレームのシフト数 @param thr_db 有音を判断するdB (thr_db > 0) @return 成功した場合は \ref AILIA_STATUS_SUCCESS 、そうでなければエラーコードを返す。 @details 全域が無音の場合、*dst_start_pos = -1,*dst_length = 0となります。

~english @brief Find the region of the signal between the first and the last non-silence samples. Detects the area excluding the silent range before and after the signal input @param dst_start_pos pointer to the destination where to write the outputted start position of the non-silence area, of int format @param dst_length pointer to the destination where to write the outputted length of the non-silence area, of int format @param src pointer to the input data, of float format, and of length sample_n @param sample_n count of samples in the input data @param win_n size of the window function @param hop_n stride of each window shift (in number of samples) @param thr_db threshold (in dB) above which the signal is considered non-silence (thr_db > 0) @return In case of success, \ref AILIA_STATUS_SUCCESS , and else an error code is returned. @details In case the whole signal is considered silence, the following happens: *dst_start_pos = -1, *dst_length = 0

Implementation

int ailiaAudioGetNonSilentPos(
  ffi.Pointer<ffi.Int> dst_start_pos,
  ffi.Pointer<ffi.Int> dst_length,
  ffi.Pointer<ffi.Void> src,
  int sample_n,
  int win_n,
  int hop_n,
  double thr_db,
) {
  return _ailiaAudioGetNonSilentPos(
    dst_start_pos,
    dst_length,
    src,
    sample_n,
    win_n,
    hop_n,
    thr_db,
  );
}