[翻译] 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 EZAudio. ZLHistogramAudioPlot继承自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.

 

转载于:https://www.cnblogs.com/YouXianMing/p/4246756.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/432047.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Remon Spekreijse CSerialPort串口类的修正版2014-01-10

转自:http://m.blog.csdn.net/blog/itas109/18358297# 2014-1-16阅读691 评论0 如需转载请标明出处:http://blog.csdn.net/itas109 这是一份优秀的类文件,好多的地方值得我们学习,具体在多线程,事件,自定义…

获取进程名称与ID

HANDLE hProceessnap CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);if (hProceessnap INVALID_HANDLE_VALUE){printf_s("创建进行快照失败\n");return -1;}else{PROCESSENTRY32 pe32;pe32.dwSize sizeof(pe32);BOOL hProcess Process32First(hProceessnap, …

CMake find_package

find_package(XXX REQUIRED) CMake 会寻找 XXX_Dir的路径查找.cmake文件 有两种方式设置 1. 命令行模式下,使用-D -DXXX_Dir"路径" 2. 界面模式下,使用Add Entry添加 XXX_Dir 变量并设置路径

Libevent:6辅助函数以及类型

在头文件<event2/util.h>中定义了许多有用的函数和类型来帮助实现可移植的程序。Libevent在内部使用这些类型和函数。 一&#xff1a;基本类型 evutil_socket_t 除了Windows之外的大多数系统&#xff0c;socket就是一个整数&#xff0c;而且操作系统按照数值顺序对它们进…

enable_if

typedef struct {int a; }TestType;int main() {enable_if <1, TestType>::type test1; //正确test1.a 100;enable_if <is_integral<int>::value, TestType>::type test2; //正确test1.a 100;enable_if <0, TestType>::type test3; //错…

一. NSIS介绍

概述 最近需要写一个安装程序&#xff0c;比对了一下现有的安装工具&#xff0c;最后选定了NSIS&#xff0c;最主要的原因一是开源、二是灵活。 下面把我的要求简单列举下&#xff1a; 1、需要检查系统环境是否满足要求 2、需要界面友好的安装过程 3、需要一些自定义界面&…

HDU-1008

水题 Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor,…

二. 简单的NSIS安装包

新建脚本&#xff1a;向导 我们先从一个简单的NSIS安装包开始吧&#xff0c;就像前面&#xff08;NSIS介绍&#xff09;所说&#xff0c;我们虽然看过用户手册&#xff0c;可要写安装脚本无从下手&#xff0c;那我们的编辑工具HM NIS Edit就派上用场了。 打开HM NIS Edit&…

Ubuntu 14.04 LAMP搭建(Apache 2.47+MySQL 5.5+PHP5.5)

Ubuntu 14.04 LAMP搭建(Apache 2.47MySQL 5.5PHP5.5) 原文:Ubuntu LAMP搭建 为了数据库课程设计&#xff0c;只好自己搭一个数据库系统&#xff0c;采用LAMP方式。 一、安装 1.安装Apache sudo apt-get install apache2 Apache在安装期间会新建一个目录&#xff1a;/var/www&am…

C++变量未初始的后果

#include <iostream> using namespace std;void dummy(int &a) {}int main() {int i 2;while (i--){int a;dummy(a);if (i 1){a 100;}cout << a << endl;cout << &a << endl;}getchar(); } 上面程序&#xff0c;如果变量a没有初始化…

NSIS 查找文件是否存在,并设置安装路径

Var GIT Function .onInit!insertmacro MUI_LANGDLL_DISPLAYStrCpy $GIT "false"MessageBox MB_OK $9IfFileExists "C:\Program Files\Git\git-cmd.exe" 0 4MessageBox MB_OK "Git已安装"StrCpy $INSTDIR "C:\Program Files\Git"StrCp…

国内主流云主机比较

随着国内云主机技术日趋成熟&#xff0c;云主机的优势越来越明显&#xff0c;用户对云主机的态度也由观望变为乐于尝试。国内各大云主机商也放低姿态&#xff0c;产品设置和定价上逐渐迎合个人用户和中小型企业用户的需求。 云主机的诸多好处&#xff1a;集群计算、处理能力可弹…

30 个很棒的 PHP 开源 CMS 内容管理系统

本文汇集了30个优秀的开源CMS建站系统&#xff0c;采用PHP开发。以下列表不分先后顺序。 1. AdaptCMS AdaptCMS Lite 是一个开源的CMS系统&#xff0c;主要特点是易用&#xff0c;而且可以轻松和其他系统接驳&#xff0c;提供简单的扩展定制途径&#xff0c;一个简单而且功能强…

Alwayson常用脚本

1、修改实例下所有节点的数据同步模式&#xff0c;在master数据库下运行 --查找所有异步提交的辅助节点&#xff0c;修改为同步提交模式 -- SYNCHRONOUS_COMMIT 同步提交模式 -- ASYNCHRONOUS_COMMIT 异步提交模式 select ALTER AVAILABILITY GROUP [a.name] MODIFY REPLICA…

Package ‘*****‘ has no installation candidate

如果在apt源中未找到软件&#xff0c;去ubuntu的软件包搜索页面中去搜索该软件 Ubuntu – Ubuntu Packages Search https://packages.ubuntu.com/ 前面红字找到对应ubuntu版本的软件版本名称&#xff0c;后面中括号为仓库名称&#xff0c;然后写入到/etc/apt/sources.list中 …

Oracle 客户端连接服务器[转]

很多朋友在开发项目中并不是每个人用一个数据库&#xff0c;而是有单独的一台主机作为开发的数据库服务器&#xff0c;这样&#xff0c;就需要我们的开发人员去连接它。 首先是进入oracle的 Net Mananger&#xff1b; 接下来就是进行简单的设置了。。 &am…

p3d gauge 尺寸问题

1. 在panel.cfg中&#xff0c;每个window可以有多个gauge&#xff0c;window是gauge的容器 2. 在panel.cfg中&#xff0c;background_color为window背景色&#xff0c;如果设置为0&#xff0c;0&#xff0c;0&#xff0c;未被gauge覆盖的 部分会透明 3. 在panel.cfg中&#…

BZOJ2199 [Usaco2011 Jan]奶牛议会

首先建立一个2-SAT的裸模型&#xff0c;然后发现。。。tarjan没法判断?的情况 于是暴力对每一个议案check一下&#xff0c;直接dfs即可 1 /**************************************************************2 Problem: 21993 User: rausen4 Language: C5 Resu…

ubuntu 远程桌面

1. apt-get install xrdp 2. apt-get install dconf-editor 3. 启动 dconf-editor&#xff0c;org->gnome->desktop->remote-access&#xff0c;取消 “requlre-encryption”的勾选 4. 打开系统左上角的"Search your computer"&#xff0c;然后找到“Des…