ailiaAudioGetFrameLen method
~japanese @brief STFTで生成される時間フレーム長を取得します。 @param frame_n フレーム長出力先ポインタ @param sample_n STFTを適用するサンプル数 @param fft_n FFT点数 @param hop_n 窓のシフト数 @param center AILIA_AUDIO_STFT_CENTER_* のいずれか @return 成功した場合は \ref AILIA_STATUS_SUCCESS 、そうでなければエラーコードを返す。 @details STFT実行前のバッファサイズの決定に使用します。 \ref AILIA_AUDIO_STFT_CENTER_NONE の場合 hop_n ずつ区切り、sample_n の前後に padding を行いません。 \ref AILIA_AUDIO_STFT_CENTER_ENABLE の場合 sample_n の前後に fft_n/2 の padding(reflect) を行います。 \ref AILIA_AUDIO_STFT_CENTER_SCIPY_DEFAULT の場合、sample_n の前後に fft_n/2 の padding(zero) を行い、hop_nの倍数になるようにpadding(zero)を行います
~english @brief Get the number of frames generated by the STFT. @param frame_n pointer to the destination where to write the output (the number of frames) @param sample_n count of samples on which the STFT is performed @param fft_n size of the FFT at each frame (i.e. number of frequency bins at each frame) @param hop_n stride of each window shift (in number of samples). This is the quantum of time for the time axis of the STFT output. @param center any of the AILIA_AUDIO_STFT_CENTER_* constants @return In case of success, \ref AILIA_STATUS_SUCCESS , and else an error code is returned. @details Before executing the STFT, use this function to determine the space required for the output buffer. If \ref AILIA_AUDIO_STFT_CENTER_NONE is used, the sample_n samples are cut in packets of size hop_n, and no padding occurs before the first sample nor after the last sample. If \ref AILIA_AUDIO_STFT_CENTER_ENABLE is used, a reflection padding of length fft_n/n is performed before the first sample and after the last sample. If \ref AILIA_AUDIO_STFT_CENTER_ENABLE is used, a zero padding of length fft_n/n is performed before the first sample and after the last sample, and moreover an additional zero padding is performed to ensure that the total length is a multiple of hop_n.
Implementation
int ailiaAudioGetFrameLen(
ffi.Pointer<ffi.Int> frame_n,
int sample_n,
int fft_n,
int hop_n,
int center,
) {
return _ailiaAudioGetFrameLen(
frame_n,
sample_n,
fft_n,
hop_n,
center,
);
}