Re: [Audacity-devel] patch review Timer Record needs to remember the last scheduled duration
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Al D. <bus...@gm...> - 2010-02-17 16:15:54
|
On Wednesday 17 February 2010 09:07:46 Gale Andrews wrote:
> | From Peter Sampson <pet...@ya...>
> | Sun, 14 Feb 2010 08:03:04 -0800 (PST)
> | Subject: [Audacity-devel] patch review Timer Record needs to
> | remember the last scheduled duration
> |
> > And -1 from me too
> >
> > I suggested the 1hour period on the forum - where
> > a) it attracted supporting votes, and
> > b) was picked up and implemented (for which, thanks).
> >
> > For my use, most of the shows I record off-air from the BBC are
> > one-hour duration - it's very easy to modify the time duration
> > for others that are not this length.
>
> +1. The suggestion doesn't (or shouldn't) change the default
> length of an hour, so you need take no action at all in your case.
>
> But if you always wanted 90 minutes, then after the patch you can
> change to 90 minutes once, and then you will always get 90 minutes.
> Before the patch, you have to change to 90 minutes every single
> time (even if it's in the same session).
>
+1 from me. I was thinking of putting it in a while ago myself but I
never got around to reviewing it.
- Al
>
>
>
>
> Gale
>
>
> ________________________________
>
> > From: Martyn Shaw <mar...@go...>
> > To: aud...@li...
> > Sent: Wed, February 10, 2010 1:35:55 AM
> > Subject: Re: [Audacity-devel] patch review Timer Record needs to
> > remember the last scheduled duration
> >
> > +1 from me, it seems like a no-brainer here. If I wanted to
> > record a 30 min show yesterday then I probably want to record a
> > 30 min show again today. Exactly how that happens I haven't
> > looked into.
> >
> > TTFN
> > Martyn
> >
> > On 09/02/2010 22:15, Vaughan Johnson wrote:
> > > I think I was clear about this when it was suggested, but -1
> > > from me. I prefer it always revert to 1 hour and consider this
> > > a code bloat feature.
> > >
> > > - V
> > >
> > > On 2/8/2010 11:07 AM, Ed Musgrove wrote:
> > >> (Normally I would not post this here but since we cannot
> > >> attach patches to the wiki I must use this list so that I can
> > >> have a nabble reference -- sorry!)
> > >> New patch attached to replace stale patch
> > >>
> > >> ============= general comments=============
> > >> Patch author: Lavanya Tekumalla
> > >> Patch: Timer Record needs to remember the last scheduled
> > >> duration as per Release checklist not aiming for 1.4
> > >> Reviewer: Ed Musgrove
> > >> +1
> > >>
> > >> I find this patch useful in two situations. As a normal user I
> > >> almost always want to record at the same duration as that used
> > >> last time. As a beta tester investigating a bug I always want
> > >> to record for a very brief duration; I might perform this
> > >> timed recording task 50 or more times in an hour trying to pin
> > >> down a specific problem, the reduction in keystrokes and mouse
> > >> movements obtained by using this patch is significant. In fact
> > >> while exploring a bug with timed recording last fall I wrote
> > >> this exact same code and have had it in "My Audacity" ever
> > >> since.
> > >>
> > >> I think this patch is stale, it would not apply (I will try to
> > >> reference a fresh batch via nabble):
> > >> ---------------------
> > >> D:\audio\Audacity\record timer duration retention>dir
> > >> Volume in drive D is RAIDdata
> > >> Volume Serial Number is EA04-0A51
> > >>
> > >> Directory of D:\audio\Audacity\record timer duration
> > >> retention
> > >>
> > >> 02/08/2010 09:45 AM<DIR> .
> > >> 02/08/2010 09:45 AM<DIR> ..
> > >> 02/06/2010 10:22 AM 1,670
> > >> retainRecordTimerDuration.patch 02/08/2010 09:37 AM
> > >> 17,057 TimerRecordDialog.cpp 2 File(s) 18,727 bytes
> > >> 2 Dir(s) 712,987,291,648 bytes free
> > >>
> > >> D:\audio\Audacity\record timer duration retention>patch -p1
> > >> <retainRecordTimerDuration.patch
> > >> patching file TimerRecordDialog.cpp
> > >> Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line
> > >> 354
> > >>
> > >> This application has requested the Runtime to terminate it in
> > >> an unusual way.
> > >> Please contact the application's support team for more
> > >> information.
> > >>
> > >> D:\audio\Audacity\record timer duration retention>
> > >> ---------------------
> > >> Probably because the patch is stale in re. SVN TRUNK; patch:
> > >> ---------------------
> > >> @@ -209,6 +218,9 @@
> > >>
> > >> m_timer.Stop(); // Don't need to keep updating
> > >> m_DateTime_Start to prevent backdating.
> > >>
> > >> + double dTime = m_TimeSpan_Duration.GetSeconds().ToDouble();
> > >> + gPrefs->Write(wxT("/TimerRecord/LastDurationInSeconds"),
> > >> wxString::Format(wxT("%ld"),(long) dTime));
> > >> +
> > >> int updateResult = eProgressSuccess;
> > >> if (m_DateTime_Start> wxDateTime::UNow())
> > >> updateResult = this->WaitForStart();
> > >> ---------------------
> > >> TRUNK:
> > >> ---------------------
> > >> m_timer.Stop(); // Don't need to keep updating
> > >> m_DateTime_Start to prevent backdating.
> > >> this->EndModal(wxID_OK);
> > >> }
> > >>
> > >> ///Runs the wait for start dialog. Returns false if the user
> > >> clicks stop while we are recording
> > >> ///so that the high
> > >> bool TimerRecordDialog::RunWaitDialog()
> > >> {
> > >> int updateResult = eProgressSuccess;
> > >> if (m_DateTime_Start> wxDateTime::UNow())
> > >> updateResult = this->WaitForStart();
> > >> ---------------------
> > >>
> > >> ============= code specific comments=============
> > >> The following two lines are from the patch:
> > >> + minutes = (long) ((seconds - hours * 3600 ) / 60);
> > >> + seconds = (long) (seconds - ( hours * 3600 + minutes * 60
> > >> )); I would replace them with the functionally identical:
> > >> minutes = (long) ((seconds - (hours * 3600)) / 60); seconds =
> > >> (long) (seconds - ((hours * 3600) + (minutes * 60))); Two tiny
> > >> changes -- I remove the superfluous spaces (i.e. after the 60
> > >> in "minutes * 60 ));" on the second line).
> > >> In both lines I added superfluous parentheses around the
> > >> multiplication [i.e. (hours * 3600)]; I know that
> > >> multiplication takes precedence over addition, I just find
> > >> that it makes the code easier to read. ----------------------
> > >> Because the original patch was stale it was not clear exactly
> > >> where Lavanya intended to perform the preferences write. I
> > >> have chosen to put it after EndModal on the (probably
> > >> erroneous) assumption that while the operating system is doing
> > >> housework closing a window Audacity can be doing the disk
> > >> write.
> > >> m_timer.Stop(); // Don't need to keep updating
> > >> m_DateTime_Start to prevent backdating.
> > >> this->EndModal(wxID_OK);
> > >> double dTime =
> > >> m_TimeSpan_Duration.GetSeconds().ToDouble();
> > >> gPrefs->Write(wxT("/TimerRecord/LastDurationInSeconds"),
> > >> wxString::Format(wxT("%ld"),(long) dTime));
> > >>
> > >> --Ed
> > >
> > > ---------------------------------------------------------------
> > >---------------
>
> -------------------------------------------------------------------
> ----------- SOLARIS 10 is the OS for Data Centers - provides
> features such as DTrace, Predictive Self Healing and Award Winning
> ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> audacity-devel mailing list
> aud...@li...
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>
|