[翻译] ZLHistogramAudioPlot

简介:

ZLHistogramAudioPlot

A hardware-accelerated audio visualization view using EZAudio, inspired by AudioCopy. ZLHistogramAudioPlot was originally developed for Murmur.

这是使用了EZAudio,一个硬件加速的audio可视化view,灵感来自于AudioCopy.ZLHistogramAudioPlot这个最开始是为了Murmur而开发的.

Preview - 预览

Buffer

CocoaPods

You can install ZLHistogramAudioPlot through CocoaPods adding the following to your Podfile:

你可以用CocoaPods来安装ZLHistogramAudioPlot

pod 'ZLHistogramAudioPlot'

Usage - 使用

Checkout the demo app for an example.

下载demo app来看源码吧:

Customizable attributes:

可以定制的属性:

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

/// The lower bound of the frequency range the audio plot will display. Default:
/// 1200Hz
@property (nonatomic) float minFrequency; /// The number of bins in the audio plot. Default: 30 @property (nonatomic) NSUInteger numOfBins; /// The padding of each bin in percent width. Default: 0.1 @property (nonatomic) CGFloat padding; /// The gain applied to the height of each bin. Default: 10 @property (nonatomic) CGFloat gain; /// A float that specifies the vertical gravitational acceleration applied to /// each bin. Default: 10 pixel/sec^2 @property (nonatomic) float gravity; /// The color of all 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 only /// supported by plot type EZPlotTypeBuffer. @property (strong, nonatomic) NSArray *colors;

Dependencies - 依赖关系

  • ZLHistogramAudioPlot is a subclass of EZAudioPlot. It requires EZAudioZLHistogramAudioPlot继承自EZAudioPlot,它需要EZAudio框架支持
  • It also requires Accelerate framework for hardware acceleration. 他也需要Accelerate来支持硬件加速

Compatibilty - 兼容性

ZLHistogramAudioPlot uses the following interface provided by EZAudio to get audio data:

ZLHistogramAudioPlot是使用以下的接口来获取到EZAudio的audio数据的:

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

It can be easily modified to work with Audio Unit and Core Audio.

你也可以简单的修改到支持 Audio Unit 与 Core Audio

 

Requirements - 需要的环境

  • iOS 6 or higher. iOS 6 + 
  • Automatic Reference Counting (ARC). ARC

 

License

ZLHistogramAudioPlot is available under the MIT license. See the LICENSE file for more info.

 

目录
相关文章
|
存储 前端开发 JavaScript
No121.精选前端面试题,享受每天的挑战和学习
No121.精选前端面试题,享受每天的挑战和学习
|
7月前
|
监控 算法 数据安全/隐私保护
基于扩频解扩+turbo译码的QPSK图传通信系统matlab误码率仿真,扩频参数可设置
本项目基于MATLAB 2022a实现图像传输通信系统的仿真,涵盖QPSK调制解调、扩频技术和Turbo译码。系统适用于无人机图像传输等高要求场景,确保图像质量和传输稳定性。通过仿真,验证了系统在不同信噪比下的性能,展示了图像的接收与恢复效果。核心代码实现了二进制数据到RGB图像的转换与显示,并保存不同条件下的结果。
104 6
|
存储 SQL 算法
LeetCode 题目 65:有效数字(Valid Number)【python】
LeetCode 题目 65:有效数字(Valid Number)【python】
|
前端开发 小程序
前端get请求参数包含数组的情况
前端get请求参数包含数组的情况
592 0
|
负载均衡 Ubuntu Linux
Mycat高可用方案-HAProxy+Keepalived
Mycat高可用方案-HAProxy+Keepalived
2344 0
Mycat高可用方案-HAProxy+Keepalived
|
前端开发 Java 数据库
手把手教你使用Spring Boot从零开始制作用户注册登录功能
手把手教你使用Spring Boot从零开始制作用户注册登录功能
6858 2
手把手教你使用Spring Boot从零开始制作用户注册登录功能
|
Serverless
数学建模统计分析-相关系数
数学建模统计分析-相关系数
288 0
|
自然语言处理 JavaScript 前端开发
深度解析javascript中的this(四)
深度解析javascript中的this(四)
185 0