Graham,

> On Mar 15, 2015, at 18:57, Graham Cox <graham....@bigpond.com> wrote:
> 
> If I were designing this, I'd probably have a single NSView subclass that 
> handled three things: a) optimally drawing the waveform, b) maintaining and 
> drawing the playhead and

I like the simplicity of your design, but considering point b, how does a play 
head that spans multiple tracks, for a multi track editing interface, work?  
Presumably, we're talking about each view managing a single channel of audio.  
If there were many channels, would managing the play head in a separate, 
superimposed, view (or layer) be easier, or would you expect the play heads 
from each of the audio channel views be easily synchronized without any tear or 
drift?

> c) maintaining and drawing a selection rectangle. I wouldn't use additional 
> views for the playhead and selection graphics because that's just asking for 
> low performance (CALayers however, would be a different matter, and probably 
> a good solution, but these can be created as part of a single view). Keep it 
> all in one view where it's all nice and simple and you can use the fastest 
> drawing techniques you can, such as low-level Core Graphics, or CALayers. You 
> can then ask your view questions, such as "where is the playhead?", "what is 
> my selection time range?" and so on. Presumably the answers to these are used 
> to set propeties on the audio player itself which is independent of the view.
> 
> --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