X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Faudio_region_editor.h;h=5c9e56d92373bcab9589959416ac03d1617c8fcf;hb=c78528dcea03a61685ad0586eaa6302847af6fe9;hp=1f23427167aec82f3196965a214a61422fc0e379;hpb=9155aca8c2b39daa98ff12cbb748809a99af67a3;p=ardour.git diff --git a/gtk2_ardour/audio_region_editor.h b/gtk2_ardour/audio_region_editor.h index 1f23427167..5c9e56d923 100644 --- a/gtk2_ardour/audio_region_editor.h +++ b/gtk2_ardour/audio_region_editor.h @@ -35,7 +35,9 @@ #include #include -#include + +#include "pbd/signals.h" +#include "pbd/crossthread.h" #include "audio_clock.h" #include "ardour_dialog.h" @@ -51,67 +53,32 @@ class AudioRegionView; class AudioRegionEditor : public RegionEditor { public: - AudioRegionEditor (ARDOUR::Session&, boost::shared_ptr, AudioRegionView& rv); + AudioRegionEditor (ARDOUR::Session*, boost::shared_ptr); ~AudioRegionEditor (); + void peak_amplitude_thread (); + private: - boost::shared_ptr _region; - AudioRegionView& _region_view; - - void connect_editor_events (); - - Gtk::Label name_label; - Gtk::Entry name_entry; - Gtk::HBox name_hbox; - - Gtk::HBox top_row_hbox; - Gtk::HBox top_row_button_hbox; - - Gtk::ToggleButton audition_button; - - Gtk::HBox lower_hbox; - - Gtk::Table time_table; - - Gtk::Label position_label; - Gtk::Label end_label; - Gtk::Label length_label; - Gtk::Label sync_relative_label; - Gtk::Label sync_absolute_label; - Gtk::Label start_label; - - AudioClock position_clock; - AudioClock end_clock; - AudioClock length_clock; - AudioClock sync_offset_relative_clock; ///< sync offset relative to the start of the region - AudioClock sync_offset_absolute_clock; ///< sync offset relative to the start of the timeline - AudioClock start_clock; - - Gtk::HSeparator sep3; - Gtk::VSeparator sep1; - Gtk::VSeparator sep2; - - void region_changed (ARDOUR::Change); - void bounds_changed (ARDOUR::Change); - void name_changed (); - - void audition_state_changed (bool); - - void activation (); - - void name_entry_changed (); - void position_clock_changed (); - void end_clock_changed (); - void length_clock_changed (); - void sync_offset_absolute_clock_changed (); - void sync_offset_relative_clock_changed (); - - void audition_button_toggled (); - - gint bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)()); - gint breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)()); - bool spin_arrow_grab; + void region_changed (PBD::PropertyChange const &); + + void gain_changed (); + void gain_adjustment_changed (); + + boost::shared_ptr _audio_region; + + Gtk::Label gain_label; + Gtk::Adjustment gain_adjustment; + Gtk::SpinButton gain_entry; + + Gtk::Label _peak_amplitude_label; + Gtk::Entry _peak_amplitude; + + pthread_t _peak_amplitude_thread_handle; + void peak_amplitude_found (double); + PBD::Signal1 PeakAmplitudeFound; + PBD::ScopedConnection _peak_amplitude_connection; + CrossThreadChannel _peak_channel; }; #endif /* __gtk_ardour_audio_region_edit_h__ */