Re: [Audacity-devel] Mod Script Pipe problem with stopping playback
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Dan H. <da...@go...> - 2010-02-20 00:53:40
|
On Tue, Feb 16, 2010 at 02:12:49PM +0000, Marty Goddard wrote:
> Hello,
>
> Regarding the version number mismatch in the module, and the problem in SetProjectInfo.cpp and missing lines from SetTrackInfo.cpp, should I have submitted a patch for these fixes?
>
> Further to the problem in stopping playback over the named pipe, I discovered that a simple change to the default settings for the Stop menu command gives the correct performance without any apparent drawback except an obvious cosmetic problem: The Stop menu is disabled during playback. This does not prevent the stop command from being available via the spacebar or the scripting interface.
>
> I changed the following line in Menus.cpp (line 594)
>
> c->AddItem(wxT("Stop"), _("&Stop"), FN(OnStop) ); // Menus.cpp line 594, was
> c->AddItem(wxT("Stop"), _("&Stop"), FN(OnStop), AudioIOBusyFlag, AudioIOBusyFlag);
>
>
> I believe that by removing the dependence on , AudioIOBusyFlag, the command reverts to the default dependency upon AudioIONotBusyFlag, from:
>
> c->SetDefaultFlags(AudioIONotBusyFlag, AudioIONotBusyFlag); // Menus.cpp line 587
>
> Given that it works for me, I'll keep the above until I can figure out how make the Stop command always available (It shouldn't cause a problem if it's enabled when no playback is happening, right?)
>
I suspect the way to get this working without having problems with the
menu items is to move or copy the code for triggering playback/stopping
into separate commands, rather than doing it through the menu command
interface... But it's up to you whether or not you want to do this, as
the above method may be fine for your purposes.
Dan
|