mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-16 07:31:16 +02:00
Slightly faster parsing of Nyquist programs.
This reads the program into a buffer first. It also preallocates space for the Nyquist program.
This commit is contained in:
@@ -2177,6 +2177,7 @@ bool NyquistEffect::ParseProgram(wxInputStream & stream)
|
|||||||
wxTextInputStream pgm(stream, wxT(" \t"), wxConvAuto());
|
wxTextInputStream pgm(stream, wxT(" \t"), wxConvAuto());
|
||||||
|
|
||||||
mCmd = wxT("");
|
mCmd = wxT("");
|
||||||
|
mCmd.Alloc(10000);
|
||||||
mIsSal = false;
|
mIsSal = false;
|
||||||
mControls.clear();
|
mControls.clear();
|
||||||
mCategories.clear();
|
mCategories.clear();
|
||||||
@@ -2261,7 +2262,8 @@ or for LISP, begin with an open parenthesis such as:\n\t(mult *track* 0.1)\n .")
|
|||||||
|
|
||||||
void NyquistEffect::ParseFile()
|
void NyquistEffect::ParseFile()
|
||||||
{
|
{
|
||||||
wxFileInputStream stream(mFileName.GetFullPath());
|
wxFileInputStream rawStream(mFileName.GetFullPath());
|
||||||
|
wxBufferedInputStream stream(rawStream, 10000);
|
||||||
|
|
||||||
ParseProgram(stream);
|
ParseProgram(stream);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user