ZLHistogramAudioPlot 0.0.1

ZLHistogramAudioPlot 0.0.1

测试已测试
Lang语言 Obj-CObjective C
许可协议 MIT
Released最后发布2014年12月

李知炫维护。




  • 李知炫

一个使用 EZAudio 实现的硬件加速音频可视化视图,受 AudioCopy 启发。

预览

缓冲区

preview buffer

滚动

preview rolling

使用

查看示例应用程序以获取示例。

可定制属性

/// The upper bound of the frequency range the audio plot will process. Default: 10000Hz
@property (nonatomic) float maxFrequency;

/// The lower bound of the frequency range the audio plot will process. Default: 1200Hz
@property (nonatomic) float minFrequency;

/// The number of bins in the audio plot. Default: 30
@property (nonatomic) NSUInteger numOfBins;

/// The padding of the bins in percent. Default: 0.1
@property (nonatomic) CGFloat padding;

/// The gain applied to the heights of bins. Default: 10
@property (nonatomic) CGFloat gain;

/// A float that specifies the vertical gravitational acceleration applied to bins in the audio plot. Default: 10 pixel/s^2
@property (nonatomic) float gravity;

/// The color of bins in the audio plot
@property (strong,nonatomic) UIColor *color;

/// An array of color objects defining the color of each bin in the audio plot. If not set, the color attribute will be used instead. Currently not supported by Buffer type.
@property (strong,nonatomic) NSArray *colors;

依赖项

  • ZLHistogramAudioPlot 是 EZAudioPlot 的子类。它需要 EZAudio
  • 它还要求使用硬件加速功能需要 Accelerate 框架。

兼容性

ZLHistogramAudioPlot 使用 EZAudio 提供的以下接口来获取音频数据

- (void)updateBuffer:(float *)buffer withBufferSize:(UInt32)bufferSize;

它可以很容易地修改以与 Audio UnitCore Audio 一同使用。

要求

  • iOS 6 或更高版本。
  • 自动引用计数(ARC)。

许可协议

ZLHistogramAudioPlot 在 MIT 许可协议下提供。有关更多信息,请参阅 LICENSE 文件。