Re: [Audacity-devel] FIX_PLAY_ON_OPEN
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Andreas M. <And...@gm...> - 2007-12-02 16:20:29
|
Martyn, could you please explain where exactly you disagree? I still don't understand, sorry. Is SetActiveProject(NULL); not okay? I saw this fixes the "Essential". But is it safe? Thanks, Andreas Shaw wrote: > Andreas > > On this occasion, I disagree with you. You must have been using the > Transcription toolbar 'play' button to come to this conclusion, > judging by your comments. > > There are several ways to set off playback in the second project, some > are ignored, some are not. > > Pressing SpaceBar calls AudacityProject::OnPlayStop() and is not a > problem. > > Pressing Play calls ControlToolBar::OnPlay which calls > ControlToolBar::PlayDefault() which calls StopPlaying(), which causes > the problem. > > Any use? > Martyn > > Andreas Micheler wrote: > >> Hallo all, >> >> I have found out a quick fix for the problem: >> " >> Essential fixes >> If you open another file when the first is playing, the first stops >> playing and starts again from time zero." >> >> The fix is not yet tested much, but it seems to work. >> Please, can some people check if I don't break anything with it? >> I mean, is it allowed to have NULL as current project, or will it crash >> somewhere? >> >> I changed the constructor AudacityProject to this: >> _____________________________________________________________ >> AudacityProject *CreateNewAudacityProject(wxWindow * parentWindow) >> { >> bool bMaximized; >> wxRect wndRect; >> >> #if defined(__WXMAC__) >> if (gParentFrame->IsShown()) { >> gParentFrame->Hide(); >> } >> #endif >> >> GetNextWindowPlacement(&wndRect, &bMaximized); >> #ifdef FIX_PLAY_ON_OPEN >> SetActiveProject(NULL); >> #endif //FIX_PLAY_ON_OPEN >> >> //Create and show a new project >> AudacityProject *p = new AudacityProject(parentWindow, -1, >> wxPoint(wndRect.x, >> wndRect.y), wxSize(wndRect.width, wndRect.height)); >> >> gAudacityProjects.Add(p); >> >> if(bMaximized) >> p->Maximize(true); >> >> p->Show(true); >> >> //Set the new project as active: >> SetActiveProject(p); >> >> return p; >> } >> _____________________________________________________________ >> >> The problem is, that in >> void TranscriptionToolBar::Create(wxWindow * parent) >> there's a call to >> OnSpeedSlider(dummy); >> and therein >> OnPlaySpeed(event); >> and there: >> >> void TranscriptionToolBar::OnPlaySpeed(wxCommandEvent & event) >> { >> // Can't do anything without an active project >> AudacityProject * p = GetActiveProject(); >> if (!p) { >> return; >> } >> >> // Pop up the button >> SetButton(false, mButtons[TTB_PlaySpeed]); >> >> // If IO is busy, abort immediately >> if (gAudioIO->IsBusy()) { >> p->GetControlToolBar()->StopPlaying(); // !!!!!! this stops the >> playing >> } >> >> I'm not really sure about this fix, >> so I won't check it in until I get some confirmations. ;-) >> >> Cheers, >> Andreas >> >> ------------------------------------------------------------------------- >> SF.Net email is sponsored by: The Future of Linux Business White Paper >> from Novell. From the desktop to the data center, Linux is going >> mainstream. Let it simplify your IT future. >> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 >> _______________________________________________ >> Audacity-devel mailing list >> Aud...@li... >> https://lists.sourceforge.net/lists/listinfo/audacity-devel >> >> > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > >from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > Audacity-devel mailing list > Aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel > > |