1 /* 2 * Copyright (C) 2021 Paul Davis <paul@linuxaudiosystems.com> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License along 15 * with this program; if not, write to the Free Software Foundation, Inc., 16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 */ 18 19 #include "dsp_stats_ui.h" 20 #include "dsp_stats_window.h" 21 22 #include "pbd/i18n.h" 23 24 using namespace ARDOUR; 25 using namespace Gtkmm2ext; 26 using namespace Gtk; 27 DspStatisticsWindow()28DspStatisticsWindow::DspStatisticsWindow() 29 : ArdourWindow (_("Performance Meters")) 30 , ui (new DspStatisticsGUI) 31 { 32 ui->show (); 33 add (*ui); 34 } 35 ~DspStatisticsWindow()36DspStatisticsWindow::~DspStatisticsWindow () 37 { 38 delete ui; 39 } 40 41 void set_session(Session * s)42DspStatisticsWindow::set_session (Session* s) 43 { 44 ui->set_session (s); 45 } 46 47 void on_show()48DspStatisticsWindow::on_show () 49 { 50 ArdourWindow::on_show (); 51 ui->start_updating (); 52 } 53 54 void on_hide()55DspStatisticsWindow::on_hide () 56 { 57 ArdourWindow::on_hide (); 58 ui->stop_updating (); 59 } 60