ailiaAudioConvertPowerToDB method

int ailiaAudioConvertPowerToDB(
  1. Pointer<Void> dst,
  2. Pointer<Void> src,
  3. int src_n,
  4. double top_db
)

~japanese @brief 非負の入力値をデシベルスケールに変換します。 @param dst 出力データポインタ、float 型、長さ src_n @param src 入力データポインタ、float 型、要素数 src_n @param src_n 計算対象の要素数 @param top_db 出力の最大値から出力下限の閾値までを定める値 (>= 0.0)、負数の場合は処理は閾値を設定しない @return 成功した場合は \ref AILIA_STATUS_SUCCESS 、そうでなければエラーコードを返す。 @details librosa.power_to_dbと互換性があります。

~english @brief Convert non-negative input values to decibel scale. @param dst pointer to the output data, of float format, and of length src_n @param src pointer to the input data, of float format, and of length src_n @param src_n number of elements to be calculated @param top_db float >= 0.0 @return In case of success, \ref AILIA_STATUS_SUCCESS , and else an error code is returned. @details Output compatible with librosa.power_to_db. dst = trimlow( 10 * log10(src / ref) ) where ref is the max of 1e-10 and of positive values of src, and trimlow(), if top_db > 0, trims all values inferior to (- top_db) and replaces them by (- top_db)), else, trimlow() does nothing.

Implementation

int ailiaAudioConvertPowerToDB(
  ffi.Pointer<ffi.Void> dst,
  ffi.Pointer<ffi.Void> src,
  int src_n,
  double top_db,
) {
  return _ailiaAudioConvertPowerToDB(
    dst,
    src,
    src_n,
    top_db,
  );
}