On 18/02/2013, at 6:46 PM, iain <i...@sleepfive.com> wrote:

> I'm trying to draw a sample waveform so for some of the audio files I have
> which come in around 30minutes long, even drawing to a reduction of 8192
> frames/pixel you're looking at views of 10,000pixels wide (at 44100hz).
> Drawing 1frame per pixel would be a view 80million pixels wide. Admittedly
> that's the extreme case but drawing only the visible area is a good
> performance boost, especially when I need to draw things on top of the
> waveform. I do have the data points cached at certain zoom levels as well
> but it's all a memory/speed trade off. I can't cache the data points at all
> zoom levels, so I need to loop through the (cached) data to redraw, but
> equally I can't have a pixmap backing store at each zoom level, so only
> caching a pixmap of the visible area is a trade off I'm happy with.


Oldish thread now, but I just came across this, which looks highly relevant to 
your problem:  http://supermegaultragroovy.com/2009/10/06/drawing-waveforms/


--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to