Browse Source

Ignored commandline starting with "-"

master
Nasca Octavian PAUL 13 years ago
parent
commit
d1b8aafe1b
4 changed files with 19 additions and 5 deletions
  1. +11
    -4
      GUI.fl
  2. +6
    -1
      ProcessedStretch.cpp
  3. +1
    -0
      ProcessedStretch.h
  4. +1
    -0
      readme.txt

+ 11
- 4
GUI.fl View File

@@ -267,7 +267,7 @@ render();}
xywh {5 50 985 420} box BORDER_BOX
} {
Fl_Group {} {
label Parameters open selected
label Parameters open
xywh {5 70 985 400}
} {
Fl_Slider stretch_slider {
@@ -941,12 +941,18 @@ if ( i == 0 ) return true;
else return false;} {}
}

Function {main(int argc, char *argv[])} {return_type int
Function {main(int argc, char *argv[])} {open return_type int
} {
code {GUI *gui=new GUI();


if (argc>1){
gui->open_input_file(argv[1]);
const char *filename=argv[1];
if (filename[0]=='-'){
if (argc>2) filename=argv[2];
else filename=NULL;
};
if (filename) gui->open_input_file(filename);
};
gui->window->show();

@@ -955,5 +961,6 @@ Fl::run();

delete gui;

return 0;} {}
return 0;} {selected
}
}

+ 6
- 1
ProcessedStretch.cpp View File

@@ -125,8 +125,12 @@ ProcessedStretch::ProcessedStretch(REALTYPE rap_,int in_bufsize_,FFTWindow w,boo
sumfreq=new REALTYPE[nfreq];
tmpfreq1=new REALTYPE[nfreq];
tmpfreq2=new REALTYPE[nfreq];
fbfreq=new REALTYPE[nfreq];
free_filter_freqs=new REALTYPE[nfreq];
for (int i=0;i<nfreq;i++) free_filter_freqs[i]=1.0;
for (int i=0;i<nfreq;i++) {
free_filter_freqs[i]=1.0;
fbfreq[i]=0.0;
};
};
ProcessedStretch::~ProcessedStretch(){
delete [] infreq;
@@ -134,6 +138,7 @@ ProcessedStretch::~ProcessedStretch(){
delete [] tmpfreq1;
delete [] tmpfreq2;
delete [] free_filter_freqs;
delete [] fbfreq;
};

void ProcessedStretch::set_parameters(ProcessParameters *ppar){


+ 1
- 0
ProcessedStretch.h View File

@@ -172,6 +172,7 @@ class ProcessedStretch:public Stretch{
ProcessParameters pars;

REALTYPE *infreq,*sumfreq,*tmpfreq1,*tmpfreq2;
REALTYPE *fbfreq;
};

#endif


+ 1
- 0
readme.txt View File

@@ -74,6 +74,7 @@ History:
2011????(2.)
- Added an option to preserve the tonal part or noise part
- Ignored the commandline parameters starting with "-" (usefull for macosx)

Enjoy! :)
Paul


Loading…
Cancel
Save