Re: Tracking visibleRect changes using Autolayout
Re: Tracking visibleRect changes using Autolayout
- Subject: Re: Tracking visibleRect changes using Autolayout
- From: Graham Cox <email@hidden>
- Date: Fri, 01 Mar 2013 13:44:12 +1100
On 18/02/2013, at 6:46 PM, iain <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden