On Wed, 2009-11-04 at 23:32 +0800, sam lewis wrote:
> Hi,
>
> I attach the patch to remove original hard-coded file filter in
> BatchProcessDialog::OnApplyToFiles and use the same method as
> AudacityProject::ShowOpenDialog. In fact, I copy some code from the
> later function.
A couple of issues in the patch:
1. #include "Import/Import.h": no such file or directory. The
subdirectory is called "import" and on Linux file systems are case
sensitive (and Mac is moving that way), so "import" and "Import" are
different directories. This causes a compile failure.
2. + _("Select file(s) for batch processing...");
+ //wxString fileSelector = project->GetCleanSpeechMode() ?
+ // _("Vocal files (*.wav;*.mp3)|*.wav;*.mp3|WAV files (*.wav)|*.wav|MP3 files (*.mp3)|*.mp3") :
+ // _("All files (*.*)|*.*|WAV files (*.wav)|*.wav|AIFF files (*.aif)|*.aif|AU files (*.au)|*.au|MP3 files (*.mp3)|*.mp3|Ogg Vorbis files (*.ogg)|*.ogg|FLAC files (*.flac)|*.flac"
+ // );
No point in leaving the incorrect code commented out - it's always there
in the CVS history if needed. If you feel you want a note that it used
to be different, then add a 1-line comment so people know to look in the
history for how it worked, e.g.
+ // CleanSpech used to hard-code a restricted file type list here
> As I observed, CleanSpeech projects are supposed to have different
> hard-coded file filter. Should I just keep it unchanged?
Frankly, I couldn't care less as no-one is maintaining the CleanSpeech
code. I'm looking forward to the day when it can be pushed into a module
out of core Audacity and left to someone who is interested to look after
it, without polluting the Audacity code base with
not-quite-thought-through features that would have been better
implemented another way.
In this case the hard-coded list constituted a bug, because it would
include file types even if support for them was omitted from Audacity. A
better solution would just have been to disable the libraries supporting
the file types the project didn't want (e.g. no FLAC) at compile time
(or add a feature to do so at runtime). Neither of these is worth the
effort unless someone comes up with the interest to do a major re-vamp
of the cleanspeach idea.
With the above issues fixed this seems to work fine - I get the list of
file formats I expect, and choose from that list OK when I go to run a
chain. We should be able to cross this one off the list now.
Richard
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel