KSRealtimeAnalyzer.h 746 B

123456789101112131415161718192021222324252627
  1. //
  2. // KSRealtimeAnalyzer.h
  3. // KulexiuSchoolStudent
  4. //
  5. // Created by 王智 on 2024/7/29.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <AVFoundation/AVFoundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface KSRealtimeAnalyzer : NSObject
  11. @property (nonatomic, assign) BOOL isAnalise; // 是否正在分析中
  12. @property (nonatomic, assign) NSInteger frequencyBands; // 频带数量
  13. @property (nonatomic, assign) float startFrequency; // 起始频率
  14. @property (nonatomic, assign) float endFrequency; // 截止频率
  15. @property (nonatomic, assign) float spectrumSmooth; // 频谱平滑
  16. - (instancetype)initWithFFTSize:(NSInteger)fftSize;
  17. - (NSArray<NSArray<NSNumber *> *> *)analyseWithBuffer:(AVAudioPCMBuffer *)buffer;
  18. @end
  19. NS_ASSUME_NONNULL_END