paulstretch_cpp

PaulStretch
Log | Files | Refs | LICENSE

commit d1b8aafe1b2ae486a9fc261d66ad8a7cd49f7524
parent 5192e3ed1c67aaca76129b862b8b26c7c30954fe
Author: Nasca Octavian PAUL <zynaddsubfx@yahoo.com>
Date:   Sun, 27 Feb 2011 13:07:40 +0200

Ignored commandline starting with "-"

Diffstat:
MGUI.fl | 15+++++++++++----
MProcessedStretch.cpp | 7++++++-
MProcessedStretch.h | 1+
Mreadme.txt | 1+
4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/GUI.fl b/GUI.fl @@ -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 + } } diff --git a/ProcessedStretch.cpp b/ProcessedStretch.cpp @@ -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){ diff --git a/ProcessedStretch.h b/ProcessedStretch.h @@ -172,6 +172,7 @@ class ProcessedStretch:public Stretch{ ProcessParameters pars; REALTYPE *infreq,*sumfreq,*tmpfreq1,*tmpfreq2; + REALTYPE *fbfreq; }; #endif diff --git a/readme.txt b/readme.txt @@ -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