rendering a waveform on an iphone

你说的曾经没有我的故事 提交于 2019-11-28 18:23:59
Nick Haddad

I'm reposting my answer from this question, since it applies here as well:

When displaying an audio waveform, you will want to do some sort of data reduction on the original data, because there is usually more data available in an audio file than pixels on the screen. Most audio editors build a separate file (called a peak file or overview file) which stores a subset of the audio data (usually the peaks and valleys of a waveform) for use at different zoom levels. Then as you zoom in past a certain point you start referencing the raw audio data itself.

Here are some good articles on this:

Waveform Display

Build an Audio Waveform Display

As far as source code goes, I would recommend looking through the Audacity source code. Audacity's waveform display is pretty good and mostly likely does a similar sort of data reduction when rendering the waveforms.

Rog

CorePlot is the library you are looking for. It is hosted on Google code.

See this related SO question.

unsynchronized

I realise this is an old post, however i searched for this recently, and decided to roll my own solution based on a few snippets i located on SO and a few other sites.

See my answer to This question

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!