Re: [Audacity-devel] more bugzilla review
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Vaughan J. <vjo...@co...> - 2004-01-05 00:24:30
|
Dominic Mazzoni wrote: > On Dec 21, 2003, at 4:09 PM, Vaughan Johnson wrote: > >> ...* bug 73 (Detect audio CD tracks on Windows: >> Win32 presents audio CDs as mounted volumes, with a pseudo-WAV file >> visible for each track. When a user tries to open one of these audio >> CD tracks in Audacity, it produces a cryptic error message ("riff >> file does not specify 'wave' as type").): >> I don't see that behavior on Win2K Pro or Win98 SE. The files on an >> audio CD have a .cda extension, and trying to import them in Audacity >> 1.2.0pre3 brings up an alert: "Audacity did not recognize the type of >> this file...". So, Matt (reporter), is it fixed, or do I not understand? > > > It would be best if Audacity specifically recognized ".cda" files and > brought up a different error message that explains that CD audio files > must be ripped. Okay. I put a hack in Importer::Import() to do this, but should it instead be an importPluginNode that returns 0? Also, if this extra verbiage is a translation burden, we can back this out to the development version. >> * bug 110 (Doesn't ask if you save changes if you close while recording: >> >> Open a new Audacity project and click "Record". Then close the >> window or Quit, >> and Audacity closes the window without asking if you want to save >> changes, so >> you could lose everything you've recorded. >> >> ): > > ... > The fundamental problem is that the Project never pushes state, > realizing that it's been modified, until it checks to see if recording > has _finished_ during an idle event. > > Three ideas for solutions: > > * Is it enough to mark a project as Dirty (mDirty = true) when you > start recording? No, that didn't do it. > > > * Could a project PushState when you start recording, and then > ModifyState when you finish? I hacked in a PushState (but not the ModifyState), and that makes it ask whether to save when you click the close box, but it keeps recording! If you save, it does it successfully, up to some completed chunk, and closes. I was surprised it didn't crash, but as you said, Dominic, we need to stop recording before exiting, and presumably before asking whether to save. On these first 2 ideas, because mDirty and PushState are private, I just hacked AudacityProject::SetAudioIOToken(). That's the wrong place to do it, but for testing worked because the only place I could easily tell where recording starts is in ControlToolBar::OnRecord(), and it calls SetAudioIOToken on first successful loop. Is there a better place to catch that, or will ControlToolBar need state-modifying callbacks a la TrackPanel (to maintain the privacy restriction)? It doesn't look like AudacityProject::OnRecord() is called anywhere. > > > * Do an explicit check to see if you're in the middle of recording in > the AudacityProject destructor, and if so, push state, duplicating a > bit of code shown above. I didn't try this one, but does the above give you an indication whether this is necessary? I didn't yet look into making it stop recording before presenting the save dialog. Are both necessary? -Vaughan |