Re: [Audacity-devel] mDuration
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Martyn S. <mar...@gm...> - 2010-09-05 23:53:54
|
OK (and had a minor incursion), but I see myself writing double quantMT0 = (double)((sampleCount)floor(mT0 * projRate + 0.5))/projRate; and RawTime = (double)((sampleCount)floor(RawTime * mSampleRate + 0.5)) / mSampleRate; // put on a sample and feel like I'll do more of that, much the same as WaveTrack::TimeToLongSamples and WaveTrack::LongSamplesToTime Is there a way to do this once, like: double Thing::quantisedTime(double time, double rate) { return (double)((sampleCount)floor(time * rate + 0.5))/rate; } and if so where should it be (my OOP programming skills letting me down again :-))? Would it be more efficient? TTFN Martyn On 03/09/2010 06:16, Al Dimond wrote: > On Thursday, September 02, 2010 19:52:11 Vaughan Johnson wrote: >> Bold. And correct, I think. I say go for it. >> > > I agree. I'll keep an eye out for any changes in this vein and do some > testing when I have a chance. > > - Al > >> - V >> >> On 9/2/2010 4:20 PM, Martyn Shaw wrote: >>> Hi >>> >>> Many of the uses of mDuration are wrong in the code, particularly >>> when >>> >>> mDuration = mT1 - mT0; >>> >>> (and equivalents) since these then get converted to samples later >>> and mDuration can be off by a sample. The remnants in bug 123 >>> is an example of this, there are others. >>> >>> I'm thinking that mDuration should be eradicated from the code, >>> and that we always pass around mViewInfo.sel0 and mViewInfo.sel1 >>> (in their various guises), but this is quite invasive. >>> >>> Should I just go for it? It will need review/testing. >>> >>> TTFN >>> Martyn >> >> ------------------------------------------------------------------- >> ----------- This SF.net Dev2Dev email is sponsored by: >> >> Show off your parallel programming skills. >> Enter the Intel(R) Threading Challenge 2010. >> http://p.sf.net/sfu/intel-thread-sfd >> _______________________________________________ >> audacity-devel mailing list >> aud...@li... >> https://lists.sourceforge.net/lists/listinfo/audacity-devel > > ------------------------------------------------------------------------------ > This SF.net Dev2Dev email is sponsored by: > > Show off your parallel programming skills. > Enter the Intel(R) Threading Challenge 2010. > http://p.sf.net/sfu/intel-thread-sfd > _______________________________________________ > audacity-devel mailing list > aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel > |