bool Module::show_analysis_window ( void ) { /* use a large window for more accuracy at low frequencies */ nframes_t nframes = sample_rate() / 2; float *buf = new float[nframes]; memset( buf, 0, sizeof(float) * nframes ); buf[0] = 1; if ( ! get_impulse_response( buf, nframes ) ) { // return false; } Fl_Double_Window *w = new Fl_Double_Window( 1000, 500 ); { SpectrumView * o = new SpectrumView( 25,25, 1000 - 50, 500 - 50, label() ); o->labelsize(10); o->align(FL_ALIGN_RIGHT|FL_ALIGN_TOP); o->sample_rate( sample_rate() ); o->data( buf, nframes ); } w->end(); w->show(); while ( w->shown() ) Fl::wait(); delete w; return true; }