Re: [Audacity-devel] Sample-level time accuracy
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Vaughan J. <va...@au...> - 2010-09-24 22:03:44
|
On 9/22/2010 5:48 PM, Martyn Shaw wrote: > For anybody that's still with this... > > On 14/09/2010 01:25, Martyn Shaw wrote: > ... >> So use QUANTIZED_TIME to round every t in every method that uses a >> passed-in time in WaveTrack? And then the same for WaveClip? It sounds >> like a plan, but is it reasonable? I'm thinking so. >> >> Scanning down WaveTrack.h that would be (first lines only): >> >> virtual void SetOffset (double o); > > well this just calls... > >> Similarly in WaveClip: >> >> void SetOffset(double offset); > > and I see that it's WaveClips that actually have an offset, so I > figure that I'll fix it there only. Yes, I think that's right. Also, I took a bit closer look at your original list in this thread of WaveTrack and WaveClip methods that probably need changing. I think you'll run into lots of cases similar to WaveTrack::SetOffset() and WaveClip::SetOffset(), where many do not need to have the QUANTIZED_TIME change, as the real work is done at a lower level. For example, WaveTrack::Cut() just calls WaveTrack::Copy() and WaveTrack::Clear() (which just calls WaveTrack::HandleClear()), and so the changes need to be in WaveTrack::Copy() and WaveTrack::HandleClear(), not in WaveTrack::Cut(). Of course, those workhorses are the more complicated methods to fix! > > What should we do with overlapping waveclips in an aup??? Easily > possible to create with Audacity and a text editor (just set the > <waveclip offset=" to overlapping values), I question whether we should support such perversion. AUP files should be written by Audacity, not text editors. :-) >and probably 'out there' in > legacy files. We draw them OK, but possibly fail elsewhere. > I think legacy files have no notion of clips. Dominic, have you been following this thread? As the original architect, I think he might have valuable input on this whole thread, so if he doesn't respond here, Martyn, I recommend summarizing it and emailing him directly. Maybe Markus, too, as he did the adaptation to clips. That applies to your question in the "r10691 committed" email about why mOffset (of a Clip) is a double, not a sampleCount. I think your reasoning on all this is right, but there may be something I'm missing. - Vaughan |