日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

[翻译] ZLHistogramAudioPlot

發布時間:2023/12/10 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [翻译] 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

總結

以上是生活随笔為你收集整理的[翻译] ZLHistogramAudioPlot的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。