2 * Copyright (C) 2006-2011 David Robillard <d@drobilla.net>
3 * Copyright (C) 2006-2013 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
5 * Copyright (C) 2013 John Emmas <john@creativepost.co.uk>
6 * Copyright (C) 2015-2017 Robin Gareus <robin@gareus.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __gtk_ardour_audio_region_edit_h__
24 #define __gtk_ardour_audio_region_edit_h__
28 #include <gtkmm/label.h>
29 #include <gtkmm/entry.h>
30 #include <gtkmm/box.h>
31 #include <gtkmm/togglebutton.h>
32 #include <gtkmm/button.h>
33 #include <gtkmm/arrow.h>
34 #include <gtkmm/frame.h>
35 #include <gtkmm/table.h>
36 #include <gtkmm/adjustment.h>
37 #include <gtkmm/separator.h>
38 #include <gtkmm/spinbutton.h>
41 #include "pbd/signals.h"
42 #include "pbd/crossthread.h"
44 #include "audio_clock.h"
45 #include "ardour_dialog.h"
46 #include "region_editor.h"
53 class AudioRegionView;
55 class AudioRegionEditor : public RegionEditor
58 AudioRegionEditor (ARDOUR::Session*, boost::shared_ptr<ARDOUR::AudioRegion>);
59 ~AudioRegionEditor ();
61 void peak_amplitude_thread ();
65 void region_changed (PBD::PropertyChange const &);
68 void gain_adjustment_changed ();
70 boost::shared_ptr<ARDOUR::AudioRegion> _audio_region;
72 Gtk::Label gain_label;
73 Gtk::Adjustment gain_adjustment;
74 Gtk::SpinButton gain_entry;
76 Gtk::Label _peak_amplitude_label;
77 Gtk::Entry _peak_amplitude;
79 void signal_peak_thread ();
80 pthread_t _peak_amplitude_thread_handle;
81 void peak_amplitude_found (double);
82 PBD::Signal1<void, double> PeakAmplitudeFound;
83 PBD::ScopedConnection _peak_amplitude_connection;
84 CrossThreadChannel _peak_channel;
87 #endif /* __gtk_ardour_audio_region_edit_h__ */