From 74c4ca3e526c91998a2dd46cb906f3520d3582de Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 19 Oct 2024 01:51:44 +0200 Subject: [PATCH] Reduce reliance on boost - the hard part the rest from `tools/convert_boost.sh`. * replace boost::function, boost::bind with std::function and std::bind. This required some manual fixes, notably std::placeholders, some static_casts<>, and boost::function::clear -> = {}. --- gtk2_ardour/ardour_ui.cc | 76 ++--- gtk2_ardour/ardour_ui2.cc | 4 +- gtk2_ardour/ardour_ui_dependents.cc | 2 +- gtk2_ardour/ardour_ui_dialogs.cc | 30 +- gtk2_ardour/ardour_ui_options.cc | 4 +- gtk2_ardour/ardour_ui_session.cc | 4 +- gtk2_ardour/audio_clip_editor.cc | 2 +- gtk2_ardour/audio_clock.cc | 6 +- gtk2_ardour/audio_region_editor.cc | 4 +- gtk2_ardour/audio_region_properties_box.cc | 2 +- gtk2_ardour/audio_region_view.cc | 6 +- gtk2_ardour/audio_streamview.cc | 4 +- gtk2_ardour/audio_time_axis.cc | 8 +- gtk2_ardour/automation_controller.cc | 4 +- gtk2_ardour/automation_line.cc | 6 +- gtk2_ardour/automation_region_view.cc | 4 +- gtk2_ardour/automation_streamview.cc | 2 +- gtk2_ardour/automation_time_axis.cc | 8 +- gtk2_ardour/beatbox_gui.cc | 8 +- gtk2_ardour/bundle_manager.cc | 2 +- gtk2_ardour/control_slave_ui.cc | 6 +- gtk2_ardour/cue_editor.cc | 2 +- gtk2_ardour/cuebox_ui.cc | 2 +- gtk2_ardour/editing_context.cc | 16 +- gtk2_ardour/editor.cc | 92 +++--- gtk2_ardour/editor_drag.cc | 2 +- gtk2_ardour/editor_markers.cc | 8 +- gtk2_ardour/editor_ops.cc | 20 +- gtk2_ardour/editor_regions.cc | 4 +- gtk2_ardour/editor_route_groups.cc | 8 +- gtk2_ardour/editor_sections.cc | 14 +- gtk2_ardour/editor_sources.cc | 4 +- gtk2_ardour/editor_summary.cc | 14 +- gtk2_ardour/engine_dialog.cc | 10 +- gtk2_ardour/export_dialog.cc | 6 +- gtk2_ardour/export_file_notebook.cc | 2 +- gtk2_ardour/export_format_dialog.cc | 30 +- gtk2_ardour/export_report.cc | 4 +- gtk2_ardour/export_video_dialog.cc | 4 +- gtk2_ardour/foldback_strip.cc | 24 +- gtk2_ardour/gain_meter.cc | 16 +- gtk2_ardour/generic_pluginui.cc | 16 +- gtk2_ardour/group_tabs.cc | 10 +- gtk2_ardour/instrument_selector.cc | 2 +- gtk2_ardour/io_button.cc | 14 +- gtk2_ardour/io_plugin_window.cc | 14 +- gtk2_ardour/io_selector.cc | 2 +- gtk2_ardour/level_meter.cc | 6 +- gtk2_ardour/library_download_dialog.cc | 4 +- gtk2_ardour/location_ui.cc | 20 +- gtk2_ardour/lua_script_manager.cc | 2 +- gtk2_ardour/luainstance.cc | 6 +- gtk2_ardour/luawindow.cc | 4 +- gtk2_ardour/lv2_plugin_ui.cc | 4 +- gtk2_ardour/lxvst_plugin_ui.cc | 2 +- gtk2_ardour/mac_vst_plugin_ui.mm | 2 +- gtk2_ardour/meter_strip.cc | 8 +- gtk2_ardour/meterbridge.cc | 16 +- gtk2_ardour/midi_channel_selector.cc | 8 +- gtk2_ardour/midi_cue_editor.cc | 4 +- gtk2_ardour/midi_list_editor.cc | 4 +- gtk2_ardour/midi_region_properties_box.cc | 2 +- gtk2_ardour/midi_region_view.cc | 4 +- gtk2_ardour/midi_streamview.cc | 2 +- gtk2_ardour/midi_time_axis.cc | 14 +- gtk2_ardour/midi_tracer.cc | 12 +- gtk2_ardour/midi_view.cc | 14 +- gtk2_ardour/mini_timeline.cc | 22 +- gtk2_ardour/mixer_strip.cc | 38 +-- gtk2_ardour/mixer_ui.cc | 58 ++-- gtk2_ardour/monitor_section.cc | 10 +- gtk2_ardour/mono_panner.cc | 8 +- gtk2_ardour/mono_panner_editor.cc | 4 +- gtk2_ardour/option_editor.cc | 2 +- gtk2_ardour/panner2d.cc | 14 +- gtk2_ardour/panner_ui.cc | 2 +- gtk2_ardour/patch_change_dialog.cc | 2 +- gtk2_ardour/patch_change_widget.cc | 20 +- gtk2_ardour/playlist_selector.cc | 8 +- gtk2_ardour/plugin_display.cc | 4 +- gtk2_ardour/plugin_dspload_window.cc | 10 +- gtk2_ardour/plugin_eq_gui.cc | 2 +- gtk2_ardour/plugin_manager_ui.cc | 6 +- gtk2_ardour/plugin_pin_dialog.cc | 24 +- gtk2_ardour/plugin_presets_ui.cc | 8 +- gtk2_ardour/plugin_scan_dialog.cc | 4 +- gtk2_ardour/plugin_selector.cc | 10 +- gtk2_ardour/plugin_ui.cc | 20 +- gtk2_ardour/plugin_window_proxy.cc | 2 +- gtk2_ardour/port_group.cc | 8 +- gtk2_ardour/port_insert_ui.cc | 6 +- gtk2_ardour/port_matrix.cc | 20 +- gtk2_ardour/port_matrix_body.cc | 4 +- gtk2_ardour/prh.cc | 2 +- gtk2_ardour/processor_box.cc | 40 +-- gtk2_ardour/processor_box.h | 5 +- gtk2_ardour/rc_option_editor.cc | 12 +- gtk2_ardour/rec_info_box.cc | 10 +- gtk2_ardour/recorder_ui.cc | 48 +-- gtk2_ardour/region_editor.cc | 6 +- gtk2_ardour/region_fx_line.cc | 2 +- gtk2_ardour/region_layering_order_editor.cc | 2 +- gtk2_ardour/region_list_base.cc | 6 +- gtk2_ardour/region_view.cc | 4 +- gtk2_ardour/return_ui.cc | 2 +- gtk2_ardour/route_group_dialog.cc | 2 +- gtk2_ardour/route_list_base.cc | 34 +-- gtk2_ardour/route_params_ui.cc | 20 +- gtk2_ardour/route_processor_selection.cc | 2 +- gtk2_ardour/route_time_axis.cc | 34 +-- gtk2_ardour/route_ui.cc | 64 ++-- gtk2_ardour/selection.cc | 6 +- gtk2_ardour/selection_properties_box.cc | 2 +- gtk2_ardour/send_ui.cc | 2 +- gtk2_ardour/session_import_dialog.cc | 4 +- gtk2_ardour/sfdb_freesound_mootcher.cc | 4 +- gtk2_ardour/sfdb_ui.cc | 4 +- gtk2_ardour/shuttle_control.cc | 8 +- gtk2_ardour/source_list_base.cc | 2 +- gtk2_ardour/speaker_dialog.cc | 2 +- gtk2_ardour/splash.cc | 2 +- gtk2_ardour/step_editor.cc | 4 +- gtk2_ardour/stereo_panner.cc | 12 +- gtk2_ardour/stereo_panner_editor.cc | 6 +- gtk2_ardour/streamview.cc | 20 +- gtk2_ardour/strip_silence_dialog.cc | 2 +- gtk2_ardour/surround_strip.cc | 6 +- gtk2_ardour/template_dialog.cc | 4 +- gtk2_ardour/tempo_dialog.cc | 6 +- gtk2_ardour/time_axis_view.cc | 2 +- gtk2_ardour/time_axis_view_item.cc | 2 +- gtk2_ardour/time_info_box.cc | 10 +- gtk2_ardour/track_record_axis.cc | 18 +- gtk2_ardour/transcode_ffmpeg.cc | 16 +- gtk2_ardour/transcode_video_dialog.cc | 10 +- gtk2_ardour/transport_control_ui.cc | 12 +- gtk2_ardour/transport_masters_dialog.cc | 18 +- gtk2_ardour/trigger_clip_picker.cc | 12 +- gtk2_ardour/trigger_master.cc | 4 +- gtk2_ardour/trigger_page.cc | 20 +- gtk2_ardour/trigger_strip.cc | 14 +- gtk2_ardour/trigger_ui.cc | 10 +- gtk2_ardour/triggerbox_ui.cc | 6 +- gtk2_ardour/ui_config.cc | 4 +- gtk2_ardour/ui_config.h | 4 +- gtk2_ardour/vca_master_strip.cc | 16 +- gtk2_ardour/vca_time_axis.cc | 14 +- gtk2_ardour/video_monitor.cc | 6 +- gtk2_ardour/video_timeline.cc | 18 +- gtk2_ardour/virtual_keyboard_window.cc | 6 +- gtk2_ardour/visibility_group.cc | 2 +- gtk2_ardour/visibility_group.h | 4 +- gtk2_ardour/vst3_nsview_plugin_ui.mm | 2 +- gtk2_ardour/vst3_plugin_ui.cc | 4 +- gtk2_ardour/window_manager.h | 9 +- gtk2_ardour/windows_vst_plugin_ui.cc | 2 +- headless/load_session.cc | 4 +- libs/ardour/ardour/ardour.h | 2 +- libs/ardour/ardour/async_midi_port.h | 5 +- libs/ardour/ardour/audio_backend.h | 3 +- libs/ardour/ardour/audioengine.h | 2 +- libs/ardour/ardour/audiosource.h | 3 +- libs/ardour/ardour/auv2_scan.h | 2 +- libs/ardour/ardour/control_protocol_manager.h | 2 +- libs/ardour/ardour/io_tasklist.h | 5 +- libs/ardour/ardour/library.h | 5 +- libs/ardour/ardour/lv2_plugin.h | 2 +- libs/ardour/ardour/midi_cursor.h | 2 +- libs/ardour/ardour/midi_patch_manager.h | 2 +- libs/ardour/ardour/midi_port.h | 2 +- libs/ardour/ardour/playlist.h | 4 +- libs/ardour/ardour/proxy_controllable.h | 12 +- libs/ardour/ardour/rc_configuration.h | 2 +- libs/ardour/ardour/region.h | 2 +- libs/ardour/ardour/region_factory.h | 2 +- libs/ardour/ardour/route.h | 2 +- libs/ardour/ardour/rt_task.h | 5 +- libs/ardour/ardour/rt_tasklist.h | 3 +- libs/ardour/ardour/session.h | 14 +- libs/ardour/ardour/session_configuration.h | 2 +- libs/ardour/ardour/session_event.h | 7 +- libs/ardour/ardour/session_playlists.h | 5 +- libs/ardour/ardour/surround_pannable.h | 2 +- libs/ardour/ardour/vst2_scan.h | 2 +- libs/ardour/ardour/vst3_scan.h | 2 +- libs/ardour/async_midi_port.cc | 2 +- libs/ardour/audio_track.cc | 2 +- libs/ardour/audioengine.cc | 6 +- libs/ardour/audioregion.cc | 16 +- libs/ardour/audiosource.cc | 2 +- libs/ardour/auditioner.cc | 2 +- libs/ardour/automatable.cc | 2 +- libs/ardour/automation_control.cc | 2 +- libs/ardour/automation_list.cc | 2 +- libs/ardour/automation_watch.cc | 6 +- libs/ardour/auv2_scan.cc | 2 +- libs/ardour/butler.cc | 4 +- libs/ardour/control_group.cc | 2 +- libs/ardour/control_protocol_manager.cc | 2 +- libs/ardour/convolver.cc | 2 +- libs/ardour/delivery.cc | 6 +- libs/ardour/disk_io.cc | 8 +- libs/ardour/disk_reader.cc | 2 +- libs/ardour/export_channel.cc | 2 +- libs/ardour/export_format_manager.cc | 12 +- libs/ardour/export_formats.cc | 12 +- libs/ardour/export_graph_builder.cc | 8 +- libs/ardour/export_handler.cc | 6 +- libs/ardour/ffmpegfileimportable.cc | 4 +- libs/ardour/globals.cc | 4 +- libs/ardour/graph.cc | 10 +- libs/ardour/instrument_info.cc | 2 +- libs/ardour/internal_send.cc | 12 +- libs/ardour/io.cc | 4 +- libs/ardour/io_plug.cc | 4 +- libs/ardour/io_tasklist.cc | 4 +- libs/ardour/library.cc | 2 +- libs/ardour/ltc_slave.cc | 6 +- libs/ardour/lua_api.cc | 2 +- libs/ardour/lv2_plugin.cc | 2 +- libs/ardour/midi_automation_list_binder.cc | 2 +- libs/ardour/midi_clock_slave.cc | 10 +- libs/ardour/midi_model.cc | 70 ++--- libs/ardour/midi_patch_manager.cc | 4 +- libs/ardour/midi_region.cc | 14 +- libs/ardour/midi_scene_changer.cc | 12 +- libs/ardour/midi_track.cc | 12 +- libs/ardour/mtc_slave.cc | 6 +- libs/ardour/pannable.cc | 20 +- libs/ardour/playlist.cc | 16 +- libs/ardour/plugin.cc | 4 +- libs/ardour/plugin_insert.cc | 16 +- libs/ardour/plugin_manager.cc | 8 +- libs/ardour/port.cc | 8 +- libs/ardour/port_insert.cc | 4 +- libs/ardour/port_manager.cc | 8 +- libs/ardour/rc_configuration.cc | 2 +- libs/ardour/region.cc | 4 +- libs/ardour/region_factory.cc | 4 +- libs/ardour/region_fx_plugin.cc | 10 +- libs/ardour/route.cc | 32 +- libs/ardour/route_group.cc | 8 +- libs/ardour/rt_task.cc | 2 +- libs/ardour/rt_tasklist.cc | 2 +- libs/ardour/send.cc | 6 +- libs/ardour/session.cc | 118 ++++---- libs/ardour/session_configuration.cc | 2 +- libs/ardour/session_events.cc | 6 +- libs/ardour/session_export.cc | 6 +- libs/ardour/session_handle.cc | 8 +- libs/ardour/session_ltc.cc | 4 +- libs/ardour/session_playlists.cc | 8 +- libs/ardour/session_process.cc | 2 +- libs/ardour/session_rtevents.cc | 5 +- libs/ardour/session_state.cc | 84 +++--- libs/ardour/session_transport.cc | 4 +- libs/ardour/slavable.cc | 6 +- libs/ardour/slavable_automation_control.cc | 16 +- libs/ardour/sndfilesource.cc | 2 +- libs/ardour/surround_pannable.cc | 24 +- libs/ardour/surround_send.cc | 6 +- libs/ardour/ticker.cc | 2 +- libs/ardour/track.cc | 16 +- libs/ardour/transport_master.cc | 8 +- libs/ardour/transport_master_manager.cc | 2 +- libs/ardour/triggerbox.cc | 12 +- libs/ardour/vst2_scan.cc | 2 +- libs/ardour/vst3_plugin.cc | 16 +- libs/ardour/vst3_scan.cc | 2 +- libs/ardour/worker.cc | 2 +- .../audiographer/general/cmdpipe_writer.h | 2 +- libs/backends/alsa/alsa_audiobackend.cc | 12 +- libs/backends/alsa/alsa_audiobackend.h | 6 +- libs/backends/coreaudio/coreaudio_backend.cc | 4 +- libs/backends/coreaudio/coreaudio_backend.h | 6 +- libs/backends/dummy/dummy_audiobackend.cc | 4 +- libs/backends/dummy/dummy_audiobackend.h | 6 +- libs/backends/jack/jack_audiobackend.cc | 8 +- libs/backends/jack/jack_audiobackend.h | 6 +- libs/backends/portaudio/portaudio_backend.cc | 4 +- libs/backends/portaudio/portaudio_backend.h | 6 +- .../backends/pulseaudio/pulseaudio_backend.cc | 4 +- libs/backends/pulseaudio/pulseaudio_backend.h | 6 +- libs/canvas/image.cc | 4 +- .../control_protocol/control_protocol.cc | 4 +- .../midi_surface/midi_surface.cc | 34 +-- libs/evoral/Control.cc | 2 +- libs/evoral/ControlList.cc | 4 +- libs/evoral/ControlSet.cc | 4 +- libs/evoral/evoral/ControlList.h | 4 +- libs/gtkmm2ext/gtkmm2ext/gui_thread.h | 3 +- libs/midi++2/channel.cc | 16 +- libs/midi++2/mmc.cc | 8 +- libs/midi++2/parser.cc | 2 +- libs/panners/1in2out/panner_1in2out.cc | 2 +- libs/panners/2in2out/panner_2in2out.cc | 4 +- libs/panners/stereobalance/panner_balance.cc | 2 +- libs/panners/vbap/vbap.cc | 6 +- libs/panners/vbap/vbap_speakers.cc | 2 +- libs/pbd/base_ui.cc | 2 +- libs/pbd/controllable.cc | 4 +- libs/pbd/downloader.cc | 2 +- libs/pbd/glib_event_source.cc | 2 +- libs/pbd/inflater.cc | 2 +- libs/pbd/pbd/abstract_ui.cc | 4 +- libs/pbd/pbd/abstract_ui.h | 2 +- libs/pbd/pbd/configuration.h | 3 +- libs/pbd/pbd/event_loop.h | 6 +- libs/pbd/pbd/glib_event_source.h | 5 +- libs/pbd/pbd/memento_command.h | 6 +- libs/pbd/pbd/pthread_utils.h | 6 +- libs/pbd/pbd/sequence_property.h | 7 +- libs/pbd/pbd/signals.h | 12 +- libs/pbd/pthread_utils.cc | 4 +- libs/pbd/receiver.cc | 2 +- libs/pbd/stateful_diff_command.cc | 4 +- libs/pbd/test/signals_test.cc | 8 +- libs/pbd/undo.cc | 4 +- libs/surfaces/cc121/cc121.cc | 70 ++--- libs/surfaces/cc121/cc121.h | 6 +- libs/surfaces/cc121/gui.cc | 6 +- libs/surfaces/console1/c1_control.h | 68 ++--- libs/surfaces/console1/c1_gui.cc | 6 +- .../surfaces/console1/c1_plugin_operations.cc | 12 +- libs/surfaces/console1/console1.cc | 210 ++++++------- libs/surfaces/console1/console1.h | 4 +- .../contourdesign/contourdesign_gui.cc | 4 +- libs/surfaces/faderport/faderport.cc | 76 ++--- libs/surfaces/faderport/faderport.h | 6 +- libs/surfaces/faderport/gui.cc | 6 +- libs/surfaces/faderport8/actions.cc | 18 +- libs/surfaces/faderport8/callbacks.cc | 22 +- libs/surfaces/faderport8/faderport8.cc | 88 +++--- libs/surfaces/faderport8/faderport8.h | 2 +- libs/surfaces/faderport8/fp8_button.h | 14 +- libs/surfaces/faderport8/fp8_controls.cc | 8 +- libs/surfaces/faderport8/fp8_strip.cc | 26 +- libs/surfaces/faderport8/fp8_strip.h | 4 +- libs/surfaces/faderport8/gui.cc | 6 +- .../generic_midi_control_protocol.cc | 12 +- libs/surfaces/generic_midi/gmcp_gui.cc | 6 +- .../surfaces/generic_midi/midicontrollable.cc | 28 +- libs/surfaces/generic_midi/midiinvokable.cc | 12 +- .../surfaces/launch_control_xl/controllers.cc | 276 +++++++++--------- libs/surfaces/launch_control_xl/gui.cc | 6 +- .../launch_control_xl/launch_control_xl.cc | 60 ++-- .../launch_control_xl/launch_control_xl.h | 58 ++-- libs/surfaces/launchkey_4/gui.cc | 6 +- libs/surfaces/launchkey_4/launchkey_4.cc | 22 +- libs/surfaces/launchpad_pro/gui.cc | 6 +- libs/surfaces/launchpad_pro/lppro.cc | 14 +- libs/surfaces/launchpad_x/gui.cc | 6 +- libs/surfaces/launchpad_x/lpx.cc | 14 +- libs/surfaces/mackie/gui.cc | 8 +- .../mackie/mackie_control_protocol.cc | 26 +- libs/surfaces/mackie/strip.cc | 18 +- libs/surfaces/mackie/subview.cc | 20 +- libs/surfaces/mackie/surface.cc | 18 +- libs/surfaces/maschine2/callbacks.cc | 58 ++-- libs/surfaces/maschine2/canvas.cc | 2 +- libs/surfaces/maschine2/m2_button.h | 4 +- libs/surfaces/maschine2/ui_knob.cc | 4 +- libs/surfaces/maschine2/ui_menu.cc | 2 +- libs/surfaces/osc/osc.cc | 18 +- libs/surfaces/osc/osc_controllable.cc | 2 +- libs/surfaces/osc/osc_cue_observer.cc | 16 +- libs/surfaces/osc/osc_global_observer.cc | 36 +-- libs/surfaces/osc/osc_route_observer.cc | 50 ++-- libs/surfaces/osc/osc_select_observer.cc | 100 +++---- libs/surfaces/push2/cues.cc | 10 +- libs/surfaces/push2/gui.cc | 6 +- libs/surfaces/push2/knob.cc | 2 +- libs/surfaces/push2/level_meter.cc | 6 +- libs/surfaces/push2/mix.cc | 12 +- libs/surfaces/push2/scale.cc | 6 +- libs/surfaces/push2/track_mix.cc | 18 +- libs/surfaces/us2400/gui.cc | 8 +- libs/surfaces/us2400/strip.cc | 20 +- libs/surfaces/us2400/surface.cc | 14 +- .../us2400/us2400_control_protocol.cc | 22 +- libs/surfaces/websockets/feedback.cc | 16 +- libs/surfaces/websockets/mixer.cc | 4 +- libs/surfaces/wiimote/wiimote.cc | 4 +- libs/temporal/temporal/domain_provider.h | 2 +- libs/waveview/wave_view.cc | 4 +- libs/widgets/ardour_button.cc | 2 +- libs/widgets/ardour_ctrl_base.cc | 2 +- libs/widgets/ardour_display.cc | 2 +- libs/widgets/ardour_spinner.cc | 2 +- libs/widgets/binding_proxy.cc | 6 +- luasession/luasession.cc | 4 +- session_utils/common.cc | 2 +- 392 files changed, 2264 insertions(+), 2282 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 07bd90f827..7e0fe35c79 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -339,17 +339,17 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) , plugin_dsp_load_window (X_("plugin-dsp-load"), _("Plugin DSP Load")) , dsp_statistics_window (X_("dsp-statistics"), _("Performance Meters")) , transport_masters_window (X_("transport-masters"), _("Transport Masters")) - , session_option_editor (X_("session-options-editor"), _("Properties"), boost::bind (&ARDOUR_UI::create_session_option_editor, this)) - , add_video_dialog (X_("add-video"), _("Add Video"), boost::bind (&ARDOUR_UI::create_add_video_dialog, this)) - , bundle_manager (X_("bundle-manager"), _("Bundle Manager"), boost::bind (&ARDOUR_UI::create_bundle_manager, this)) - , big_clock_window (X_("big-clock"), _("Big Clock"), boost::bind (&ARDOUR_UI::create_big_clock_window, this)) - , big_transport_window (X_("big-transport"), _("Transport Controls"), boost::bind (&ARDOUR_UI::create_big_transport_window, this)) - , virtual_keyboard_window (X_("virtual-keyboard"), _("Virtual Keyboard"), boost::bind (&ARDOUR_UI::create_virtual_keyboard_window, this)) - , library_download_window (X_("library-downloader"), _("Library Downloader"), boost::bind (&ARDOUR_UI::create_library_download_window, this)) - , audio_port_matrix (X_("audio-connection-manager"), _("Audio Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::AUDIO)) - , midi_port_matrix (X_("midi-connection-manager"), _("MIDI Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::MIDI)) - , key_editor (X_("key-editor"), _("Keyboard Shortcuts"), boost::bind (&ARDOUR_UI::create_key_editor, this)) - , luawindow (X_("luawindow"), S_("Window|Scripting"), boost::bind (&ARDOUR_UI::create_luawindow, this)) + , session_option_editor (X_("session-options-editor"), _("Properties"), std::bind (&ARDOUR_UI::create_session_option_editor, this)) + , add_video_dialog (X_("add-video"), _("Add Video"), std::bind (&ARDOUR_UI::create_add_video_dialog, this)) + , bundle_manager (X_("bundle-manager"), _("Bundle Manager"), std::bind (&ARDOUR_UI::create_bundle_manager, this)) + , big_clock_window (X_("big-clock"), _("Big Clock"), std::bind (&ARDOUR_UI::create_big_clock_window, this)) + , big_transport_window (X_("big-transport"), _("Transport Controls"), std::bind (&ARDOUR_UI::create_big_transport_window, this)) + , virtual_keyboard_window (X_("virtual-keyboard"), _("Virtual Keyboard"), std::bind (&ARDOUR_UI::create_virtual_keyboard_window, this)) + , library_download_window (X_("library-downloader"), _("Library Downloader"), std::bind (&ARDOUR_UI::create_library_download_window, this)) + , audio_port_matrix (X_("audio-connection-manager"), _("Audio Connections"), std::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::AUDIO)) + , midi_port_matrix (X_("midi-connection-manager"), _("MIDI Connections"), std::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::MIDI)) + , key_editor (X_("key-editor"), _("Keyboard Shortcuts"), std::bind (&ARDOUR_UI::create_key_editor, this)) + , luawindow (X_("luawindow"), S_("Window|Scripting"), std::bind (&ARDOUR_UI::create_luawindow, this)) , video_server_process (0) , have_configure_timeout (false) , last_configure_time (0) @@ -373,7 +373,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) record_mode_strings = I18N (_record_mode_strings); - if (ARDOUR::handle_old_configuration_files (boost::bind (ask_about_configuration_copy, _1, _2, _3))) { + if (ARDOUR::handle_old_configuration_files (std::bind (ask_about_configuration_copy, _1, _2, _3))) { { /* "touch" the been-here-before path now that config has been migrated */ @@ -436,57 +436,57 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) install_actions (); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed)); - boost::function pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); + std::function pc (std::bind (&ARDOUR_UI::parameter_changed, this, _1)); UIConfiguration::instance().map_parameters (pc); transport_ctrl.setup (this); - ARDOUR::DiskWriter::Overrun.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::disk_overrun_handler, this), gui_context()); - ARDOUR::DiskReader::Underrun.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::disk_underrun_handler, this), gui_context()); + ARDOUR::DiskWriter::Overrun.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::disk_overrun_handler, this), gui_context()); + ARDOUR::DiskReader::Underrun.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::disk_underrun_handler, this), gui_context()); - ARDOUR::Session::VersionMismatch.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_format_mismatch, this, _1, _2), gui_context()); + ARDOUR::Session::VersionMismatch.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::session_format_mismatch, this, _1, _2), gui_context()); - TriggerBox::CueRecordingChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::cue_rec_state_changed, this), gui_context ()); + TriggerBox::CueRecordingChanged.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::cue_rec_state_changed, this), gui_context ()); cue_rec_state_changed(); /* handle dialog requests */ - ARDOUR::Session::Dialog.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_dialog, this, _1), gui_context()); + ARDOUR::Session::Dialog.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::session_dialog, this, _1), gui_context()); /* handle pending state with a dialog (PROBLEM: needs to return a value and thus cannot be x-thread) */ - ARDOUR::Session::AskAboutPendingState.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::pending_state_dialog, this)); + ARDOUR::Session::AskAboutPendingState.connect_same_thread (forever_connections, std::bind (&ARDOUR_UI::pending_state_dialog, this)); /* handle sr mismatch with a dialog (PROBLEM: needs to return a value and thus cannot be x-thread) */ - ARDOUR::Session::AskAboutSampleRateMismatch.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::sr_mismatch_dialog, this, _1, _2)); + ARDOUR::Session::AskAboutSampleRateMismatch.connect_same_thread (forever_connections, std::bind (&ARDOUR_UI::sr_mismatch_dialog, this, _1, _2)); /* handle sr mismatch with a dialog - cross-thread from engine */ - ARDOUR::Session::NotifyAboutSampleRateMismatch.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::sr_mismatch_message, this, _1, _2), gui_context ()); + ARDOUR::Session::NotifyAboutSampleRateMismatch.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::sr_mismatch_message, this, _1, _2), gui_context ()); /* handle requests to quit (coming from JACK session) */ - ARDOUR::Session::Quit.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::finish, this), gui_context ()); + ARDOUR::Session::Quit.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::finish, this), gui_context ()); /* tell the user about feedback */ - ARDOUR::Session::FeedbackDetected.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::feedback_detected, this), gui_context ()); - ARDOUR::Session::SuccessfulGraphSort.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::successful_graph_sort, this), gui_context ()); + ARDOUR::Session::FeedbackDetected.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::feedback_detected, this), gui_context ()); + ARDOUR::Session::SuccessfulGraphSort.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::successful_graph_sort, this), gui_context ()); /* indicate global latency compensation en/disable */ - ARDOUR::Latent::DisableSwitchChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::latency_switch_changed, this), gui_context ()); + ARDOUR::Latent::DisableSwitchChanged.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::latency_switch_changed, this), gui_context ()); /* handle requests to deal with missing files */ - ARDOUR::Session::MissingFile.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::missing_file, this, _1, _2, _3)); + ARDOUR::Session::MissingFile.connect_same_thread (forever_connections, std::bind (&ARDOUR_UI::missing_file, this, _1, _2, _3)); /* and ambiguous files */ - ARDOUR::FileSource::AmbiguousFileName.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::ambiguous_file, this, _1, _2)); + ARDOUR::FileSource::AmbiguousFileName.connect_same_thread (forever_connections, std::bind (&ARDOUR_UI::ambiguous_file, this, _1, _2)); - ARDOUR::GUIIdle.connect (forever_connections, MISSING_INVALIDATOR, boost::bind(&ARDOUR_UI::gui_idle_handler, this), gui_context()); + ARDOUR::GUIIdle.connect (forever_connections, MISSING_INVALIDATOR, std::bind(&ARDOUR_UI::gui_idle_handler, this), gui_context()); - Config->ParameterChanged.connect ( forever_connections, MISSING_INVALIDATOR, boost::bind(&ARDOUR_UI::set_flat_buttons, this), gui_context() ); + Config->ParameterChanged.connect ( forever_connections, MISSING_INVALIDATOR, std::bind(&ARDOUR_UI::set_flat_buttons, this), gui_context() ); set_flat_buttons(); theme_changed.connect (sigc::mem_fun(*this, &ARDOUR_UI::on_theme_changed)); @@ -596,7 +596,7 @@ ARDOUR_UI::attach_to_engine () if (!first_time) { return; } - AudioEngine::instance()->Running.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_running, this, _1), gui_context()); + AudioEngine::instance()->Running.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::engine_running, this, _1), gui_context()); engine_running (0); first_time = false; } @@ -636,7 +636,7 @@ ARDOUR_UI::engine_halted (const char* reason, bool free_reason) free it later. */ char *copy = strdup (reason); - Gtkmm2ext::UI::instance()->call_slot (MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_halted, this, copy, true)); + Gtkmm2ext::UI::instance()->call_slot (MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::engine_halted, this, copy, true)); return; } @@ -684,11 +684,11 @@ ARDOUR_UI::post_engine () /* connect to important signals */ - AudioEngine::instance()->Stopped.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_stopped, this), gui_context()); - AudioEngine::instance()->SampleRateChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::update_sample_rate, this), gui_context()); - AudioEngine::instance()->BufferSizeChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::update_sample_rate, this), gui_context()); - AudioEngine::instance()->Halted.connect_same_thread (halt_connection, boost::bind (&ARDOUR_UI::engine_halted, this, _1, false)); - AudioEngine::instance()->BecameSilent.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::audioengine_became_silent, this), gui_context()); + AudioEngine::instance()->Stopped.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::engine_stopped, this), gui_context()); + AudioEngine::instance()->SampleRateChanged.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::update_sample_rate, this), gui_context()); + AudioEngine::instance()->BufferSizeChanged.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::update_sample_rate, this), gui_context()); + AudioEngine::instance()->Halted.connect_same_thread (halt_connection, std::bind (&ARDOUR_UI::engine_halted, this, _1, false)); + AudioEngine::instance()->BecameSilent.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::audioengine_became_silent, this), gui_context()); if (setup_windows ()) { throw failed_constructor (); // TODO catch me if you can @@ -854,8 +854,8 @@ ARDOUR_UI::post_engine () { DisplaySuspender ds; - Config->ParameterChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context()); - boost::function pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); + Config->ParameterChanged.connect (forever_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context()); + std::function pc (std::bind (&ARDOUR_UI::parameter_changed, this, _1)); Config->map_parameters (pc); UIConfiguration::instance().map_parameters (pc); diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index de7604a9b9..7509aa2d63 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -779,7 +779,7 @@ ARDOUR_UI::_auditioning_changed (bool onoff) void ARDOUR_UI::auditioning_changed (bool onoff) { - UI::instance()->call_slot (MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::_auditioning_changed, this, onoff)); + UI::instance()->call_slot (MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::_auditioning_changed, this, onoff)); } void @@ -943,7 +943,7 @@ ARDOUR_UI::set_punch_sensitivity () void ARDOUR_UI::editor_realized () { - boost::function pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); + std::function pc (std::bind (&ARDOUR_UI::parameter_changed, this, _1)); Config->map_parameters (pc); UIConfiguration::instance().reset_dpi (); diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index b9f77c3b42..a431d2cb44 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -116,7 +116,7 @@ ARDOUR_UI::we_have_dependents () /* catch up on parameters */ - boost::function pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); + std::function pc (std::bind (&ARDOUR_UI::parameter_changed, this, _1)); Config->map_parameters (pc); UIConfiguration::instance().reset_dpi (); diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index f4e1d1577a..12aeef2364 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -199,24 +199,24 @@ ARDOUR_UI::set_session (Session *s) blink_connection = Timers::blink_connect (sigc::mem_fun(*this, &ARDOUR_UI::blink_handler)); - _session->SaveSessionRequested.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::save_session_at_its_request, this, _1), gui_context()); - _session->StateSaved.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::update_title, this), gui_context()); - _session->StateSaved.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::update_path_label, this), gui_context()); - _session->RecordStateChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::record_state_changed, this), gui_context()); - _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::map_transport_state, this), gui_context()); - _session->DirtyChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_dirty_changed, this), gui_context()); + _session->SaveSessionRequested.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::save_session_at_its_request, this, _1), gui_context()); + _session->StateSaved.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::update_title, this), gui_context()); + _session->StateSaved.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::update_path_label, this), gui_context()); + _session->RecordStateChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::record_state_changed, this), gui_context()); + _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::map_transport_state, this), gui_context()); + _session->DirtyChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::session_dirty_changed, this), gui_context()); - _session->PunchLoopConstraintChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::set_punch_sensitivity, this), gui_context()); - _session->auto_punch_location_changed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::set_punch_sensitivity, this), gui_context ()); + _session->PunchLoopConstraintChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::set_punch_sensitivity, this), gui_context()); + _session->auto_punch_location_changed.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::set_punch_sensitivity, this), gui_context ()); - _session->Xrun.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::xrun_handler, this, _1), gui_context()); - _session->SoloActive.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::soloing_changed, this, _1), gui_context()); - _session->AuditionActive.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::auditioning_changed, this, _1), gui_context()); - _session->locations()->added.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); - _session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); - _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ()); + _session->Xrun.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::xrun_handler, this, _1), gui_context()); + _session->SoloActive.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::soloing_changed, this, _1), gui_context()); + _session->AuditionActive.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::auditioning_changed, this, _1), gui_context()); + _session->locations()->added.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); + _session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); + _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ()); - _session->LatencyUpdated.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_latency_updated, this, _1), gui_context()); + _session->LatencyUpdated.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::session_latency_updated, this, _1), gui_context()); session_latency_updated (true); /* Clocks are on by default after we are connected to a session, so show that here. diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index a3e78f8126..9be798cb88 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -308,8 +308,8 @@ ARDOUR_UI::toggle_latency_switch () void ARDOUR_UI::setup_session_options () { - _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context()); - boost::function pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); + _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context()); + std::function pc (std::bind (&ARDOUR_UI::parameter_changed, this, _1)); _session->config.map_parameters (pc); } diff --git a/gtk2_ardour/ardour_ui_session.cc b/gtk2_ardour/ardour_ui_session.cc index 0b37be1cb9..4a2643f734 100644 --- a/gtk2_ardour/ardour_ui_session.cc +++ b/gtk2_ardour/ardour_ui_session.cc @@ -676,7 +676,7 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name, audio_midi_setup->set_position (WIN_POS_CENTER); audio_midi_setup->set_modal (); audio_midi_setup->present (); - _engine_dialog_connection = audio_midi_setup->signal_response().connect (boost::bind (&ARDOUR_UI::audio_midi_setup_for_new_session_done, this, _1, path, snap_name, session_template, bus_profile, unnamed, domain)); + _engine_dialog_connection = audio_midi_setup->signal_response().connect (std::bind (&ARDOUR_UI::audio_midi_setup_for_new_session_done, this, _1, path, snap_name, session_template, bus_profile, unnamed, domain)); /* not done yet, but we're avoiding modal dialogs */ return 0; @@ -1064,7 +1064,7 @@ If you still wish to proceed, please use the\n\n\ * copied so far, and the total number to copy. */ - sa.Progress.connect_same_thread (c, boost::bind (&ARDOUR_UI::save_as_progress_update, this, _1, _2, _3, label, progress_bar)); + sa.Progress.connect_same_thread (c, std::bind (&ARDOUR_UI::save_as_progress_update, this, _1, _2, _3, label, progress_bar)); progress_dialog.show_all (); progress_dialog.present (); diff --git a/gtk2_ardour/audio_clip_editor.cc b/gtk2_ardour/audio_clip_editor.cc index 6f3304dcb9..3358d82667 100644 --- a/gtk2_ardour/audio_clip_editor.cc +++ b/gtk2_ardour/audio_clip_editor.cc @@ -625,7 +625,7 @@ AudioClipEditorBox::set_region (std::shared_ptr r, TriggerReference tref PBD::PropertyChange interesting_stuff; region_changed (interesting_stuff); - _region->PropertyChanged.connect (state_connection, invalidator (*this), boost::bind (&AudioClipEditorBox::region_changed, this, _1), gui_context ()); + _region->PropertyChanged.connect (state_connection, invalidator (*this), std::bind (&AudioClipEditorBox::region_changed, this, _1), gui_context ()); } void diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 02b3651126..6f3f7021fd 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -130,7 +130,7 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string& UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &AudioClock::set_colors)); UIConfiguration::instance().DPIReset.connect (sigc::mem_fun (*this, &AudioClock::dpi_reset)); - TempoMap::MapChanged.connect (tempo_map_connection, invalidator (*this), boost::bind (&AudioClock::tempo_map_changed, this), gui_context()); + TempoMap::MapChanged.connect (tempo_map_connection, invalidator (*this), std::bind (&AudioClock::tempo_map_changed, this), gui_context()); } AudioClock::~AudioClock () @@ -1369,8 +1369,8 @@ AudioClock::set_session (Session *s) _limit_pos = timepos_t (limit_sec * _session->sample_rate()); } - Config->ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_configuration_changed, this, _1), gui_context()); - _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_configuration_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (_session_connections, invalidator (*this), std::bind (&AudioClock::session_configuration_changed, this, _1), gui_context()); + _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), std::bind (&AudioClock::session_configuration_changed, this, _1), gui_context()); /* try load v6 style settings (session file) */ XMLNode* node = _session->extra_xml (X_("ClockModes")); diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc index d8bb8e8af8..6c11c68984 100644 --- a/gtk2_ardour/audio_region_editor.cc +++ b/gtk2_ardour/audio_region_editor.cc @@ -124,7 +124,7 @@ AudioRegionEditor::AudioRegionEditor (Session* s, AudioRegionView* arv) _peak_amplitude.property_editable() = false; _peak_amplitude.set_text (_("Calculating...")); - PeakAmplitudeFound.connect (_peak_amplitude_connection, invalidator (*this), boost::bind (&AudioRegionEditor::peak_amplitude_found, this, _1), gui_context ()); + PeakAmplitudeFound.connect (_peak_amplitude_connection, invalidator (*this), std::bind (&AudioRegionEditor::peak_amplitude_found, this, _1), gui_context ()); char name[64]; snprintf (name, 64, "peak amplitude-%p", this); @@ -266,7 +266,7 @@ AudioRegionEditor::show_on_touch_changed () _ctrl_touched_connection.disconnect (); return; } - Controllable::ControlTouched.connect (_ctrl_touched_connection, invalidator (*this), boost::bind (&AudioRegionEditor::show_touched_automation, this, _1), gui_context ()); + Controllable::ControlTouched.connect (_ctrl_touched_connection, invalidator (*this), std::bind (&AudioRegionEditor::show_touched_automation, this, _1), gui_context ()); } void diff --git a/gtk2_ardour/audio_region_properties_box.cc b/gtk2_ardour/audio_region_properties_box.cc index 42d4df00cb..377c0e2f56 100644 --- a/gtk2_ardour/audio_region_properties_box.cc +++ b/gtk2_ardour/audio_region_properties_box.cc @@ -128,7 +128,7 @@ RegionPropertiesBox::set_region (std::shared_ptr r) PBD::PropertyChange interesting_stuff; region_changed (interesting_stuff); - _region->PropertyChanged.connect (state_connection, invalidator (*this), boost::bind (&RegionPropertiesBox::region_changed, this, _1), gui_context ()); + _region->PropertyChanged.connect (state_connection, invalidator (*this), std::bind (&RegionPropertiesBox::region_changed, this, _1), gui_context ()); } void diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 5ab54875fd..c43557ed15 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1186,7 +1186,7 @@ AudioRegionView::set_region_fx_line (std::shared_ptr ac, std: _fx_line->set_height ((uint32_t) rint (height() - NAME_HIGHLIGHT_SIZE) - 2); _fx_line->reset (); - rfx->DropReferences.connect (_region_fx_connection, invalidator (*this), boost::bind (&AudioRegionView::set_region_gain_line, this), gui_context ()); + rfx->DropReferences.connect (_region_fx_connection, invalidator (*this), std::bind (&AudioRegionView::set_region_gain_line, this), gui_context ()); bool changed = _rfx_id != rfx->id () || _rdx_param != param_id; _rfx_id = rfx->id (); @@ -1369,7 +1369,7 @@ AudioRegionView::create_waves () // cerr << "\tchannel " << n << endl; if (wait_for_data) { - if (audio_region()->audio_source(n)->peaks_ready (boost::bind (&AudioRegionView::peaks_ready_handler, this, n), &_data_ready_connections[n], gui_context())) { + if (audio_region()->audio_source(n)->peaks_ready (std::bind (&AudioRegionView::peaks_ready_handler, this, n), &_data_ready_connections[n], gui_context())) { // cerr << "\tData is ready for channel " << n << "\n"; create_one_wave (n, true); } else { @@ -1499,7 +1499,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/) void AudioRegionView::peaks_ready_handler (uint32_t which) { - Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&AudioRegionView::create_one_wave, this, which, false)); + Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), std::bind (&AudioRegionView::create_one_wave, this, which, false)); // cerr << "AudioRegionView::peaks_ready_handler() called on " << which << " this: " << this << endl; } diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index c57e7832d1..0e218fde8c 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -156,7 +156,7 @@ AudioStreamView::add_region_view_internal (std::shared_ptr r, bool wait_ /* catch region going away */ - r->DropReferences.connect (*this, invalidator (*this), boost::bind (&AudioStreamView::remove_region_view, this, std::weak_ptr (r)), gui_context()); + r->DropReferences.connect (*this, invalidator (*this), std::bind (&AudioStreamView::remove_region_view, this, std::weak_ptr (r)), gui_context()); RegionViewAdded (region_view); @@ -234,7 +234,7 @@ AudioStreamView::setup_rec_box () sources.push_back (src); src->PeakRangeReady.connect (rec_data_ready_connections, invalidator (*this), - boost::bind (&AudioStreamView::rec_peak_range_ready, this, _1, _2, std::weak_ptr(src)), + std::bind (&AudioStreamView::rec_peak_range_ready, this, _1, _2, std::weak_ptr(src)), gui_context()); } } diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 94bc58e726..3b1511509d 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -120,7 +120,7 @@ AudioTimeAxisView::set_route (std::shared_ptr rt) if (_route->panner_shell()) { _route->panner_shell()->Changed.connect (*this, invalidator (*this), - boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context()); + std::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context()); } /* map current state of the route */ @@ -222,7 +222,7 @@ void AudioTimeAxisView::show_all_automation (bool apply_to_selection) { if (apply_to_selection) { - _editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::show_all_automation, _1, false)); + _editor.get_selection().tracks.foreach_audio_time_axis (std::bind (&AudioTimeAxisView::show_all_automation, _1, false)); } else { no_redraw = true; @@ -238,7 +238,7 @@ void AudioTimeAxisView::show_existing_automation (bool apply_to_selection) { if (apply_to_selection) { - _editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::show_existing_automation, _1, false)); + _editor.get_selection().tracks.foreach_audio_time_axis (std::bind (&AudioTimeAxisView::show_existing_automation, _1, false)); } else { no_redraw = true; @@ -254,7 +254,7 @@ void AudioTimeAxisView::hide_all_automation (bool apply_to_selection) { if (apply_to_selection) { - _editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::hide_all_automation, _1, false)); + _editor.get_selection().tracks.foreach_audio_time_axis (std::bind (&AudioTimeAxisView::hide_all_automation, _1, false)); } else { no_redraw = true; diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index fdaf7e4abd..4d0cf4c455 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -124,11 +124,11 @@ AutomationController::AutomationController(std::shared_ptr ac _adjustment->signal_value_changed().connect( sigc::mem_fun(*this, &AutomationController::value_adjusted)); - ac->Changed.connect (_changed_connections, invalidator (*this), boost::bind (&AutomationController::display_effective_value, this), gui_context()); + ac->Changed.connect (_changed_connections, invalidator (*this), std::bind (&AutomationController::display_effective_value, this), gui_context()); display_effective_value (); if (ac->alist ()) { - ac->alist()->automation_state_changed.connect (_changed_connections, invalidator (*this), boost::bind (&AutomationController::automation_state_changed, this), gui_context()); + ac->alist()->automation_state_changed.connect (_changed_connections, invalidator (*this), std::bind (&AutomationController::automation_state_changed, this), gui_context()); automation_state_changed (); } diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index b87b44af14..24d582c039 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -1008,7 +1008,7 @@ AutomationLine::list_changed () if (!update_pending) { update_pending = true; - Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&AutomationLine::queue_reset, this)); + Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), std::bind (&AutomationLine::queue_reset, this)); } } @@ -1458,10 +1458,10 @@ AutomationLine::connect_to_list () { _list_connections.drop_connections (); - alist->StateChanged.connect (_list_connections, invalidator (*this), boost::bind (&AutomationLine::list_changed, this), gui_context()); + alist->StateChanged.connect (_list_connections, invalidator (*this), std::bind (&AutomationLine::list_changed, this), gui_context()); alist->InterpolationChanged.connect ( - _list_connections, invalidator (*this), boost::bind (&AutomationLine::interpolation_changed, this, _1), gui_context()); + _list_connections, invalidator (*this), std::bind (&AutomationLine::interpolation_changed, this, _1), gui_context()); } MementoCommandBinder* diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index edadbb2fd8..f8101f8538 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -67,7 +67,7 @@ AutomationRegionView::AutomationRegionView (ArdourCanvas::Container* group->raise_to_top(); trackview.editor().MouseModeChanged.connect(_mouse_mode_connection, invalidator (*this), - boost::bind (&AutomationRegionView::mouse_mode_changed, this), + std::bind (&AutomationRegionView::mouse_mode_changed, this), gui_context ()); } @@ -361,5 +361,5 @@ AutomationRegionView::make_merger() { std::shared_ptr c = _region->control(_parameter, true); std::shared_ptr ac = std::dynamic_pointer_cast(c); - return new MergeableLine (_line, ac, boost::bind (&AutomationRegionView::drawn_time_filter, this, _1), nullptr, nullptr); + return new MergeableLine (_line, ac, std::bind (&AutomationRegionView::drawn_time_filter, this, _1), nullptr, nullptr); } diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc index f1e403c4cd..0bde166b98 100644 --- a/gtk2_ardour/automation_streamview.cc +++ b/gtk2_ardour/automation_streamview.cc @@ -125,7 +125,7 @@ AutomationStreamView::add_region_view_internal (std::shared_ptr region, display_region (region_view); /* catch regionview going away */ - region->DropReferences.connect (*this, invalidator (*this), boost::bind (&AutomationStreamView::remove_region_view, this, std::weak_ptr(region)), gui_context()); + region->DropReferences.connect (*this, invalidator (*this), std::bind (&AutomationStreamView::remove_region_view, this, std::weak_ptr(region)), gui_context()); /* setup automation state for this region */ if (_automation_view.parameter().type() != MidiVelocityAutomation) { diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 5f033e1ca4..e2b7342b9c 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -303,7 +303,7 @@ AutomationTimeAxisView::AutomationTimeAxisView ( UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &AutomationTimeAxisView::color_handler)); _stripable->DropReferences.connect ( - _stripable_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::route_going_away, this), gui_context () + _stripable_connections, invalidator (*this), std::bind (&AutomationTimeAxisView::route_going_away, this), gui_context () ); set_velocity_mode (_velocity_mode, true); @@ -944,11 +944,11 @@ AutomationTimeAxisView::add_line (std::shared_ptr line) assert(line->the_list() == _control->list()); _control->alist()->automation_state_changed.connect ( - _list_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::automation_state_changed, this), gui_context() + _list_connections, invalidator (*this), std::bind (&AutomationTimeAxisView::automation_state_changed, this), gui_context() ); _control->alist()->InterpolationChanged.connect ( - _list_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::interpolation_changed, this, _1), gui_context() + _list_connections, invalidator (*this), std::bind (&AutomationTimeAxisView::interpolation_changed, this, _1), gui_context() ); } @@ -1243,6 +1243,6 @@ AutomationTimeAxisView::set_selected_regionviews (RegionSelection& rs) MergeableLine* AutomationTimeAxisView::make_merger () { - return new MergeableLine (_line, _control, nullptr, boost::bind (&AutomationTimeAxisView::set_automation_state, this, _1), boost::bind (RouteTimeAxisView::signal_ctrl_touched, false)); + return new MergeableLine (_line, _control, nullptr, std::bind (&AutomationTimeAxisView::set_automation_state, this, _1), std::bind (RouteTimeAxisView::signal_ctrl_touched, false)); } diff --git a/gtk2_ardour/beatbox_gui.cc b/gtk2_ardour/beatbox_gui.cc index 35d59691c2..aeb15cd74b 100644 --- a/gtk2_ardour/beatbox_gui.cc +++ b/gtk2_ardour/beatbox_gui.cc @@ -87,7 +87,7 @@ BBGUI::BBGUI (std::shared_ptr bb) export_as_region_button.signal_clicked.connect (sigc::mem_fun (*this, &BBGUI::export_as_region)); get_action_area()->pack_end (export_as_region_button); - bbox->sequencer().PropertyChanged.connect (sequencer_connection, invalidator (*this), boost::bind (&BBGUI::sequencer_changed, this, _1), gui_context()); + bbox->sequencer().PropertyChanged.connect (sequencer_connection, invalidator (*this), std::bind (&BBGUI::sequencer_changed, this, _1), gui_context()); { /* trigger initial draw */ @@ -345,7 +345,7 @@ SequencerView::SequencerView (StepSequencer& s, ArdourCanvas::Item *p) velocity_mode_text->set_ignore_events (true); timing_mode_text->set_ignore_events (true); - _sequencer.PropertyChanged.connect (sequencer_connection, invalidator (*this), boost::bind (&SequencerView::sequencer_changed, this, _1), gui_context()); + _sequencer.PropertyChanged.connect (sequencer_connection, invalidator (*this), std::bind (&SequencerView::sequencer_changed, this, _1), gui_context()); { /* trigger initial draw */ @@ -586,7 +586,7 @@ SequencerStepIndicator::SequencerStepIndicator (SequencerView& s, ArdourCanvas:: text->name = string_compose ("SI %1", n); Event.connect (sigc::mem_fun (*this, &SequencerStepIndicator::on_event)); - sv.sequencer().PropertyChanged.connect (sequencer_connection, invalidator (*this), boost::bind (&SequencerStepIndicator::sequencer_changed, this, _1), gui_context()); + sv.sequencer().PropertyChanged.connect (sequencer_connection, invalidator (*this), std::bind (&SequencerStepIndicator::sequencer_changed, this, _1), gui_context()); } void @@ -742,7 +742,7 @@ StepView::StepView (SequenceView& sview, Step& s, ArdourCanvas::Canvas* c) text->name = string_compose ("step %1", _step.index()); Event.connect (sigc::mem_fun (*this, &StepView::on_event)); - _step.PropertyChanged.connect (step_connection, invalidator (*this), boost::bind (&StepView::step_changed, this, _1), gui_context()); + _step.PropertyChanged.connect (step_connection, invalidator (*this), std::bind (&StepView::step_changed, this, _1), gui_context()); } void diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc index 31355609ba..ebafe28785 100644 --- a/gtk2_ardour/bundle_manager.cc +++ b/gtk2_ardour/bundle_manager.cc @@ -385,7 +385,7 @@ BundleManager::add_bundle (std::shared_ptr b) (*i)[_list_model_columns.name] = u->name (); (*i)[_list_model_columns.bundle] = u; - u->Changed.connect (bundle_connections, invalidator (*this), boost::bind (&BundleManager::bundle_changed, this, _1, std::weak_ptr (u)), gui_context()); + u->Changed.connect (bundle_connections, invalidator (*this), std::bind (&BundleManager::bundle_changed, this, _1, std::weak_ptr (u)), gui_context()); } void diff --git a/gtk2_ardour/control_slave_ui.cc b/gtk2_ardour/control_slave_ui.cc index b08c123cd5..b1635ca221 100644 --- a/gtk2_ardour/control_slave_ui.cc +++ b/gtk2_ardour/control_slave_ui.cc @@ -79,10 +79,10 @@ ControlSlaveUI::set_stripable (std::shared_ptr s) ac->MasterStatusChange.connect (connections, invalidator (*this), - boost::bind (&ControlSlaveUI::update_vca_display, this), + std::bind (&ControlSlaveUI::update_vca_display, this), gui_context()); - stripable->DropReferences.connect (connections, invalidator (*this), boost::bind (&ControlSlaveUI::set_stripable, this, std::shared_ptr()), gui_context()); + stripable->DropReferences.connect (connections, invalidator (*this), std::bind (&ControlSlaveUI::set_stripable, this, std::shared_ptr()), gui_context()); } update_vca_display (); @@ -232,7 +232,7 @@ ControlSlaveUI::add_vca_button (std::shared_ptr vca) vca_button->set_text (PBD::to_string (vca->number())); vca_button->set_fixed_colors (vca->presentation_info().color(), vca->presentation_info().color ()); - vca->presentation_info().PropertyChanged.connect (master_connections, invalidator (*this), boost::bind (&ControlSlaveUI::master_property_changed, this, _1), gui_context()); + vca->presentation_info().PropertyChanged.connect (master_connections, invalidator (*this), std::bind (&ControlSlaveUI::master_property_changed, this, _1), gui_context()); pack_start (*vca_button); vca_button->show (); diff --git a/gtk2_ardour/cue_editor.cc b/gtk2_ardour/cue_editor.cc index 218d5e0ffc..3452b3ee88 100644 --- a/gtk2_ardour/cue_editor.cc +++ b/gtk2_ardour/cue_editor.cc @@ -8,7 +8,7 @@ CueEditor::CueEditor (std::string const & name) : EditingContext (name) , HistoryOwner (X_("cue-editor")) { - _history.Changed.connect (history_connection, invalidator (*this), boost::bind (&CueEditor::history_changed, this), gui_context()); + _history.Changed.connect (history_connection, invalidator (*this), std::bind (&CueEditor::history_changed, this), gui_context()); } CueEditor::~CueEditor () diff --git a/gtk2_ardour/cuebox_ui.cc b/gtk2_ardour/cuebox_ui.cc index fd9114bdde..242904a13f 100644 --- a/gtk2_ardour/cuebox_ui.cc +++ b/gtk2_ardour/cuebox_ui.cc @@ -84,7 +84,7 @@ CueEntry::CueEntry (Item* item, uint64_t cue_index) set_tooltip (_("Click to launch all clips in this row\nRight-click to select properties for all clips in this row")); /* watch for cue-recording state */ - TriggerBox::CueRecordingChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&CueEntry::rec_state_changed, this), gui_context ()); + TriggerBox::CueRecordingChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&CueEntry::rec_state_changed, this), gui_context ()); /* watch for change in theme */ UIConfiguration::instance ().ParameterChanged.connect (sigc::mem_fun (*this, &CueEntry::ui_parameter_changed)); diff --git a/gtk2_ardour/editing_context.cc b/gtk2_ardour/editing_context.cc index 2f47657934..8b0846d09e 100644 --- a/gtk2_ardour/editing_context.cc +++ b/gtk2_ardour/editing_context.cc @@ -186,7 +186,7 @@ EditingContext::EditingContext (std::string const & name) /* handle escape */ - ARDOUR_UI::instance()->Escape.connect (escape_connection, MISSING_INVALIDATOR, boost::bind (&EditingContext::escape, this), gui_context()); + ARDOUR_UI::instance()->Escape.connect (escape_connection, MISSING_INVALIDATOR, std::bind (&EditingContext::escape, this), gui_context()); } EditingContext::~EditingContext() @@ -2132,13 +2132,13 @@ EditingContext::register_mouse_mode_actions () Glib::RefPtr mouse_mode_actions = ActionManager::create_action_group (bindings, group_name); RadioAction::Group mouse_mode_group; - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("Grab (Object Tool)"), boost::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseObject)); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), boost::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseRange)); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), boost::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseDraw)); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), boost::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseTimeFX)); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-grid", _("Grid Tool"), boost::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseGrid)); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Internal Edit (Content Tool)"), boost::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseContent)); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-cut", _("Cut Tool"), boost::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseCut)); + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("Grab (Object Tool)"), std::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseObject)); + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), std::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseRange)); + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), std::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseDraw)); + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), std::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseTimeFX)); + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-grid", _("Grid Tool"), std::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseGrid)); + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Internal Edit (Content Tool)"), std::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseContent)); + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-cut", _("Cut Tool"), std::bind (&EditingContext::mouse_mode_toggled, this, Editing::MouseCut)); add_mouse_mode_actions (mouse_mode_actions); } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index fb2fdaa2e3..b6cd29b96f 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -504,7 +504,7 @@ Editor::Editor () _summary = new EditorSummary (this); - TempoMap::MapChanged.connect (tempo_map_connection, invalidator (*this), boost::bind (&Editor::tempo_map_changed, this), gui_context()); + TempoMap::MapChanged.connect (tempo_map_connection, invalidator (*this), std::bind (&Editor::tempo_map_changed, this), gui_context()); selection->TimeChanged.connect (sigc::mem_fun(*this, &Editor::time_selection_changed)); selection->TracksChanged.connect (sigc::mem_fun(*this, &Editor::track_selection_changed)); @@ -583,7 +583,7 @@ Editor::Editor () bottom_hbox.set_border_width (2); bottom_hbox.set_spacing (3); - PresentationInfo::Change.connect (*this, MISSING_INVALIDATOR, boost::bind (&Editor::presentation_info_changed, this, _1), gui_context()); + PresentationInfo::Change.connect (*this, MISSING_INVALIDATOR, std::bind (&Editor::presentation_info_changed, this, _1), gui_context()); _route_groups = new EditorRouteGroups (this); _routes = new EditorRoutes (); @@ -596,9 +596,9 @@ Editor::Editor () /* these are static location signals */ - Location::start_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); - Location::end_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); - Location::changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); + Location::start_changed.connect (*this, invalidator (*this), std::bind (&Editor::location_changed, this, _1), gui_context()); + Location::end_changed.connect (*this, invalidator (*this), std::bind (&Editor::location_changed, this, _1), gui_context()); + Location::changed.connect (*this, invalidator (*this), std::bind (&Editor::location_changed, this, _1), gui_context()); #if SELECTION_PROPERTIES_BOX_TODO add_notebook_page (_("Selection"), *_properties_box); @@ -725,7 +725,7 @@ Editor::Editor () setup_toolbar (); - RegionView::RegionViewGoingAway.connect (*this, invalidator (*this), boost::bind (&Editor::catch_vanishing_regionview, this, _1), gui_context()); + RegionView::RegionViewGoingAway.connect (*this, invalidator (*this), std::bind (&Editor::catch_vanishing_regionview, this, _1), gui_context()); /* nudge stuff */ @@ -741,32 +741,32 @@ Editor::Editor () /* allow external control surfaces/protocols to do various things */ - ControlProtocol::ZoomToSession.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_session, this), gui_context()); - ControlProtocol::ZoomIn.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_step, this, false), gui_context()); - ControlProtocol::ZoomOut.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_step, this, true), gui_context()); - ControlProtocol::Undo.connect (*this, invalidator (*this), boost::bind (&Editor::undo, this, true), gui_context()); - ControlProtocol::Redo.connect (*this, invalidator (*this), boost::bind (&Editor::redo, this, true), gui_context()); - ControlProtocol::ScrollTimeline.connect (*this, invalidator (*this), boost::bind (&Editor::control_scroll, this, _1), gui_context()); - ControlProtocol::StepTracksUp.connect (*this, invalidator (*this), boost::bind (&Editor::control_step_tracks_up, this), gui_context()); - ControlProtocol::StepTracksDown.connect (*this, invalidator (*this), boost::bind (&Editor::control_step_tracks_down, this), gui_context()); - ControlProtocol::GotoView.connect (*this, invalidator (*this), boost::bind (&Editor::control_view, this, _1), gui_context()); + ControlProtocol::ZoomToSession.connect (*this, invalidator (*this), std::bind (&Editor::temporal_zoom_session, this), gui_context()); + ControlProtocol::ZoomIn.connect (*this, invalidator (*this), std::bind (&Editor::temporal_zoom_step, this, false), gui_context()); + ControlProtocol::ZoomOut.connect (*this, invalidator (*this), std::bind (&Editor::temporal_zoom_step, this, true), gui_context()); + ControlProtocol::Undo.connect (*this, invalidator (*this), std::bind (&Editor::undo, this, true), gui_context()); + ControlProtocol::Redo.connect (*this, invalidator (*this), std::bind (&Editor::redo, this, true), gui_context()); + ControlProtocol::ScrollTimeline.connect (*this, invalidator (*this), std::bind (&Editor::control_scroll, this, _1), gui_context()); + ControlProtocol::StepTracksUp.connect (*this, invalidator (*this), std::bind (&Editor::control_step_tracks_up, this), gui_context()); + ControlProtocol::StepTracksDown.connect (*this, invalidator (*this), std::bind (&Editor::control_step_tracks_down, this), gui_context()); + ControlProtocol::GotoView.connect (*this, invalidator (*this), std::bind (&Editor::control_view, this, _1), gui_context()); ControlProtocol::CloseDialog.connect (*this, invalidator (*this), Keyboard::close_current_dialog, gui_context()); - ControlProtocol::VerticalZoomInAll.connect (*this, invalidator (*this), boost::bind (&Editor::control_vertical_zoom_in_all, this), gui_context()); - ControlProtocol::VerticalZoomOutAll.connect (*this, invalidator (*this), boost::bind (&Editor::control_vertical_zoom_out_all, this), gui_context()); - ControlProtocol::VerticalZoomInSelected.connect (*this, invalidator (*this), boost::bind (&Editor::control_vertical_zoom_in_selected, this), gui_context()); - ControlProtocol::VerticalZoomOutSelected.connect (*this, invalidator (*this), boost::bind (&Editor::control_vertical_zoom_out_selected, this), gui_context()); + ControlProtocol::VerticalZoomInAll.connect (*this, invalidator (*this), std::bind (&Editor::control_vertical_zoom_in_all, this), gui_context()); + ControlProtocol::VerticalZoomOutAll.connect (*this, invalidator (*this), std::bind (&Editor::control_vertical_zoom_out_all, this), gui_context()); + ControlProtocol::VerticalZoomInSelected.connect (*this, invalidator (*this), std::bind (&Editor::control_vertical_zoom_in_selected, this), gui_context()); + ControlProtocol::VerticalZoomOutSelected.connect (*this, invalidator (*this), std::bind (&Editor::control_vertical_zoom_out_selected, this), gui_context()); - BasicUI::AccessAction.connect (*this, invalidator (*this), boost::bind (&Editor::access_action, this, _1, _2), gui_context()); + BasicUI::AccessAction.connect (*this, invalidator (*this), std::bind (&Editor::access_action, this, _1, _2), gui_context()); /* problematic: has to return a value and thus cannot be x-thread */ - Session::AskAboutPlaylistDeletion.connect_same_thread (*this, boost::bind (&Editor::playlist_deletion_dialog, this, _1)); - Route::PluginSetup.connect_same_thread (*this, boost::bind (&Editor::plugin_setup, this, _1, _2, _3)); + Session::AskAboutPlaylistDeletion.connect_same_thread (*this, std::bind (&Editor::playlist_deletion_dialog, this, _1)); + Route::PluginSetup.connect_same_thread (*this, std::bind (&Editor::plugin_setup, this, _1, _2, _3)); - Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&Editor::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&Editor::parameter_changed, this, _1), gui_context()); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &Editor::ui_parameter_changed)); - TimeAxisView::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Editor::timeaxisview_deleted, this, _1), gui_context()); + TimeAxisView::CatchDeletion.connect (*this, invalidator (*this), std::bind (&Editor::timeaxisview_deleted, this, _1), gui_context()); _ignore_region_action = false; _last_region_menu_was_main = false; @@ -776,7 +776,7 @@ Editor::Editor () constructed = true; /* grab current parameter state */ - boost::function pc (boost::bind (&Editor::ui_parameter_changed, this, _1)); + std::function pc (std::bind (&Editor::ui_parameter_changed, this, _1)); UIConfiguration::instance().map_parameters (pc); setup_fade_images (); @@ -1299,23 +1299,23 @@ Editor::set_session (Session *t) ("context") where the handler will be asked to run. */ - _session->StepEditStatusChange.connect (_session_connections, invalidator (*this), boost::bind (&Editor::step_edit_status_change, this, _1), gui_context()); - _session->TransportStateChange.connect (_session_connections, invalidator (*this), boost::bind (&Editor::map_transport_state, this), gui_context()); - _session->TransportLooped.connect (_session_connections, invalidator (*this), boost::bind (&Editor::transport_looped, this), gui_context()); - _session->PositionChanged.connect (_session_connections, invalidator (*this), boost::bind (&Editor::map_position_change, this, _1), gui_context()); - _session->vca_manager().VCAAdded.connect (_session_connections, invalidator (*this), boost::bind (&Editor::add_vcas, this, _1), gui_context()); - _session->RouteAdded.connect (_session_connections, invalidator (*this), boost::bind (&Editor::add_routes, this, _1), gui_context()); - _session->DirtyChanged.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_title, this), gui_context()); - _session->Located.connect (_session_connections, invalidator (*this), boost::bind (&Editor::located, this), gui_context()); - _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&Editor::parameter_changed, this, _1), gui_context()); - _session->StateSaved.connect (_session_connections, invalidator (*this), boost::bind (&Editor::session_state_saved, this, _1), gui_context()); - _session->locations()->added.connect (_session_connections, invalidator (*this), boost::bind (&Editor::add_new_location, this, _1), gui_context()); - _session->locations()->removed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::location_gone, this, _1), gui_context()); - _session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::refresh_location_display, this), gui_context()); - _session->auto_loop_location_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::loop_location_changed, this, _1), gui_context ()); - Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_section_rects, this), gui_context ()); + _session->StepEditStatusChange.connect (_session_connections, invalidator (*this), std::bind (&Editor::step_edit_status_change, this, _1), gui_context()); + _session->TransportStateChange.connect (_session_connections, invalidator (*this), std::bind (&Editor::map_transport_state, this), gui_context()); + _session->TransportLooped.connect (_session_connections, invalidator (*this), std::bind (&Editor::transport_looped, this), gui_context()); + _session->PositionChanged.connect (_session_connections, invalidator (*this), std::bind (&Editor::map_position_change, this, _1), gui_context()); + _session->vca_manager().VCAAdded.connect (_session_connections, invalidator (*this), std::bind (&Editor::add_vcas, this, _1), gui_context()); + _session->RouteAdded.connect (_session_connections, invalidator (*this), std::bind (&Editor::add_routes, this, _1), gui_context()); + _session->DirtyChanged.connect (_session_connections, invalidator (*this), std::bind (&Editor::update_title, this), gui_context()); + _session->Located.connect (_session_connections, invalidator (*this), std::bind (&Editor::located, this), gui_context()); + _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), std::bind (&Editor::parameter_changed, this, _1), gui_context()); + _session->StateSaved.connect (_session_connections, invalidator (*this), std::bind (&Editor::session_state_saved, this, _1), gui_context()); + _session->locations()->added.connect (_session_connections, invalidator (*this), std::bind (&Editor::add_new_location, this, _1), gui_context()); + _session->locations()->removed.connect (_session_connections, invalidator (*this), std::bind (&Editor::location_gone, this, _1), gui_context()); + _session->locations()->changed.connect (_session_connections, invalidator (*this), std::bind (&Editor::refresh_location_display, this), gui_context()); + _session->auto_loop_location_changed.connect (_session_connections, invalidator (*this), std::bind (&Editor::loop_location_changed, this, _1), gui_context ()); + Location::flags_changed.connect (_session_connections, invalidator (*this), std::bind (&Editor::update_section_rects, this), gui_context ()); - _session->history().Changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::history_changed, this), gui_context()); + _session->history().Changed.connect (_session_connections, invalidator (*this), std::bind (&Editor::history_changed, this), gui_context()); _playhead_cursor->canvas_item().reparent ((ArdourCanvas::Item*) get_cursor_scroll_group()); _playhead_cursor->show (); @@ -1323,7 +1323,7 @@ Editor::set_session (Session *t) _snapped_cursor->canvas_item().reparent ((ArdourCanvas::Item*) get_cursor_scroll_group()); _snapped_cursor->set_color (UIConfiguration::instance().color ("edit point")); - boost::function pc (boost::bind (&Editor::parameter_changed, this, _1)); + std::function pc (std::bind (&Editor::parameter_changed, this, _1)); Config->map_parameters (pc); _session->config.map_parameters (pc); @@ -1673,7 +1673,7 @@ Editor::loudness_analyze_region_selection () SimpleProgressDialog spd (_("Region Loudness Analysis"), sigc::mem_fun (ag, &AnalysisGraph::cancel)); ScopedConnection c; ag.set_total_samples (total_work); - ag.Progress.connect_same_thread (c, boost::bind (&SimpleProgressDialog::update_progress, &spd, _1, _2)); + ag.Progress.connect_same_thread (c, std::bind (&SimpleProgressDialog::update_progress, &spd, _1, _2)); spd.show(); for (RegionSelection::iterator j = ars.begin (); j != ars.end (); ++j) { @@ -1722,7 +1722,7 @@ Editor::loudness_analyze_range_selection () SimpleProgressDialog spd (_("Range Loudness Analysis"), sigc::mem_fun (ag, &AnalysisGraph::cancel)); ScopedConnection c; ag.set_total_samples (total_work); - ag.Progress.connect_same_thread (c, boost::bind (&SimpleProgressDialog::update_progress, &spd, _1, _2)); + ag.Progress.connect_same_thread (c, std::bind (&SimpleProgressDialog::update_progress, &spd, _1, _2)); spd.show(); for (TrackSelection::iterator i = s.tracks.begin (); i != s.tracks.end (); ++i) { @@ -4792,7 +4792,7 @@ Editor::add_stripables (StripableList& sl) vtv->set_vca (v); track_views.push_back (vtv); - (*s)->gui_changed.connect (*this, invalidator (*this), boost::bind (&Editor::handle_gui_changes, this, _1, _2), gui_context()); + (*s)->gui_changed.connect (*this, invalidator (*this), std::bind (&Editor::handle_gui_changes, this, _1, _2), gui_context()); changed = true; } else if ((r = std::dynamic_pointer_cast (*s)) != 0) { @@ -4821,7 +4821,7 @@ Editor::add_stripables (StripableList& sl) rtv->view()->RegionViewAdded.connect (sigc::mem_fun (*this, &Editor::region_view_added)); rtv->view()->RegionViewRemoved.connect (sigc::mem_fun (*this, &Editor::region_view_removed)); - (*s)->gui_changed.connect (*this, invalidator (*this), boost::bind (&Editor::handle_gui_changes, this, _1, _2), gui_context()); + (*s)->gui_changed.connect (*this, invalidator (*this), std::bind (&Editor::handle_gui_changes, this, _1, _2), gui_context()); changed = true; } } diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index a293e8e556..16129ae2e1 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -682,7 +682,7 @@ RegionDrag::RegionDrag (Editor& e, ArdourCanvas::Item* i, RegionView* p, listget_time_axis_view ())); } - RegionView::RegionViewGoingAway.connect (death_connection, invalidator (*this), boost::bind (&RegionDrag::region_going_away, this, _1), gui_context ()); + RegionView::RegionViewGoingAway.connect (death_connection, invalidator (*this), std::bind (&RegionDrag::region_going_away, this, _1), gui_context ()); } void diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 268e06194c..353d184a25 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -243,10 +243,10 @@ Editor::add_new_location_internal (Location* location) } } - location->NameChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, location), gui_context()); - location->CueChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, location), gui_context()); - location->TimeDomainChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, location), gui_context()); - location->FlagsChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_flags_changed, this, location), gui_context()); + location->NameChanged.connect (*this, invalidator (*this), std::bind (&Editor::location_changed, this, location), gui_context()); + location->CueChanged.connect (*this, invalidator (*this), std::bind (&Editor::location_changed, this, location), gui_context()); + location->TimeDomainChanged.connect (*this, invalidator (*this), std::bind (&Editor::location_changed, this, location), gui_context()); + location->FlagsChanged.connect (*this, invalidator (*this), std::bind (&Editor::location_flags_changed, this, location), gui_context()); pair newpair; diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index ecbd9ccdf4..f96763a6d0 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -9152,7 +9152,7 @@ Editor::unlock () void Editor::bring_in_callback (Gtk::Label* label, uint32_t n, uint32_t total, string name) { - Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&Editor::update_bring_in_message, this, label, n, total, name)); + Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), std::bind (&Editor::update_bring_in_message, this, label, n, total, name)); } void @@ -9184,7 +9184,7 @@ Editor::bring_all_sources_into_session () cerr << " Do it\n"; - _session->bring_all_sources_into_session (boost::bind (&Editor::bring_in_callback, this, &msg, _1, _2, _3)); + _session->bring_all_sources_into_session (std::bind (&Editor::bring_in_callback, this, &msg, _1, _2, _3)); } void @@ -9208,9 +9208,9 @@ Editor::toggle_all_existing_automation () } if (!some_automation_shown) { - tvl.foreach_stripable_time_axis (boost::bind (&StripableTimeAxisView::show_existing_automation, _1, false)); + tvl.foreach_stripable_time_axis (std::bind (&StripableTimeAxisView::show_existing_automation, _1, false)); } else { - tvl.foreach_stripable_time_axis (boost::bind (&StripableTimeAxisView::hide_all_automation, _1, false)); + tvl.foreach_stripable_time_axis (std::bind (&StripableTimeAxisView::hide_all_automation, _1, false)); } } @@ -9237,10 +9237,10 @@ Editor::toggle_layer_display () if (seen_stacked && seen_overlaid) { /* inconsistent current display - go to overlaid */ - tvl.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, Overlaid)); + tvl.foreach_route_time_axis (std::bind (&RouteTimeAxisView::set_layer_display, _1, Overlaid)); } else { - tvl.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::toggle_layer_display, _1)); + tvl.foreach_route_time_axis (std::bind (&RouteTimeAxisView::toggle_layer_display, _1)); } } @@ -9249,14 +9249,14 @@ void Editor::layer_display_overlaid () { TrackViewList & tvl (selection->tracks.empty() ? track_views : selection->tracks); - tvl.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, Overlaid)); + tvl.foreach_route_time_axis (std::bind (&RouteTimeAxisView::set_layer_display, _1, Overlaid)); } void Editor::layer_display_stacked () { TrackViewList & tvl (selection->tracks.empty() ? track_views : selection->tracks); - tvl.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, Stacked)); + tvl.foreach_route_time_axis (std::bind (&RouteTimeAxisView::set_layer_display, _1, Stacked)); } void @@ -9640,10 +9640,10 @@ Editor::remove_gaps (timecnt_t const & gap_threshold, timecnt_t const & leave_ga */ if (markers_too && (*i == first_selected_playlist)) { - boost::function callback (boost::bind (&Editor::remove_gap_marker_callback, this, _1, _2)); + std::function callback (std::bind (&Editor::remove_gap_marker_callback, this, _1, _2)); (*i)->remove_gaps (gap_threshold, leave_gap, callback); } else { - boost::function callback (boost::bind (gap_marker_callback_relax, _1, _2)); + std::function callback (std::bind (gap_marker_callback_relax, _1, _2)); (*i)->remove_gaps (gap_threshold, leave_gap, callback); } diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc index e069daf6af..bb182da51e 100644 --- a/gtk2_ardour/editor_regions.cc +++ b/gtk2_ardour/editor_regions.cc @@ -55,8 +55,8 @@ EditorRegions::EditorRegions (Editor* e) _change_connection = _display.get_selection ()->signal_changed ().connect (sigc::mem_fun (*this, &EditorRegions::selection_changed)); - e->EditorFreeze.connect (_editor_freeze_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::freeze_tree_model, this), gui_context ()); - e->EditorThaw.connect (_editor_thaw_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::thaw_tree_model, this), gui_context ()); + e->EditorFreeze.connect (_editor_freeze_connection, MISSING_INVALIDATOR, std::bind (&EditorRegions::freeze_tree_model, this), gui_context ()); + e->EditorThaw.connect (_editor_thaw_connection, MISSING_INVALIDATOR, std::bind (&EditorRegions::thaw_tree_model, this), gui_context ()); } void diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc index d720ff2634..9a2f442021 100644 --- a/gtk2_ardour/editor_route_groups.cc +++ b/gtk2_ardour/editor_route_groups.cc @@ -430,7 +430,7 @@ EditorRouteGroups::add (RouteGroup* group) focus = true; } - group->PropertyChanged.connect (_property_changed_connections, MISSING_INVALIDATOR, boost::bind (&EditorRouteGroups::property_changed, this, group, _1), gui_context()); + group->PropertyChanged.connect (_property_changed_connections, MISSING_INVALIDATOR, std::bind (&EditorRouteGroups::property_changed, this, group, _1), gui_context()); if (focus) { TreeViewColumn* col = _display.get_column (0); @@ -543,12 +543,12 @@ EditorRouteGroups::set_session (Session* s) if (_session) { - _session->route_group_added.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&EditorRouteGroups::add, this, _1), gui_context()); + _session->route_group_added.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&EditorRouteGroups::add, this, _1), gui_context()); _session->route_group_removed.connect ( - _session_connections, MISSING_INVALIDATOR, boost::bind (&EditorRouteGroups::groups_changed, this), gui_context() + _session_connections, MISSING_INVALIDATOR, std::bind (&EditorRouteGroups::groups_changed, this), gui_context() ); _session->route_groups_reordered.connect ( - _session_connections, MISSING_INVALIDATOR, boost::bind (&EditorRouteGroups::groups_changed, this), gui_context() + _session_connections, MISSING_INVALIDATOR, std::bind (&EditorRouteGroups::groups_changed, this), gui_context() ); } diff --git a/gtk2_ardour/editor_sections.cc b/gtk2_ardour/editor_sections.cc index a12fbcb946..aa986b6308 100644 --- a/gtk2_ardour/editor_sections.cc +++ b/gtk2_ardour/editor_sections.cc @@ -96,14 +96,14 @@ EditorSections::set_session (Session* s) SessionHandlePtr::set_session (s); if (_session) { - _session->locations ()->added.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::location_changed, this, _1), gui_context ()); - _session->locations ()->removed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::location_changed, this, _1), gui_context ()); - _session->locations ()->changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::queue_redisplay, this), gui_context ()); + _session->locations ()->added.connect (_session_connections, invalidator (*this), std::bind (&EditorSections::location_changed, this, _1), gui_context ()); + _session->locations ()->removed.connect (_session_connections, invalidator (*this), std::bind (&EditorSections::location_changed, this, _1), gui_context ()); + _session->locations ()->changed.connect (_session_connections, invalidator (*this), std::bind (&EditorSections::queue_redisplay, this), gui_context ()); - Location::start_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::location_changed, this, _1), gui_context ()); - Location::end_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::location_changed, this, _1), gui_context ()); - Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::queue_redisplay, this), gui_context ()); - Location::name_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::location_changed, this, _1), gui_context ()); + Location::start_changed.connect (_session_connections, invalidator (*this), std::bind (&EditorSections::location_changed, this, _1), gui_context ()); + Location::end_changed.connect (_session_connections, invalidator (*this), std::bind (&EditorSections::location_changed, this, _1), gui_context ()); + Location::flags_changed.connect (_session_connections, invalidator (*this), std::bind (&EditorSections::queue_redisplay, this), gui_context ()); + Location::name_changed.connect (_session_connections, invalidator (*this), std::bind (&EditorSections::location_changed, this, _1), gui_context ()); } redisplay (); diff --git a/gtk2_ardour/editor_sources.cc b/gtk2_ardour/editor_sources.cc index 3d6a38a8bb..11b544d0cd 100644 --- a/gtk2_ardour/editor_sources.cc +++ b/gtk2_ardour/editor_sources.cc @@ -68,8 +68,8 @@ EditorSources::EditorSources (Editor* e) _change_connection = _display.get_selection ()->signal_changed ().connect (sigc::mem_fun (*this, &EditorSources::selection_changed)); - e->EditorFreeze.connect (_editor_freeze_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::freeze_tree_model, this), gui_context ()); - e->EditorThaw.connect (_editor_thaw_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::thaw_tree_model, this), gui_context ()); + e->EditorFreeze.connect (_editor_freeze_connection, MISSING_INVALIDATOR, std::bind (&EditorSources::freeze_tree_model, this), gui_context ()); + e->EditorThaw.connect (_editor_thaw_connection, MISSING_INVALIDATOR, std::bind (&EditorSources::thaw_tree_model, this), gui_context ()); } void diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index 916c992999..3f65bf1f4c 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -114,11 +114,11 @@ EditorSummary::set_session (Session* s) */ if (_session) { - Region::RegionsPropertyChanged.connect (region_property_connection, invalidator (*this), boost::bind (&EditorSummary::set_background_dirty, this), gui_context()); - PresentationInfo::Change.connect (route_ctrl_id_connection, invalidator (*this), boost::bind (&EditorSummary::set_background_dirty, this), gui_context()); - _editor->playhead_cursor()->PositionChanged.connect (position_connection, invalidator (*this), boost::bind (&EditorSummary::playhead_position_changed, this, _1), gui_context()); - _session->StartTimeChanged.connect (_session_connections, invalidator (*this), boost::bind (&EditorSummary::set_background_dirty, this), gui_context()); - _session->EndTimeChanged.connect (_session_connections, invalidator (*this), boost::bind (&EditorSummary::set_background_dirty, this), gui_context()); + Region::RegionsPropertyChanged.connect (region_property_connection, invalidator (*this), std::bind (&EditorSummary::set_background_dirty, this), gui_context()); + PresentationInfo::Change.connect (route_ctrl_id_connection, invalidator (*this), std::bind (&EditorSummary::set_background_dirty, this), gui_context()); + _editor->playhead_cursor()->PositionChanged.connect (position_connection, invalidator (*this), std::bind (&EditorSummary::playhead_position_changed, this, _1), gui_context()); + _session->StartTimeChanged.connect (_session_connections, invalidator (*this), std::bind (&EditorSummary::set_background_dirty, this), gui_context()); + _session->EndTimeChanged.connect (_session_connections, invalidator (*this), std::bind (&EditorSummary::set_background_dirty, this), gui_context()); _editor->selection->RegionsChanged.connect (sigc::mem_fun(*this, &EditorSummary::set_background_dirty)); } @@ -960,10 +960,10 @@ EditorSummary::routes_added (list const & r) { for (list::const_iterator i = r.begin(); i != r.end(); ++i) { /* Connect to the relevant signal for the route so that we know when its colour has changed */ - (*i)->route()->presentation_info().PropertyChanged.connect (*this, invalidator (*this), boost::bind (&EditorSummary::route_gui_changed, this, _1), gui_context ()); + (*i)->route()->presentation_info().PropertyChanged.connect (*this, invalidator (*this), std::bind (&EditorSummary::route_gui_changed, this, _1), gui_context ()); std::shared_ptr tr = std::dynamic_pointer_cast ((*i)->route ()); if (tr) { - tr->PlaylistChanged.connect (*this, invalidator (*this), boost::bind (&EditorSummary::set_background_dirty, this), gui_context ()); + tr->PlaylistChanged.connect (*this, invalidator (*this), std::bind (&EditorSummary::set_background_dirty, this), gui_context ()); } } diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index 38863fe173..34200b53c1 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -319,16 +319,16 @@ EngineControl::EngineControl () set_tooltip (try_autostart_button, string_compose (_("Always try these settings when starting %1, if the same device is available"), PROGRAM_NAME)); - ARDOUR::Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&EngineControl::config_parameter_changed, this, _1), gui_context ()); + ARDOUR::Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&EngineControl::config_parameter_changed, this, _1), gui_context ()); /* Pick up any existing audio setup configuration, if appropriate */ XMLNode* audio_setup = ARDOUR::Config->extra_xml ("AudioMIDISetup"); - ARDOUR::AudioEngine::instance ()->Running.connect (running_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_running, this), gui_context ()); - ARDOUR::AudioEngine::instance ()->Stopped.connect (stopped_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_stopped, this), gui_context ()); - ARDOUR::AudioEngine::instance ()->Halted.connect (stopped_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_stopped, this), gui_context ()); - ARDOUR::AudioEngine::instance ()->DeviceListChanged.connect (devicelist_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::device_list_changed, this), gui_context ()); + ARDOUR::AudioEngine::instance ()->Running.connect (running_connection, MISSING_INVALIDATOR, std::bind (&EngineControl::engine_running, this), gui_context ()); + ARDOUR::AudioEngine::instance ()->Stopped.connect (stopped_connection, MISSING_INVALIDATOR, std::bind (&EngineControl::engine_stopped, this), gui_context ()); + ARDOUR::AudioEngine::instance ()->Halted.connect (stopped_connection, MISSING_INVALIDATOR, std::bind (&EngineControl::engine_stopped, this), gui_context ()); + ARDOUR::AudioEngine::instance ()->DeviceListChanged.connect (devicelist_connection, MISSING_INVALIDATOR, std::bind (&EngineControl::device_list_changed, this), gui_context ()); config_parameter_changed ("try-autostart-engine"); config_parameter_changed ("monitoring-model"); diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 113a295da7..261b6b37cc 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -126,7 +126,7 @@ ExportDialog::set_session (ARDOUR::Session* s) _initialized = true; - _session->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&ExportDialog::parameter_changed, this, _1), gui_context()); + _session->config.ParameterChanged.connect (*this, invalidator (*this), std::bind (&ExportDialog::parameter_changed, this, _1), gui_context()); } void @@ -369,12 +369,12 @@ ExportDialog::do_export (bool analysis_only) handler->SoundcloudProgress.connect_same_thread( *this, - boost::bind(&ExportDialog::soundcloud_upload_progress, this, _1, _2, _3) + std::bind(&ExportDialog::soundcloud_upload_progress, this, _1, _2, _3) ); #if 0 handler->SoundcloudProgress.connect( *this, invalidator (*this), - boost::bind(&ExportDialog::soundcloud_upload_progress, this, _1, _2, _3), + std::bind(&ExportDialog::soundcloud_upload_progress, this, _1, _2, _3), gui_context() ); #endif diff --git a/gtk2_ardour/export_file_notebook.cc b/gtk2_ardour/export_file_notebook.cc index 2d5a0e73d7..a5be2cf95b 100644 --- a/gtk2_ardour/export_file_notebook.cc +++ b/gtk2_ardour/export_file_notebook.cc @@ -266,7 +266,7 @@ ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager, tab_close_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*parent, &ExportFileNotebook::remove_file_page), this)); - profile_manager->FormatListChanged.connect (format_connection, invalidator (*this), boost::bind (&ExportFormatSelector::update_format_list, &format_selector), gui_context()); + profile_manager->FormatListChanged.connect (format_connection, invalidator (*this), std::bind (&ExportFormatSelector::update_format_list, &format_selector), gui_context()); format_selector.FormatEdited.connect (sigc::mem_fun (*this, &ExportFileNotebook::FilePage::save_format_to_manager)); format_selector.FormatRemoved.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::remove_format_profile)); diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc index cb8134f5f0..c62ce32233 100644 --- a/gtk2_ardour/export_format_dialog.cc +++ b/gtk2_ardour/export_format_dialog.cc @@ -111,7 +111,7 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) update_description (); manager.DescriptionChanged.connect ( *this, invalidator (*this), - boost::bind (&ExportFormatDialog::update_description, this), gui_context ()); + std::bind (&ExportFormatDialog::update_description, this), gui_context ()); /* Normalize */ @@ -235,7 +235,7 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) close_button = add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_APPLY); close_button->set_sensitive (false); close_button->signal_clicked ().connect (sigc::mem_fun (*this, &ExportFormatDialog::end_dialog)); - manager.CompleteChanged.connect (*this, invalidator (*this), boost::bind (&Gtk::Button::set_sensitive, close_button, _1), gui_context ()); + manager.CompleteChanged.connect (*this, invalidator (*this), std::bind (&Gtk::Button::set_sensitive, close_button, _1), gui_context ()); with_cue.signal_toggled ().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_with_cue)); with_toc.signal_toggled ().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_with_toc)); @@ -504,7 +504,7 @@ ExportFormatDialog::init_format_table () row[compatibility_cols.label] = (*it)->name (); WeakCompatPtr ptr (*it); - (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_compatibility_selection, this, _1, ptr), gui_context ()); + (*it)->SelectChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_compatibility_selection, this, _1, ptr), gui_context ()); } compatibility_view.append_column_editable ("", compatibility_cols.selected); @@ -532,8 +532,8 @@ ExportFormatDialog::init_format_table () row[quality_cols.label] = (*it)->name (); WeakQualityPtr ptr (*it); - (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_quality_selection, this, _1, ptr), gui_context ()); - (*it)->CompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_quality_compatibility, this, _1, ptr), gui_context ()); + (*it)->SelectChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_quality_selection, this, _1, ptr), gui_context ()); + (*it)->CompatibleChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_quality_compatibility, this, _1, ptr), gui_context ()); } quality_view.append_column ("", quality_cols.label); @@ -554,19 +554,19 @@ ExportFormatDialog::init_format_table () row[format_cols.label] = (*it)->name (); WeakFormatPtr ptr (*it); - (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_format_selection, this, _1, ptr), gui_context ()); - (*it)->CompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_format_compatibility, this, _1, ptr), gui_context ()); + (*it)->SelectChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_format_selection, this, _1, ptr), gui_context ()); + (*it)->CompatibleChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_format_compatibility, this, _1, ptr), gui_context ()); /* Encoding options */ std::shared_ptr hsf; if ((hsf = std::dynamic_pointer_cast (*it))) { - hsf->SampleFormatSelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_format_selection, this, _1, _2), gui_context ()); - hsf->SampleFormatCompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_format_compatibility, this, _1, _2), gui_context ()); + hsf->SampleFormatSelectChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_sample_format_selection, this, _1, _2), gui_context ()); + hsf->SampleFormatCompatibleChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_sample_format_compatibility, this, _1, _2), gui_context ()); - hsf->DitherTypeSelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_dither_type_selection, this, _1, _2), gui_context ()); - hsf->DitherTypeCompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_dither_type_compatibility, this, _1, _2), gui_context ()); + hsf->DitherTypeSelectChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_dither_type_selection, this, _1, _2), gui_context ()); + hsf->DitherTypeCompatibleChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_dither_type_compatibility, this, _1, _2), gui_context ()); } } @@ -588,8 +588,8 @@ ExportFormatDialog::init_format_table () row[sample_rate_cols.label] = (*it)->name (); WeakSampleRatePtr ptr (*it); - (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_rate_selection, this, _1, ptr), gui_context ()); - (*it)->CompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_rate_compatibility, this, _1, ptr), gui_context ()); + (*it)->SelectChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_sample_rate_selection, this, _1, ptr), gui_context ()); + (*it)->CompatibleChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_sample_rate_compatibility, this, _1, ptr), gui_context ()); } sample_rate_view.append_column ("", sample_rate_cols.label); @@ -1262,8 +1262,8 @@ ExportFormatDialog::fill_sample_rate_lists (std::shared_ptrname (); WeakSampleRatePtr ptr (*it); - (*it)->SelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_rate_selection, this, _1, ptr), gui_context ()); - (*it)->CompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_rate_compatibility, this, _1, ptr), gui_context ()); + (*it)->SelectChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_sample_rate_selection, this, _1, ptr), gui_context ()); + (*it)->CompatibleChanged.connect (*this, invalidator (*this), std::bind (&ExportFormatDialog::change_sample_rate_compatibility, this, _1, ptr), gui_context ()); } } diff --git a/gtk2_ardour/export_report.cc b/gtk2_ardour/export_report.cc index 15315765ac..e284011bed 100644 --- a/gtk2_ardour/export_report.cc +++ b/gtk2_ardour/export_report.cc @@ -832,8 +832,8 @@ ExportReport::init (const AnalysisResults & ar, bool with_file) get_vbox ()->pack_start (pages, false, false); if (_session && _session->the_auditioner()) { - _session->AuditionActive.connect(auditioner_connections, invalidator (*this), boost::bind (&ExportReport::audition_active, this, _1), gui_context()); - _session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), boost::bind (&ExportReport::audition_progress, this, _1, _2), gui_context()); + _session->AuditionActive.connect(auditioner_connections, invalidator (*this), std::bind (&ExportReport::audition_active, this, _1), gui_context()); + _session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), std::bind (&ExportReport::audition_progress, this, _1, _2), gui_context()); } if (_session && with_file && _session->the_auditioner()) { diff --git a/gtk2_ardour/export_video_dialog.cc b/gtk2_ardour/export_video_dialog.cc index b1fe8ee215..3caab2af72 100644 --- a/gtk2_ardour/export_video_dialog.cc +++ b/gtk2_ardour/export_video_dialog.cc @@ -770,8 +770,8 @@ ExportVideoDialog::encode_video () ffs["-b:a"] = audio_bitrate_combo.get_active_text (); } - _transcoder->Progress.connect (*this, invalidator (*this), boost::bind (&ExportVideoDialog::update_progress, this, _1, _2), gui_context ()); - _transcoder->Finished.connect (*this, invalidator (*this), boost::bind (&ExportVideoDialog::finished, this, _1), gui_context ()); + _transcoder->Progress.connect (*this, invalidator (*this), std::bind (&ExportVideoDialog::update_progress, this, _1, _2), gui_context ()); + _transcoder->Finished.connect (*this, invalidator (*this), std::bind (&ExportVideoDialog::finished, this, _1), gui_context ()); if (!_transcoder->encode (outfn, _insnd, invid, ffs, meta, map)) { ARDOUR_UI::instance ()->popup_error (_("Transcoding failed.")); diff --git a/gtk2_ardour/foldback_strip.cc b/gtk2_ardour/foldback_strip.cc index c217521aad..f88d670852 100644 --- a/gtk2_ardour/foldback_strip.cc +++ b/gtk2_ardour/foldback_strip.cc @@ -117,13 +117,13 @@ FoldbackSend::FoldbackSend (std::shared_ptr snd, std::shared_ptrChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::level_changed, this), gui_context ()); - _send_proc->ActiveChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::send_state_changed, this), gui_context ()); + lc->Changed.connect (_connections, invalidator (*this), std::bind (&FoldbackSend::level_changed, this), gui_context ()); + _send_proc->ActiveChanged.connect (_connections, invalidator (*this), std::bind (&FoldbackSend::send_state_changed, this), gui_context ()); _button.signal_button_press_event ().connect (sigc::mem_fun (*this, &FoldbackSend::button_press)); _button.signal_button_release_event ().connect (sigc::mem_fun (*this, &FoldbackSend::button_release)); _pan_control.signal_button_press_event().connect (sigc::mem_fun (*this, &FoldbackSend::pan_knob_press)); - _send_route->PropertyChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::route_property_changed, this, _1), gui_context ()); - _send->panner_shell()->PannableChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::send_pan_changed, this), gui_context ()); + _send_route->PropertyChanged.connect (_connections, invalidator (*this), std::bind (&FoldbackSend::route_property_changed, this, _1), gui_context ()); + _send->panner_shell()->PannableChanged.connect (_connections, invalidator (*this), std::bind (&FoldbackSend::send_pan_changed, this), gui_context ()); show (); } @@ -433,7 +433,7 @@ FoldbackStrip::init () _panners.set_width (Wide); - _insert_box = new ProcessorBox (0, boost::bind (&FoldbackStrip::plugin_selector, this), _pr_selection, 0); + _insert_box = new ProcessorBox (0, std::bind (&FoldbackStrip::plugin_selector, this), _pr_selection, 0); _insert_box->set_no_show_all (); _insert_box->show (); _insert_box->set_session (_session); @@ -547,7 +547,7 @@ FoldbackStrip::init () signal_enter_notify_event ().connect (sigc::mem_fun (*this, &FoldbackStrip::fb_strip_enter_event)); Mixer_UI::instance ()->show_spill_change.connect (sigc::mem_fun (*this, &FoldbackStrip::spill_change)); - PresentationInfo::Change.connect (*this, invalidator (*this), boost::bind (&FoldbackStrip::presentation_info_changed, this, _1), gui_context ()); + PresentationInfo::Change.connect (*this, invalidator (*this), std::bind (&FoldbackStrip::presentation_info_changed, this, _1), gui_context ()); } FoldbackStrip::~FoldbackStrip () @@ -614,18 +614,18 @@ FoldbackStrip::set_route (std::shared_ptr rt) if (_route->panner_shell ()) { update_panner_choices (); - _route->panner_shell ()->Changed.connect (route_connections, invalidator (*this), boost::bind (&FoldbackStrip::connect_to_pan, this), gui_context ()); + _route->panner_shell ()->Changed.connect (route_connections, invalidator (*this), std::bind (&FoldbackStrip::connect_to_pan, this), gui_context ()); } /* set up metering */ _route->set_meter_point (MeterPostFader); _route->set_meter_type (MeterPeak0dB); - _route->output ()->changed.connect (route_connections, invalidator (*this), boost::bind (&FoldbackStrip::update_output_display, this), gui_context ()); - _route->io_changed.connect (route_connections, invalidator (*this), boost::bind (&FoldbackStrip::io_changed_proxy, this), gui_context ()); - _route->comment_changed.connect (route_connections, invalidator (*this), boost::bind (&FoldbackStrip::setup_comment_button, this), gui_context ()); + _route->output ()->changed.connect (route_connections, invalidator (*this), std::bind (&FoldbackStrip::update_output_display, this), gui_context ()); + _route->io_changed.connect (route_connections, invalidator (*this), std::bind (&FoldbackStrip::io_changed_proxy, this), gui_context ()); + _route->comment_changed.connect (route_connections, invalidator (*this), std::bind (&FoldbackStrip::setup_comment_button, this), gui_context ()); - _session->FBSendsChanged.connect (route_connections, invalidator (*this), boost::bind (&FoldbackStrip::update_send_box, this), gui_context ()); + _session->FBSendsChanged.connect (route_connections, invalidator (*this), std::bind (&FoldbackStrip::update_send_box, this), gui_context ()); /* now force an update of all the various elements */ name_changed (); @@ -688,7 +688,7 @@ FoldbackStrip::update_send_box () FoldbackSend* fb_s = new FoldbackSend (snd, s_rt, _route, _width); _send_display.pack_start (*fb_s, Gtk::PACK_SHRINK); fb_s->show (); - s_rt->processors_changed.connect (_send_connections, invalidator (*this), boost::bind (&FoldbackStrip::update_send_box, this), gui_context ()); + s_rt->processors_changed.connect (_send_connections, invalidator (*this), std::bind (&FoldbackStrip::update_send_box, this), gui_context ()); } } update_sensitivity (); diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 52be42a871..4818c7e41e 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -134,7 +134,7 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int level_meter = new LevelMeterHBox(_session); - level_meter->ButtonPress.connect_same_thread (_level_meter_connection, boost::bind (&GainMeterBase::level_meter_button_press, this, _1)); + level_meter->ButtonPress.connect_same_thread (_level_meter_connection, std::bind (&GainMeterBase::level_meter_button_press, this, _1)); meter_metric_area.signal_button_press_event().connect (sigc::mem_fun (*this, &GainMeterBase::level_meter_button_press)); meter_metric_area.add_events (Gdk::BUTTON_PRESS_MASK); @@ -258,7 +258,7 @@ GainMeterBase::set_controls (std::shared_ptr s, if (amp) { amp->ConfigurationChanged.connect ( - model_connections, invalidator (*this), boost::bind (&GainMeterBase::setup_gain_adjustment, this), gui_context () + model_connections, invalidator (*this), std::bind (&GainMeterBase::setup_gain_adjustment, this), gui_context () ); } @@ -284,12 +284,12 @@ GainMeterBase::set_controls (std::shared_ptr s, connections.push_back (gain_automation_state_button.signal_button_press_event().connect (sigc::mem_fun(*this, &GainMeterBase::gain_automation_state_button_event), false)); connections.push_back (ChangeGainAutomationState.connect (sigc::mem_fun(*this, &GainMeterBase::set_gain_astate))); - _control->alist()->automation_state_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::gain_automation_state_changed, this), gui_context()); + _control->alist()->automation_state_changed.connect (model_connections, invalidator (*this), std::bind (&GainMeter::gain_automation_state_changed, this), gui_context()); gain_automation_state_changed (); } - _control->Changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeterBase::gain_changed, this), gui_context()); + _control->Changed.connect (model_connections, invalidator (*this), std::bind (&GainMeterBase::gain_changed, this), gui_context()); gain_changed (); show_gain (); @@ -743,7 +743,7 @@ GainMeterBase::set_route_group_meter_point (Route& route, MeterPoint mp) RouteGroup* route_group; if ((route_group = route.route_group ()) != 0) { - route_group->foreach_route (boost::bind (&Route::set_meter_point, _1, mp)); + route_group->foreach_route (std::bind (&Route::set_meter_point, _1, mp)); } else { route.set_meter_point (mp); } @@ -1045,10 +1045,10 @@ GainMeter::set_controls (std::shared_ptr s, if (_meter) { _meter->ConfigurationChanged.connect ( - model_connections, invalidator (*this), boost::bind (&GainMeter::meter_configuration_changed, this, _1), gui_context() + model_connections, invalidator (*this), std::bind (&GainMeter::meter_configuration_changed, this, _1), gui_context() ); _meter->MeterTypeChanged.connect ( - model_connections, invalidator (*this), boost::bind (&GainMeter::redraw_metrics, this), gui_context() + model_connections, invalidator (*this), std::bind (&GainMeter::redraw_metrics, this), gui_context() ); meter_configuration_changed (_meter->input_streams ()); @@ -1056,7 +1056,7 @@ GainMeter::set_controls (std::shared_ptr s, if (route()) { - route()->active_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::route_active_changed, this), gui_context ()); + route()->active_changed.connect (model_connections, invalidator (*this), std::bind (&GainMeter::route_active_changed, this), gui_context ()); } hbox.pack_start (meter_hbox, true, true); diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index 2c8d153299..e90d3b2502 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -178,7 +178,7 @@ GenericPluginUI::GenericPluginUI (std::shared_ptr pib, bool scro main_contents.pack_start (settings_box, false, false); if (_pi) { - _pi->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&GenericPluginUI::processor_active_changed, this, std::weak_ptr(_pi)), gui_context()); + _pi->ActiveChanged.connect (active_connection, invalidator (*this), std::bind (&GenericPluginUI::processor_active_changed, this, std::weak_ptr(_pi)), gui_context()); _bypass_button.set_active (!_pi->enabled()); } else { _bypass_button.set_sensitive (false); @@ -385,7 +385,7 @@ GenericPluginUI::build () * AutomationControl has only support for numeric values currently. * The only case is Variant::PATH for now */ plugin->PropertyChanged.connect(*this, invalidator(*this), - boost::bind(&GenericPluginUI::path_property_changed, this, _1, _2), + std::bind(&GenericPluginUI::path_property_changed, this, _1, _2), gui_context()); /* and query current property value */ @@ -410,7 +410,7 @@ GenericPluginUI::build () automation_latch_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Latch)); /* XXX This is a workaround for AutomationControl not knowing about preset loads */ - plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&GenericPluginUI::update_input_displays, this), gui_context ()); + plugin->PresetLoaded.connect (*this, invalidator (*this), std::bind (&GenericPluginUI::update_input_displays, this), gui_context ()); } @@ -666,12 +666,12 @@ GenericPluginUI::build_midi_table () _pib->plugin()->BankPatchChange.connect ( midi_connections, invalidator (*this), - boost::bind (&GenericPluginUI::midi_bank_patch_change, this, _1), + std::bind (&GenericPluginUI::midi_bank_patch_change, this, _1), gui_context()); _pib->plugin()->UpdatedMidnam.connect ( midi_connections, invalidator (*this), - boost::bind (&GenericPluginUI::midi_refill_patches, this), + std::bind (&GenericPluginUI::midi_refill_patches, this), gui_context()); } @@ -1029,7 +1029,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param, mcontrol->alist()->automation_state_changed.connect ( control_connections, invalidator (*this), - boost::bind (&GenericPluginUI::automation_state_changed, this, control_ui), + std::bind (&GenericPluginUI::automation_state_changed, this, control_ui), gui_context()); input_controls_with_automation.push_back (control_ui); } @@ -1114,7 +1114,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param, if (mcontrol) { mcontrol->Changed.connect(control_connections, invalidator(*this), - boost::bind(&GenericPluginUI::ui_parameter_changed, + std::bind(&GenericPluginUI::ui_parameter_changed, this, control_ui), gui_context()); } @@ -1189,7 +1189,7 @@ GenericPluginUI::ui_parameter_changed (ControlUI* cui) { if (!cui->update_pending) { cui->update_pending = true; - Gtkmm2ext::UI::instance()->call_slot (MISSING_INVALIDATOR, boost::bind (&GenericPluginUI::update_control_display, this, cui)); + Gtkmm2ext::UI::instance()->call_slot (MISSING_INVALIDATOR, std::bind (&GenericPluginUI::update_control_display, this, cui)); } } diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index 585ff16c15..950c8cfade 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -72,16 +72,16 @@ GroupTabs::set_session (Session* s) if (_session) { _session->RouteGroupPropertyChanged.connect ( - _session_connections, invalidator (*this), boost::bind (&GroupTabs::route_group_property_changed, this, _1), gui_context() + _session_connections, invalidator (*this), std::bind (&GroupTabs::route_group_property_changed, this, _1), gui_context() ); _session->RouteAddedToRouteGroup.connect ( - _session_connections, invalidator (*this), boost::bind (&GroupTabs::route_added_to_route_group, this, _1, _2), gui_context() + _session_connections, invalidator (*this), std::bind (&GroupTabs::route_added_to_route_group, this, _1, _2), gui_context() ); _session->RouteRemovedFromRouteGroup.connect ( - _session_connections, invalidator (*this), boost::bind (&GroupTabs::route_removed_from_route_group, this, _1, _2), gui_context() + _session_connections, invalidator (*this), std::bind (&GroupTabs::route_removed_from_route_group, this, _1, _2), gui_context() ); - _session->route_group_removed.connect (_session_connections, invalidator (*this), boost::bind (&GroupTabs::set_dirty, this, (cairo_rectangle_t*)0), gui_context()); + _session->route_group_removed.connect (_session_connections, invalidator (*this), std::bind (&GroupTabs::set_dirty, this, (cairo_rectangle_t*)0), gui_context()); } } @@ -702,7 +702,7 @@ GroupTabs::run_new_group_dialog (RouteList const * rl, bool with_master) if (rl) { for (auto const& r : *rl) { - r->DropReferences.connect (_new_route_group_connection, invalidator (*d), boost::bind (&Dialog::response, d, RESPONSE_CANCEL), gui_context()); + r->DropReferences.connect (_new_route_group_connection, invalidator (*d), std::bind (&Dialog::response, d, RESPONSE_CANCEL), gui_context()); } } diff --git a/gtk2_ardour/instrument_selector.cc b/gtk2_ardour/instrument_selector.cc index 35bd1635bb..61d5f1543c 100644 --- a/gtk2_ardour/instrument_selector.cc +++ b/gtk2_ardour/instrument_selector.cc @@ -40,7 +40,7 @@ InstrumentSelector::InstrumentSelector (InstrumentListDisposition disp) { refill (); - PluginManager::instance ().PluginListChanged.connect (_update_connection, invalidator (*this), boost::bind (&InstrumentSelector::refill, this), gui_context()); + PluginManager::instance ().PluginListChanged.connect (_update_connection, invalidator (*this), std::bind (&InstrumentSelector::refill, this), gui_context()); DropPluginInfoPtr.connect (sigc::mem_fun (*this, &InstrumentSelector::drop_plugin_ptr)); } diff --git a/gtk2_ardour/io_button.cc b/gtk2_ardour/io_button.cc index 54b96f6823..a673abb3fc 100644 --- a/gtk2_ardour/io_button.cc +++ b/gtk2_ardour/io_button.cc @@ -259,7 +259,7 @@ IOButtonBase::set_label (IOButtonBase& self, ARDOUR::Session& session, std::shar if (io->bundle ()->connected_to (dest_io->bundle (), session.engine (), dt, true)) { label << Gtkmm2ext::markup_escape_text (route->name ()); have_label = true; - route->PropertyChanged.connect (self._bundle_connections, invalidator (self), boost::bind (&IOButtonBase::maybe_update, &self, _1), gui_context ()); + route->PropertyChanged.connect (self._bundle_connections, invalidator (self), std::bind (&IOButtonBase::maybe_update, &self, _1), gui_context ()); break; } @@ -269,7 +269,7 @@ IOButtonBase::set_label (IOButtonBase& self, ARDOUR::Session& session, std::shar if (exclusively_connected (dest_io, io, dt, typed_connection_count, route->name (), label)) { have_label = true; - route->PropertyChanged.connect (self._bundle_connections, invalidator (self), boost::bind (&IOButtonBase::maybe_update, &self, _1), gui_context ()); + route->PropertyChanged.connect (self._bundle_connections, invalidator (self), std::bind (&IOButtonBase::maybe_update, &self, _1), gui_context ()); } break; } @@ -449,12 +449,12 @@ IOButton::set_route (std::shared_ptr rt, RouteUI* routeui) return; } - AudioEngine::instance ()->PortConnectedOrDisconnected.connect (_connections, invalidator (*this), boost::bind (&IOButton::port_connected_or_disconnected, this, _1, _3), gui_context ()); - AudioEngine::instance ()->PortPrettyNameChanged.connect (_connections, invalidator (*this), boost::bind (&IOButton::port_pretty_name_changed, this, _1), gui_context ()); + AudioEngine::instance ()->PortConnectedOrDisconnected.connect (_connections, invalidator (*this), std::bind (&IOButton::port_connected_or_disconnected, this, _1, _3), gui_context ()); + AudioEngine::instance ()->PortPrettyNameChanged.connect (_connections, invalidator (*this), std::bind (&IOButton::port_pretty_name_changed, this, _1), gui_context ()); - io ()->changed.connect (_connections, invalidator (*this), boost::bind (&IOButton::update, this), gui_context ()); + io ()->changed.connect (_connections, invalidator (*this), std::bind (&IOButton::update, this), gui_context ()); /* We're really only interested in BundleRemoved when connected to that bundle */ - _route->session ().BundleAddedOrRemoved.connect (_connections, invalidator (*this), boost::bind (&IOButton::update, this), gui_context ()); + _route->session ().BundleAddedOrRemoved.connect (_connections, invalidator (*this), std::bind (&IOButton::update, this), gui_context ()); update (); } @@ -719,7 +719,7 @@ IOButton::update () set_label (*this, _route->session (), bundle, _input ? _route->input () : _route->output ()); if (bundle) { - bundle->Changed.connect (_bundle_connections, invalidator (*this), boost::bind (&IOButton::update, this), gui_context ()); + bundle->Changed.connect (_bundle_connections, invalidator (*this), std::bind (&IOButton::update, this), gui_context ()); } } diff --git a/gtk2_ardour/io_plugin_window.cc b/gtk2_ardour/io_plugin_window.cc index 0a1abc445b..4f4fd53ec4 100644 --- a/gtk2_ardour/io_plugin_window.cc +++ b/gtk2_ardour/io_plugin_window.cc @@ -100,7 +100,7 @@ IOPluginWindow::set_session (Session* s) return; } refill (); - _session->IOPluginsChanged.connect (_session_connections, invalidator (*this), boost::bind (&IOPluginWindow::refill, this), gui_context ()); + _session->IOPluginsChanged.connect (_session_connections, invalidator (*this), std::bind (&IOPluginWindow::refill, this), gui_context ()); } void @@ -310,7 +310,7 @@ IOPluginWindow::IOPlugUI::IOPlugUI (std::shared_ptr iop) } _btn_ioplug.signal_button_press_event ().connect (sigc::mem_fun (*this, &IOPluginWindow::IOPlugUI::button_press_event), false); - _iop->DropReferences.connect (_going_away_connection, invalidator (*this), boost::bind (&IOPluginWindow::IOPlugUI::self_delete, this), gui_context ()); + _iop->DropReferences.connect (_going_away_connection, invalidator (*this), std::bind (&IOPluginWindow::IOPlugUI::self_delete, this), gui_context ()); show_all (); } @@ -392,11 +392,11 @@ IOPluginWindow::IOButton::IOButton (std::shared_ptr io, bool pre) signal_button_press_event ().connect (sigc::mem_fun (*this, &IOButton::button_press), false); signal_button_release_event ().connect (sigc::mem_fun (*this, &IOButton::button_release), false); - AudioEngine::instance ()->PortConnectedOrDisconnected.connect (_connections, invalidator (*this), boost::bind (&IOButton::port_connected_or_disconnected, this, _1, _3), gui_context ()); - AudioEngine::instance ()->PortPrettyNameChanged.connect (_connections, invalidator (*this), boost::bind (&IOButton::port_pretty_name_changed, this, _1), gui_context ()); + AudioEngine::instance ()->PortConnectedOrDisconnected.connect (_connections, invalidator (*this), std::bind (&IOButton::port_connected_or_disconnected, this, _1, _3), gui_context ()); + AudioEngine::instance ()->PortPrettyNameChanged.connect (_connections, invalidator (*this), std::bind (&IOButton::port_pretty_name_changed, this, _1), gui_context ()); - _io->changed.connect (_connections, invalidator (*this), boost::bind (&IOButton::update, this), gui_context ()); - _io->session ().BundleAddedOrRemoved.connect (_connections, invalidator (*this), boost::bind (&IOButton::update, this), gui_context ()); + _io->changed.connect (_connections, invalidator (*this), std::bind (&IOButton::update, this), gui_context ()); + _io->session ().BundleAddedOrRemoved.connect (_connections, invalidator (*this), std::bind (&IOButton::update, this), gui_context ()); } IOPluginWindow::IOButton::~IOButton () @@ -444,7 +444,7 @@ IOPluginWindow::IOButton::update () set_label (*this, _io->session (), bundle, _io); if (bundle) { - bundle->Changed.connect (_bundle_connections, invalidator (*this), boost::bind (&IOButton::update, this), gui_context ()); + bundle->Changed.connect (_bundle_connections, invalidator (*this), std::bind (&IOButton::update, this), gui_context ()); } } diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index 5b64ceb5ff..22f964ea54 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -65,7 +65,7 @@ IOSelector::IOSelector (Gtk::Window* p, ARDOUR::Session* session, std::shared_pt _port_group.reset (new PortGroup (io->name())); _ports[_ours].add_group (_port_group); - io->changed.connect (_io_connection, invalidator (*this), boost::bind (&IOSelector::io_changed_proxy, this), gui_context ()); + io->changed.connect (_io_connection, invalidator (*this), std::bind (&IOSelector::io_changed_proxy, this), gui_context ()); setup_all_ports (); init (); diff --git a/gtk2_ardour/level_meter.cc b/gtk2_ardour/level_meter.cc index bb068cf6e1..6eb4657415 100644 --- a/gtk2_ardour/level_meter.cc +++ b/gtk2_ardour/level_meter.cc @@ -61,7 +61,7 @@ LevelMeterBase::LevelMeterBase (Session* s, PBD::EventLoop::InvalidationRecord* { set_session (s); - Config->ParameterChanged.connect (_parameter_connection, parent_invalidator, boost::bind (&LevelMeterBase::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (_parameter_connection, parent_invalidator, std::bind (&LevelMeterBase::parameter_changed, this, _1), gui_context()); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun(*this, &LevelMeterBase::parameter_changed)); UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &LevelMeterBase::color_handler)); } @@ -87,8 +87,8 @@ LevelMeterBase::set_meter (PeakMeter* meter) color_changed = true; // force update if (_meter) { - _meter->ConfigurationChanged.connect (_configuration_connection, parent_invalidator, boost::bind (&LevelMeterBase::configuration_changed, this, _1, _2), gui_context()); - _meter->MeterTypeChanged.connect (_meter_type_connection, parent_invalidator, boost::bind (&LevelMeterBase::meter_type_changed, this, _1), gui_context()); + _meter->ConfigurationChanged.connect (_configuration_connection, parent_invalidator, std::bind (&LevelMeterBase::configuration_changed, this, _1, _2), gui_context()); + _meter->MeterTypeChanged.connect (_meter_type_connection, parent_invalidator, std::bind (&LevelMeterBase::meter_type_changed, this, _1), gui_context()); } } diff --git a/gtk2_ardour/library_download_dialog.cc b/gtk2_ardour/library_download_dialog.cc index 940de8367b..b22f9772da 100644 --- a/gtk2_ardour/library_download_dialog.cc +++ b/gtk2_ardour/library_download_dialog.cc @@ -99,7 +99,7 @@ LibraryDownloadDialog::refill () _model->clear (); } - lf.foreach_description (boost::bind (&LibraryDownloadDialog::add_library, this, _1)); + lf.foreach_description (std::bind (&LibraryDownloadDialog::add_library, this, _1)); } void @@ -174,7 +174,7 @@ LibraryDownloadDialog::install (std::string const & path, Gtk::TreePath const & std::string destdir = Glib::path_get_dirname (path); inflater = new Inflater (path, destdir); - inflater->Progress.connect (install_connection, invalidator(*this), boost::bind (&LibraryDownloadDialog::install_progress, this, _1, path, treepath), gui_context()); + inflater->Progress.connect (install_connection, invalidator(*this), std::bind (&LibraryDownloadDialog::install_progress, this, _1, path, treepath), gui_context()); inflater->start (); /* starts unpacking in a thread */ } diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index b206b436eb..e940754a97 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -351,12 +351,12 @@ LocationEditRow::set_location (Location *loc) /* connect to per-location signals, since this row only cares about this location */ - location->NameChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::name_changed, this), gui_context()); - location->StartChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::start_changed, this), gui_context()); - location->EndChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::end_changed, this), gui_context()); - location->Changed.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::location_changed, this), gui_context()); - location->FlagsChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::flags_changed, this), gui_context()); - location->LockChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::lock_changed, this), gui_context()); + location->NameChanged.connect (connections, invalidator (*this), std::bind (&LocationEditRow::name_changed, this), gui_context()); + location->StartChanged.connect (connections, invalidator (*this), std::bind (&LocationEditRow::start_changed, this), gui_context()); + location->EndChanged.connect (connections, invalidator (*this), std::bind (&LocationEditRow::end_changed, this), gui_context()); + location->Changed.connect (connections, invalidator (*this), std::bind (&LocationEditRow::location_changed, this), gui_context()); + location->FlagsChanged.connect (connections, invalidator (*this), std::bind (&LocationEditRow::flags_changed, this), gui_context()); + location->LockChanged.connect (connections, invalidator (*this), std::bind (&LocationEditRow::lock_changed, this), gui_context()); } void @@ -1124,10 +1124,10 @@ LocationUI::set_session(ARDOUR::Session* s) SessionHandlePtr::set_session (s); if (_session) { - _session->locations()->added.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::location_added, this, _1), gui_context()); - _session->locations()->removed.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::location_removed, this, _1), gui_context()); - _session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::refresh_location_list, this), gui_context()); - Location::start_changed.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::start_changed, this, _1), gui_context()); + _session->locations()->added.connect (_session_connections, invalidator (*this), std::bind (&LocationUI::location_added, this, _1), gui_context()); + _session->locations()->removed.connect (_session_connections, invalidator (*this), std::bind (&LocationUI::location_removed, this, _1), gui_context()); + _session->locations()->changed.connect (_session_connections, invalidator (*this), std::bind (&LocationUI::refresh_location_list, this), gui_context()); + Location::start_changed.connect (_session_connections, invalidator (*this), std::bind (&LocationUI::start_changed, this, _1), gui_context()); _clock_group->set_clock_mode (clock_mode_from_session_instant_xml ()); } else { diff --git a/gtk2_ardour/lua_script_manager.cc b/gtk2_ardour/lua_script_manager.cc index be64fdb732..2d5408b831 100644 --- a/gtk2_ardour/lua_script_manager.cc +++ b/gtk2_ardour/lua_script_manager.cc @@ -197,7 +197,7 @@ LuaScriptManager::set_session (ARDOUR::Session *s) return; } - _session->LuaScriptsChanged.connect (_session_script_connection, invalidator (*this), boost::bind (&LuaScriptManager::setup_session_scripts, this), gui_context()); + _session->LuaScriptsChanged.connect (_session_script_connection, invalidator (*this), std::bind (&LuaScriptManager::setup_session_scripts, this), gui_context()); setup_session_scripts (); } diff --git a/gtk2_ardour/luainstance.cc b/gtk2_ardour/luainstance.cc index a9a6de43a2..d0993579e9 100644 --- a/gtk2_ardour/luainstance.cc +++ b/gtk2_ardour/luainstance.cc @@ -435,7 +435,7 @@ lua_forkexec (lua_State *L) args[argc] = 0; ARDOUR::SystemExec* x = new ARDOUR::SystemExec (args[0], args, true); - x->Terminated.connect (_luaexecs, MISSING_INVALIDATOR, boost::bind (&reaper, x), gui_context()); + x->Terminated.connect (_luaexecs, MISSING_INVALIDATOR, std::bind (&reaper, x), gui_context()); if (x->start()) { reaper (x); @@ -1563,7 +1563,7 @@ LuaInstance::set_state (const XMLNode& node) try { LuaCallbackPtr p (new LuaCallback (_session, *(*n))); _callbacks.insert (std::make_pair(p->id(), p)); - p->drop_callback.connect (_slotcon, MISSING_INVALIDATOR, boost::bind (&LuaInstance::unregister_lua_slot, this, p->id()), gui_context()); + p->drop_callback.connect (_slotcon, MISSING_INVALIDATOR, std::bind (&LuaInstance::unregister_lua_slot, this, p->id()), gui_context()); SlotChanged (p->id(), p->name(), p->signals()); /* EMIT SIGNAL */ } catch (luabridge::LuaException const& e) { #ifndef NDEBUG @@ -1949,7 +1949,7 @@ LuaInstance::register_lua_slot (const std::string& name, const std::string& scri try { LuaCallbackPtr p (new LuaCallback (_session, name, script, ah, args)); _callbacks.insert (std::make_pair(p->id(), p)); - p->drop_callback.connect (_slotcon, MISSING_INVALIDATOR, boost::bind (&LuaInstance::unregister_lua_slot, this, p->id()), gui_context()); + p->drop_callback.connect (_slotcon, MISSING_INVALIDATOR, std::bind (&LuaInstance::unregister_lua_slot, this, p->id()), gui_context()); SlotChanged (p->id(), p->name(), p->signals()); /* EMIT SIGNAL */ set_dirty (); return true; diff --git a/gtk2_ardour/luawindow.cc b/gtk2_ardour/luawindow.cc index d3253365cc..7450e773ba 100644 --- a/gtk2_ardour/luawindow.cc +++ b/gtk2_ardour/luawindow.cc @@ -167,7 +167,7 @@ LuaWindow::LuaWindow () ArdourWidgets::set_tooltip (script_select, _("Select Editor Buffer")); setup_buffers (); - LuaScripting::instance().scripts_changed.connect (*this, invalidator (*this), boost::bind (&LuaWindow::refresh_scriptlist, this), gui_context()); + LuaScripting::instance().scripts_changed.connect (*this, invalidator (*this), std::bind (&LuaWindow::refresh_scriptlist, this), gui_context()); Glib::RefPtr tb (entry.get_buffer()); _script_changed_connection = tb->signal_changed().connect (sigc::mem_fun(*this, &LuaWindow::script_changed)); @@ -217,7 +217,7 @@ void LuaWindow::set_session (Session* s) ArdourWindow::set_session (s); update_title (); - _session->DirtyChanged.connect (_session_connections, invalidator (*this), boost::bind (&LuaWindow::update_title, this), gui_context()); + _session->DirtyChanged.connect (_session_connections, invalidator (*this), std::bind (&LuaWindow::update_title, this), gui_context()); lua_State* L = lua->getState(); LuaBindings::set_session (L, _session); diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index afe9382440..37dab787e8 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -311,7 +311,7 @@ LV2PluginUI::LV2PluginUI(std::shared_ptr pib, add_common_widgets (&_ardour_buttons_box); - plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&LV2PluginUI::queue_port_update, this), gui_context ()); + plugin->PresetLoaded.connect (*this, invalidator (*this), std::bind (&LV2PluginUI::queue_port_update, this), gui_context ()); } void @@ -468,7 +468,7 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title) if (_lv2->parameter_is_input(i)) { assert (_controllables[i]); - _controllables[i]->Changed.connect (control_connections, invalidator (*this), boost::bind (&LV2PluginUI::control_changed, this, i), gui_context()); + _controllables[i]->Changed.connect (control_connections, invalidator (*this), std::bind (&LV2PluginUI::control_changed, this, i), gui_context()); /* queue for first update ("push") to GUI */ _updates.insert (i); } diff --git a/gtk2_ardour/lxvst_plugin_ui.cc b/gtk2_ardour/lxvst_plugin_ui.cc index 7f8236609b..d2a0e394d4 100644 --- a/gtk2_ardour/lxvst_plugin_ui.cc +++ b/gtk2_ardour/lxvst_plugin_ui.cc @@ -92,7 +92,7 @@ LXVSTPluginUI::package (Gtk::Window& win) /* Map the UI start and stop updating events to 'Map' events on the Window */ - _vst->VSTSizeWindow.connect (_resize_connection, invalidator (*this), boost::bind (&LXVSTPluginUI::resize_callback, this), gui_context()); + _vst->VSTSizeWindow.connect (_resize_connection, invalidator (*this), std::bind (&LXVSTPluginUI::resize_callback, this), gui_context()); return 0; } diff --git a/gtk2_ardour/mac_vst_plugin_ui.mm b/gtk2_ardour/mac_vst_plugin_ui.mm index 3637a81aa5..336353d3af 100644 --- a/gtk2_ardour/mac_vst_plugin_ui.mm +++ b/gtk2_ardour/mac_vst_plugin_ui.mm @@ -81,7 +81,7 @@ MacVSTPluginUI::MacVSTPluginUI (std::shared_ptr pib, std::shared pack_start (low_box, true, true); low_box.show (); - vst->LoadPresetProgram.connect (_program_connection, invalidator (*this), boost::bind (&MacVSTPluginUI::set_program, this), gui_context()); + vst->LoadPresetProgram.connect (_program_connection, invalidator (*this), std::bind (&MacVSTPluginUI::set_program, this), gui_context()); _ns_view = [[NSView new] retain]; diff --git a/gtk2_ardour/meter_strip.cc b/gtk2_ardour/meter_strip.cc index c1ca7d1f06..8430d0594d 100644 --- a/gtk2_ardour/meter_strip.cc +++ b/gtk2_ardour/meter_strip.cc @@ -155,8 +155,8 @@ MeterStrip::MeterStrip (Session* sess, std::shared_ptr rt) level_meter->set_meter (_route->shared_peak_meter().get()); level_meter->clear_meters(); level_meter->setup_meters (220, meter_width, 6); - level_meter->ButtonPress.connect_same_thread (level_meter_connection, boost::bind (&MeterStrip::level_meter_button_press, this, _1)); - _route->shared_peak_meter()->MeterTypeChanged.connect (meter_route_connections, invalidator (*this), boost::bind (&MeterStrip::meter_type_changed, this, _1), gui_context()); + level_meter->ButtonPress.connect_same_thread (level_meter_connection, std::bind (&MeterStrip::level_meter_button_press, this, _1)); + _route->shared_peak_meter()->MeterTypeChanged.connect (meter_route_connections, invalidator (*this), std::bind (&MeterStrip::meter_type_changed, this, _1), gui_context()); meter_align.set(0.5, 0.5, 0.0, 1.0); meter_align.add(*level_meter); @@ -299,7 +299,7 @@ MeterStrip::MeterStrip (Session* sess, std::shared_ptr rt) } _route->shared_peak_meter()->ConfigurationChanged.connect ( - meter_route_connections, invalidator (*this), boost::bind (&MeterStrip::meter_configuration_changed, this, _1), gui_context() + meter_route_connections, invalidator (*this), std::bind (&MeterStrip::meter_configuration_changed, this, _1), gui_context() ); ResetAllPeakDisplays.connect (sigc::mem_fun(*this, &MeterStrip::reset_peak_display)); @@ -315,7 +315,7 @@ MeterStrip::MeterStrip (Session* sess, std::shared_ptr rt) meter_ticks1_area.signal_expose_event().connect (sigc::mem_fun(*this, &MeterStrip::meter_ticks1_expose)); meter_ticks2_area.signal_expose_event().connect (sigc::mem_fun(*this, &MeterStrip::meter_ticks2_expose)); - _route->DropReferences.connect (meter_route_connections, invalidator (*this), boost::bind (&MeterStrip::self_delete, this), gui_context()); + _route->DropReferences.connect (meter_route_connections, invalidator (*this), std::bind (&MeterStrip::self_delete, this), gui_context()); peak_display.signal_button_release_event().connect (sigc::mem_fun(*this, &MeterStrip::peak_button_release), false); name_label.signal_button_release_event().connect (sigc::mem_fun(*this, &MeterStrip::name_label_button_release), false); diff --git a/gtk2_ardour/meterbridge.cc b/gtk2_ardour/meterbridge.cc index 9245fd1e3b..e3c286709c 100644 --- a/gtk2_ardour/meterbridge.cc +++ b/gtk2_ardour/meterbridge.cc @@ -134,10 +134,10 @@ Meterbridge::Meterbridge () signal_delete_event().connect (sigc::mem_fun (*this, &Meterbridge::hide_window)); signal_configure_event().connect (sigc::mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler)); - MeterStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Meterbridge::remove_strip, this, _1), gui_context()); - MeterStrip::MetricChanged.connect (*this, invalidator (*this), boost::bind(&Meterbridge::sync_order_keys, this), gui_context()); - MeterStrip::ConfigurationChanged.connect (*this, invalidator (*this), boost::bind(&Meterbridge::queue_resize, this), gui_context()); - PresentationInfo::Change.connect (*this, invalidator (*this), boost::bind (&Meterbridge::resync_order, this, _1), gui_context()); + MeterStrip::CatchDeletion.connect (*this, invalidator (*this), std::bind (&Meterbridge::remove_strip, this, _1), gui_context()); + MeterStrip::MetricChanged.connect (*this, invalidator (*this), std::bind(&Meterbridge::sync_order_keys, this), gui_context()); + MeterStrip::ConfigurationChanged.connect (*this, invalidator (*this), std::bind(&Meterbridge::queue_resize, this), gui_context()); + PresentationInfo::Change.connect (*this, invalidator (*this), std::bind (&Meterbridge::resync_order, this, _1), gui_context()); /* work around ScrolledWindowViewport alignment mess Part one */ Gtk::HBox * yspc = manage (new Gtk::HBox()); @@ -427,9 +427,9 @@ Meterbridge::set_session (Session* s) copy.sort (Stripable::Sorter (true)); add_strips (copy); - _session->RouteAdded.connect (_session_connections, invalidator (*this), boost::bind (&Meterbridge::add_strips, this, _1), gui_context()); - _session->DirtyChanged.connect (_session_connections, invalidator (*this), boost::bind (&Meterbridge::update_title, this), gui_context()); - _session->StateSaved.connect (_session_connections, invalidator (*this), boost::bind (&Meterbridge::update_title, this), gui_context()); + _session->RouteAdded.connect (_session_connections, invalidator (*this), std::bind (&Meterbridge::add_strips, this, _1), gui_context()); + _session->DirtyChanged.connect (_session_connections, invalidator (*this), std::bind (&Meterbridge::update_title, this), gui_context()); + _session->StateSaved.connect (_session_connections, invalidator (*this), std::bind (&Meterbridge::update_title, this), gui_context()); _session->config.ParameterChanged.connect (*this, invalidator (*this), ui_bind (&Meterbridge::parameter_changed, this, _1), gui_context()); Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&Meterbridge::parameter_changed, this, _1), gui_context()); @@ -542,7 +542,7 @@ Meterbridge::add_strips (RouteList& routes) strip = new MeterStrip (_session, route); strips.push_back (MeterBridgeStrip(strip)); - route->active_changed.connect (*this, invalidator (*this), boost::bind (&Meterbridge::sync_order_keys, this), gui_context ()); + route->active_changed.connect (*this, invalidator (*this), std::bind (&Meterbridge::sync_order_keys, this), gui_context ()); meterarea.pack_start (*strip, false, false); strip->show(); diff --git a/gtk2_ardour/midi_channel_selector.cc b/gtk2_ardour/midi_channel_selector.cc index 99279ab3de..b8b3663740 100644 --- a/gtk2_ardour/midi_channel_selector.cc +++ b/gtk2_ardour/midi_channel_selector.cc @@ -347,10 +347,10 @@ MidiChannelSelectorWindow::MidiChannelSelectorWindow (std::shared_ptr playback_mask_changed (); capture_mask_changed (); - track->playback_filter().ChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mask_changed, this), gui_context()); - track->playback_filter().ChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mode_changed, this), gui_context()); - track->capture_filter().ChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mask_changed, this), gui_context()); - track->capture_filter().ChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mode_changed, this), gui_context()); + track->playback_filter().ChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, std::bind (&MidiChannelSelectorWindow::playback_mask_changed, this), gui_context()); + track->playback_filter().ChannelModeChanged.connect (*this, MISSING_INVALIDATOR, std::bind (&MidiChannelSelectorWindow::playback_mode_changed, this), gui_context()); + track->capture_filter().ChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, std::bind (&MidiChannelSelectorWindow::capture_mask_changed, this), gui_context()); + track->capture_filter().ChannelModeChanged.connect (*this, MISSING_INVALIDATOR, std::bind (&MidiChannelSelectorWindow::capture_mode_changed, this), gui_context()); } MidiChannelSelectorWindow::~MidiChannelSelectorWindow() diff --git a/gtk2_ardour/midi_cue_editor.cc b/gtk2_ardour/midi_cue_editor.cc index b04b8bda81..a4f9054607 100644 --- a/gtk2_ardour/midi_cue_editor.cc +++ b/gtk2_ardour/midi_cue_editor.cc @@ -501,7 +501,7 @@ MidiCueEditor::set_box (std::shared_ptr b) idle_update_queued.store (0); if (b) { - b->Captured.connect (capture_connections, invalidator (*this), boost::bind (&MidiCueEditor::data_captured, this, _1), gui_context()); + b->Captured.connect (capture_connections, invalidator (*this), std::bind (&MidiCueEditor::data_captured, this, _1), gui_context()); /* Don't bind a shared_ptr within the lambda */ TriggerBox* tb (b.get()); b->RecEnableChanged.connect (capture_connections, invalidator (*this), [&, tb]() { box_rec_enable_change (*tb); }, gui_context()); @@ -541,7 +541,7 @@ MidiCueEditor::set_track (std::shared_ptr t) if (t) { set_box (t->triggerbox()); _update_connection = Timers::rapid_connect (sigc::mem_fun (*this, &MidiCueEditor::maybe_update)); - _track->DropReferences.connect (track_connection, invalidator (*this), boost::bind (&MidiCueEditor::set_track, this, nullptr), gui_context()); + _track->DropReferences.connect (track_connection, invalidator (*this), std::bind (&MidiCueEditor::set_track, this, nullptr), gui_context()); } else { set_box (nullptr); } diff --git a/gtk2_ardour/midi_list_editor.cc b/gtk2_ardour/midi_list_editor.cc index acf6d30351..25d7743541 100644 --- a/gtk2_ardour/midi_list_editor.cc +++ b/gtk2_ardour/midi_list_editor.cc @@ -150,9 +150,9 @@ MidiListEditor::MidiListEditor (Session* s, std::shared_ptr r, std:: redisplay_model (); region->midi_source (0)->model ()->ContentsChanged.connect (content_connections, invalidator (*this), - boost::bind (&MidiListEditor::redisplay_model, this), gui_context ()); + std::bind (&MidiListEditor::redisplay_model, this), gui_context ()); region->PropertyChanged.connect (content_connections, invalidator (*this), - boost::bind (&MidiListEditor::redisplay_model, this), gui_context ()); + std::bind (&MidiListEditor::redisplay_model, this), gui_context ()); buttons.attach (sound_notes_button, 0, 1, 0, 1); Glib::RefPtr act = ActionManager::get_action ("Editor", "sound-midi-notes"); diff --git a/gtk2_ardour/midi_region_properties_box.cc b/gtk2_ardour/midi_region_properties_box.cc index 5cfec3451b..89557086d8 100644 --- a/gtk2_ardour/midi_region_properties_box.cc +++ b/gtk2_ardour/midi_region_properties_box.cc @@ -80,7 +80,7 @@ MidiRegionPropertiesBox::set_region (std::shared_ptr r) { RegionPropertiesBox::set_region (r); - _region->PropertyChanged.connect (midi_state_connection, invalidator (*this), boost::bind (&MidiRegionPropertiesBox::region_changed, this, _1), gui_context ()); + _region->PropertyChanged.connect (midi_state_connection, invalidator (*this), std::bind (&MidiRegionPropertiesBox::region_changed, this, _1), gui_context ()); } void diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 52f6d4b4b0..95474201b6 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -166,7 +166,7 @@ MidiRegionView::init (bool /*wfd*/) _note_group->parent()->raise_to_top(); - Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&MidiRegionView::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&MidiRegionView::parameter_changed, this, _1), gui_context()); connect_to_diskstream (); } @@ -224,7 +224,7 @@ MidiRegionView::connect_to_diskstream () { midi_view()->midi_track()->DataRecorded.connect( *this, invalidator(*this), - boost::bind (&MidiRegionView::data_recorded, this, _1), + std::bind (&MidiRegionView::data_recorded, this, _1), gui_context()); } diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 9e122d98b5..16dd1f9d5f 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -166,7 +166,7 @@ MidiStreamView::add_region_view_internal (std::shared_ptr r, bool wait_f /* catch regionview going away */ std::weak_ptr wr (region); // make this explicit - region->DropReferences.connect (*this, invalidator (*this), boost::bind (&MidiStreamView::remove_region_view, this, wr), gui_context()); + region->DropReferences.connect (*this, invalidator (*this), std::bind (&MidiStreamView::remove_region_view, this, wr), gui_context()); RegionViewAdded (region_view); diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 642ca8c914..bf5462d8bf 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -215,7 +215,7 @@ MidiTimeAxisView::set_route (std::shared_ptr rt) } if (_route->panner_shell()) { - _route->panner_shell()->Changed.connect (*this, invalidator (*this), boost::bind (&MidiTimeAxisView::ensure_pan_views, this, false), gui_context()); + _route->panner_shell()->Changed.connect (*this, invalidator (*this), std::bind (&MidiTimeAxisView::ensure_pan_views, this, false), gui_context()); } /* map current state of the route */ @@ -285,7 +285,7 @@ MidiTimeAxisView::set_route (std::shared_ptr rt) _midi_controls_box.set_border_width (2); /* this directly calls use_midnam_info() if there are midnam's already */ - MIDI::Name::MidiPatchManager::instance().maybe_use (*this, invalidator (*this), boost::bind (&MidiTimeAxisView::use_midnam_info, this), gui_context()); + MIDI::Name::MidiPatchManager::instance().maybe_use (*this, invalidator (*this), std::bind (&MidiTimeAxisView::use_midnam_info, this), gui_context()); controls_vbox.pack_start(_midi_controls_box, false, false); @@ -1287,7 +1287,7 @@ MidiTimeAxisView::set_note_mode(NoteMode mode, bool apply_to_selection) { if (apply_to_selection) { _editor.get_selection().tracks.foreach_midi_time_axis ( - boost::bind (&MidiTimeAxisView::set_note_mode, _1, mode, false)); + std::bind (&MidiTimeAxisView::set_note_mode, _1, mode, false)); } else { if (_note_mode != mode || midi_track()->note_mode() != mode) { _note_mode = mode; @@ -1303,7 +1303,7 @@ MidiTimeAxisView::set_color_mode (ColorMode mode, bool force, bool redisplay, bo { if (apply_to_selection) { _editor.get_selection().tracks.foreach_midi_time_axis ( - boost::bind (&MidiTimeAxisView::set_color_mode, _1, mode, force, redisplay, false)); + std::bind (&MidiTimeAxisView::set_color_mode, _1, mode, force, redisplay, false)); } else { if (_color_mode == mode && !force) { return; @@ -1330,7 +1330,7 @@ MidiTimeAxisView::set_visibility_note_range (MidiStreamView::VisibleNoteRange ra { if (apply_to_selection) { _editor.get_selection().tracks.foreach_midi_time_axis ( - boost::bind (&MidiTimeAxisView::set_visibility_note_range, _1, range, false)); + std::bind (&MidiTimeAxisView::set_visibility_note_range, _1, range, false)); } else { if (!_ignore_signals) { midi_view()->set_note_visibility_range_style (range); @@ -1358,7 +1358,7 @@ MidiTimeAxisView::show_all_automation (bool apply_to_selection) if (apply_to_selection) { _editor.get_selection().tracks.foreach_midi_time_axis ( - boost::bind (&MidiTimeAxisView::show_all_automation, _1, false)); + std::bind (&MidiTimeAxisView::show_all_automation, _1, false)); } else { no_redraw = true; // unset in RouteTimeAxisView::show_all_automation if (midi_track()) { @@ -1407,7 +1407,7 @@ MidiTimeAxisView::show_existing_automation (bool apply_to_selection) { if (apply_to_selection) { _editor.get_selection().tracks.foreach_midi_time_axis ( - boost::bind (&MidiTimeAxisView::show_existing_automation, _1, false)); + std::bind (&MidiTimeAxisView::show_existing_automation, _1, false)); } else { if (midi_track()) { const set params = midi_track()->midi_playlist()->contained_automation(); diff --git a/gtk2_ardour/midi_tracer.cc b/gtk2_ardour/midi_tracer.cc index 1b31b0a783..926e6da269 100644 --- a/gtk2_ardour/midi_tracer.cc +++ b/gtk2_ardour/midi_tracer.cc @@ -75,7 +75,7 @@ MidiTracer::MidiTracer () _midi_port_combo.pack_start (_midi_port_cols.pretty_name); AudioEngine::instance()->PortRegisteredOrUnregistered.connect - (_manager_connection, invalidator (*this), boost::bind (&MidiTracer::ports_changed, this), gui_context()); + (_manager_connection, invalidator (*this), std::bind (&MidiTracer::ports_changed, this), gui_context()); VBox* vbox = manage (new VBox); vbox->set_spacing (4); @@ -243,7 +243,7 @@ MidiTracer::port_changed () /* connect to external port */ if (0 == tracer_port->connect (pn)) { _midi_parser = std::shared_ptr (new MIDI::Parser); - _midi_parser->any.connect_same_thread (_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); + _midi_parser->any.connect_same_thread (_parser_connection, std::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); tracer_port->set_trace (_midi_parser); } else { std::cerr << "CANNOT TRACE PORT " << pn << "\n"; @@ -272,18 +272,18 @@ MidiTracer::port_changed () std::shared_ptr tm = TransportMasterManager::instance().master_by_port(std::dynamic_pointer_cast (p)); std::shared_ptr tm_midi = std::dynamic_pointer_cast (tm); if (tm_midi) { - tm_midi->transport_parser().any.connect_same_thread(_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); + tm_midi->transport_parser().any.connect_same_thread(_parser_connection, std::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); } } else { _midi_parser = std::shared_ptr (new MIDI::Parser); - _midi_parser->any.connect_same_thread (_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); + _midi_parser->any.connect_same_thread (_parser_connection, std::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); mp->set_trace (_midi_parser); traced_port = mp; } } } else { - async->parser()->any.connect_same_thread (_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); + async->parser()->any.connect_same_thread (_parser_connection, std::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); } } @@ -560,7 +560,7 @@ MidiTracer::tracer (Parser&, MIDI::byte* msg, size_t len, samplecnt_t now) int canderef (0); if (_update_queued.compare_exchange_strong (canderef, 1)) { - gui_context()->call_slot (invalidator (*this), boost::bind (&MidiTracer::update, this)); + gui_context()->call_slot (invalidator (*this), std::bind (&MidiTracer::update, this)); } } diff --git a/gtk2_ardour/midi_view.cc b/gtk2_ardour/midi_view.cc index 5dc128f3a9..deb9aa159d 100644 --- a/gtk2_ardour/midi_view.cc +++ b/gtk2_ardour/midi_view.cc @@ -191,7 +191,7 @@ MidiView::set_track (std::shared_ptr mt) _midi_track = mt; if (_midi_track) { - _midi_track->DropReferences.connect (track_going_away_connection, invalidator (*this), boost::bind (&MidiView::track_going_away, this), gui_context()); + _midi_track->DropReferences.connect (track_going_away_connection, invalidator (*this), std::bind (&MidiView::track_going_away, this), gui_context()); if (_midi_track->triggerbox()->record_enabled()) { begin_write (); @@ -225,7 +225,7 @@ MidiView::set_region (std::shared_ptr mr) return; } - _midi_region->DropReferences.connect (region_going_away_connection, invalidator (*this), boost::bind (&MidiView::region_going_away, this), gui_context()); + _midi_region->DropReferences.connect (region_going_away_connection, invalidator (*this), std::bind (&MidiView::region_going_away, this), gui_context()); set_model (_midi_region->midi_source (0)->model()); } @@ -253,21 +253,21 @@ MidiView::set_model (std::shared_ptr m) connections_requiring_model.drop_connections (); - _model->ContentsChanged.connect (connections_requiring_model, invalidator (*this), boost::bind (&MidiView::model_changed, this), gui_context()); + _model->ContentsChanged.connect (connections_requiring_model, invalidator (*this), std::bind (&MidiView::model_changed, this), gui_context()); _midi_track->playback_filter().ChannelModeChanged.connect (connections_requiring_model, invalidator (*this), - boost::bind (&MidiView::midi_channel_mode_changed, this), + std::bind (&MidiView::midi_channel_mode_changed, this), gui_context ()); _midi_track->instrument_info().Changed.connect (connections_requiring_model, invalidator (*this), - boost::bind (&MidiView::instrument_settings_changed, this), gui_context()); + std::bind (&MidiView::instrument_settings_changed, this), gui_context()); _editing_context.SnapChanged.connect (connections_requiring_model, invalidator(*this), - boost::bind (&MidiView::snap_changed, this), + std::bind (&MidiView::snap_changed, this), gui_context()); _editing_context.MouseModeChanged.connect (connections_requiring_model, invalidator (*this), - boost::bind (&MidiView::mouse_mode_changed, this), + std::bind (&MidiView::mouse_mode_changed, this), gui_context ()); model_changed (); diff --git a/gtk2_ardour/mini_timeline.cc b/gtk2_ardour/mini_timeline.cc index 33972aff2b..73e958eec2 100644 --- a/gtk2_ardour/mini_timeline.cc +++ b/gtk2_ardour/mini_timeline.cc @@ -67,14 +67,14 @@ MiniTimeline::MiniTimeline () set_name ("minitimeline"); - Location::cue_change.connect (marker_connection, invalidator (*this), boost::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); - Location::name_changed.connect (marker_connection, invalidator (*this), boost::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); - Location::end_changed.connect (marker_connection, invalidator (*this), boost::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); - Location::start_changed.connect (marker_connection, invalidator (*this), boost::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); - Location::changed.connect (marker_connection, invalidator (*this), boost::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); - Location::flags_changed.connect (marker_connection, invalidator (*this), boost::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); + Location::cue_change.connect (marker_connection, invalidator (*this), std::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); + Location::name_changed.connect (marker_connection, invalidator (*this), std::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); + Location::end_changed.connect (marker_connection, invalidator (*this), std::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); + Location::start_changed.connect (marker_connection, invalidator (*this), std::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); + Location::changed.connect (marker_connection, invalidator (*this), std::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); + Location::flags_changed.connect (marker_connection, invalidator (*this), std::bind (&MiniTimeline::update_minitimeline, this), gui_context ()); - Temporal::TempoMap::MapChanged.connect (tempo_map_connection, invalidator (*this), boost::bind (&MiniTimeline::update_minitimeline, this), gui_context()); + Temporal::TempoMap::MapChanged.connect (tempo_map_connection, invalidator (*this), std::bind (&MiniTimeline::update_minitimeline, this), gui_context()); ArdourWidgets::set_tooltip (*this, string_compose (_("Navigation Timeline. Use left-click to locate to time position or marker; scroll-wheel to jump, hold %1 for fine grained and %2 + %3 for extra-fine grained control. Right-click to set display range. The display unit is defined by the primary clock."), @@ -115,19 +115,19 @@ MiniTimeline::set_session (Session* s) _session->config.ParameterChanged.connect (session_connection, invalidator (*this), - boost::bind (&MiniTimeline::parameter_changed, this, _1), gui_context() + std::bind (&MiniTimeline::parameter_changed, this, _1), gui_context() ); _session->locations()->added.connect (session_connection, invalidator (*this), - boost::bind (&MiniTimeline::update_minitimeline, this), gui_context() + std::bind (&MiniTimeline::update_minitimeline, this), gui_context() ); _session->locations()->removed.connect (session_connection, invalidator (*this), - boost::bind (&MiniTimeline::update_minitimeline, this), gui_context() + std::bind (&MiniTimeline::update_minitimeline, this), gui_context() ); _session->locations()->changed.connect (session_connection, invalidator (*this), - boost::bind (&MiniTimeline::update_minitimeline, this), gui_context() + std::bind (&MiniTimeline::update_minitimeline, this), gui_context() ); _jumplist.clear (); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 4251857e86..db5f1e5d11 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -112,7 +112,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, bool in_mixer) , RouteUI (sess) , _mixer(mx) , _mixer_owned (in_mixer) - , processor_box (sess, boost::bind (&MixerStrip::plugin_selector, this), mx.selection(), this, in_mixer) + , processor_box (sess, std::bind (&MixerStrip::plugin_selector, this), mx.selection(), this, in_mixer) , gpm (sess, 250) , panners (sess) , button_size_group (Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL)) @@ -149,7 +149,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, std::shared_ptr rt, , RouteUI (sess) , _mixer(mx) , _mixer_owned (in_mixer) - , processor_box (sess, boost::bind (&MixerStrip::plugin_selector, this), mx.selection(), this, in_mixer) + , processor_box (sess, std::bind (&MixerStrip::plugin_selector, this), mx.selection(), this, in_mixer) , gpm (sess, 250) , panners (sess) , button_size_group (Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL)) @@ -417,7 +417,7 @@ MixerStrip::init () */ _visibility.add (&input_button_box, X_("Input"), _("Input"), false); _visibility.add (&invert_button_box, X_("PhaseInvert"), _("Phase Invert"), false); - _visibility.add (&rec_mon_table, X_("RecMon"), _("Record & Monitor"), false, boost::bind (&MixerStrip::override_rec_mon_visibility, this)); + _visibility.add (&rec_mon_table, X_("RecMon"), _("Record & Monitor"), false, std::bind (&MixerStrip::override_rec_mon_visibility, this)); _visibility.add (&solo_iso_table, X_("SoloIsoLock"), _("Solo Iso / Lock"), false); _visibility.add (&output_button, X_("Output"), _("Output"), false); _visibility.add (&_comment_button, X_("Comments"), _("Comments"), false); @@ -426,14 +426,14 @@ MixerStrip::init () parameter_changed (X_("mixer-element-visibility")); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &MixerStrip::parameter_changed)); - Config->ParameterChanged.connect (_config_connection, invalidator (*this), boost::bind (&MixerStrip::parameter_changed, this, _1), gui_context()); - _session->config.ParameterChanged.connect (_config_connection, invalidator (*this), boost::bind (&MixerStrip::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (_config_connection, invalidator (*this), std::bind (&MixerStrip::parameter_changed, this, _1), gui_context()); + _session->config.ParameterChanged.connect (_config_connection, invalidator (*this), std::bind (&MixerStrip::parameter_changed, this, _1), gui_context()); //watch for mouse enter/exit so we can do some stuff signal_enter_notify_event().connect (sigc::mem_fun(*this, &MixerStrip::mixer_strip_enter_event )); signal_leave_notify_event().connect (sigc::mem_fun(*this, &MixerStrip::mixer_strip_leave_event )); - gpm.LevelMeterButtonPress.connect_same_thread (_level_meter_connection, boost::bind (&MixerStrip::level_meter_button_press, this, _1)); + gpm.LevelMeterButtonPress.connect_same_thread (_level_meter_connection, std::bind (&MixerStrip::level_meter_button_press, this, _1)); } MixerStrip::~MixerStrip () @@ -579,8 +579,8 @@ MixerStrip::set_route (std::shared_ptr rt) if (monitor_section_button == 0 && _mixer_owned) { Glib::RefPtr act = ActionManager::get_action ("Mixer", "ToggleMonitorSection"); - _session->MonitorChanged.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::monitor_changed, this), gui_context()); - _session->MonitorBusAddedOrRemoved.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::monitor_section_added_or_removed, this), gui_context()); + _session->MonitorChanged.connect (route_connections, invalidator (*this), std::bind (&MixerStrip::monitor_changed, this), gui_context()); + _session->MonitorBusAddedOrRemoved.connect (route_connections, invalidator (*this), std::bind (&MixerStrip::monitor_section_added_or_removed, this), gui_context()); monitor_section_button = manage (new ArdourButton); monitor_changed (); @@ -653,7 +653,7 @@ MixerStrip::set_route (std::shared_ptr rt) midi_input_status_changed (); /* follow changes */ - midi_track()->InputActiveChanged.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::midi_input_status_changed, this), gui_context()); + midi_track()->InputActiveChanged.connect (route_connections, invalidator (*this), std::bind (&MixerStrip::midi_input_status_changed, this), gui_context()); } else { if (midi_input_enable_button.get_parent()) { input_button_box.remove (midi_input_enable_button); @@ -662,7 +662,7 @@ MixerStrip::set_route (std::shared_ptr rt) if (is_audio_track()) { std::shared_ptr at = audio_track(); - at->FreezeChange.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::map_frozen, this), gui_context()); + at->FreezeChange.connect (route_connections, invalidator (*this), std::bind (&MixerStrip::map_frozen, this), gui_context()); } if (is_track ()) { @@ -706,18 +706,18 @@ MixerStrip::set_route (std::shared_ptr rt) route_ops_menu = 0; _route->meter_change.connect (route_connections, invalidator (*this), bind (&MixerStrip::meter_changed, this), gui_context()); - _route->input()->changed.connect (*this, invalidator (*this), boost::bind (&MixerStrip::update_input_display, this), gui_context()); - _route->output()->changed.connect (*this, invalidator (*this), boost::bind (&MixerStrip::update_output_display, this), gui_context()); - _route->route_group_changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::route_group_changed, this), gui_context()); + _route->input()->changed.connect (*this, invalidator (*this), std::bind (&MixerStrip::update_input_display, this), gui_context()); + _route->output()->changed.connect (*this, invalidator (*this), std::bind (&MixerStrip::update_output_display, this), gui_context()); + _route->route_group_changed.connect (route_connections, invalidator (*this), std::bind (&MixerStrip::route_group_changed, this), gui_context()); - _route->io_changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::io_changed_proxy, this), gui_context ()); + _route->io_changed.connect (route_connections, invalidator (*this), std::bind (&MixerStrip::io_changed_proxy, this), gui_context ()); if (_route->panner_shell()) { update_panner_choices(); - _route->panner_shell()->Changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::connect_to_pan, this), gui_context()); + _route->panner_shell()->Changed.connect (route_connections, invalidator (*this), std::bind (&MixerStrip::connect_to_pan, this), gui_context()); } - _route->comment_changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::setup_comment_button, this), gui_context()); + _route->comment_changed.connect (route_connections, invalidator (*this), std::bind (&MixerStrip::setup_comment_button, this), gui_context()); set_stuff_from_route (); @@ -878,7 +878,7 @@ MixerStrip::connect_to_pan () std::shared_ptr p = _route->pannable (); - p->automation_state_changed.connect (panstate_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_state_changed, &panners), gui_context()); + p->automation_state_changed.connect (panstate_connection, invalidator (*this), std::bind (&PannerUI::pan_automation_state_changed, &panners), gui_context()); /* This call reduncant, PannerUI::set_panner() connects to _panshell->Changed itself * However, that only works a panner was previously set. @@ -1115,7 +1115,7 @@ MixerStrip::build_route_ops_menu () } uint32_t plugin_insert_cnt = 0; - _route->foreach_processor (boost::bind (RouteUI::help_count_plugins, _1, & plugin_insert_cnt)); + _route->foreach_processor (std::bind (RouteUI::help_count_plugins, _1, & plugin_insert_cnt)); if (active && plugin_insert_cnt > 0) { items.push_back (MenuElem (_("Pin Connections..."), sigc::mem_fun (*this, &RouteUI::manage_pins))); } @@ -1638,7 +1638,7 @@ MixerStrip::show_send (std::shared_ptr send) send->meter()->set_meter_type (_route->meter_type ()); send->set_metering (true); - _current_delivery->DropReferences.connect (send_gone_connection, invalidator (*this), boost::bind (&MixerStrip::revert_to_default_display, this), gui_context()); + _current_delivery->DropReferences.connect (send_gone_connection, invalidator (*this), std::bind (&MixerStrip::revert_to_default_display, this), gui_context()); gain_meter().set_controls (_route, send->meter(), send->amp(), send->gain_control()); gain_meter().setup_meters (); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 9c96e26705..68d4f06a9a 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -163,8 +163,8 @@ Mixer_UI::Mixer_UI () _content.set_data ("ardour-bindings", bindings); - PresentationInfo::Change.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::presentation_info_changed, this, _1), gui_context()); - Route::FanOut.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::fan_out, this, _1, false, true), gui_context()); + PresentationInfo::Change.connect (*this, invalidator (*this), std::bind (&Mixer_UI::presentation_info_changed, this, _1), gui_context()); + Route::FanOut.connect (*this, invalidator (*this), std::bind (&Mixer_UI::fan_out, this, _1, false, true), gui_context()); scroller.set_can_default (true); // set_default (scroller); @@ -429,14 +429,14 @@ Mixer_UI::Mixer_UI () _monitor_section.tearoff().set_state (*mnode); } - MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context()); - VCAMasterStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_master, this, _1), gui_context()); - FoldbackStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_foldback, this, _1), gui_context()); - SurroundStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_surround_master, this, _1), gui_context()); + MixerStrip::CatchDeletion.connect (*this, invalidator (*this), std::bind (&Mixer_UI::remove_strip, this, _1), gui_context()); + VCAMasterStrip::CatchDeletion.connect (*this, invalidator (*this), std::bind (&Mixer_UI::remove_master, this, _1), gui_context()); + FoldbackStrip::CatchDeletion.connect (*this, invalidator (*this), std::bind (&Mixer_UI::remove_foldback, this, _1), gui_context()); + SurroundStrip::CatchDeletion.connect (*this, invalidator (*this), std::bind (&Mixer_UI::remove_surround_master, this, _1), gui_context()); /* handle escape */ - ARDOUR_UI::instance()->Escape.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::escape, this), gui_context()); + ARDOUR_UI::instance()->Escape.connect (*this, invalidator (*this), std::bind (&Mixer_UI::escape, this), gui_context()); #ifndef DEFER_PLUGIN_SELECTOR_LOAD _plugin_selector = new PluginSelector (PluginManager::instance ()); @@ -444,11 +444,11 @@ Mixer_UI::Mixer_UI () #error implement deferred Plugin-Favorite list #endif - PluginManager::instance ().PluginListChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::refill_favorite_plugins, this), gui_context()); - ARDOUR::Plugin::PresetsChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::refill_favorite_plugins, this), gui_context()); + PluginManager::instance ().PluginListChanged.connect (*this, invalidator (*this), std::bind (&Mixer_UI::refill_favorite_plugins, this), gui_context()); + ARDOUR::Plugin::PresetsChanged.connect (*this, invalidator (*this), std::bind (&Mixer_UI::refill_favorite_plugins, this), gui_context()); - PluginManager::instance ().PluginStatusChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::maybe_refill_favorite_plugins, this, PLM_Favorite), gui_context()); - PluginManager::instance ().PluginStatsChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::maybe_refill_favorite_plugins, this, PLM_Recent), gui_context()); + PluginManager::instance ().PluginStatusChanged.connect (*this, invalidator (*this), std::bind (&Mixer_UI::maybe_refill_favorite_plugins, this, PLM_Favorite), gui_context()); + PluginManager::instance ().PluginStatsChanged.connect (*this, invalidator (*this), std::bind (&Mixer_UI::maybe_refill_favorite_plugins, this, PLM_Recent), gui_context()); } Mixer_UI::~Mixer_UI () @@ -652,7 +652,7 @@ Mixer_UI::add_stripables (StripableList& slist) monitor_section_attached (); } - route->DropReferences.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::monitor_section_going_away, this), gui_context()); + route->DropReferences.connect (*this, invalidator(*this), std::bind (&Mixer_UI::monitor_section_going_away, this), gui_context()); /* no regular strip shown for control out */ @@ -717,8 +717,8 @@ Mixer_UI::add_stripables (StripableList& slist) strip->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_button_release_event), strip)); } - (*s)->presentation_info().PropertyChanged.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::stripable_property_changed, this, _1, std::weak_ptr(*s)), gui_context()); - (*s)->PropertyChanged.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::stripable_property_changed, this, _1, std::weak_ptr(*s)), gui_context()); + (*s)->presentation_info().PropertyChanged.connect (*this, invalidator(*this), std::bind (&Mixer_UI::stripable_property_changed, this, _1, std::weak_ptr(*s)), gui_context()); + (*s)->PropertyChanged.connect (*this, invalidator(*this), std::bind (&Mixer_UI::stripable_property_changed, this, _1, std::weak_ptr(*s)), gui_context()); } } catch (const std::exception& e) { @@ -1308,7 +1308,7 @@ Mixer_UI::set_session (Session* sess) #if 0 /* skip mapping all session-config vars, we only need one */ - boost::function pc (boost::bind (&Mixer_UI::parameter_changed, this, _1)); + std::function pc (std::bind (&Mixer_UI::parameter_changed, this, _1)); _session->config.map_parameters (pc); #else parameter_changed ("show-group-tabs"); @@ -1316,21 +1316,21 @@ Mixer_UI::set_session (Session* sess) initial_track_display (); - _session->RouteAdded.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::add_routes, this, _1), gui_context()); - _session->route_group_added.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::add_route_group, this, _1), gui_context()); - _session->route_group_removed.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::route_groups_changed, this), gui_context()); - _session->route_groups_reordered.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::route_groups_changed, this), gui_context()); - _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::parameter_changed, this, _1), gui_context()); - _session->DirtyChanged.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::update_title, this), gui_context()); - _session->StateSaved.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::update_title, this), gui_context()); - _session->SurroundMasterAddedOrRemoved.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::sync_surround_action, this), gui_context()); + _session->RouteAdded.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::add_routes, this, _1), gui_context()); + _session->route_group_added.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::add_route_group, this, _1), gui_context()); + _session->route_group_removed.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::route_groups_changed, this), gui_context()); + _session->route_groups_reordered.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::route_groups_changed, this), gui_context()); + _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::parameter_changed, this, _1), gui_context()); + _session->DirtyChanged.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::update_title, this), gui_context()); + _session->StateSaved.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::update_title, this), gui_context()); + _session->SurroundMasterAddedOrRemoved.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::sync_surround_action, this), gui_context()); - _session->vca_manager().VCAAdded.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::add_masters, this, _1), gui_context()); - _session->vca_manager().VCACreated.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::new_masters_created, this), gui_context()); + _session->vca_manager().VCAAdded.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::add_masters, this, _1), gui_context()); + _session->vca_manager().VCACreated.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::new_masters_created, this), gui_context()); - MixerScene::Change.connect (_session_connections, invalidator (*this), boost::bind (&Mixer_UI::update_scene_buttons, this), gui_context()); + MixerScene::Change.connect (_session_connections, invalidator (*this), std::bind (&Mixer_UI::update_scene_buttons, this), gui_context()); - Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::parameter_changed, this, _1), gui_context ()); + Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&Mixer_UI::parameter_changed, this, _1), gui_context ()); route_groups_changed (); @@ -2480,7 +2480,7 @@ Mixer_UI::add_route_group (RouteGroup* group) focus = true; } - group->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::route_group_property_changed, this, group, _1), gui_context()); + group->PropertyChanged.connect (*this, invalidator (*this), std::bind (&Mixer_UI::route_group_property_changed, this, group, _1), gui_context()); if (focus) { TreeViewColumn* col = group_display.get_column (0); @@ -3667,7 +3667,7 @@ Mixer_UI::show_spill (std::shared_ptr s) show_spill_change (s); /* EMIT SIGNAL */ if (s) { - s->DropReferences.connect (_spill_gone_connection, invalidator (*this), boost::bind (&Mixer_UI::spill_nothing, this), gui_context()); + s->DropReferences.connect (_spill_gone_connection, invalidator (*this), std::bind (&Mixer_UI::spill_nothing, this), gui_context()); _group_tabs->set_sensitive (false); } else { _group_tabs->set_sensitive (true); diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index dd2ade1917..ff4f253166 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -111,7 +111,7 @@ MonitorSection::MonitorSection () channel_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL); - insert_box = new ProcessorBox (0, boost::bind (&MonitorSection::plugin_selector, this), _rr_selection, 0); + insert_box = new ProcessorBox (0, std::bind (&MonitorSection::plugin_selector, this), _rr_selection, 0); insert_box->set_no_show_all (); insert_box->show (); // TODO allow keyboard shortcuts in ProcessorBox @@ -494,7 +494,7 @@ MonitorSection::MonitorSection () _ui_initialized = true; /* catch changes that affect us */ - Config->ParameterChanged.connect (config_connection, invalidator (*this), boost::bind (&MonitorSection::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (config_connection, invalidator (*this), std::bind (&MonitorSection::parameter_changed, this, _1), gui_context()); } MonitorSection::~MonitorSection () @@ -606,9 +606,9 @@ MonitorSection::set_session (Session* s) _monitor = _route->monitor_control (); assign_controllables (); insert_box->set_route (_route); - _route->processors_changed.connect (route_connections, invalidator (*this), boost::bind (&MonitorSection::processors_changed, this, _1), gui_context()); - _route->output()->PortCountChanged.connect (route_connections, invalidator (*this), boost::bind (&MonitorSection::populate_buttons, this), gui_context()); - _route->DropReferences.connect (route_connections, invalidator (*this), boost::bind (&MonitorSection::drop_route, this), gui_context()); + _route->processors_changed.connect (route_connections, invalidator (*this), std::bind (&MonitorSection::processors_changed, this, _1), gui_context()); + _route->output()->PortCountChanged.connect (route_connections, invalidator (*this), std::bind (&MonitorSection::populate_buttons, this), gui_context()); + _route->DropReferences.connect (route_connections, invalidator (*this), std::bind (&MonitorSection::drop_route, this), gui_context()); if (_ui_initialized) { update_processor_box (); diff --git a/gtk2_ardour/mono_panner.cc b/gtk2_ardour/mono_panner.cc index 578be0c035..d4f640f19b 100644 --- a/gtk2_ardour/mono_panner.cc +++ b/gtk2_ardour/mono_panner.cc @@ -86,10 +86,10 @@ MonoPanner::MonoPanner (std::shared_ptr p) have_font = true; } - position_control->Changed.connect (panvalue_connections, invalidator(*this), boost::bind (&MonoPanner::value_change, this), gui_context()); + position_control->Changed.connect (panvalue_connections, invalidator(*this), std::bind (&MonoPanner::value_change, this), gui_context()); - _panner_shell->Changed.connect (panshell_connections, invalidator (*this), boost::bind (&MonoPanner::bypass_handler, this), gui_context()); - _panner_shell->PannableChanged.connect (panshell_connections, invalidator (*this), boost::bind (&MonoPanner::pannable_handler, this), gui_context()); + _panner_shell->Changed.connect (panshell_connections, invalidator (*this), std::bind (&MonoPanner::bypass_handler, this), gui_context()); + _panner_shell->PannableChanged.connect (panshell_connections, invalidator (*this), std::bind (&MonoPanner::pannable_handler, this), gui_context()); UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &MonoPanner::color_handler)); set_tooltip (); @@ -514,7 +514,7 @@ MonoPanner::pannable_handler () panvalue_connections.drop_connections(); position_control = _panner->pannable()->pan_azimuth_control; position_binder.set_controllable(position_control); - position_control->Changed.connect (panvalue_connections, invalidator(*this), boost::bind (&MonoPanner::value_change, this), gui_context()); + position_control->Changed.connect (panvalue_connections, invalidator(*this), std::bind (&MonoPanner::value_change, this), gui_context()); queue_draw (); } diff --git a/gtk2_ardour/mono_panner_editor.cc b/gtk2_ardour/mono_panner_editor.cc index 8645d79960..84c92af66c 100644 --- a/gtk2_ardour/mono_panner_editor.cc +++ b/gtk2_ardour/mono_panner_editor.cc @@ -60,8 +60,8 @@ MonoPannerEditor::MonoPannerEditor (MonoPanner* p) _right.set_increments (1, 10); _right.set_range (0, 100); - _panner->get_controllable()->Changed.connect (_connections, invalidator (*this), boost::bind (&MonoPannerEditor::update_editor, this), gui_context ()); - _panner->DropReferences.connect (_connections, invalidator (*this), boost::bind (&MonoPannerEditor::panner_going_away, this), gui_context ()); + _panner->get_controllable()->Changed.connect (_connections, invalidator (*this), std::bind (&MonoPannerEditor::update_editor, this), gui_context ()); + _panner->DropReferences.connect (_connections, invalidator (*this), std::bind (&MonoPannerEditor::panner_going_away, this), gui_context ()); _left.signal_value_changed().connect (sigc::mem_fun (*this, &MonoPannerEditor::left_changed)); _right.signal_value_changed().connect (sigc::mem_fun (*this, &MonoPannerEditor::right_changed)); diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index c836175769..89b1e55c86 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -816,7 +816,7 @@ OptionEditor::OptionEditor (PBD::Configuration* c) option_treeview.get_selection()->signal_changed().connect (sigc::mem_fun (*this, &OptionEditor::treeview_row_selected)); /* Watch out for changes to parameters */ - _config->ParameterChanged.connect (config_connection, invalidator (*this), boost::bind (&OptionEditor::parameter_changed, this, _1), gui_context()); + _config->ParameterChanged.connect (config_connection, invalidator (*this), std::bind (&OptionEditor::parameter_changed, this, _1), gui_context()); search_entry.show (); search_entry.set_text (_("Search here...")); diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc index a727c0acc4..9591274b7e 100644 --- a/gtk2_ardour/panner2d.cc +++ b/gtk2_ardour/panner2d.cc @@ -96,9 +96,9 @@ Panner2d::Panner2d (std::shared_ptr p, int32_t h) UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &Panner2d::color_handler)); - panner_shell->Changed.connect (panshell_connections, invalidator (*this), boost::bind (&Panner2d::handle_state_change, this), gui_context()); + panner_shell->Changed.connect (panshell_connections, invalidator (*this), std::bind (&Panner2d::handle_state_change, this), gui_context()); - panner_shell->panner()->SignalPositionChanged.connect (panner_connections, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context()); + panner_shell->panner()->SignalPositionChanged.connect (panner_connections, invalidator(*this), std::bind (&Panner2d::handle_position_change, this), gui_context()); drag_target = 0; set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK); @@ -257,7 +257,7 @@ Panner2d::handle_state_change () return; } - panner_shell->panner()->SignalPositionChanged.connect (panner_connections, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context()); + panner_shell->panner()->SignalPositionChanged.connect (panner_connections, invalidator(*this), std::bind (&Panner2d::handle_position_change, this), gui_context()); set params = panner_shell->pannable()->what_can_be_automated(); set::iterator p = params.find(PanElevationAutomation); @@ -918,10 +918,10 @@ Panner2dWindow::Panner2dWindow (std::shared_ptr p, int32_t h, uint3 bypass_button.signal_toggled().connect (sigc::mem_fun (*this, &Panner2dWindow::bypass_toggled)); width_spinner.signal_changed().connect (sigc::mem_fun (*this, &Panner2dWindow::width_changed)); - p->Changed.connect (panshell_connections, invalidator (*this), boost::bind (&Panner2dWindow::set_bypassed, this), gui_context()); + p->Changed.connect (panshell_connections, invalidator (*this), std::bind (&Panner2dWindow::set_bypassed, this), gui_context()); /* needed for the width-spinbox in the main window */ - p->PannableChanged.connect (panshell_connections, invalidator (*this), boost::bind (&Panner2dWindow::pannable_handler, this), gui_context()); - p->pannable()->pan_width_control->Changed.connect (panvalue_connections, invalidator(*this), boost::bind (&Panner2dWindow::set_width, this), gui_context()); + p->PannableChanged.connect (panshell_connections, invalidator (*this), std::bind (&Panner2dWindow::pannable_handler, this), gui_context()); + p->pannable()->pan_width_control->Changed.connect (panvalue_connections, invalidator(*this), std::bind (&Panner2dWindow::set_width, this), gui_context()); button_box.set_spacing (6); @@ -988,7 +988,7 @@ void Panner2dWindow::pannable_handler () { panvalue_connections.drop_connections(); - widget.get_panner_shell()->pannable()->pan_width_control->Changed.connect (panvalue_connections, invalidator(*this), boost::bind (&Panner2dWindow::set_width, this), gui_context()); + widget.get_panner_shell()->pannable()->pan_width_control->Changed.connect (panvalue_connections, invalidator(*this), std::bind (&Panner2dWindow::set_width, this), gui_context()); set_width(); } diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 5f8a5f8ff2..45b1872c63 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -125,7 +125,7 @@ PannerUI::set_panner (std::shared_ptr ps, std::shared_ptr p return; } - _panshell->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::panshell_changed, this), gui_context()); + _panshell->Changed.connect (connections, invalidator (*this), std::bind (&PannerUI::panshell_changed, this), gui_context()); /* new panner object, force complete reset of panner GUI */ diff --git a/gtk2_ardour/patch_change_dialog.cc b/gtk2_ardour/patch_change_dialog.cc index 035245b272..0e83d6c23a 100644 --- a/gtk2_ardour/patch_change_dialog.cc +++ b/gtk2_ardour/patch_change_dialog.cc @@ -138,7 +138,7 @@ PatchChangeDialog::PatchChangeDialog ( bank_combo_changed (); _info.Changed.connect (_info_changed_connection, invalidator (*this), - boost::bind (&PatchChangeDialog::instrument_info_changed, this), gui_context()); + std::bind (&PatchChangeDialog::instrument_info_changed, this), gui_context()); show_all (); } diff --git a/gtk2_ardour/patch_change_widget.cc b/gtk2_ardour/patch_change_widget.cc index 9f159adcd8..7ace906fa0 100644 --- a/gtk2_ardour/patch_change_widget.cc +++ b/gtk2_ardour/patch_change_widget.cc @@ -290,8 +290,8 @@ PatchChangeTab::reset (std::shared_ptr r, std::shared_ptrinstrument_info().Changed.connect (_connections, invalidator (*this), boost::bind (&PatchChangeTab::instrument_info_changed, this), gui_context ()); - _trigger->PropertyChanged.connect (_connections, invalidator (*this), boost::bind (&PatchChangeTab::trigger_property_changed, this, _1), gui_context ()); + _route->instrument_info().Changed.connect (_connections, invalidator (*this), std::bind (&PatchChangeTab::instrument_info_changed, this), gui_context ()); + _trigger->PropertyChanged.connect (_connections, invalidator (*this), std::bind (&PatchChangeTab::trigger_property_changed, this, _1), gui_context ()); refill_banks (); } @@ -469,11 +469,11 @@ PatchChangeWidget::PatchChangeWidget (std::shared_ptr r) if (!std::dynamic_pointer_cast (_route)) { processors_changed (); _route->processors_changed.connect (_route_connections, invalidator (*this), - boost::bind (&PatchChangeWidget::processors_changed, this), gui_context ()); + std::bind (&PatchChangeWidget::processors_changed, this), gui_context ()); } _info.Changed.connect (_route_connections, invalidator (*this), - boost::bind (&PatchChangeWidget::instrument_info_changed, this), gui_context ()); + std::bind (&PatchChangeWidget::instrument_info_changed, this), gui_context ()); } PatchChangeWidget::~PatchChangeWidget () @@ -528,18 +528,18 @@ PatchChangeWidget::select_channel (uint8_t chn) std::shared_ptr pi; if ((pi = std::dynamic_pointer_cast (_route->the_instrument ())) && pi->plugin ()->knows_bank_patch ()) { pi->plugin ()->BankPatchChange.connect (_ac_connections, invalidator (*this), - boost::bind (&PatchChangeWidget::bankpatch_changed, this, _1), gui_context ()); + std::bind (&PatchChangeWidget::bankpatch_changed, this, _1), gui_context ()); } else if (std::dynamic_pointer_cast (_route)) { std::shared_ptr bank_msb = _route->automation_control (Evoral::Parameter (MidiCCAutomation, chn, MIDI_CTL_MSB_BANK), true); std::shared_ptr bank_lsb = _route->automation_control (Evoral::Parameter (MidiCCAutomation, chn, MIDI_CTL_LSB_BANK), true); std::shared_ptr program = _route->automation_control (Evoral::Parameter (MidiPgmChangeAutomation, chn), true); bank_msb->Changed.connect (_ac_connections, invalidator (*this), - boost::bind (&PatchChangeWidget::bank_changed, this), gui_context ()); + std::bind (&PatchChangeWidget::bank_changed, this), gui_context ()); bank_lsb->Changed.connect (_ac_connections, invalidator (*this), - boost::bind (&PatchChangeWidget::bank_changed, this), gui_context ()); + std::bind (&PatchChangeWidget::bank_changed, this), gui_context ()); program->Changed.connect (_ac_connections, invalidator (*this), - boost::bind (&PatchChangeWidget::program_changed, this), gui_context ()); + std::bind (&PatchChangeWidget::program_changed, this), gui_context ()); } else { _no_notifications = true; } @@ -850,7 +850,7 @@ PatchChangeTriggerWindow::reset (std::shared_ptr r, std::shared_ptrname (), t->name ())); - r->DropReferences.connect (_route_connection, invalidator(*this), boost::bind (&PatchChangeTriggerWindow::clear, this), gui_context()); + r->DropReferences.connect (_route_connection, invalidator(*this), std::bind (&PatchChangeTriggerWindow::clear, this), gui_context()); /* only show tabs for the chans that this region uses */ Evoral::SMF::UsedChannels used = t->used_channels(); @@ -885,7 +885,7 @@ PatchChangeGridDialog::PatchChangeGridDialog (std::shared_ptr r) : ArdourDialog (string_compose (_("Select Patch for \"%1\""), r->name ()), false, false) , w (r) { - r->PropertyChanged.connect (_route_connection, invalidator (*this), boost::bind (&PatchChangeGridDialog::route_property_changed, this, _1, std::weak_ptr (r)), gui_context ()); + r->PropertyChanged.connect (_route_connection, invalidator (*this), std::bind (&PatchChangeGridDialog::route_property_changed, this, _1, std::weak_ptr (r)), gui_context ()); get_vbox ()->add (w); w.show (); } diff --git a/gtk2_ardour/playlist_selector.cc b/gtk2_ardour/playlist_selector.cc index f823c26af5..96aa89ed14 100644 --- a/gtk2_ardour/playlist_selector.cc +++ b/gtk2_ardour/playlist_selector.cc @@ -161,19 +161,19 @@ PlaylistSelector::prepare (RouteUI* ruix, plMode mode) this_track->PlaylistChanged.connect ( _track_connections, invalidator (*this), - boost::bind (&PlaylistSelector::redisplay, this), + std::bind (&PlaylistSelector::redisplay, this), gui_context ()); this_track->PlaylistAdded.connect ( _track_connections, invalidator (*this), - boost::bind (&PlaylistSelector::redisplay, this), + std::bind (&PlaylistSelector::redisplay, this), gui_context ()); this_track->DropReferences.connect ( _track_connections, invalidator (*this), - boost::bind (&PlaylistSelector::ok_button_click, this), + std::bind (&PlaylistSelector::ok_button_click, this), gui_context ()); } } @@ -268,7 +268,7 @@ PlaylistSelector::redisplay () sort (pls.begin (), pls.end (), cmp); for (vector >::iterator p = pls.begin (); p != pls.end (); ++p) { - (*p)->PropertyChanged.connect (_playlist_connections, invalidator (*this), boost::bind (&PlaylistSelector::pl_property_changed, this, _1), gui_context ()); + (*p)->PropertyChanged.connect (_playlist_connections, invalidator (*this), std::bind (&PlaylistSelector::pl_property_changed, this, _1), gui_context ()); TreeModel::Row child_row; diff --git a/gtk2_ardour/plugin_display.cc b/gtk2_ardour/plugin_display.cc index 50ebd35a7a..965bb07d9f 100644 --- a/gtk2_ardour/plugin_display.cc +++ b/gtk2_ardour/plugin_display.cc @@ -37,9 +37,9 @@ PluginDisplay::PluginDisplay (std::shared_ptr p, uint32_t max_he , _scroll (false) { add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); - _plug->DropReferences.connect (_death_connection, invalidator (*this), boost::bind (&PluginDisplay::plugin_going_away, this), gui_context()); + _plug->DropReferences.connect (_death_connection, invalidator (*this), std::bind (&PluginDisplay::plugin_going_away, this), gui_context()); _plug->QueueDraw.connect (_qdraw_connection, invalidator (*this), - boost::bind (&Gtk::Widget::queue_draw, this), gui_context ()); + std::bind (&Gtk::Widget::queue_draw, this), gui_context ()); } PluginDisplay::~PluginDisplay () diff --git a/gtk2_ardour/plugin_dspload_window.cc b/gtk2_ardour/plugin_dspload_window.cc index 084064fc1e..62ffb70dc3 100644 --- a/gtk2_ardour/plugin_dspload_window.cc +++ b/gtk2_ardour/plugin_dspload_window.cc @@ -171,7 +171,7 @@ PluginDSPLoadWindow::refill_processors () } _session->RouteAdded.connect ( - _route_connections, invalidator (*this), boost::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context() + _route_connections, invalidator (*this), std::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context() ); RouteList routes = _session->get_routelist (); @@ -180,16 +180,16 @@ PluginDSPLoadWindow::refill_processors () (*i)->foreach_processor (sigc::bind (sigc::mem_fun (*this, &PluginDSPLoadWindow::add_processor_to_display), (*i)->name())); (*i)->processors_changed.connect ( - _route_connections, invalidator (*this), boost::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context() + _route_connections, invalidator (*this), std::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context() ); (*i)->DropReferences.connect ( - _route_connections, invalidator (*this), boost::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context() + _route_connections, invalidator (*this), std::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context() ); } _session->IOPluginsChanged.connect ( - _route_connections, invalidator (*this), boost::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context() + _route_connections, invalidator (*this), std::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context() ); for (auto const& iop : *_session->io_plugs ()) { @@ -221,7 +221,7 @@ PluginDSPLoadWindow::add_pluginsert_to_display (std::shared_ptr if (!p->provides_stats ()) { return; } - p->DropReferences.connect (_processor_connections, MISSING_INVALIDATOR, boost::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context()); + p->DropReferences.connect (_processor_connections, MISSING_INVALIDATOR, std::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context()); PluginLoadStatsGui* plsg = new PluginLoadStatsGui (p); std::string name = route_name + " - " + p->plugin ()->name (); diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index 3539d7ddb6..17f50105bd 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -197,7 +197,7 @@ PluginEqGui::start_listening () _block_size = 0; // re-initialize the plugin next time. /* Connect the realtime signal collection callback */ - _plugin_insert->AnalysisDataGathered.connect (analysis_connection, invalidator (*this), boost::bind (&PluginEqGui::signal_collect_callback, this, _1, _2), gui_context()); + _plugin_insert->AnalysisDataGathered.connect (analysis_connection, invalidator (*this), std::bind (&PluginEqGui::signal_collect_callback, this, _1, _2), gui_context()); } void diff --git a/gtk2_ardour/plugin_manager_ui.cc b/gtk2_ardour/plugin_manager_ui.cc index cf0bd46e43..aa3d52b5e3 100644 --- a/gtk2_ardour/plugin_manager_ui.cc +++ b/gtk2_ardour/plugin_manager_ui.cc @@ -291,9 +291,9 @@ PluginManagerUI::PluginManagerUI () /* connect to signals */ - PluginManager::instance ().PluginListChanged.connect (_manager_connections, invalidator (*this), boost::bind (&PluginManagerUI::refill, this), gui_context ()); - PluginManager::instance ().PluginScanLogChanged.connect (_manager_connections, invalidator (*this), boost::bind (&PluginManagerUI::refill, this), gui_context ()); - PluginManager::instance ().PluginStatusChanged.connect (_manager_connections, invalidator (*this), boost::bind (&PluginManagerUI::plugin_status_changed, this, _1, _2, _3), gui_context ()); + PluginManager::instance ().PluginListChanged.connect (_manager_connections, invalidator (*this), std::bind (&PluginManagerUI::refill, this), gui_context ()); + PluginManager::instance ().PluginScanLogChanged.connect (_manager_connections, invalidator (*this), std::bind (&PluginManagerUI::refill, this), gui_context ()); + PluginManager::instance ().PluginStatusChanged.connect (_manager_connections, invalidator (*this), std::bind (&PluginManagerUI::plugin_status_changed, this, _1, _2, _3), gui_context ()); _btn_reindex.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::reindex)); _btn_discover.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::discover)); diff --git a/gtk2_ardour/plugin_pin_dialog.cc b/gtk2_ardour/plugin_pin_dialog.cc index e847f5a5e2..9ed7038cb8 100644 --- a/gtk2_ardour/plugin_pin_dialog.cc +++ b/gtk2_ardour/plugin_pin_dialog.cc @@ -93,15 +93,15 @@ PluginPinWidget::PluginPinWidget (std::shared_ptr pi) assert (pi->owner ()); // Route _pi->PluginIoReConfigure.connect ( - _plugin_connections, invalidator (*this), boost::bind (&PluginPinWidget::queue_idle_update, this), gui_context () + _plugin_connections, invalidator (*this), std::bind (&PluginPinWidget::queue_idle_update, this), gui_context () ); _pi->PluginMapChanged.connect ( - _plugin_connections, invalidator (*this), boost::bind (&PluginPinWidget::queue_idle_update, this), gui_context () + _plugin_connections, invalidator (*this), std::bind (&PluginPinWidget::queue_idle_update, this), gui_context () ); _pi->PluginConfigChanged.connect ( - _plugin_connections, invalidator (*this), boost::bind (&PluginPinWidget::queue_idle_update, this), gui_context () + _plugin_connections, invalidator (*this), std::bind (&PluginPinWidget::queue_idle_update, this), gui_context () ); _pin_box_size = 2 * ceil (max (8., 10. * UIConfiguration::instance ().get_ui_scale ()) * .5); @@ -262,14 +262,14 @@ PluginPinWidget::PluginPinWidget (std::shared_ptr pi) _add_sc_audio.signal_clicked.connect (sigc::bind (sigc::mem_fun (*this, &PluginPinWidget::add_sidechain_port), DataType::AUDIO)); _add_sc_midi.signal_clicked.connect (sigc::bind (sigc::mem_fun (*this, &PluginPinWidget::add_sidechain_port), DataType::MIDI)); - _route ()->PropertyChanged.connect (_plugin_connections, invalidator (*this), boost::bind (&PluginPinWidget::property_changed, this, _1), gui_context ()); - _pi->PropertyChanged.connect (_plugin_connections, invalidator (*this), boost::bind (&PluginPinWidget::property_changed, this, _1), gui_context ()); + _route ()->PropertyChanged.connect (_plugin_connections, invalidator (*this), std::bind (&PluginPinWidget::property_changed, this, _1), gui_context ()); + _pi->PropertyChanged.connect (_plugin_connections, invalidator (*this), std::bind (&PluginPinWidget::property_changed, this, _1), gui_context ()); AudioEngine::instance ()->PortConnectedOrDisconnected.connect ( - _io_connection, invalidator (*this), boost::bind (&PluginPinWidget::port_connected_or_disconnected, this, _1, _3), gui_context () + _io_connection, invalidator (*this), std::bind (&PluginPinWidget::port_connected_or_disconnected, this, _1, _3), gui_context () ); AudioEngine::instance ()->PortPrettyNameChanged.connect ( - _io_connection, invalidator (*this), boost::bind (&PluginPinWidget::port_pretty_name_changed, this, _1), gui_context () + _io_connection, invalidator (*this), std::bind (&PluginPinWidget::port_pretty_name_changed, this, _1), gui_context () ); } @@ -2051,7 +2051,7 @@ PluginPinWidget::Control::Control (std::shared_ptr c, string _adjustment.signal_value_changed ().connect (sigc::mem_fun (*this, &Control::slider_adjusted)); // dup. currently timers are used :( - //c->Changed.connect (_connection, MISSING_INVALIDATOR, boost::bind (&Control::control_changed, this), gui_context ()); + //c->Changed.connect (_connection, MISSING_INVALIDATOR, std::bind (&Control::control_changed, this), gui_context ()); // yuck, do we really need to do this? // according to c404374 this is only needed for send automation @@ -2125,7 +2125,7 @@ PluginPinDialog::PluginPinDialog (std::shared_ptr pi) add (*ppw.back()); unset_transient_for (); - _pi->PropertyChanged.connect (_connections, invalidator (*this), boost::bind (&PluginPinDialog::processor_property_changed, this, _1), gui_context()); + _pi->PropertyChanged.connect (_connections, invalidator (*this), std::bind (&PluginPinDialog::processor_property_changed, this, _1), gui_context()); /* Note: PluginPinWindowProxy handles DropReferences */ } @@ -2148,14 +2148,14 @@ PluginPinDialog::PluginPinDialog (std::shared_ptr r) _route->foreach_processor (sigc::mem_fun (*this, &PluginPinDialog::add_processor)); _route->processors_changed.connect ( - _connections, invalidator (*this), boost::bind (&PluginPinDialog::route_processors_changed, this, _1), gui_context() + _connections, invalidator (*this), std::bind (&PluginPinDialog::route_processors_changed, this, _1), gui_context() ); _route->DropReferences.connect ( - _connections, invalidator (*this), boost::bind (&PluginPinDialog::going_away, this), gui_context() + _connections, invalidator (*this), std::bind (&PluginPinDialog::going_away, this), gui_context() ); - _route->PropertyChanged.connect ( _connections, invalidator (*this), boost::bind (&PluginPinDialog::route_property_changed, this, _1), gui_context()); + _route->PropertyChanged.connect ( _connections, invalidator (*this), std::bind (&PluginPinDialog::route_property_changed, this, _1), gui_context()); } void diff --git a/gtk2_ardour/plugin_presets_ui.cc b/gtk2_ardour/plugin_presets_ui.cc index 5996b4c28e..3e478d2f26 100644 --- a/gtk2_ardour/plugin_presets_ui.cc +++ b/gtk2_ardour/plugin_presets_ui.cc @@ -99,11 +99,11 @@ PluginPresetsUI::PluginPresetsUI (std::shared_ptr insert) std::shared_ptr plugin (_insert->plugin ()); - plugin->PresetAdded.connect (_preset_connections, invalidator (*this), boost::bind (&PluginPresetsUI::update_preset_list, this), gui_context ()); - plugin->PresetRemoved.connect (_preset_connections, invalidator (*this), boost::bind (&PluginPresetsUI::update_preset_list, this), gui_context ()); + plugin->PresetAdded.connect (_preset_connections, invalidator (*this), std::bind (&PluginPresetsUI::update_preset_list, this), gui_context ()); + plugin->PresetRemoved.connect (_preset_connections, invalidator (*this), std::bind (&PluginPresetsUI::update_preset_list, this), gui_context ()); - plugin->PresetLoaded.connect (_preset_connections, invalidator (*this), boost::bind (&PluginPresetsUI::filter_presets, this), gui_context ()); - plugin->PresetDirty.connect (_preset_connections, invalidator (*this), boost::bind (&PluginPresetsUI::filter_presets, this), gui_context ()); + plugin->PresetLoaded.connect (_preset_connections, invalidator (*this), std::bind (&PluginPresetsUI::filter_presets, this), gui_context ()); + plugin->PresetDirty.connect (_preset_connections, invalidator (*this), std::bind (&PluginPresetsUI::filter_presets, this), gui_context ()); update_preset_list (); } diff --git a/gtk2_ardour/plugin_scan_dialog.cc b/gtk2_ardour/plugin_scan_dialog.cc index d58c0e074d..b58e97aa9c 100644 --- a/gtk2_ardour/plugin_scan_dialog.cc +++ b/gtk2_ardour/plugin_scan_dialog.cc @@ -98,8 +98,8 @@ PluginScanDialog::PluginScanDialog (bool just_cached, bool v, Gtk::Window* paren vbox->show_all (); /* connect to signals */ - ARDOUR::PluginScanMessage.connect (connections, MISSING_INVALIDATOR, boost::bind (&PluginScanDialog::message_handler, this, _1, _2, _3), gui_context ()); - ARDOUR::PluginScanTimeout.connect (connections, MISSING_INVALIDATOR, boost::bind (&PluginScanDialog::plugin_scan_timeout, this, _1), gui_context ()); + ARDOUR::PluginScanMessage.connect (connections, MISSING_INVALIDATOR, std::bind (&PluginScanDialog::message_handler, this, _1, _2, _3), gui_context ()); + ARDOUR::PluginScanTimeout.connect (connections, MISSING_INVALIDATOR, std::bind (&PluginScanDialog::plugin_scan_timeout, this, _1), gui_context ()); btn_cancel_all.signal_clicked.connect (sigc::mem_fun (*this, &PluginScanDialog::cancel_scan_all)); btn_cancel_one.signal_clicked.connect (sigc::mem_fun (*this, &PluginScanDialog::cancel_scan_one)); diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index f7e0887ec9..07fe276849 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -85,12 +85,12 @@ PluginSelector::PluginSelector (PluginManager& mgr) _plugin_menu = 0; in_row_change = false; - manager.PluginListChanged.connect (plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::build_plugin_menu, this), gui_context()); - manager.PluginStatusChanged.connect (plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::build_plugin_menu, this), gui_context()); - manager.PluginTagChanged.connect (plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::build_plugin_menu, this), gui_context()); + manager.PluginListChanged.connect (plugin_list_changed_connection, invalidator (*this), std::bind (&PluginSelector::build_plugin_menu, this), gui_context()); + manager.PluginStatusChanged.connect (plugin_list_changed_connection, invalidator (*this), std::bind (&PluginSelector::build_plugin_menu, this), gui_context()); + manager.PluginTagChanged.connect (plugin_list_changed_connection, invalidator (*this), std::bind (&PluginSelector::build_plugin_menu, this), gui_context()); - manager.PluginStatusChanged.connect (plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::plugin_status_changed, this, _1, _2, _3), gui_context()); - manager.PluginTagChanged.connect(plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::tags_changed, this, _1, _2, _3), gui_context()); + manager.PluginStatusChanged.connect (plugin_list_changed_connection, invalidator (*this), std::bind (&PluginSelector::plugin_status_changed, this, _1, _2, _3), gui_context()); + manager.PluginTagChanged.connect(plugin_list_changed_connection, invalidator (*this), std::bind (&PluginSelector::tags_changed, this, _1, _2, _3), gui_context()); plugin_model = Gtk::ListStore::create (plugin_columns); plugin_display.set_model (plugin_model); diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index ed1b8305e6..5f86eb4e4e 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -182,7 +182,7 @@ PluginUIWindow::PluginUIWindow (std::shared_ptr pib, set_name ("PluginEditor"); add_events (Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK); - pib->DropReferences.connect (death_connection, invalidator (*this), boost::bind (&PluginUIWindow::plugin_going_away, this), gui_context ()); + pib->DropReferences.connect (death_connection, invalidator (*this), std::bind (&PluginUIWindow::plugin_going_away, this), gui_context ()); gint h = _pluginui->get_preferred_height (); gint w = _pluginui->get_preferred_width (); @@ -604,7 +604,7 @@ PlugUIBase::PlugUIBase (std::shared_ptr pib) _bypass_button.signal_button_release_event ().connect (sigc::mem_fun (*this, &PlugUIBase::bypass_button_release), false); if (_pi) { - _pi->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&PlugUIBase::processor_active_changed, this, std::weak_ptr (_pi)), gui_context ()); + _pi->ActiveChanged.connect (active_connection, invalidator (*this), std::bind (&PlugUIBase::processor_active_changed, this, std::weak_ptr (_pi)), gui_context ()); _bypass_button.set_active (!_pi->enabled ()); } else { _bypass_button.set_sensitive (false); @@ -632,23 +632,23 @@ PlugUIBase::PlugUIBase (std::shared_ptr pib) cpuload_expander.property_expanded ().signal_changed ().connect (sigc::mem_fun (*this, &PlugUIBase::toggle_cpuload_display)); cpuload_expander.set_expanded (false); - _pib->DropReferences.connect (death_connection, invalidator (*this), boost::bind (&PlugUIBase::plugin_going_away, this), gui_context ()); + _pib->DropReferences.connect (death_connection, invalidator (*this), std::bind (&PlugUIBase::plugin_going_away, this), gui_context ()); if (_pib->ui_elements () & PlugInsertBase::PluginPreset) { - plugin->PresetAdded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ()); - plugin->PresetRemoved.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ()); - plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset, this), gui_context ()); - plugin->PresetDirty.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset_modified, this), gui_context ()); + plugin->PresetAdded.connect (*this, invalidator (*this), std::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ()); + plugin->PresetRemoved.connect (*this, invalidator (*this), std::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ()); + plugin->PresetLoaded.connect (*this, invalidator (*this), std::bind (&PlugUIBase::update_preset, this), gui_context ()); + plugin->PresetDirty.connect (*this, invalidator (*this), std::bind (&PlugUIBase::update_preset_modified, this), gui_context ()); } if (_pi && _pi->ui_elements () != PlugInsertBase::NoGUIToolbar) { - _pi->AutomationStateChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::automation_state_changed, this), gui_context ()); - _pi->LatencyChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::set_latency_label, this), gui_context ()); + _pi->AutomationStateChanged.connect (*this, invalidator (*this), std::bind (&PlugUIBase::automation_state_changed, this), gui_context ()); + _pi->LatencyChanged.connect (*this, invalidator (*this), std::bind (&PlugUIBase::set_latency_label, this), gui_context ()); automation_state_changed (); } shared_ptr tt = std::dynamic_pointer_cast (_pib); if (tt) { - tt->TailTimeChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::set_tailtime_label, this), gui_context ()); + tt->TailTimeChanged.connect (*this, invalidator (*this), std::bind (&PlugUIBase::set_tailtime_label, this), gui_context ()); } } diff --git a/gtk2_ardour/plugin_window_proxy.cc b/gtk2_ardour/plugin_window_proxy.cc index d58d04b81c..0b0dcb35e3 100644 --- a/gtk2_ardour/plugin_window_proxy.cc +++ b/gtk2_ardour/plugin_window_proxy.cc @@ -40,7 +40,7 @@ PluginWindowProxy::PluginWindowProxy (std::string const& name, std::string const if (!p) { return; } - p->DropReferences.connect (*this, MISSING_INVALIDATOR, boost::bind (&PluginWindowProxy::plugin_going_away, this), gui_context ()); + p->DropReferences.connect (*this, MISSING_INVALIDATOR, std::bind (&PluginWindowProxy::plugin_going_away, this), gui_context ()); } PluginWindowProxy::~PluginWindowProxy () diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index 9316cca6b4..07e501f2d8 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -137,7 +137,7 @@ PortGroup::add_bundle_internal (std::shared_ptr b, std::shared_ptr i } BundleRecord* br = new BundleRecord (b, io, colour, has_colour); - b->Changed.connect (br->changed_connection, invalidator (*this), boost::bind (&PortGroup::bundle_changed, this, _1), gui_context()); + b->Changed.connect (br->changed_connection, invalidator (*this), std::bind (&PortGroup::bundle_changed, this, _1), gui_context()); _bundles.push_back (br); Changed (); @@ -400,7 +400,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp #endif RouteIOs rb (r, io); - r->foreach_processor (boost::bind (&PortGroupList::maybe_add_processor_to_list, this, _1, &rb.ios, inputs, used_io)); + r->foreach_processor (std::bind (&PortGroupList::maybe_add_processor_to_list, this, _1, &rb.ios, inputs, used_io)); route_ios.push_back (rb); } @@ -914,8 +914,8 @@ PortGroupList::add_group (std::shared_ptr g) { _groups.push_back (g); - g->Changed.connect (_changed_connections, invalidator (*this), boost::bind (&PortGroupList::emit_changed, this), gui_context()); - g->BundleChanged.connect (_bundle_changed_connections, invalidator (*this), boost::bind (&PortGroupList::emit_bundle_changed, this, _1), gui_context()); + g->Changed.connect (_changed_connections, invalidator (*this), std::bind (&PortGroupList::emit_changed, this), gui_context()); + g->BundleChanged.connect (_bundle_changed_connections, invalidator (*this), std::bind (&PortGroupList::emit_bundle_changed, this, _1), gui_context()); emit_changed (); } diff --git a/gtk2_ardour/port_insert_ui.cc b/gtk2_ardour/port_insert_ui.cc index 7c88924da7..1f0b7a187a 100644 --- a/gtk2_ardour/port_insert_ui.cc +++ b/gtk2_ardour/port_insert_ui.cc @@ -115,9 +115,9 @@ PortInsertUI::PortInsertUI (Gtk::Window* parent, ARDOUR::Session* sess, std::sha Gtkmm2ext::UI::instance ()->set_tip (_measure_latency_button, _("Measure Latency using the first port of each direction\n(note that gain is not applied during measurement).\nRight-click to forget previous measurements,\nand revert to use default port latency.")); _pi->set_metering (true); - _pi->input ()->changed.connect (_connections, invalidator (*this), boost::bind (&PortInsertUI::return_changed, this, _1, _2), gui_context ()); - _pi->output ()->changed.connect (_connections, invalidator (*this), boost::bind (&PortInsertUI::send_changed, this, _1, _2), gui_context ()); - _pi->LatencyChanged.connect (_connections, invalidator (*this), boost::bind (&PortInsertUI::set_latency_label, this), gui_context ()); + _pi->input ()->changed.connect (_connections, invalidator (*this), std::bind (&PortInsertUI::return_changed, this, _1, _2), gui_context ()); + _pi->output ()->changed.connect (_connections, invalidator (*this), std::bind (&PortInsertUI::send_changed, this, _1, _2), gui_context ()); + _pi->LatencyChanged.connect (_connections, invalidator (*this), std::bind (&PortInsertUI::set_latency_label, this), gui_context ()); _fast_screen_update_connection = Timers::super_rapid_connect (sigc::mem_fun (*this, &PortInsertUI::fast_update)); diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc index 020b2a3278..3cbd583338 100644 --- a/gtk2_ardour/port_matrix.cc +++ b/gtk2_ardour/port_matrix.cc @@ -153,31 +153,31 @@ PortMatrix::init () for (int i = 0; i < 2; ++i) { /* watch for the content of _ports[] changing */ - _ports[i].Changed.connect (_changed_connections, invalidator (*this), boost::bind (&PortMatrix::setup, this), gui_context()); + _ports[i].Changed.connect (_changed_connections, invalidator (*this), std::bind (&PortMatrix::setup, this), gui_context()); /* and for bundles in _ports[] changing */ - _ports[i].BundleChanged.connect (_bundle_changed_connections, invalidator (*this), boost::bind (&PortMatrix::setup, this), gui_context()); + _ports[i].BundleChanged.connect (_bundle_changed_connections, invalidator (*this), std::bind (&PortMatrix::setup, this), gui_context()); } /* Part 2: notice when things have changed that require our subclass to clear and refill _ports[] */ /* watch for routes being added or removed */ - _session->RouteAdded.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::routes_changed, this), gui_context()); + _session->RouteAdded.connect (_session_connections, invalidator (*this), std::bind (&PortMatrix::routes_changed, this), gui_context()); /* and also bundles */ - _session->BundleAddedOrRemoved.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports, this), gui_context()); + _session->BundleAddedOrRemoved.connect (_session_connections, invalidator (*this), std::bind (&PortMatrix::setup_global_ports, this), gui_context()); /* and also ports */ - _session->engine().PortRegisteredOrUnregistered.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports, this), gui_context()); + _session->engine().PortRegisteredOrUnregistered.connect (_session_connections, invalidator (*this), std::bind (&PortMatrix::setup_global_ports, this), gui_context()); - _session->engine().PortPrettyNameChanged.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_all_ports, this), gui_context()); + _session->engine().PortPrettyNameChanged.connect (_session_connections, invalidator (*this), std::bind (&PortMatrix::setup_all_ports, this), gui_context()); /* watch for route order keys changing, which changes the order of things in our global ports list(s) */ - PresentationInfo::Change.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports_proxy, this), gui_context()); + PresentationInfo::Change.connect (_session_connections, invalidator (*this), std::bind (&PortMatrix::setup_global_ports_proxy, this), gui_context()); /* Part 3: other stuff */ - _session->engine().PortConnectedOrDisconnected.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::port_connected_or_disconnected, this), gui_context ()); + _session->engine().PortConnectedOrDisconnected.connect (_session_connections, invalidator (*this), std::bind (&PortMatrix::port_connected_or_disconnected, this), gui_context ()); _hscroll.signal_value_changed().connect (sigc::mem_fun (*this, &PortMatrix::hscroll_changed)); _vscroll.signal_value_changed().connect (sigc::mem_fun (*this, &PortMatrix::vscroll_changed)); @@ -195,8 +195,8 @@ PortMatrix::reconnect_to_routes () std::shared_ptr routes = _session->get_routes (); for (auto const& i : *routes) { - i->processors_changed.connect (_route_connections, invalidator (*this), boost::bind (&PortMatrix::route_processors_changed, this, _1), gui_context()); - i->DropReferences.connect (_route_connections, invalidator (*this), boost::bind (&PortMatrix::routes_changed, this), gui_context()); + i->processors_changed.connect (_route_connections, invalidator (*this), std::bind (&PortMatrix::route_processors_changed, this, _1), gui_context()); + i->DropReferences.connect (_route_connections, invalidator (*this), std::bind (&PortMatrix::routes_changed, this), gui_context()); } } diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc index 89ad10b81b..1cffd2d7f1 100644 --- a/gtk2_ardour/port_matrix_body.cc +++ b/gtk2_ardour/port_matrix_body.cc @@ -266,7 +266,7 @@ PortMatrixBody::setup () PortGroup::BundleList r = _matrix->visible_rows()->bundles (); for (PortGroup::BundleList::iterator i = r.begin(); i != r.end(); ++i) { - (*i)->bundle->Changed.connect (_bundle_connections, invalidator (*this), boost::bind (&PortMatrixBody::rebuild_and_draw_row_labels, this), gui_context()); + (*i)->bundle->Changed.connect (_bundle_connections, invalidator (*this), std::bind (&PortMatrixBody::rebuild_and_draw_row_labels, this), gui_context()); } } @@ -274,7 +274,7 @@ PortMatrixBody::setup () if (_matrix->visible_columns()) { PortGroup::BundleList c = _matrix->visible_columns()->bundles (); for (PortGroup::BundleList::iterator i = c.begin(); i != c.end(); ++i) { - (*i)->bundle->Changed.connect (_bundle_connections, invalidator (*this), boost::bind (&PortMatrixBody::rebuild_and_draw_column_labels, this), gui_context()); + (*i)->bundle->Changed.connect (_bundle_connections, invalidator (*this), std::bind (&PortMatrixBody::rebuild_and_draw_column_labels, this), gui_context()); } } diff --git a/gtk2_ardour/prh.cc b/gtk2_ardour/prh.cc index eb7bfaf0a6..14ab4e540b 100644 --- a/gtk2_ardour/prh.cc +++ b/gtk2_ardour/prh.cc @@ -84,7 +84,7 @@ PianoRollHeader::PianoRollHeader (Item* parent, MidiViewBackground& bg) } resize (); - bg.HeightChanged.connect (height_connection, MISSING_INVALIDATOR, boost::bind (&PianoRollHeader::resize, this), gui_context()); + bg.HeightChanged.connect (height_connection, MISSING_INVALIDATOR, std::bind (&PianoRollHeader::resize, this), gui_context()); /* draw vertical lines on both sides of the rectangle */ set_fill (false); diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 133bc72883..ad3666c006 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -238,9 +238,9 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, std::shared_ptr routing_icon.hide(); output_routing_icon.hide(); - _processor->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_active_changed, this), gui_context()); - _processor->PropertyChanged.connect (name_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_property_changed, this, _1), gui_context()); - _processor->ConfigurationChanged.connect (config_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_configuration_changed, this, _1, _2), gui_context()); + _processor->ActiveChanged.connect (active_connection, invalidator (*this), std::bind (&ProcessorEntry::processor_active_changed, this), gui_context()); + _processor->PropertyChanged.connect (name_connection, invalidator (*this), std::bind (&ProcessorEntry::processor_property_changed, this, _1), gui_context()); + _processor->ConfigurationChanged.connect (config_connection, invalidator (*this), std::bind (&ProcessorEntry::processor_configuration_changed, this, _1, _2), gui_context()); const uint32_t limit_inline_controls = UIConfiguration::instance().get_max_inline_controls (); @@ -1019,9 +1019,9 @@ ProcessorEntry::Control::Control (ProcessorEntry& e,std::shared_ptrChanged.connect (_connections, invalidator (*this), boost::bind (&Control::control_changed, this), gui_context ()); + c->Changed.connect (_connections, invalidator (*this), std::bind (&Control::control_changed, this), gui_context ()); if (c->alist ()) { - c->alist()->automation_state_changed.connect (_connections, invalidator (*this), boost::bind (&Control::control_automation_state_changed, this), gui_context()); + c->alist()->automation_state_changed.connect (_connections, invalidator (*this), std::bind (&Control::control_automation_state_changed, this), gui_context()); control_automation_state_changed (); } @@ -1056,9 +1056,9 @@ ProcessorEntry::Control::Control (ProcessorEntry& e,std::shared_ptrChanged.connect (_connections, invalidator (*this), boost::bind (&Control::control_changed, this), gui_context ()); + c->Changed.connect (_connections, invalidator (*this), std::bind (&Control::control_changed, this), gui_context ()); if (c->alist ()) { - c->alist()->automation_state_changed.connect (_connections, invalidator (*this), boost::bind (&Control::control_automation_state_changed, this), gui_context()); + c->alist()->automation_state_changed.connect (_connections, invalidator (*this), std::bind (&Control::control_automation_state_changed, this), gui_context()); control_automation_state_changed (); } } @@ -1259,13 +1259,13 @@ PluginInsertProcessorEntry::PluginInsertProcessorEntry (ProcessorBox* b, std::sh , _plugin_insert (p) { p->PluginIoReConfigure.connect ( - _iomap_connection, invalidator (*this), boost::bind (&PluginInsertProcessorEntry::iomap_changed, this), gui_context() + _iomap_connection, invalidator (*this), std::bind (&PluginInsertProcessorEntry::iomap_changed, this), gui_context() ); p->PluginMapChanged.connect ( - _iomap_connection, invalidator (*this), boost::bind (&PluginInsertProcessorEntry::iomap_changed, this), gui_context() + _iomap_connection, invalidator (*this), std::bind (&PluginInsertProcessorEntry::iomap_changed, this), gui_context() ); p->PluginConfigChanged.connect ( - _iomap_connection, invalidator (*this), boost::bind (&PluginInsertProcessorEntry::iomap_changed, this), gui_context() + _iomap_connection, invalidator (*this), std::bind (&PluginInsertProcessorEntry::iomap_changed, this), gui_context() ); } @@ -1935,7 +1935,7 @@ static std::list drag_targets_noplugin() return tmp; } -ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function get_plugin_selector, +ProcessorBox::ProcessorBox (ARDOUR::Session* sess, std::function get_plugin_selector, ProcessorSelection& psel, MixerStrip* parent, bool owner_is_mixer) : _parent_strip (parent) , _owner_is_mixer (owner_is_mixer) @@ -1990,7 +1990,7 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::functionDeliveryChanged.connect ( - _mixer_strip_connections, invalidator (*this), boost::bind (&ProcessorBox::mixer_strip_delivery_changed, this, _1), gui_context () + _mixer_strip_connections, invalidator (*this), std::bind (&ProcessorBox::mixer_strip_delivery_changed, this, _1), gui_context () ); } @@ -2024,15 +2024,15 @@ ProcessorBox::set_route (std::shared_ptr r) _route = r; _route->processors_changed.connect ( - _route_connections, invalidator (*this), boost::bind (&ProcessorBox::route_processors_changed, this, _1), gui_context() + _route_connections, invalidator (*this), std::bind (&ProcessorBox::route_processors_changed, this, _1), gui_context() ); _route->DropReferences.connect ( - _route_connections, invalidator (*this), boost::bind (&ProcessorBox::route_going_away, this), gui_context() + _route_connections, invalidator (*this), std::bind (&ProcessorBox::route_going_away, this), gui_context() ); _route->PropertyChanged.connect ( - _route_connections, invalidator (*this), boost::bind (&ProcessorBox::route_property_changed, this, _1), gui_context() + _route_connections, invalidator (*this), std::bind (&ProcessorBox::route_property_changed, this, _1), gui_context() ); redisplay_processors (); @@ -4727,11 +4727,11 @@ ProcessorWindowProxy::ProcessorWindowProxy (string const & name, ProcessorBox* b if (!p) { return; } - p->DropReferences.connect (going_away_connection, MISSING_INVALIDATOR, boost::bind (&ProcessorWindowProxy::processor_going_away, this), gui_context()); + p->DropReferences.connect (going_away_connection, MISSING_INVALIDATOR, std::bind (&ProcessorWindowProxy::processor_going_away, this), gui_context()); - p->ToggleUI.connect (gui_connections, invalidator (*this), boost::bind (&ProcessorWindowProxy::show_the_right_window, this, false), gui_context()); - p->ShowUI.connect (gui_connections, invalidator (*this), boost::bind (&ProcessorWindowProxy::show_the_right_window, this, true), gui_context()); - p->HideUI.connect (gui_connections, invalidator (*this), boost::bind (&ProcessorWindowProxy::hide, this), gui_context()); + p->ToggleUI.connect (gui_connections, invalidator (*this), std::bind (&ProcessorWindowProxy::show_the_right_window, this, false), gui_context()); + p->ShowUI.connect (gui_connections, invalidator (*this), std::bind (&ProcessorWindowProxy::show_the_right_window, this, true), gui_context()); + p->HideUI.connect (gui_connections, invalidator (*this), std::bind (&ProcessorWindowProxy::hide, this), gui_context()); std::shared_ptr pi = std::dynamic_pointer_cast (p); if (pi) { @@ -4905,7 +4905,7 @@ PluginPinWindowProxy::PluginPinWindowProxy(std::string const &name, std::weak_pt if (!p) { return; } - p->DropReferences.connect (going_away_connection, MISSING_INVALIDATOR, boost::bind (&PluginPinWindowProxy::processor_going_away, this), gui_context()); + p->DropReferences.connect (going_away_connection, MISSING_INVALIDATOR, std::bind (&PluginPinWindowProxy::processor_going_away, this), gui_context()); } PluginPinWindowProxy::~PluginPinWindowProxy() diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 6892849219..7e0b09b199 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -429,7 +428,7 @@ public: ProcessorsAB, }; - ProcessorBox (ARDOUR::Session*, boost::function get_plugin_selector, + ProcessorBox (ARDOUR::Session*, std::function get_plugin_selector, ProcessorSelection&, MixerStrip* parent, bool owner_is_mixer = false); ~ProcessorBox (); @@ -497,7 +496,7 @@ private: PBD::ScopedConnectionList _mixer_strip_connections; PBD::ScopedConnectionList _route_connections; - boost::function _get_plugin_selector; + std::function _get_plugin_selector; std::shared_ptr _processor_being_created; diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index f14e7834cf..40497f3743 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -1380,13 +1380,13 @@ protected: AudioEngine::instance()->PortRegisteredOrUnregistered.connect ( _engine_connection, invalidator (*this), - boost::bind (&PortSelectOption::update_port_combo, this), + std::bind (&PortSelectOption::update_port_combo, this), gui_context()); AudioEngine::instance()->PortPrettyNameChanged.connect ( _engine_connection, invalidator (*this), - boost::bind (&PortSelectOption::update_port_combo, this), + std::bind (&PortSelectOption::update_port_combo, this), gui_context()); } @@ -1612,7 +1612,7 @@ class ControlSurfacesOptions : public OptionEditorMiniPage ControlProtocolManager& m = ControlProtocolManager::instance (); m.ProtocolStatusChange.connect (protocol_status_connection, MISSING_INVALIDATOR, - boost::bind (&ControlSurfacesOptions::protocol_status_changed, this, _1), gui_context()); + std::bind (&ControlSurfacesOptions::protocol_status_changed, this, _1), gui_context()); _store->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::view_changed)); _view.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked)); @@ -2104,15 +2104,15 @@ class MidiPortOptions : public OptionEditorMiniPage, public sigc::trackable AudioEngine::instance()->PortRegisteredOrUnregistered.connect (connections, invalidator (*this), - boost::bind (&MidiPortOptions::refill, this), + std::bind (&MidiPortOptions::refill, this), gui_context()); AudioEngine::instance()->MidiPortInfoChanged.connect (connections, invalidator (*this), - boost::bind (&MidiPortOptions::refill, this), + std::bind (&MidiPortOptions::refill, this), gui_context()); AudioEngine::instance()->MidiSelectionPortsChanged.connect (connections, invalidator (*this), - boost::bind (&MidiPortOptions::refill, this), + std::bind (&MidiPortOptions::refill, this), gui_context()); } diff --git a/gtk2_ardour/rec_info_box.cc b/gtk2_ardour/rec_info_box.cc index a7108f59c1..3725717a66 100644 --- a/gtk2_ardour/rec_info_box.cc +++ b/gtk2_ardour/rec_info_box.cc @@ -90,8 +90,8 @@ DurationInfoBox::set_session (Session* s) _rectime_connection.disconnect (); return; } - _session->RecordStateChanged.connect (_session_connections, invalidator (*this), boost::bind (&DurationInfoBox::rec_state_changed, this), gui_context()); - _session->UpdateRouteRecordState.connect (_session_connections, invalidator (*this), boost::bind (&DurationInfoBox::update, this), gui_context()); + _session->RecordStateChanged.connect (_session_connections, invalidator (*this), std::bind (&DurationInfoBox::rec_state_changed, this), gui_context()); + _session->UpdateRouteRecordState.connect (_session_connections, invalidator (*this), std::bind (&DurationInfoBox::update, this), gui_context()); } void @@ -185,8 +185,8 @@ XrunInfoBox::set_session (Session* s) return; } - _session->Xrun.connect (_session_connections, invalidator (*this), boost::bind (&XrunInfoBox::update, this), gui_context()); - _session->RecordStateChanged.connect (_session_connections, invalidator (*this), boost::bind (&XrunInfoBox::update, this), gui_context()); + _session->Xrun.connect (_session_connections, invalidator (*this), std::bind (&XrunInfoBox::update, this), gui_context()); + _session->RecordStateChanged.connect (_session_connections, invalidator (*this), std::bind (&XrunInfoBox::update, this), gui_context()); } void @@ -271,7 +271,7 @@ RemainInfoBox::set_session (Session* s) } _diskspace_connection = Timers::second_connect (sigc::mem_fun (*this, &RemainInfoBox::update)); - _session->UpdateRouteRecordState.connect (_session_connections, invalidator (*this), boost::bind (&RemainInfoBox::update, this), gui_context()); + _session->UpdateRouteRecordState.connect (_session_connections, invalidator (*this), std::bind (&RemainInfoBox::update, this), gui_context()); } void diff --git a/gtk2_ardour/recorder_ui.cc b/gtk2_ardour/recorder_ui.cc index eea0ad0849..b5fa908f05 100644 --- a/gtk2_ardour/recorder_ui.cc +++ b/gtk2_ardour/recorder_ui.cc @@ -294,17 +294,17 @@ RecorderUI::RecorderUI () _content.set_data ("ardour-bindings", bindings); /* subscribe to signals */ - AudioEngine::instance ()->Running.connect (_engine_connections, invalidator (*this), boost::bind (&RecorderUI::start_updating, this), gui_context ()); - AudioEngine::instance ()->Stopped.connect (_engine_connections, invalidator (*this), boost::bind (&RecorderUI::stop_updating, this), gui_context ()); - AudioEngine::instance ()->Halted.connect (_engine_connections, invalidator (*this), boost::bind (&RecorderUI::stop_updating, this), gui_context ()); - AudioEngine::instance ()->PortConnectedOrDisconnected.connect (_engine_connections, invalidator (*this), boost::bind (&RecorderUI::port_connected_or_disconnected, this, _2, _4), gui_context ()); - AudioEngine::instance ()->PortPrettyNameChanged.connect (_engine_connections, invalidator (*this), boost::bind (&RecorderUI::port_pretty_name_changed, this, _1), gui_context ()); - AudioEngine::instance ()->PhysInputChanged.connect (_engine_connections, invalidator (*this), boost::bind (&RecorderUI::add_or_remove_io, this, _1, _2, _3), gui_context ()); + AudioEngine::instance ()->Running.connect (_engine_connections, invalidator (*this), std::bind (&RecorderUI::start_updating, this), gui_context ()); + AudioEngine::instance ()->Stopped.connect (_engine_connections, invalidator (*this), std::bind (&RecorderUI::stop_updating, this), gui_context ()); + AudioEngine::instance ()->Halted.connect (_engine_connections, invalidator (*this), std::bind (&RecorderUI::stop_updating, this), gui_context ()); + AudioEngine::instance ()->PortConnectedOrDisconnected.connect (_engine_connections, invalidator (*this), std::bind (&RecorderUI::port_connected_or_disconnected, this, _2, _4), gui_context ()); + AudioEngine::instance ()->PortPrettyNameChanged.connect (_engine_connections, invalidator (*this), std::bind (&RecorderUI::port_pretty_name_changed, this, _1), gui_context ()); + AudioEngine::instance ()->PhysInputChanged.connect (_engine_connections, invalidator (*this), std::bind (&RecorderUI::add_or_remove_io, this, _1, _2, _3), gui_context ()); - PresentationInfo::Change.connect (*this, invalidator (*this), boost::bind (&RecorderUI::presentation_info_changed, this, _1), gui_context()); - Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RecorderUI::parameter_changed, this, _1), gui_context ()); + PresentationInfo::Change.connect (*this, invalidator (*this), std::bind (&RecorderUI::presentation_info_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&RecorderUI::parameter_changed, this, _1), gui_context ()); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RecorderUI::parameter_changed)); - //ARDOUR_UI::instance()->Escape.connect (*this, invalidator (*this), boost::bind (&RecorderUI::escape, this), gui_context()); + //ARDOUR_UI::instance()->Escape.connect (*this, invalidator (*this), std::bind (&RecorderUI::escape, this), gui_context()); /* init */ update_title (); @@ -421,21 +421,21 @@ RecorderUI::set_session (Session* s) XMLNode* node = ARDOUR_UI::instance()->recorder_settings(); set_state (*node, Stateful::loading_state_version); - _session->DirtyChanged.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::update_title, this), gui_context ()); - _session->StateSaved.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::update_title, this), gui_context ()); + _session->DirtyChanged.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::update_title, this), gui_context ()); + _session->StateSaved.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::update_title, this), gui_context ()); - _session->RouteAdded.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::add_routes, this, _1), gui_context ()); - TrackRecordAxis::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&RecorderUI::remove_route, this, _1), gui_context ()); - TrackRecordAxis::EditNextName.connect (*this, invalidator (*this), boost::bind (&RecorderUI::tra_name_edit, this, _1, _2), gui_context ()); + _session->RouteAdded.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::add_routes, this, _1), gui_context ()); + TrackRecordAxis::CatchDeletion.connect (*this, invalidator (*this), std::bind (&RecorderUI::remove_route, this, _1), gui_context ()); + TrackRecordAxis::EditNextName.connect (*this, invalidator (*this), std::bind (&RecorderUI::tra_name_edit, this, _1, _2), gui_context ()); - _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::parameter_changed, this, _1), gui_context ()); + _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::parameter_changed, this, _1), gui_context ()); - Region::RegionsPropertyChanged.connect (*this, invalidator (*this), boost::bind (&RecorderUI::regions_changed, this, _1, _2), gui_context()); - _session->StartTimeChanged.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::gui_extents_changed, this), gui_context()); - _session->EndTimeChanged.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::gui_extents_changed, this), gui_context()); - _session->RecordStateChanged.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::update_sensitivity, this), gui_context()); - _session->UpdateRouteRecordState.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::update_recordstate, this), gui_context()); - _session->IOPluginsChanged.connect (_session_connections, invalidator (*this), boost::bind (&RecorderUI::io_plugins_changed, this), gui_context()); + Region::RegionsPropertyChanged.connect (*this, invalidator (*this), std::bind (&RecorderUI::regions_changed, this, _1, _2), gui_context()); + _session->StartTimeChanged.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::gui_extents_changed, this), gui_context()); + _session->EndTimeChanged.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::gui_extents_changed, this), gui_context()); + _session->RecordStateChanged.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::update_sensitivity, this), gui_context()); + _session->UpdateRouteRecordState.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::update_recordstate, this), gui_context()); + _session->IOPluginsChanged.connect (_session_connections, invalidator (*this), std::bind (&RecorderUI::io_plugins_changed, this), gui_context()); /* map_parameters */ parameter_changed ("show-group-tabs"); @@ -622,7 +622,7 @@ RecorderUI::start_updating () _meter_area.queue_resize (); MonitorPort& mp (AudioEngine::instance()->monitor_port ()); - mp.MonitorInputChanged.connect (_monitor_connection, invalidator (*this), boost::bind (&RecorderUI::update_monitorstate, this, _1, _2), gui_context()); + mp.MonitorInputChanged.connect (_monitor_connection, invalidator (*this), std::bind (&RecorderUI::update_monitorstate, this, _1, _2), gui_context()); const bool en = _session ? true : false; const bool have_ms = Config->get_use_monitor_bus(); @@ -658,7 +658,7 @@ RecorderUI::add_or_remove_io (DataType dt, vector ports, bool add) if (_input_ports.empty () && add) { _monitor_connection.disconnect (); MonitorPort& mp (AudioEngine::instance()->monitor_port ()); - mp.MonitorInputChanged.connect (_monitor_connection, invalidator (*this), boost::bind (&RecorderUI::update_monitorstate, this, _1, _2), gui_context()); + mp.MonitorInputChanged.connect (_monitor_connection, invalidator (*this), std::bind (&RecorderUI::update_monitorstate, this, _1, _2), gui_context()); } if (add) { @@ -700,7 +700,7 @@ RecorderUI::io_plugin_add (std::shared_ptr p) PortManager::AudioInputPorts const& aip (p->audio_input_ports ()); PortManager::MIDIInputPorts const& mip (p->midi_input_ports ()); _ioplugins.insert (p); - p->DropReferences.connect (_going_away_connections, invalidator (*this), boost::bind (&RecorderUI::io_plugin_going_away, this, std::weak_ptr(p)), gui_context ()); + p->DropReferences.connect (_going_away_connections, invalidator (*this), std::bind (&RecorderUI::io_plugin_going_away, this, std::weak_ptr(p)), gui_context ()); for (auto i = aip.begin (); i != aip.end (); ++i) { _input_ports[i->first] = std::shared_ptr (new InputPort (i->first, DataType::AUDIO, this, _vertical, true)); set_connections (i->first); diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc index af85c7f562..d16e6f2c4b 100644 --- a/gtk2_ardour/region_editor.cc +++ b/gtk2_ardour/region_editor.cc @@ -225,8 +225,8 @@ RegionEditor::RegionEditor (Session* s, RegionView* rv) bounds_changed (change); - _region->PropertyChanged.connect (state_connection, invalidator (*this), boost::bind (&RegionEditor::region_changed, this, _1), gui_context()); - _region->RegionFxChanged.connect (region_connection, invalidator (*this), boost::bind (&RegionEditor::region_fx_changed, this), gui_context ()); + _region->PropertyChanged.connect (state_connection, invalidator (*this), std::bind (&RegionEditor::region_changed, this, _1), gui_context()); + _region->RegionFxChanged.connect (region_connection, invalidator (*this), std::bind (&RegionEditor::region_fx_changed, this), gui_context ()); spin_arrow_grab = false; @@ -320,7 +320,7 @@ RegionEditor::connect_editor_events () audition_button.signal_toggled().connect (sigc::mem_fun(*this, &RegionEditor::audition_button_toggled)); - _session->AuditionActive.connect (audition_connection, invalidator (*this), boost::bind (&RegionEditor::audition_state_changed, this, _1), gui_context()); + _session->AuditionActive.connect (audition_connection, invalidator (*this), std::bind (&RegionEditor::audition_state_changed, this, _1), gui_context()); } void diff --git a/gtk2_ardour/region_fx_line.cc b/gtk2_ardour/region_fx_line.cc index 6515f2c2e1..56faeceb1a 100644 --- a/gtk2_ardour/region_fx_line.cc +++ b/gtk2_ardour/region_fx_line.cc @@ -46,7 +46,7 @@ RegionFxLine::RegionFxLine (std::string const& name, RegionView& r, ArdourCanvas void RegionFxLine::init () { - _rv.region()->PropertyChanged.connect (_region_changed_connection, invalidator (*this), boost::bind (&RegionFxLine::region_changed, this, _1), gui_context()); + _rv.region()->PropertyChanged.connect (_region_changed_connection, invalidator (*this), std::bind (&RegionFxLine::region_changed, this, _1), gui_context()); group->raise_to_top (); group->set_y_position (2); } diff --git a/gtk2_ardour/region_layering_order_editor.cc b/gtk2_ardour/region_layering_order_editor.cc index a5c2f17cb6..ef395312b8 100644 --- a/gtk2_ardour/region_layering_order_editor.cc +++ b/gtk2_ardour/region_layering_order_editor.cc @@ -196,7 +196,7 @@ RegionLayeringOrderEditor::set_context (const string& a_name, Session* s, TimeAx clock.set (pos, true); playlist_modified_connection.disconnect (); - pl->ContentsChanged.connect (playlist_modified_connection, invalidator (*this), boost::bind + pl->ContentsChanged.connect (playlist_modified_connection, invalidator (*this), std::bind (&RegionLayeringOrderEditor::playlist_modified, this), gui_context()); _time_axis_view = tav; diff --git a/gtk2_ardour/region_list_base.cc b/gtk2_ardour/region_list_base.cc index 2b7117c9af..505b9b7ade 100644 --- a/gtk2_ardour/region_list_base.cc +++ b/gtk2_ardour/region_list_base.cc @@ -284,8 +284,8 @@ RegionListBase::set_session (ARDOUR::Session* s) return; } - ARDOUR::Region::RegionsPropertyChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&RegionListBase::regions_changed, this, _1, _2), gui_context ()); - ARDOUR::RegionFactory::CheckNewRegion.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&RegionListBase::add_region, this, _1), gui_context ()); + ARDOUR::Region::RegionsPropertyChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&RegionListBase::regions_changed, this, _1, _2), gui_context ()); + ARDOUR::RegionFactory::CheckNewRegion.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&RegionListBase::add_region, this, _1), gui_context ()); redisplay (); } @@ -336,7 +336,7 @@ RegionListBase::add_region (std::shared_ptr region) } if (region->whole_file ()) { - region->DropReferences.connect (_remove_region_connections, MISSING_INVALIDATOR, boost::bind (&RegionListBase::remove_weak_region, this, std::weak_ptr (region)), gui_context ()); + region->DropReferences.connect (_remove_region_connections, MISSING_INVALIDATOR, std::bind (&RegionListBase::remove_weak_region, this, std::weak_ptr (region)), gui_context ()); } PropertyChange pc; diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index f7933a2a28..52b1e945ea 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -236,8 +236,8 @@ RegionView::init (bool wfd) /* derived class calls set_height () including RegionView::set_height() in ::init() */ //set_height (trackview.current_height()); - _region->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&RegionView::region_changed, this, _1), gui_context()); - _region->RegionFxChanged.connect (*this, invalidator (*this), boost::bind (&RegionView::region_renamed, this), gui_context()); + _region->PropertyChanged.connect (*this, invalidator (*this), std::bind (&RegionView::region_changed, this, _1), gui_context()); + _region->RegionFxChanged.connect (*this, invalidator (*this), std::bind (&RegionView::region_renamed, this), gui_context()); /* derived class calls set_colors () including RegionView::set_colors() in ::init() */ //set_colors (); diff --git a/gtk2_ardour/return_ui.cc b/gtk2_ardour/return_ui.cc index 6cf8ab5045..1d0b150cde 100644 --- a/gtk2_ardour/return_ui.cc +++ b/gtk2_ardour/return_ui.cc @@ -59,7 +59,7 @@ ReturnUI::ReturnUI (Gtk::Window* parent, std::shared_ptr r, Session* ses show_all (); _return->set_metering (true); - _return->input()->changed.connect (input_change_connection, invalidator (*this), boost::bind (&ReturnUI::ins_changed, this, _1, _2), gui_context()); + _return->input()->changed.connect (input_change_connection, invalidator (*this), std::bind (&ReturnUI::ins_changed, this, _1, _2), gui_context()); _gpm.setup_meters (); _gpm.set_fader_name (X_("ReturnUIFader")); diff --git a/gtk2_ardour/route_group_dialog.cc b/gtk2_ardour/route_group_dialog.cc index 83b9c0211e..c78496b206 100644 --- a/gtk2_ardour/route_group_dialog.cc +++ b/gtk2_ardour/route_group_dialog.cc @@ -179,7 +179,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new) add_button (Stock::NEW, RESPONSE_OK); set_default_response (RESPONSE_OK); } else { - _group->Destroyed.connect (_group_connection, invalidator (*this), boost::bind (&Dialog::response, this, RESPONSE_CANCEL), gui_context()); + _group->Destroyed.connect (_group_connection, invalidator (*this), std::bind (&Dialog::response, this, RESPONSE_CANCEL), gui_context()); } show_all_children (); diff --git a/gtk2_ardour/route_list_base.cc b/gtk2_ardour/route_list_base.cc index 2404cdc7b4..de0b35d5df 100644 --- a/gtk2_ardour/route_list_base.cc +++ b/gtk2_ardour/route_list_base.cc @@ -277,11 +277,11 @@ RouteListBase::set_session (Session* s) initial_display (); if (_session) { - _session->vca_manager ().VCAAdded.connect (_session_connections, invalidator (_scroller), boost::bind (&RouteListBase::add_masters, this, _1), gui_context ()); - _session->RouteAdded.connect (_session_connections, invalidator (_scroller), boost::bind (&RouteListBase::add_routes, this, _1), gui_context ()); - _session->SoloChanged.connect (_session_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); - _session->RecordStateChanged.connect (_session_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); - PresentationInfo::Change.connect (_session_connections, invalidator (_scroller), boost::bind (&RouteListBase::presentation_info_changed, this, _1), gui_context ()); + _session->vca_manager ().VCAAdded.connect (_session_connections, invalidator (_scroller), std::bind (&RouteListBase::add_masters, this, _1), gui_context ()); + _session->RouteAdded.connect (_session_connections, invalidator (_scroller), std::bind (&RouteListBase::add_routes, this, _1), gui_context ()); + _session->SoloChanged.connect (_session_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + _session->RecordStateChanged.connect (_session_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + PresentationInfo::Change.connect (_session_connections, invalidator (_scroller), std::bind (&RouteListBase::presentation_info_changed, this, _1), gui_context ()); } } @@ -622,39 +622,39 @@ RouteListBase::add_stripables (StripableList& slist) * UI (e.g. track-height is not of any relevant to OSC) */ - stripable->PropertyChanged.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::route_property_changed, this, _1, ws), gui_context ()); - stripable->presentation_info ().PropertyChanged.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::route_property_changed, this, _1, ws), gui_context ()); + stripable->PropertyChanged.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::route_property_changed, this, _1, ws), gui_context ()); + stripable->presentation_info ().PropertyChanged.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::route_property_changed, this, _1, ws), gui_context ()); if (std::dynamic_pointer_cast (stripable)) { std::shared_ptr t = std::dynamic_pointer_cast (stripable); - t->rec_enable_control ()->Changed.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); - t->rec_safe_control ()->Changed.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + t->rec_enable_control ()->Changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + t->rec_safe_control ()->Changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); } if (midi_trk) { - midi_trk->StepEditStatusChange.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); - midi_trk->InputActiveChanged.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::update_input_active_display, this), gui_context ()); + midi_trk->StepEditStatusChange.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + midi_trk->InputActiveChanged.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::update_input_active_display, this), gui_context ()); } std::shared_ptr ac; if ((ac = stripable->mute_control ()) != 0) { - ac->Changed.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + ac->Changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); } if ((ac = stripable->solo_control ()) != 0) { - ac->Changed.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + ac->Changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); } if ((ac = stripable->solo_isolate_control ()) != 0) { - ac->Changed.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + ac->Changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); } if ((ac = stripable->solo_safe_control ()) != 0) { - ac->Changed.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + ac->Changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); } if (route) { - route->active_changed.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::queue_idle_update, this), gui_context ()); + route->active_changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ()); } - stripable->DropReferences.connect (_stripable_connections, invalidator (_scroller), boost::bind (&RouteListBase::remove_strip, this, ws), gui_context ()); + stripable->DropReferences.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::remove_strip, this, ws), gui_context ()); } queue_idle_update (); diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc index fae1833af7..271877df14 100644 --- a/gtk2_ardour/route_params_ui.cc +++ b/gtk2_ardour/route_params_ui.cc @@ -161,8 +161,8 @@ RouteParams_UI::add_routes (RouteList const& routes) //route_select_list.rows().back().select (); - route->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&RouteParams_UI::route_property_changed, this, _1, std::weak_ptr(route)), gui_context()); - route->DropReferences.connect (*this, invalidator (*this), boost::bind (&RouteParams_UI::route_removed, this, std::weak_ptr(route)), gui_context()); + route->PropertyChanged.connect (*this, invalidator (*this), std::bind (&RouteParams_UI::route_property_changed, this, _1, std::weak_ptr(route)), gui_context()); + route->DropReferences.connect (*this, invalidator (*this), std::bind (&RouteParams_UI::route_removed, this, std::weak_ptr(route)), gui_context()); } } @@ -236,12 +236,12 @@ RouteParams_UI::setup_processor_boxes() cleanup_processor_boxes(); // construct new redirect boxes - insert_box = new ProcessorBox (_session, boost::bind (&RouteParams_UI::plugin_selector, this), _p_selection, 0); + insert_box = new ProcessorBox (_session, std::bind (&RouteParams_UI::plugin_selector, this), _p_selection, 0); insert_box->set_route (_route); std::shared_ptr at = std::dynamic_pointer_cast(_route); if (at) { - at->FreezeChange.connect (route_connections, invalidator (*this), boost::bind (&RouteParams_UI::map_frozen, this), gui_context()); + at->FreezeChange.connect (route_connections, invalidator (*this), std::bind (&RouteParams_UI::map_frozen, this), gui_context()); } redir_hpane.add (*insert_box); @@ -360,7 +360,7 @@ RouteParams_UI::set_session (Session *sess) if (_session) { std::shared_ptr r = _session->get_routes(); add_routes (*r); - _session->RouteAdded.connect (_session_connections, invalidator (*this), boost::bind (&RouteParams_UI::add_routes, this, _1), gui_context()); + _session->RouteAdded.connect (_session_connections, invalidator (*this), std::bind (&RouteParams_UI::add_routes, this, _1), gui_context()); } } @@ -412,7 +412,7 @@ RouteParams_UI::route_selected() setup_io_selector(); setup_processor_boxes(); - route->processors_changed.connect (_route_processors_connection, invalidator (*this), boost::bind (&RouteParams_UI::processors_changed, this, _1), gui_context()); + route->processors_changed.connect (_route_processors_connection, invalidator (*this), std::bind (&RouteParams_UI::processors_changed, this, _1), gui_context()); track_input_label.set_text (_route->name()); @@ -477,7 +477,7 @@ RouteParams_UI::redirect_selected (std::shared_ptr proc) SendUI *send_ui = new SendUI (this, _session, send); cleanup_view(); - send->DropReferences.connect (_processor_going_away_connection, invalidator (*this), boost::bind (&RouteParams_UI::processor_going_away, this, std::weak_ptr(proc)), gui_context()); + send->DropReferences.connect (_processor_going_away_connection, invalidator (*this), std::bind (&RouteParams_UI::processor_going_away, this, std::weak_ptr(proc)), gui_context()); _active_view = send_ui; redir_hpane.add (*_active_view); @@ -488,7 +488,7 @@ RouteParams_UI::redirect_selected (std::shared_ptr proc) ReturnUI *return_ui = new ReturnUI (this, retrn, _session); cleanup_view(); - retrn->DropReferences.connect (_processor_going_away_connection, invalidator (*this), boost::bind (&RouteParams_UI::processor_going_away, this, std::weak_ptr(proc)), gui_context()); + retrn->DropReferences.connect (_processor_going_away_connection, invalidator (*this), std::bind (&RouteParams_UI::processor_going_away, this, std::weak_ptr(proc)), gui_context()); _active_view = return_ui; redir_hpane.add (*_active_view); @@ -499,7 +499,7 @@ RouteParams_UI::redirect_selected (std::shared_ptr proc) GenericPluginUI *plugin_ui = new GenericPluginUI (plugin_insert, true); cleanup_view(); - plugin_insert->plugin()->DropReferences.connect (_processor_going_away_connection, invalidator (*this), boost::bind (&RouteParams_UI::plugin_going_away, this, PreFader), gui_context()); + plugin_insert->plugin()->DropReferences.connect (_processor_going_away_connection, invalidator (*this), std::bind (&RouteParams_UI::plugin_going_away, this, PreFader), gui_context()); plugin_ui->start_updating (0); _active_view = plugin_ui; @@ -511,7 +511,7 @@ RouteParams_UI::redirect_selected (std::shared_ptr proc) PortInsertUI *portinsert_ui = new PortInsertUI (this, _session, port_insert); cleanup_view(); - port_insert->DropReferences.connect (_processor_going_away_connection, invalidator (*this), boost::bind (&RouteParams_UI::processor_going_away, this, std::weak_ptr (proc)), gui_context()); + port_insert->DropReferences.connect (_processor_going_away_connection, invalidator (*this), std::bind (&RouteParams_UI::processor_going_away, this, std::weak_ptr (proc)), gui_context()); _active_view = portinsert_ui; redir_hpane.add (*_active_view); diff --git a/gtk2_ardour/route_processor_selection.cc b/gtk2_ardour/route_processor_selection.cc index 4db686a4f7..be059b609d 100644 --- a/gtk2_ardour/route_processor_selection.cc +++ b/gtk2_ardour/route_processor_selection.cc @@ -113,7 +113,7 @@ RouteProcessorSelection::add (AxisView* r, bool with_groups) shp.session()->selection().select_stripable_and_maybe_group (r->stripable(), SelectionAdd, with_groups); MixerStrip* ms = dynamic_cast (r); if (ms) { - ms->CatchDeletion.connect (*this, invalidator (*this), boost::bind (&RouteProcessorSelection::remove, this, _1, false), gui_context()); + ms->CatchDeletion.connect (*this, invalidator (*this), std::bind (&RouteProcessorSelection::remove, this, _1, false), gui_context()); } } } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index d10cb405ab..c787c64562 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -127,11 +127,11 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, ArdourCan number_label.set_alignment(.5, .5); number_label.set_fallthrough_to_parent (true); - sess->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::parameter_changed, this, _1), gui_context()); + sess->config.ParameterChanged.connect (*this, invalidator (*this), std::bind (&RouteTimeAxisView::parameter_changed, this, _1), gui_context()); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RouteTimeAxisView::parameter_changed)); Controllable::ControlTouched.connect ( - ctrl_touched_connection, invalidator (*this), boost::bind (&RouteTimeAxisView::show_touched_automation, this, _1), gui_context () + ctrl_touched_connection, invalidator (*this), std::bind (&RouteTimeAxisView::show_touched_automation, this, _1), gui_context () ); parameter_changed ("editor-stereo-only-meters"); @@ -225,9 +225,9 @@ RouteTimeAxisView::set_route (std::shared_ptr rt) } _route->meter_change.connect (*this, invalidator (*this), bind (&RouteTimeAxisView::meter_changed, this), gui_context()); - _route->input()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context()); - _route->output()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context()); - _route->track_number_changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::label_view, this), gui_context()); + _route->input()->changed.connect (*this, invalidator (*this), std::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context()); + _route->output()->changed.connect (*this, invalidator (*this), std::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context()); + _route->track_number_changed.connect (*this, invalidator (*this), std::bind (&RouteTimeAxisView::label_view, this), gui_context()); if (ARDOUR::Profile->get_mixbus()) { controls_table.attach (*mute_button, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); @@ -300,7 +300,7 @@ RouteTimeAxisView::set_route (std::shared_ptr rt) _y_position = -1; - _route->processors_changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::processors_changed, this, _1), gui_context()); + _route->processors_changed.connect (*this, invalidator (*this), std::bind (&RouteTimeAxisView::processors_changed, this, _1), gui_context()); if (is_track()) { @@ -309,10 +309,10 @@ RouteTimeAxisView::set_route (std::shared_ptr rt) set_layer_display (layer_display); } - track()->FreezeChange.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::map_frozen, this), gui_context()); - track()->SpeedChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::speed_changed, this), gui_context()); + track()->FreezeChange.connect (*this, invalidator (*this), std::bind (&RouteTimeAxisView::map_frozen, this), gui_context()); + track()->SpeedChanged.connect (*this, invalidator (*this), std::bind (&RouteTimeAxisView::speed_changed, this), gui_context()); - track()->ChanCountChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::chan_count_changed, this), gui_context()); + track()->ChanCountChanged.connect (*this, invalidator (*this), std::bind (&RouteTimeAxisView::chan_count_changed, this), gui_context()); /* pick up the correct freeze state */ map_frozen (); @@ -894,7 +894,7 @@ RouteTimeAxisView::build_display_menu () if (active && _route && !_route->is_singleton ()) { items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Duplicate..."), boost::bind (&ARDOUR_UI::start_duplicate_routes, ARDOUR_UI::instance()))); + items.push_back (MenuElem (_("Duplicate..."), std::bind (&ARDOUR_UI::start_duplicate_routes, ARDOUR_UI::instance()))); items.push_back (SeparatorElem()); items.push_back (MenuElem (_("Remove"), sigc::mem_fun(_editor, &PublicEditor::remove_tracks))); @@ -1102,7 +1102,7 @@ RouteTimeAxisView::set_align_choice (RadioMenuItem* mitem, AlignChoice choice, b } if (apply_to_selection) { - _editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_align_choice, _1, mitem, choice, false)); + _editor.get_selection().tracks.foreach_route_time_axis (std::bind (&RouteTimeAxisView::set_align_choice, _1, mitem, choice, false)); } else { if (track ()) { track()->set_align_choice (choice); @@ -1113,7 +1113,7 @@ RouteTimeAxisView::set_align_choice (RadioMenuItem* mitem, AlignChoice choice, b void RouteTimeAxisView::speed_changed () { - Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&RouteTimeAxisView::reset_samples_per_pixel, this)); + Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), std::bind (&RouteTimeAxisView::reset_samples_per_pixel, this)); } void @@ -1618,7 +1618,7 @@ void RouteTimeAxisView::show_all_automation (bool apply_to_selection) { if (apply_to_selection) { - _editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::show_all_automation, _1, false)); + _editor.get_selection().tracks.foreach_route_time_axis (std::bind (&RouteTimeAxisView::show_all_automation, _1, false)); } else { no_redraw = true; @@ -1648,7 +1648,7 @@ void RouteTimeAxisView::show_existing_automation (bool apply_to_selection) { if (apply_to_selection) { - _editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::show_existing_automation, _1, false)); + _editor.get_selection().tracks.foreach_route_time_axis (std::bind (&RouteTimeAxisView::show_existing_automation, _1, false)); } else { no_redraw = true; @@ -1769,7 +1769,7 @@ void RouteTimeAxisView::hide_all_automation (bool apply_to_selection) { if (apply_to_selection) { - _editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::hide_all_automation, _1, false)); + _editor.get_selection().tracks.foreach_route_time_axis (std::bind (&RouteTimeAxisView::hide_all_automation, _1, false)); } else { no_redraw = true; StripableTimeAxisView::hide_all_automation (); @@ -2179,10 +2179,10 @@ RouteTimeAxisView::processors_changed (RouteProcessorChange c) if (pi && pi->plugin ()->has_midnam ()) { midnam_connection.drop_connections (); the_instrument->DropReferences.connect (midnam_connection, invalidator (*this), - boost::bind (&RouteTimeAxisView::drop_instrument_ref, this), + std::bind (&RouteTimeAxisView::drop_instrument_ref, this), gui_context()); pi->plugin()->UpdateMidnam.connect (midnam_connection, invalidator (*this), - boost::bind (&RouteTimeAxisView::reread_midnam, this), + std::bind (&RouteTimeAxisView::reread_midnam, this), gui_context()); reread_midnam (); diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index a64f6f80f3..0ec341876e 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -249,13 +249,13 @@ RouteUI::init () UI::instance()->set_tip (monitor_disk_button, _("Monitor playback"), ""); monitor_disk_button->set_no_show_all (true); - _session->SoloChanged.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::solo_changed_so_update_mute, this), gui_context()); - _session->TransportStateChange.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::check_rec_enable_sensitivity, this), gui_context()); - _session->RecordStateChanged.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::session_rec_enable_changed, this), gui_context()); - _session->MonitorBusAddedOrRemoved.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_button, this), gui_context()); + _session->SoloChanged.connect (_session_connections, invalidator (*this), std::bind (&RouteUI::solo_changed_so_update_mute, this), gui_context()); + _session->TransportStateChange.connect (_session_connections, invalidator (*this), std::bind (&RouteUI::check_rec_enable_sensitivity, this), gui_context()); + _session->RecordStateChanged.connect (_session_connections, invalidator (*this), std::bind (&RouteUI::session_rec_enable_changed, this), gui_context()); + _session->MonitorBusAddedOrRemoved.connect (_session_connections, invalidator (*this), std::bind (&RouteUI::update_solo_button, this), gui_context()); - _session->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteUI::parameter_changed, this, _1), gui_context()); - Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteUI::parameter_changed, this, _1), gui_context()); + _session->config.ParameterChanged.connect (*this, invalidator (*this), std::bind (&RouteUI::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&RouteUI::parameter_changed, this, _1), gui_context()); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (this, &RouteUI::parameter_changed)); rec_enable_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::rec_enable_press), false); @@ -278,7 +278,7 @@ RouteUI::init () monitor_disk_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_press), false); monitor_disk_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_release), false); - BusSendDisplayChanged.connect_same_thread (*this, boost::bind(&RouteUI::bus_send_display_changed, this, _1)); + BusSendDisplayChanged.connect_same_thread (*this, std::bind(&RouteUI::bus_send_display_changed, this, _1)); } void @@ -382,45 +382,45 @@ RouteUI::set_route (std::shared_ptr rp) } if (self_destruct) { - rp->DropReferences.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::self_delete, this), gui_context()); + rp->DropReferences.connect (route_connections, invalidator (*this), std::bind (&RouteUI::self_delete, this), gui_context()); } mute_button->set_controllable (_route->mute_control()); solo_button->set_controllable (_route->solo_control()); - _route->active_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_active_changed, this), gui_context()); + _route->active_changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::route_active_changed, this), gui_context()); - _route->comment_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::comment_changed, this), gui_context()); + _route->comment_changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::comment_changed, this), gui_context()); - _route->mute_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_mute_display, this), gui_context()); - _route->solo_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); - _route->solo_safe_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); - _route->solo_isolate_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); - _route->phase_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_polarity_display, this), gui_context()); + _route->mute_control()->Changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::update_mute_display, this), gui_context()); + _route->solo_control()->Changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::update_solo_display, this), gui_context()); + _route->solo_safe_control()->Changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::update_solo_display, this), gui_context()); + _route->solo_isolate_control()->Changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::update_solo_display, this), gui_context()); + _route->phase_control()->Changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::update_polarity_display, this), gui_context()); if (is_track()) { - track()->FreezeChange.connect (*this, invalidator (*this), boost::bind (&RouteUI::map_frozen, this), gui_context()); + track()->FreezeChange.connect (*this, invalidator (*this), std::bind (&RouteUI::map_frozen, this), gui_context()); track_mode_changed(); } - _route->PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_property_changed, this, _1), gui_context()); - _route->presentation_info().PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_gui_changed, this, _1), gui_context ()); + _route->PropertyChanged.connect (route_connections, invalidator (*this), std::bind (&RouteUI::route_property_changed, this, _1), gui_context()); + _route->presentation_info().PropertyChanged.connect (route_connections, invalidator (*this), std::bind (&RouteUI::route_gui_changed, this, _1), gui_context ()); - _route->polarity()->ConfigurationChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::setup_invert_buttons, this), gui_context()); + _route->polarity()->ConfigurationChanged.connect (route_connections, invalidator (*this), std::bind (&RouteUI::setup_invert_buttons, this), gui_context()); if (_session->writable() && is_track()) { std::shared_ptr t = std::dynamic_pointer_cast(_route); - t->rec_enable_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_rec_enable_changed, this), gui_context()); - t->rec_safe_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_rec_enable_changed, this), gui_context()); + t->rec_enable_control()->Changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::route_rec_enable_changed, this), gui_context()); + t->rec_safe_control()->Changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::route_rec_enable_changed, this), gui_context()); rec_enable_button->show(); rec_enable_button->set_controllable (t->rec_enable_control()); if (is_midi_track()) { midi_track()->StepEditStatusChange.connect (route_connections, invalidator (*this), - boost::bind (&RouteUI::step_edit_changed, this, _1), gui_context()); + std::bind (&RouteUI::step_edit_changed, this, _1), gui_context()); } } @@ -431,13 +431,13 @@ RouteUI::set_route (std::shared_ptr rp) if (is_track()) { std::shared_ptr t = std::dynamic_pointer_cast(_route); - t->monitoring_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_monitoring_display, this), gui_context()); + t->monitoring_control()->Changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::update_monitoring_display, this), gui_context()); update_monitoring_display (); } if (_route->triggerbox ()) { - _route->triggerbox ()->EmptyStatusChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_monitoring_display, this), gui_context()); + _route->triggerbox ()->EmptyStatusChanged.connect (route_connections, invalidator (*this), std::bind (&RouteUI::update_monitoring_display, this), gui_context()); } mute_button->set_can_focus (false); @@ -1483,7 +1483,7 @@ RouteUI::build_mute_menu(void) items.push_back (CheckMenuElem(*surround_mute_check)); surround_mute_check->show_all(); - _route->mute_points_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::muting_change, this), gui_context()); + _route->mute_points_changed.connect (route_connections, invalidator (*this), std::bind (&RouteUI::muting_change, this), gui_context()); } void @@ -1812,7 +1812,7 @@ RouteUI::setup_comment_editor () bo->tip_widget ().show_all (); bo->parameter_changed ("show-master-bus-comment-on-load"); vbox->signal_unrealize().connect ([bo]() { delete bo; }); - _session->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&BoolOption::parameter_changed, bo, _1), gui_context()); + _session->config.ParameterChanged.connect (*this, invalidator (*this), std::bind (&BoolOption::parameter_changed, bo, _1), gui_context()); } _comment_window->add (*vbox); } @@ -1844,7 +1844,7 @@ void RouteUI::set_route_active (bool a, bool apply_to_selection) { if (apply_to_selection) { - ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (boost::bind (&RouteUI::set_route_active, _1, a, false)); + ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (std::bind (&RouteUI::set_route_active, _1, a, false)); } else if (!is_singleton () #ifdef MIXBUS && !_route->mixbus() @@ -2099,9 +2099,9 @@ RouteUI::setup_invert_buttons () std::shared_ptr ac = send->polarity_control (); if (ac) { N = 1; - ac->Changed.connect (send_connections, invalidator (*this), boost::bind (&RouteUI::update_polarity_display, this), gui_context()); + ac->Changed.connect (send_connections, invalidator (*this), std::bind (&RouteUI::update_polarity_display, this), gui_context()); if (ac->alist ()) { - ac->alist()->automation_state_changed.connect (send_connections, invalidator (*this), boost::bind (&RouteUI::update_phase_invert_sensitivty, this), gui_context()); + ac->alist()->automation_state_changed.connect (send_connections, invalidator (*this), std::bind (&RouteUI::update_phase_invert_sensitivty, this), gui_context()); update_phase_invert_sensitivty (); } } else { @@ -2403,7 +2403,7 @@ RoutePinWindowProxy::RoutePinWindowProxy(std::string const &name, std::shared_pt : WM::ProxyBase (name, string()) , _route (std::weak_ptr (route)) { - route->DropReferences.connect (going_away_connection, MISSING_INVALIDATOR, boost::bind (&RoutePinWindowProxy::route_going_away, this), gui_context()); + route->DropReferences.connect (going_away_connection, MISSING_INVALIDATOR, std::bind (&RoutePinWindowProxy::route_going_away, this), gui_context()); } RoutePinWindowProxy::~RoutePinWindowProxy() @@ -2885,7 +2885,7 @@ RouteUI::set_time_domain (Temporal::TimeDomain td, bool apply_to_selection) { if (apply_to_selection) { std::cerr << "change route TD to " << td << std::endl; - ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (boost::bind (&RouteUI::set_time_domain, _1, td, false)); + ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (std::bind (&RouteUI::set_time_domain, _1, td, false)); } else { route()->set_time_domain (td); } @@ -2896,7 +2896,7 @@ void RouteUI::clear_time_domain (bool apply_to_selection) { if (apply_to_selection) { - ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (boost::bind (&RouteUI::clear_time_domain, _1, false)); + ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (std::bind (&RouteUI::clear_time_domain, _1, false)); } else { route()->clear_time_domain (); } diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index baccc2473b..0f63147e96 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -74,13 +74,13 @@ Selection::Selection (const EditingContext* e, bool mls) /* we have disambiguate which remove() for the compiler */ void (Selection::*marker_remove)(ArdourMarker*) = &Selection::remove; - ArdourMarker::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (marker_remove, this, _1), gui_context()); + ArdourMarker::CatchDeletion.connect (*this, MISSING_INVALIDATOR, std::bind (marker_remove, this, _1), gui_context()); void (Selection::*point_remove)(ControlPoint*) = &Selection::remove; - ControlPoint::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (point_remove, this, _1), gui_context()); + ControlPoint::CatchDeletion.connect (*this, MISSING_INVALIDATOR, std::bind (point_remove, this, _1), gui_context()); void (Selection::*rv_remove)(RegionView*) = &Selection::remove; - RegionView::RegionViewGoingAway.connect (*this, MISSING_INVALIDATOR, boost::bind (rv_remove, this, _1), gui_context()); + RegionView::RegionViewGoingAway.connect (*this, MISSING_INVALIDATOR, std::bind (rv_remove, this, _1), gui_context()); } #if 0 diff --git a/gtk2_ardour/selection_properties_box.cc b/gtk2_ardour/selection_properties_box.cc index 4ea6f98290..4dde6d43a8 100644 --- a/gtk2_ardour/selection_properties_box.cc +++ b/gtk2_ardour/selection_properties_box.cc @@ -106,7 +106,7 @@ SelectionPropertiesBox::SelectionPropertiesBox () Editor::instance().get_selection().TriggersChanged.connect (sigc::mem_fun (*this, &SelectionPropertiesBox::selection_changed)); /* maybe we care about mouse mode?? */ - Editor::instance().MouseModeChanged.connect (editor_connections, invalidator(*this), boost::bind (&SelectionPropertiesBox::track_mouse_mode, this), gui_context()); + Editor::instance().MouseModeChanged.connect (editor_connections, invalidator(*this), std::bind (&SelectionPropertiesBox::track_mouse_mode, this), gui_context()); selection_changed(); } diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc index 7448188179..67a19c4eb6 100644 --- a/gtk2_ardour/send_ui.cc +++ b/gtk2_ardour/send_ui.cc @@ -55,7 +55,7 @@ SendUI::SendUI (Gtk::Window* parent, Session* session, std::shared_ptr s) _panners.set_panner (s->panner_shell (), s->panner ()); _send->set_metering (true); - _send->output ()->changed.connect (_send_connection, invalidator (*this), boost::bind (&SendUI::outs_changed, this, _1, _2), gui_context ()); + _send->output ()->changed.connect (_send_connection, invalidator (*this), std::bind (&SendUI::outs_changed, this, _1, _2), gui_context ()); _gpm.setup_meters (); _gpm.set_fader_name (X_("SendUIFader")); diff --git a/gtk2_ardour/session_import_dialog.cc b/gtk2_ardour/session_import_dialog.cc index ce532d5885..9d326b7f4c 100644 --- a/gtk2_ardour/session_import_dialog.cc +++ b/gtk2_ardour/session_import_dialog.cc @@ -105,8 +105,8 @@ SessionImportDialog::SessionImportDialog (ARDOUR::Session* target) : ok_button->signal_clicked().connect (sigc::mem_fun (*this, &SessionImportDialog::do_merge)); // prompt signals XXX: problem - handlers to be in the same thread since they return values - ElementImporter::Rename.connect_same_thread (connections, boost::bind (&SessionImportDialog::open_rename_dialog, this, _1, _2)); - ElementImporter::Prompt.connect_same_thread (connections, boost::bind (&SessionImportDialog::open_prompt_dialog, this, _1)); + ElementImporter::Rename.connect_same_thread (connections, std::bind (&SessionImportDialog::open_rename_dialog, this, _1, _2)); + ElementImporter::Prompt.connect_same_thread (connections, std::bind (&SessionImportDialog::open_prompt_dialog, this, _1)); // Finalize show_all(); diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc index a4e86305c6..44ecbfbe71 100644 --- a/gtk2_ardour/sfdb_freesound_mootcher.cc +++ b/gtk2_ardour/sfdb_freesound_mootcher.cc @@ -587,8 +587,8 @@ Mootcher::fetchAudioFile(std::string originalFileName, std::string theID, std::s sfb = caller; - Progress.connect(*this, invalidator (*this), boost::bind(&Mootcher::updateProgress, this, _1, _2), gui_context()); - Finished.connect(*this, invalidator (*this), boost::bind(&Mootcher::doneWithMootcher, this), gui_context()); + Progress.connect(*this, invalidator (*this), std::bind(&Mootcher::updateProgress, this, _1, _2), gui_context()); + Finished.connect(*this, invalidator (*this), std::bind(&Mootcher::doneWithMootcher, this), gui_context()); pthread_t freesound_download_thread; pthread_create_and_store("freesound_import", &freesound_download_thread, freesound_download_thread_func, this); diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 2cc2dd68cb..c2db051402 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -289,8 +289,8 @@ SoundFileBox::set_session(Session* s) } else { auditioner_connections.drop_connections(); if (_session->the_auditioner()) { - _session->AuditionActive.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_active, this, _1), gui_context()); - _session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_progress, this, _1, _2), gui_context()); + _session->AuditionActive.connect(auditioner_connections, invalidator (*this), std::bind (&SoundFileBox::audition_active, this, _1), gui_context()); + _session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), std::bind (&SoundFileBox::audition_progress, this, _1, _2), gui_context()); } } } diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc index 9a45ad44e0..049bbd344d 100644 --- a/gtk2_ardour/shuttle_control.cc +++ b/gtk2_ardour/shuttle_control.cc @@ -79,7 +79,7 @@ ShuttleInfoButton::ShuttleInfoButton () set_elements (ArdourButton::Text); parameter_changed ("shuttle-units"); - Config->ParameterChanged.connect (parameter_connection, MISSING_INVALIDATOR, boost::bind (&ShuttleInfoButton::parameter_changed, this, _1), gui_context ()); + Config->ParameterChanged.connect (parameter_connection, MISSING_INVALIDATOR, std::bind (&ShuttleInfoButton::parameter_changed, this, _1), gui_context ()); add_events (Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK); } @@ -187,8 +187,8 @@ ShuttleControl::ShuttleControl () shuttle_max_speed = 1.5f; } - Config->ParameterChanged.connect (parameter_connection, MISSING_INVALIDATOR, boost::bind (&ShuttleControl::parameter_changed, this, _1), gui_context ()); - Port::ResamplerQualityChanged.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&ShuttleControl::parameter_changed, this, "external-sync"), gui_context ()); + Config->ParameterChanged.connect (parameter_connection, MISSING_INVALIDATOR, std::bind (&ShuttleControl::parameter_changed, this, _1), gui_context ()); + Port::ResamplerQualityChanged.connect (port_connection, MISSING_INVALIDATOR, std::bind (&ShuttleControl::parameter_changed, this, "external-sync"), gui_context ()); UIConfiguration::instance ().ColorsChanged.connect (sigc::mem_fun (*this, &ShuttleControl::set_colors)); Timers::blink_connect (sigc::mem_fun (*this, &ShuttleControl::do_blink)); @@ -277,7 +277,7 @@ ShuttleControl::set_session (Session* s) if (_session) { _session->add_controllable (_controllable); _info_button.set_session (s); - _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ShuttleControl::parameter_changed, this, _1), gui_context()); + _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ShuttleControl::parameter_changed, this, _1), gui_context()); /* set sensitivity */ parameter_changed ("external-sync"); } else { diff --git a/gtk2_ardour/source_list_base.cc b/gtk2_ardour/source_list_base.cc index 3b430dc2e0..15333163b6 100644 --- a/gtk2_ardour/source_list_base.cc +++ b/gtk2_ardour/source_list_base.cc @@ -35,7 +35,7 @@ SourceListBase::set_session (ARDOUR::Session* s) { RegionListBase::set_session (s); if (s) { - s->SourceRemoved.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&SourceListBase::remove_weak_source, this, _1), gui_context ()); + s->SourceRemoved.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&SourceListBase::remove_weak_source, this, _1), gui_context ()); } } diff --git a/gtk2_ardour/speaker_dialog.cc b/gtk2_ardour/speaker_dialog.cc index 2b3e1b3fe3..1b7617a7b4 100644 --- a/gtk2_ardour/speaker_dialog.cc +++ b/gtk2_ardour/speaker_dialog.cc @@ -521,7 +521,7 @@ SpeakerDialog::set_selected (int i) azimuth_adjustment.set_value (speakers->speakers()[selected_index].angles().azi); speakers->speakers()[selected_index].PositionChanged.connect ( selected_speaker_connection, MISSING_INVALIDATOR, - boost::bind (&SpeakerDialog::speaker_position_changed, this), + std::bind (&SpeakerDialog::speaker_position_changed, this), gui_context () ); } diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc index 8ffa83f0d1..c0b74a5a37 100644 --- a/gtk2_ardour/splash.cc +++ b/gtk2_ardour/splash.cc @@ -122,7 +122,7 @@ Splash::Splash () expose_is_the_one = false; if (!ARDOUR_COMMAND_LINE::no_splash) { - ARDOUR::BootMessage.connect (msg_connection, invalidator (*this), boost::bind (&Splash::boot_message, this, _1), gui_context()); + ARDOUR::BootMessage.connect (msg_connection, invalidator (*this), std::bind (&Splash::boot_message, this, _1), gui_context()); present (); } } diff --git a/gtk2_ardour/step_editor.cc b/gtk2_ardour/step_editor.cc index aeca9ca91c..97f2cee1cc 100644 --- a/gtk2_ardour/step_editor.cc +++ b/gtk2_ardour/step_editor.cc @@ -48,7 +48,7 @@ StepEditor::StepEditor (PublicEditor& e, std::shared_ptr t, MidiTimeA step_edit_region_view = 0; _track->PlaylistChanged.connect (*this, invalidator (*this), - boost::bind (&StepEditor::playlist_changed, this), + std::bind (&StepEditor::playlist_changed, this), gui_context()); playlist_changed (); } @@ -433,7 +433,7 @@ StepEditor::playlist_changed () { step_edit_region_connection.disconnect (); _track->playlist()->RegionRemoved.connect (step_edit_region_connection, invalidator (*this), - boost::bind (&StepEditor::region_removed, this, _1), + std::bind (&StepEditor::region_removed, this, _1), gui_context()); } diff --git a/gtk2_ardour/stereo_panner.cc b/gtk2_ardour/stereo_panner.cc index e63518dc1a..0942e5e7a9 100644 --- a/gtk2_ardour/stereo_panner.cc +++ b/gtk2_ardour/stereo_panner.cc @@ -97,11 +97,11 @@ StereoPanner::StereoPanner (std::shared_ptr p) have_font = true; } - position_control->Changed.connect (panvalue_connections, invalidator(*this), boost::bind (&StereoPanner::value_change, this), gui_context()); - width_control->Changed.connect (panvalue_connections, invalidator(*this), boost::bind (&StereoPanner::value_change, this), gui_context()); + position_control->Changed.connect (panvalue_connections, invalidator(*this), std::bind (&StereoPanner::value_change, this), gui_context()); + width_control->Changed.connect (panvalue_connections, invalidator(*this), std::bind (&StereoPanner::value_change, this), gui_context()); - _panner_shell->Changed.connect (panshell_connections, invalidator (*this), boost::bind (&StereoPanner::bypass_handler, this), gui_context()); - _panner_shell->PannableChanged.connect (panshell_connections, invalidator (*this), boost::bind (&StereoPanner::pannable_handler, this), gui_context()); + _panner_shell->Changed.connect (panshell_connections, invalidator (*this), std::bind (&StereoPanner::bypass_handler, this), gui_context()); + _panner_shell->PannableChanged.connect (panshell_connections, invalidator (*this), std::bind (&StereoPanner::pannable_handler, this), gui_context()); UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &StereoPanner::color_handler)); @@ -724,8 +724,8 @@ StereoPanner::pannable_handler () position_binder.set_controllable(position_control); width_binder.set_controllable(width_control); - position_control->Changed.connect (panvalue_connections, invalidator(*this), boost::bind (&StereoPanner::value_change, this), gui_context()); - width_control->Changed.connect (panvalue_connections, invalidator(*this), boost::bind (&StereoPanner::value_change, this), gui_context()); + position_control->Changed.connect (panvalue_connections, invalidator(*this), std::bind (&StereoPanner::value_change, this), gui_context()); + width_control->Changed.connect (panvalue_connections, invalidator(*this), std::bind (&StereoPanner::value_change, this), gui_context()); queue_draw (); } diff --git a/gtk2_ardour/stereo_panner_editor.cc b/gtk2_ardour/stereo_panner_editor.cc index 4132ed82cf..93606f107c 100644 --- a/gtk2_ardour/stereo_panner_editor.cc +++ b/gtk2_ardour/stereo_panner_editor.cc @@ -61,14 +61,14 @@ StereoPannerEditor::StereoPannerEditor (StereoPanner* p) set_width_range (); _panner->get_position_controllable()->Changed.connect ( - _connections, invalidator (*this), boost::bind (&StereoPannerEditor::update_editor, this), gui_context () + _connections, invalidator (*this), std::bind (&StereoPannerEditor::update_editor, this), gui_context () ); _panner->get_width_controllable()->Changed.connect ( - _connections, invalidator (*this), boost::bind (&StereoPannerEditor::update_editor, this), gui_context () + _connections, invalidator (*this), std::bind (&StereoPannerEditor::update_editor, this), gui_context () ); - _panner->DropReferences.connect (_connections, invalidator (*this), boost::bind (&StereoPannerEditor::panner_going_away, this), gui_context ()); + _panner->DropReferences.connect (_connections, invalidator (*this), std::bind (&StereoPannerEditor::panner_going_away, this), gui_context ()); _position.signal_value_changed().connect (sigc::mem_fun (*this, &StereoPannerEditor::position_changed)); _width.signal_value_changed().connect (sigc::mem_fun (*this, &StereoPannerEditor::width_changed)); diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 13a1806a92..47ba1c51e0 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -83,11 +83,11 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Container* canvas_g canvas_rect->Event.connect (sigc::bind (sigc::mem_fun (_trackview.editor(), &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview)); if (_trackview.is_track()) { - _trackview.track()->rec_enable_control()->Changed.connect (*this, invalidator (*this), boost::bind (&StreamView::rec_enable_changed, this), gui_context()); + _trackview.track()->rec_enable_control()->Changed.connect (*this, invalidator (*this), std::bind (&StreamView::rec_enable_changed, this), gui_context()); - _trackview.session()->TransportStateChange.connect (*this, invalidator (*this), boost::bind (&StreamView::transport_changed, this), gui_context()); - _trackview.session()->TransportLooped.connect (*this, invalidator (*this), boost::bind (&StreamView::transport_looped, this), gui_context()); - _trackview.session()->RecordStateChanged.connect (*this, invalidator (*this), boost::bind (&StreamView::sess_rec_enable_changed, this), gui_context()); + _trackview.session()->TransportStateChange.connect (*this, invalidator (*this), std::bind (&StreamView::transport_changed, this), gui_context()); + _trackview.session()->TransportLooped.connect (*this, invalidator (*this), std::bind (&StreamView::transport_looped, this), gui_context()); + _trackview.session()->RecordStateChanged.connect (*this, invalidator (*this), std::bind (&StreamView::sess_rec_enable_changed, this), gui_context()); } UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &StreamView::color_handler)); @@ -238,7 +238,7 @@ StreamView::display_track (std::shared_ptr tr) { playlist_switched_connection.disconnect(); playlist_switched (tr); - tr->PlaylistChanged.connect (playlist_switched_connection, invalidator (*this), boost::bind (&StreamView::playlist_switched, this, std::weak_ptr (tr)), gui_context()); + tr->PlaylistChanged.connect (playlist_switched_connection, invalidator (*this), std::bind (&StreamView::playlist_switched, this, std::weak_ptr (tr)), gui_context()); } void @@ -345,10 +345,10 @@ StreamView::playlist_switched (std::weak_ptr wtr) /* catch changes */ - tr->playlist()->LayeringChanged.connect (playlist_connections, invalidator (*this), boost::bind (&StreamView::playlist_layered, this, std::weak_ptr (tr)), gui_context()); - tr->playlist()->RegionAdded.connect (playlist_connections, invalidator (*this), boost::bind (&StreamView::add_region_view, this, _1), gui_context()); - tr->playlist()->RegionRemoved.connect (playlist_connections, invalidator (*this), boost::bind (&StreamView::remove_region_view, this, _1), gui_context()); - tr->playlist()->ContentsChanged.connect (playlist_connections, invalidator (*this), boost::bind (&StreamView::update_coverage_frame, this), gui_context()); + tr->playlist()->LayeringChanged.connect (playlist_connections, invalidator (*this), std::bind (&StreamView::playlist_layered, this, std::weak_ptr (tr)), gui_context()); + tr->playlist()->RegionAdded.connect (playlist_connections, invalidator (*this), std::bind (&StreamView::add_region_view, this, _1), gui_context()); + tr->playlist()->RegionRemoved.connect (playlist_connections, invalidator (*this), std::bind (&StreamView::remove_region_view, this, _1), gui_context()); + tr->playlist()->ContentsChanged.connect (playlist_connections, invalidator (*this), std::bind (&StreamView::update_coverage_frame, this), gui_context()); } void @@ -409,7 +409,7 @@ StreamView::transport_looped() { // to force a new rec region rec_active = false; - Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&StreamView::setup_rec_box, this)); + Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), std::bind (&StreamView::setup_rec_box, this)); } void diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc index c097839b84..a586c0ee42 100644 --- a/gtk2_ardour/strip_silence_dialog.cc +++ b/gtk2_ardour/strip_silence_dialog.cc @@ -130,7 +130,7 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list const & v) progress_idle_connection = Glib::signal_idle().connect (sigc::mem_fun (*this, &StripSilenceDialog::idle_update_progress)); /* Create a thread which runs while the dialogue is open to compute the silence regions */ - Completed.connect (_completed_connection, invalidator(*this), boost::bind (&StripSilenceDialog::update, this), gui_context ()); + Completed.connect (_completed_connection, invalidator(*this), std::bind (&StripSilenceDialog::update, this), gui_context ()); _thread_should_finish = false; pthread_create_and_store ("SilenceDetect", &_thread, StripSilenceDialog::_detection_thread_work, this, 0); diff --git a/gtk2_ardour/surround_strip.cc b/gtk2_ardour/surround_strip.cc index 356a08015e..efffa7a27e 100644 --- a/gtk2_ardour/surround_strip.cc +++ b/gtk2_ardour/surround_strip.cc @@ -237,7 +237,7 @@ SurroundStrip::init () UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &SurroundStrip::parameter_changed)); - //PresentationInfo::Change.connect (*this, invalidator (*this), boost::bind (&SurroundStrip::presentation_info_changed, this, _1), gui_context ()); + //PresentationInfo::Change.connect (*this, invalidator (*this), std::bind (&SurroundStrip::presentation_info_changed, this, _1), gui_context ()); } void @@ -307,9 +307,9 @@ SurroundStrip::set_route (std::shared_ptr r) /* set up metering */ _route->set_meter_type (MeterPeak0dB); - _route->comment_changed.connect (route_connections, invalidator (*this), boost::bind (&SurroundStrip::setup_comment_button, this), gui_context ()); + _route->comment_changed.connect (route_connections, invalidator (*this), std::bind (&SurroundStrip::setup_comment_button, this), gui_context ()); - _route->gain_control ()->MasterStatusChange.connect (route_connections, invalidator (*this), boost::bind (&SurroundStrip::update_spacers, this), gui_context()); + _route->gain_control ()->MasterStatusChange.connect (route_connections, invalidator (*this), std::bind (&SurroundStrip::update_spacers, this), gui_context()); /* now force an update of all the various elements */ name_changed (); diff --git a/gtk2_ardour/template_dialog.cc b/gtk2_ardour/template_dialog.cc index dac3f59f5b..0548f05bc3 100644 --- a/gtk2_ardour/template_dialog.cc +++ b/gtk2_ardour/template_dialog.cc @@ -208,8 +208,8 @@ TemplateDialog::TemplateDialog () session_tm->init (); route_tm->init (); - session_tm->TemplatesImported.connect (*this, invalidator (*this), boost::bind (&RouteTemplateManager::init, route_tm), gui_context ()); - route_tm->TemplatesImported.connect (*this, invalidator (*this), boost::bind (&SessionTemplateManager::init, session_tm), gui_context ()); + session_tm->TemplatesImported.connect (*this, invalidator (*this), std::bind (&RouteTemplateManager::init, route_tm), gui_context ()); + route_tm->TemplatesImported.connect (*this, invalidator (*this), std::bind (&SessionTemplateManager::init, session_tm), gui_context ()); signal_hide().connect (sigc::mem_fun (session_tm, &TemplateManager::handle_dirty_description)); signal_hide().connect (sigc::mem_fun (route_tm, &TemplateManager::handle_dirty_description)); diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc index bf5413586c..79b3d03fc0 100644 --- a/gtk2_ardour/tempo_dialog.cc +++ b/gtk2_ardour/tempo_dialog.cc @@ -289,14 +289,14 @@ TempoDialog::init (const Temporal::BBT_Time& when, double bpm, double end_bpm, d _midi_port_combo.set_model (_midi_port_list); _midi_port_combo.pack_start (_midi_port_cols.pretty_name); - AudioEngine::instance ()->PortRegisteredOrUnregistered.connect (_manager_connection, invalidator (*this), boost::bind (&TempoDialog::ports_changed, this), gui_context ()); + AudioEngine::instance ()->PortRegisteredOrUnregistered.connect (_manager_connection, invalidator (*this), std::bind (&TempoDialog::ports_changed, this), gui_context ()); std::shared_ptr port = AudioEngine::instance ()->register_input_port (DataType::MIDI, "Tap Tempo", false, PortFlags (IsInput | Hidden | IsTerminal)); _midi_tap_port = std::dynamic_pointer_cast (port); assert (_midi_tap_port); _midi_tap_parser = std::shared_ptr (new MIDI::Parser); - _midi_tap_parser->any.connect_same_thread (_parser_connection, boost::bind (&TempoDialog::midi_event, this, _2, _3, _4)); + _midi_tap_parser->any.connect_same_thread (_parser_connection, std::bind (&TempoDialog::midi_event, this, _2, _3, _4)); _midi_tap_port->set_trace (_midi_tap_parser); - _midi_tap_signal.connect (_xthread_connection, invalidator (*this), boost::bind (&TempoDialog::tap_tempo, this, _1), gui_context ()); + _midi_tap_signal.connect (_xthread_connection, invalidator (*this), std::bind (&TempoDialog::tap_tempo, this, _1), gui_context ()); /* init state */ tempo_type_change (); diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 359b631c0e..e6c6f4c6a5 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -633,7 +633,7 @@ void TimeAxisView::set_height_enum (Height h, bool apply_to_selection) { if (apply_to_selection) { - _editor.get_selection().tracks.foreach_time_axis (boost::bind (&TimeAxisView::set_height_enum, _1, h, false)); + _editor.get_selection().tracks.foreach_time_axis (std::bind (&TimeAxisView::set_height_enum, _1, h, false)); } else { set_height (preset_height (h)); } diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 8e50350ae7..d8ed73e61f 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -257,7 +257,7 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co //set_position (start, this); group->Event.connect (sigc::mem_fun (*this, &TimeAxisViewItem::canvas_group_event)); - //Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&TimeAxisViewItem::parameter_changed, this, _1), gui_context ()); + //Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&TimeAxisViewItem::parameter_changed, this, _1), gui_context ()); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &TimeAxisViewItem::parameter_changed)); } diff --git a/gtk2_ardour/time_info_box.cc b/gtk2_ardour/time_info_box.cc index 86d89371c3..beba8bf9bd 100644 --- a/gtk2_ardour/time_info_box.cc +++ b/gtk2_ardour/time_info_box.cc @@ -138,7 +138,7 @@ TimeInfoBox::TimeInfoBox (std::string state_node_name, bool with_punch) Editor::instance().get_selection().TimeChanged.connect (sigc::mem_fun (*this, &TimeInfoBox::selection_changed)); Editor::instance().get_selection().RegionsChanged.connect (sigc::mem_fun (*this, &TimeInfoBox::selection_changed)); - Editor::instance().MouseModeChanged.connect (editor_connections, invalidator(*this), boost::bind (&TimeInfoBox::track_mouse_mode, this), gui_context()); + Editor::instance().MouseModeChanged.connect (editor_connections, invalidator(*this), std::bind (&TimeInfoBox::track_mouse_mode, this), gui_context()); } TimeInfoBox::~TimeInfoBox () @@ -227,7 +227,7 @@ TimeInfoBox::set_session (Session* s) punch_changed (punch); _session->auto_punch_location_changed.connect (_session_connections, MISSING_INVALIDATOR, - boost::bind (&TimeInfoBox::punch_location_changed, this, _1), gui_context()); + std::bind (&TimeInfoBox::punch_location_changed, this, _1), gui_context()); } } @@ -305,7 +305,7 @@ TimeInfoBox::selection_changed () } for (PlaylistSet::iterator ps = playlists.begin(); ps != playlists.end(); ++ps) { (*ps)->ContentsChanged.connect (region_property_connections, invalidator (*this), - boost::bind (&TimeInfoBox::region_selection_changed, this), gui_context()); + std::bind (&TimeInfoBox::region_selection_changed, this), gui_context()); } region_selection_changed (); } @@ -366,8 +366,8 @@ TimeInfoBox::watch_punch (Location* punch) assert (with_punch_clock); punch_connections.drop_connections (); - punch->start_changed.connect (punch_connections, MISSING_INVALIDATOR, boost::bind (&TimeInfoBox::punch_changed, this, _1), gui_context()); - punch->end_changed.connect (punch_connections, MISSING_INVALIDATOR, boost::bind (&TimeInfoBox::punch_changed, this, _1), gui_context()); + punch->start_changed.connect (punch_connections, MISSING_INVALIDATOR, std::bind (&TimeInfoBox::punch_changed, this, _1), gui_context()); + punch->end_changed.connect (punch_connections, MISSING_INVALIDATOR, std::bind (&TimeInfoBox::punch_changed, this, _1), gui_context()); punch_changed (punch); } diff --git a/gtk2_ardour/track_record_axis.cc b/gtk2_ardour/track_record_axis.cc index b65aee0c0e..505640cc55 100644 --- a/gtk2_ardour/track_record_axis.cc +++ b/gtk2_ardour/track_record_axis.cc @@ -108,7 +108,7 @@ TrackRecordAxis::TrackRecordAxis (Session* s, std::shared_ptr rt) Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&TrackRecordAxis::parameter_changed, this, _1), gui_context ()); s->config.ParameterChanged.connect (*this, invalidator (*this), ui_bind (&TrackRecordAxis::parameter_changed, this, _1), gui_context ()); - PublicEditor::instance().playhead_cursor()->PositionChanged.connect (*this, invalidator (*this), boost::bind (&TrackSummary::playhead_position_changed, &_track_summary, _1), gui_context()); + PublicEditor::instance().playhead_cursor()->PositionChanged.connect (*this, invalidator (*this), std::bind (&TrackSummary::playhead_position_changed, &_track_summary, _1), gui_context()); ResetAllPeakDisplays.connect (sigc::mem_fun (*this, &TrackRecordAxis::reset_peak_display)); ResetRoutePeakDisplays.connect (sigc::mem_fun (*this, &TrackRecordAxis::reset_route_peak_display)); @@ -671,14 +671,14 @@ TrackRecordAxis::TrackSummary::TrackSummary (std::shared_ptr r) _track = std::dynamic_pointer_cast (r); assert (_track); - _track->PlaylistChanged.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::playlist_changed, this), gui_context ()); - _track->playlist()->ContentsChanged.connect (_playlist_connections, invalidator (*this), boost::bind (&TrackSummary::playlist_contents_changed, this), gui_context ()); - _track->presentation_info().PropertyChanged.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::property_changed, this, _1), gui_context ()); + _track->PlaylistChanged.connect (_connections, invalidator (*this), std::bind (&TrackSummary::playlist_changed, this), gui_context ()); + _track->playlist()->ContentsChanged.connect (_playlist_connections, invalidator (*this), std::bind (&TrackSummary::playlist_contents_changed, this), gui_context ()); + _track->presentation_info().PropertyChanged.connect (_connections, invalidator (*this), std::bind (&TrackSummary::property_changed, this, _1), gui_context ()); - _track->rec_enable_control()->Changed.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context()); - _track->session().TransportStateChange.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context()); - _track->session().TransportLooped.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context()); - _track->session().RecordStateChanged.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context()); + _track->rec_enable_control()->Changed.connect (_connections, invalidator (*this), std::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context()); + _track->session().TransportStateChange.connect (_connections, invalidator (*this), std::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context()); + _track->session().TransportLooped.connect (_connections, invalidator (*this), std::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context()); + _track->session().RecordStateChanged.connect (_connections, invalidator (*this), std::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context()); } @@ -833,7 +833,7 @@ void TrackRecordAxis::TrackSummary::playlist_changed () { _playlist_connections.disconnect (); - _track->playlist()->ContentsChanged.connect (_playlist_connections, invalidator (*this), boost::bind (&TrackSummary::playlist_contents_changed, this), gui_context ()); + _track->playlist()->ContentsChanged.connect (_playlist_connections, invalidator (*this), std::bind (&TrackSummary::playlist_contents_changed, this), gui_context ()); set_dirty (); } diff --git a/gtk2_ardour/transcode_ffmpeg.cc b/gtk2_ardour/transcode_ffmpeg.cc index e5db3127e9..9a324a96a0 100644 --- a/gtk2_ardour/transcode_ffmpeg.cc +++ b/gtk2_ardour/transcode_ffmpeg.cc @@ -91,8 +91,8 @@ TranscodeFfmpeg::probe () argp[5] = strdup (infile.c_str ()); argp[6] = 0; ffcmd = new ARDOUR::SystemExec (ffprobe_exe, argp, true); - ffcmd->ReadStdout.connect_same_thread (*this, boost::bind (&TranscodeFfmpeg::ffprobeparse, this, _1, _2)); - ffcmd->Terminated.connect (*this, invalidator (*this), boost::bind (&TranscodeFfmpeg::ffexit, this), gui_context ()); + ffcmd->ReadStdout.connect_same_thread (*this, std::bind (&TranscodeFfmpeg::ffprobeparse, this, _1, _2)); + ffcmd->Terminated.connect (*this, invalidator (*this), std::bind (&TranscodeFfmpeg::ffexit, this), gui_context ()); if (ffcmd->start (SystemExec::IgnoreAndClose)) { ffexit (); return false; @@ -406,8 +406,8 @@ TranscodeFfmpeg::encode (std::string outfile, std::string inf_a, std::string inf } ffcmd = new ARDOUR::SystemExec (ffmpeg_exe, argp, true); - ffcmd->ReadStdout.connect_same_thread (*this, boost::bind (&TranscodeFfmpeg::ffmpegparse_v, this, _1, _2)); - ffcmd->Terminated.connect (*this, invalidator (*this), boost::bind (&TranscodeFfmpeg::ffexit, this), gui_context ()); + ffcmd->ReadStdout.connect_same_thread (*this, std::bind (&TranscodeFfmpeg::ffmpegparse_v, this, _1, _2)); + ffcmd->Terminated.connect (*this, invalidator (*this), std::bind (&TranscodeFfmpeg::ffexit, this), gui_context ()); if (ffcmd->start (SystemExec::MergeWithStdin)) { ffexit (); @@ -461,8 +461,8 @@ TranscodeFfmpeg::extract_audio (std::string outfile, ARDOUR::samplecnt_t /*sampl } ffcmd = new ARDOUR::SystemExec (ffmpeg_exe, argp, true); - ffcmd->ReadStdout.connect_same_thread (*this, boost::bind (&TranscodeFfmpeg::ffmpegparse_a, this, _1, _2)); - ffcmd->Terminated.connect (*this, invalidator (*this), boost::bind (&TranscodeFfmpeg::ffexit, this), gui_context ()); + ffcmd->ReadStdout.connect_same_thread (*this, std::bind (&TranscodeFfmpeg::ffmpegparse_a, this, _1, _2)); + ffcmd->Terminated.connect (*this, invalidator (*this), std::bind (&TranscodeFfmpeg::ffexit, this), gui_context ()); if (ffcmd->start (SystemExec::MergeWithStdin)) { ffexit (); @@ -533,8 +533,8 @@ TranscodeFfmpeg::transcode (std::string outfile, const int outw, const int outh, } ffcmd = new ARDOUR::SystemExec (ffmpeg_exe, argp, true); - ffcmd->ReadStdout.connect_same_thread (*this, boost::bind (&TranscodeFfmpeg::ffmpegparse_v, this, _1, _2)); - ffcmd->Terminated.connect (*this, invalidator (*this), boost::bind (&TranscodeFfmpeg::ffexit, this), gui_context ()); + ffcmd->ReadStdout.connect_same_thread (*this, std::bind (&TranscodeFfmpeg::ffmpegparse_v, this, _1, _2)); + ffcmd->Terminated.connect (*this, invalidator (*this), std::bind (&TranscodeFfmpeg::ffexit, this), gui_context ()); if (ffcmd->start (SystemExec::MergeWithStdin)) { ffexit (); return false; diff --git a/gtk2_ardour/transcode_video_dialog.cc b/gtk2_ardour/transcode_video_dialog.cc index a56a51f9ee..ba31f6f8b1 100644 --- a/gtk2_ardour/transcode_video_dialog.cc +++ b/gtk2_ardour/transcode_video_dialog.cc @@ -385,8 +385,8 @@ TranscodeVideoDialog::launch_audioonly () if (debug_checkbox.get_active ()) { transcoder->set_debug (true); } - transcoder->Progress.connect (*this, invalidator (*this), boost::bind (&TranscodeVideoDialog::update_progress, this, _1, _2), gui_context ()); - transcoder->Finished.connect (*this, invalidator (*this), boost::bind (&TranscodeVideoDialog::finished, this, _1), gui_context ()); + transcoder->Progress.connect (*this, invalidator (*this), std::bind (&TranscodeVideoDialog::update_progress, this, _1, _2), gui_context ()); + transcoder->Finished.connect (*this, invalidator (*this), std::bind (&TranscodeVideoDialog::finished, this, _1), gui_context ()); launch_extract (); } @@ -437,7 +437,7 @@ TranscodeVideoDialog::launch_transcode () aborted = false; if (audio_combo.get_active_row_number () != 0) { pending_audio_extract = true; - StartNextStage.connect (*this, invalidator (*this), boost::bind (&TranscodeVideoDialog::launch_extract, this), gui_context ()); + StartNextStage.connect (*this, invalidator (*this), std::bind (&TranscodeVideoDialog::launch_extract, this), gui_context ()); } int scale_width, scale_height, bitrate; @@ -457,8 +457,8 @@ TranscodeVideoDialog::launch_transcode () bitrate = 0; } - transcoder->Progress.connect (*this, invalidator (*this), boost::bind (&TranscodeVideoDialog::update_progress, this, _1, _2), gui_context ()); - transcoder->Finished.connect (*this, invalidator (*this), boost::bind (&TranscodeVideoDialog::finished, this, _1), gui_context ()); + transcoder->Progress.connect (*this, invalidator (*this), std::bind (&TranscodeVideoDialog::update_progress, this, _1, _2), gui_context ()); + transcoder->Finished.connect (*this, invalidator (*this), std::bind (&TranscodeVideoDialog::finished, this, _1), gui_context ()); if (!transcoder->transcode (outfn, scale_width, scale_height, bitrate)) { ARDOUR_UI::instance ()->popup_error (_("Transcoding Failed.")); Gtk::Dialog::response (RESPONSE_CANCEL); diff --git a/gtk2_ardour/transport_control_ui.cc b/gtk2_ardour/transport_control_ui.cc index 01edda1cd9..86021032b9 100644 --- a/gtk2_ardour/transport_control_ui.cc +++ b/gtk2_ardour/transport_control_ui.cc @@ -38,7 +38,7 @@ using namespace ArdourWidgets; TransportControlUI::TransportControlUI () { - Config->ParameterChanged.connect (config_connection, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (config_connection, MISSING_INVALIDATOR, std::bind (&TransportControlUI::parameter_changed, this, _1), gui_context()); } void @@ -178,11 +178,11 @@ TransportControlUI::set_session (ARDOUR::Session *s) return; } - _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::parameter_changed, this, _1), gui_context()); - _session->StepEditStatusChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::step_edit_status_change, this, _1), gui_context()); - _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::map_transport_state, this), gui_context()); - _session->auto_loop_location_changed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::set_loop_sensitivity, this), gui_context ()); - _session->PunchLoopConstraintChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::set_loop_sensitivity, this), gui_context ()); + _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&TransportControlUI::parameter_changed, this, _1), gui_context()); + _session->StepEditStatusChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&TransportControlUI::step_edit_status_change, this, _1), gui_context()); + _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&TransportControlUI::map_transport_state, this), gui_context()); + _session->auto_loop_location_changed.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&TransportControlUI::set_loop_sensitivity, this), gui_context ()); + _session->PunchLoopConstraintChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&TransportControlUI::set_loop_sensitivity, this), gui_context ()); rec_button.set_sensitive (true); } diff --git a/gtk2_ardour/transport_masters_dialog.cc b/gtk2_ardour/transport_masters_dialog.cc index 58fae44b5f..aab00368f2 100644 --- a/gtk2_ardour/transport_masters_dialog.cc +++ b/gtk2_ardour/transport_masters_dialog.cc @@ -57,8 +57,8 @@ TransportMastersWidget::TransportMastersWidget () midi_port_store = ListStore::create (port_columns); audio_port_store = ListStore::create (port_columns); - AudioEngine::instance()->PortRegisteredOrUnregistered.connect (port_reg_connection, invalidator (*this), boost::bind (&TransportMastersWidget::update_ports, this), gui_context()); - AudioEngine::instance()->PortPrettyNameChanged.connect (port_reg_connection, invalidator (*this), boost::bind (&TransportMastersWidget::update_ports, this), gui_context()); + AudioEngine::instance()->PortRegisteredOrUnregistered.connect (port_reg_connection, invalidator (*this), std::bind (&TransportMastersWidget::update_ports, this), gui_context()); + AudioEngine::instance()->PortPrettyNameChanged.connect (port_reg_connection, invalidator (*this), std::bind (&TransportMastersWidget::update_ports, this), gui_context()); update_ports (); Gtk::Table *add_table = manage(new Gtk::Table(1,2)); @@ -68,7 +68,7 @@ TransportMastersWidget::TransportMastersWidget () pack_start (*add_table, FALSE, FALSE); pack_start (lost_sync_button, FALSE, FALSE, 12); - Config->ParameterChanged.connect (config_connection, invalidator (*this), boost::bind (&TransportMastersWidget::param_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (config_connection, invalidator (*this), std::bind (&TransportMastersWidget::param_changed, this, _1), gui_context()); lost_sync_button.signal_toggled().connect (sigc::mem_fun (*this, &TransportMastersWidget::lost_sync_button_toggled)); lost_sync_button.set_active (Config->get_transport_masters_just_roll_when_sync_lost()); set_tooltip (lost_sync_button, string_compose (_("When enabled, if the signal from a transport master is lost, %1 will keep rolling at its current speed.\n" @@ -105,11 +105,11 @@ TransportMastersWidget::TransportMastersWidget () table.set_col_spacings (12); table.set_row_spacings (6); - TransportMasterManager::instance().CurrentChanged.connect (current_connection, invalidator (*this), boost::bind (&TransportMastersWidget::current_changed, this, _1, _2), gui_context()); - TransportMasterManager::instance().Added.connect (add_connection, invalidator (*this), boost::bind (&TransportMastersWidget::rebuild, this), gui_context()); - TransportMasterManager::instance().Removed.connect (remove_connection, invalidator (*this), boost::bind (&TransportMastersWidget::rebuild, this), gui_context()); + TransportMasterManager::instance().CurrentChanged.connect (current_connection, invalidator (*this), std::bind (&TransportMastersWidget::current_changed, this, _1, _2), gui_context()); + TransportMasterManager::instance().Added.connect (add_connection, invalidator (*this), std::bind (&TransportMastersWidget::rebuild, this), gui_context()); + TransportMasterManager::instance().Removed.connect (remove_connection, invalidator (*this), std::bind (&TransportMastersWidget::rebuild, this), gui_context()); - AudioEngine::instance()->Running.connect (engine_running_connection, invalidator (*this), boost::bind (&TransportMastersWidget::update_usability, this), gui_context()); + AudioEngine::instance()->Running.connect (engine_running_connection, invalidator (*this), std::bind (&TransportMastersWidget::update_usability, this), gui_context()); rebuild (); } @@ -256,7 +256,7 @@ TransportMastersWidget::rebuild () r->sclock_synced_button.signal_toggled().connect (sigc::mem_fun (*r, &TransportMastersWidget::Row::sync_button_toggled)); } - r->tm->PropertyChanged.connect (r->property_change_connection, invalidator (*r), boost::bind (&TransportMastersWidget::Row::prop_change, r, _1), gui_context()); + r->tm->PropertyChanged.connect (r->property_change_connection, invalidator (*r), std::bind (&TransportMastersWidget::Row::prop_change, r, _1), gui_context()); PropertyChange all_change; all_change.add (Properties::locked); @@ -682,7 +682,7 @@ TransportMastersWidget::set_session (ARDOUR::Session* s) SessionHandlePtr::set_session (s); if (_session) { - _session->config.ParameterChanged.connect (session_config_connection, invalidator (*this), boost::bind (&TransportMastersWidget::param_changed, this, _1), gui_context()); + _session->config.ParameterChanged.connect (session_config_connection, invalidator (*this), std::bind (&TransportMastersWidget::param_changed, this, _1), gui_context()); rebuild (); } else { clear (); diff --git a/gtk2_ardour/trigger_clip_picker.cc b/gtk2_ardour/trigger_clip_picker.cc index 926954e05d..6045aa30a8 100644 --- a/gtk2_ardour/trigger_clip_picker.cc +++ b/gtk2_ardour/trigger_clip_picker.cc @@ -219,8 +219,8 @@ TriggerClipPicker::TriggerClipPicker () UIConfiguration::instance ().ColorsChanged.connect (sigc::mem_fun (*this, &TriggerClipPicker::on_theme_changed)); UIConfiguration::instance ().ParameterChanged.connect (sigc::mem_fun (*this, &TriggerClipPicker::parameter_changed)); - Config->ParameterChanged.connect (_config_connection, invalidator (*this), boost::bind (&TriggerClipPicker::parameter_changed, this, _1), gui_context ()); - LibraryClipAdded.connect (_clip_added_connection, invalidator (*this), boost::bind (&TriggerClipPicker::clip_added, this, _1, _2), gui_context ()); + Config->ParameterChanged.connect (_config_connection, invalidator (*this), std::bind (&TriggerClipPicker::parameter_changed, this, _1), gui_context ()); + LibraryClipAdded.connect (_clip_added_connection, invalidator (*this), std::bind (&TriggerClipPicker::clip_added, this, _1, _2), gui_context ()); /* cache value */ _clip_library_dir = clip_library_dir (); @@ -865,9 +865,9 @@ TriggerClipPicker::set_session (Session* s) _gain_control.set_controllable (none); } else { _auditioner_connections.drop_connections (); - _session->AuditionActive.connect (_auditioner_connections, invalidator (*this), boost::bind (&TriggerClipPicker::audition_active, this, _1), gui_context ()); - _session->the_auditioner ()->AuditionProgress.connect (_auditioner_connections, invalidator (*this), boost::bind (&TriggerClipPicker::audition_progress, this, _1, _2), gui_context ()); - _session->the_auditioner ()->processors_changed.connect (_auditioner_connections, invalidator (*this), boost::bind (&TriggerClipPicker::audition_processors_changed, this), gui_context ()); + _session->AuditionActive.connect (_auditioner_connections, invalidator (*this), std::bind (&TriggerClipPicker::audition_active, this, _1), gui_context ()); + _session->the_auditioner ()->AuditionProgress.connect (_auditioner_connections, invalidator (*this), std::bind (&TriggerClipPicker::audition_progress, this, _1, _2), gui_context ()); + _session->the_auditioner ()->processors_changed.connect (_auditioner_connections, invalidator (*this), std::bind (&TriggerClipPicker::audition_processors_changed, this), gui_context ()); audition_processors_changed (); /* set sensitivity */ _gain_control.set_controllable (_session->the_auditioner ()->gain_control ()); @@ -1095,7 +1095,7 @@ TriggerClipPicker::audition_show_plugin_ui () _audition_plugnui->set_session (_session); _audition_plugnui->show_all (); _audition_plugnui->set_title (/* generate_processor_title (plugin_insert)*/ _("Audition Synth")); - plugin_insert->DropReferences.connect (_processor_connections, invalidator (*this), boost::bind (&TriggerClipPicker::audition_processor_going_away, this), gui_context()); + plugin_insert->DropReferences.connect (_processor_connections, invalidator (*this), std::bind (&TriggerClipPicker::audition_processor_going_away, this), gui_context()); _audition_plugnui->signal_map_event ().connect (sigc::hide (sigc::bind (sigc::mem_fun (*this, &TriggerClipPicker::audition_processor_viz), true))); _audition_plugnui->signal_unmap_event ().connect (sigc::hide (sigc::bind (sigc::mem_fun (*this, &TriggerClipPicker::audition_processor_viz), false))); diff --git a/gtk2_ardour/trigger_master.cc b/gtk2_ardour/trigger_master.cc index b9907bb419..a3516212c7 100644 --- a/gtk2_ardour/trigger_master.cc +++ b/gtk2_ardour/trigger_master.cc @@ -129,7 +129,7 @@ TriggerMaster::TriggerMaster (Item* parent) set_tooltip (_("Click to stop all clips in this track\nRight-click to select properties for all clips in this track")); #if 0 /* XXX trigger changes */ - _triggerbox->PropertyChanged.connect (_trigger_prop_connection, MISSING_INVALIDATOR, boost::bind (&TriggerMaster::prop_change, this, _1), gui_context()); + _triggerbox->PropertyChanged.connect (_trigger_prop_connection, MISSING_INVALIDATOR, std::bind (&TriggerMaster::prop_change, this, _1), gui_context()); PropertyChange changed; changed.add (ARDOUR::Properties::name); changed.add (ARDOUR::Properties::running); @@ -137,7 +137,7 @@ TriggerMaster::TriggerMaster (Item* parent) #endif #if 0 /* XXX route changes */ - dynamic_cast (_triggerbox->owner())->presentation_info().Change.connect (_owner_prop_connection, MISSING_INVALIDATOR, boost::bind (&TriggerMaster::owner_prop_change, this, _1), gui_context()); + dynamic_cast (_triggerbox->owner())->presentation_info().Change.connect (_owner_prop_connection, MISSING_INVALIDATOR, std::bind (&TriggerMaster::owner_prop_change, this, _1), gui_context()); #endif _update_connection = Timers::rapid_connect (sigc::mem_fun (*this, &TriggerMaster::maybe_update)); diff --git a/gtk2_ardour/trigger_page.cc b/gtk2_ardour/trigger_page.cc index 647d96d070..defd01699d 100644 --- a/gtk2_ardour/trigger_page.cc +++ b/gtk2_ardour/trigger_page.cc @@ -172,8 +172,8 @@ TriggerPage::TriggerPage () _content.set_data ("ardour-bindings", bindings); /* subscribe to signals */ - Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&TriggerPage::parameter_changed, this, _1), gui_context ()); - PresentationInfo::Change.connect (*this, invalidator (*this), boost::bind (&TriggerPage::pi_property_changed, this, _1), gui_context ()); + Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&TriggerPage::parameter_changed, this, _1), gui_context ()); + PresentationInfo::Change.connect (*this, invalidator (*this), std::bind (&TriggerPage::pi_property_changed, this, _1), gui_context ()); /* init */ update_title (); @@ -271,16 +271,16 @@ TriggerPage::set_session (Session* s) XMLNode* node = ARDOUR_UI::instance ()->trigger_page_settings (); set_state (*node, Stateful::loading_state_version); - _session->DirtyChanged.connect (_session_connections, invalidator (*this), boost::bind (&TriggerPage::update_title, this), gui_context ()); - _session->StateSaved.connect (_session_connections, invalidator (*this), boost::bind (&TriggerPage::update_title, this), gui_context ()); + _session->DirtyChanged.connect (_session_connections, invalidator (*this), std::bind (&TriggerPage::update_title, this), gui_context ()); + _session->StateSaved.connect (_session_connections, invalidator (*this), std::bind (&TriggerPage::update_title, this), gui_context ()); - _session->RouteAdded.connect (_session_connections, invalidator (*this), boost::bind (&TriggerPage::add_routes, this, _1), gui_context ()); - TriggerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&TriggerPage::remove_route, this, _1), gui_context ()); + _session->RouteAdded.connect (_session_connections, invalidator (*this), std::bind (&TriggerPage::add_routes, this, _1), gui_context ()); + TriggerStrip::CatchDeletion.connect (*this, invalidator (*this), std::bind (&TriggerPage::remove_route, this, _1), gui_context ()); - _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&TriggerPage::parameter_changed, this, _1), gui_context ()); + _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), std::bind (&TriggerPage::parameter_changed, this, _1), gui_context ()); Editor::instance ().get_selection ().TriggersChanged.connect (sigc::mem_fun (*this, &TriggerPage::selection_changed)); - Trigger::TriggerArmChanged.connect (*this, invalidator (*this), boost::bind (&TriggerPage::rec_enable_changed, this, _1), gui_context()); + Trigger::TriggerArmChanged.connect (*this, invalidator (*this), std::bind (&TriggerPage::rec_enable_changed, this, _1), gui_context()); initial_track_display (); @@ -521,8 +521,8 @@ TriggerPage::add_routes (RouteList& rl) TriggerStrip* ts = new TriggerStrip (_session, *r); _strips.push_back (ts); - (*r)->presentation_info ().PropertyChanged.connect (*this, invalidator (*this), boost::bind (&TriggerPage::stripable_property_changed, this, _1, std::weak_ptr (*r)), gui_context ()); - (*r)->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&TriggerPage::stripable_property_changed, this, _1, std::weak_ptr (*r)), gui_context ()); + (*r)->presentation_info ().PropertyChanged.connect (*this, invalidator (*this), std::bind (&TriggerPage::stripable_property_changed, this, _1, std::weak_ptr (*r)), gui_context ()); + (*r)->PropertyChanged.connect (*this, invalidator (*this), std::bind (&TriggerPage::stripable_property_changed, this, _1, std::weak_ptr (*r)), gui_context ()); ts->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &TriggerPage::strip_button_release_event), ts)); } redisplay_track_list (); diff --git a/gtk2_ardour/trigger_strip.cc b/gtk2_ardour/trigger_strip.cc index 739357590c..8c2f2d8d61 100644 --- a/gtk2_ardour/trigger_strip.cc +++ b/gtk2_ardour/trigger_strip.cc @@ -66,7 +66,7 @@ TriggerStrip::TriggerStrip (Session* s, std::shared_ptr rt) , _tmaster_widget (-1, 16) , input_button (true) , output_button (false) - , _processor_box (s, boost::bind (&TriggerStrip::plugin_selector, this), _pb_selection, 0) + , _processor_box (s, std::bind (&TriggerStrip::plugin_selector, this), _pb_selection, 0) , _trigger_display (*this, -1., TriggerBox::default_triggers_per_box * 16.) , _panners (s) , _level_meter (s) @@ -221,13 +221,13 @@ TriggerStrip::set_route (std::shared_ptr rt) delete _route_ops_menu; _route_ops_menu = 0; - _route->input ()->changed.connect (*this, invalidator (*this), boost::bind (&TriggerStrip::io_changed, this), gui_context ()); - _route->output ()->changed.connect (*this, invalidator (*this), boost::bind (&TriggerStrip::io_changed, this), gui_context ()); - _route->io_changed.connect (route_connections, invalidator (*this), boost::bind (&TriggerStrip::io_changed, this), gui_context ()); + _route->input ()->changed.connect (*this, invalidator (*this), std::bind (&TriggerStrip::io_changed, this), gui_context ()); + _route->output ()->changed.connect (*this, invalidator (*this), std::bind (&TriggerStrip::io_changed, this), gui_context ()); + _route->io_changed.connect (route_connections, invalidator (*this), std::bind (&TriggerStrip::io_changed, this), gui_context ()); if (_route->panner_shell ()) { update_panner_choices (); - _route->panner_shell ()->Changed.connect (route_connections, invalidator (*this), boost::bind (&TriggerStrip::connect_to_pan, this), gui_context ()); + _route->panner_shell ()->Changed.connect (route_connections, invalidator (*this), std::bind (&TriggerStrip::connect_to_pan, this), gui_context ()); } _panners.set_panner (_route->main_outs ()->panner_shell (), _route->main_outs ()->panner ()); @@ -300,7 +300,7 @@ TriggerStrip::build_route_ops_menu () } uint32_t plugin_insert_cnt = 0; - _route->foreach_processor (boost::bind (RouteUI::help_count_plugins, _1, & plugin_insert_cnt)); + _route->foreach_processor (std::bind (RouteUI::help_count_plugins, _1, & plugin_insert_cnt)); if (active && plugin_insert_cnt > 0) { items.push_back (MenuElem (_("Pin Connections..."), sigc::mem_fun (*this, &RouteUI::manage_pins))); } @@ -386,7 +386,7 @@ TriggerStrip::connect_to_pan () std::shared_ptr p = _route->pannable (); - p->automation_state_changed.connect (_panstate_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_state_changed, &_panners), gui_context ()); + p->automation_state_changed.connect (_panstate_connection, invalidator (*this), std::bind (&PannerUI::pan_automation_state_changed, &_panners), gui_context ()); if (_panners._panner == 0) { _panners.panshell_changed (); diff --git a/gtk2_ardour/trigger_ui.cc b/gtk2_ardour/trigger_ui.cc index bc8e254f49..a58a4a9ee3 100644 --- a/gtk2_ardour/trigger_ui.cc +++ b/gtk2_ardour/trigger_ui.cc @@ -135,8 +135,8 @@ TriggerUI::trigger_swap (uint32_t n) } trigger_connections.drop_connections (); - trigger()->PropertyChanged.connect (trigger_connections, invalidator (*this), boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context ()); - tref.box()->PropertyChanged.connect (trigger_connections, invalidator (*this), boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context ()); + trigger()->PropertyChanged.connect (trigger_connections, invalidator (*this), std::bind (&TriggerUI::trigger_changed, this, _1), gui_context ()); + tref.box()->PropertyChanged.connect (trigger_connections, invalidator (*this), std::bind (&TriggerUI::trigger_changed, this, _1), gui_context ()); trigger_changed (Properties::name); } @@ -808,10 +808,10 @@ TriggerUI::set_trigger (ARDOUR::TriggerReference tr) trigger_changed (TriggerBox::all_trigger_props()); - trigger()->PropertyChanged.connect (trigger_connections, invalidator (*this), boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context()); - tref.box()->PropertyChanged.connect (trigger_connections, invalidator (*this), boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context ()); + trigger()->PropertyChanged.connect (trigger_connections, invalidator (*this), std::bind (&TriggerUI::trigger_changed, this, _1), gui_context()); + tref.box()->PropertyChanged.connect (trigger_connections, invalidator (*this), std::bind (&TriggerUI::trigger_changed, this, _1), gui_context ()); - tref.box()->TriggerSwapped.connect (trigger_swap_connection, invalidator (*this), boost::bind (&TriggerUI::trigger_swap, this, _1), gui_context ()); + tref.box()->TriggerSwapped.connect (trigger_swap_connection, invalidator (*this), std::bind (&TriggerUI::trigger_swap, this, _1), gui_context ()); on_trigger_set(); //derived classes can do initialization here } diff --git a/gtk2_ardour/triggerbox_ui.cc b/gtk2_ardour/triggerbox_ui.cc index 3fe5719a11..0a2b7c8847 100644 --- a/gtk2_ardour/triggerbox_ui.cc +++ b/gtk2_ardour/triggerbox_ui.cc @@ -104,8 +104,8 @@ TriggerEntry::TriggerEntry (Item* item, TriggerStrip& s, TriggerReference tr) /* this will trigger a call to on_trigger_changed() */ set_trigger (tr); - trigger()->ArmChanged.connect (_rec_enable_connections, MISSING_INVALIDATOR, boost::bind (&TriggerEntry::rec_enable_change, this), gui_context()); - tref.box()->RecEnableChanged.connect (_rec_enable_connections, MISSING_INVALIDATOR, boost::bind (&TriggerEntry::rec_enable_change, this), gui_context()); + trigger()->ArmChanged.connect (_rec_enable_connections, MISSING_INVALIDATOR, std::bind (&TriggerEntry::rec_enable_change, this), gui_context()); + tref.box()->RecEnableChanged.connect (_rec_enable_connections, MISSING_INVALIDATOR, std::bind (&TriggerEntry::rec_enable_change, this), gui_context()); /* DnD Source */ GtkCanvas* gtkcanvas = static_cast (canvas ()); @@ -127,7 +127,7 @@ TriggerEntry::TriggerEntry (Item* item, TriggerStrip& s, TriggerReference tr) set_widget_colors (); /* owner color changes (?) */ - dynamic_cast (tref.box()->owner ())->presentation_info ().Change.connect (_owner_prop_connection, MISSING_INVALIDATOR, boost::bind (&TriggerEntry::owner_prop_change, this, _1), gui_context ()); + dynamic_cast (tref.box()->owner ())->presentation_info ().Change.connect (_owner_prop_connection, MISSING_INVALIDATOR, std::bind (&TriggerEntry::owner_prop_change, this, _1), gui_context ()); selection_change (); rec_enable_change (); diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 0dbc8b9d04..6e42f750d9 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -125,7 +125,7 @@ UIConfiguration::UIConfiguration () } } - ColorsChanged.connect (boost::bind (&UIConfiguration::colors_changed, this)); + ColorsChanged.connect (std::bind (&UIConfiguration::colors_changed, this)); ParameterChanged.connect (sigc::mem_fun (*this, &UIConfiguration::parameter_changed)); } @@ -218,7 +218,7 @@ UIConfiguration::get_ui_scale () } void -UIConfiguration::map_parameters (boost::function& functor) +UIConfiguration::map_parameters (std::function& functor) { #undef UI_CONFIG_VARIABLE #define UI_CONFIG_VARIABLE(Type,var,Name,value) functor (Name); diff --git a/gtk2_ardour/ui_config.h b/gtk2_ardour/ui_config.h index 8a1da7b10d..d365eef0b4 100644 --- a/gtk2_ardour/ui_config.h +++ b/gtk2_ardour/ui_config.h @@ -28,8 +28,6 @@ #include #include -#include -#include #include "ardour/types.h" // required for operators used in pbd/configuration_variable.h #include "ardour/types_convert.h" @@ -64,7 +62,7 @@ public: int load_defaults (); int load_color_theme (bool allow_own); - void map_parameters (boost::function&); + void map_parameters (std::function&); int set_state (const XMLNode&, int version); XMLNode& get_state () const; XMLNode& get_variables (std::string const &) const; diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc index d0cd3d5623..056865877f 100644 --- a/gtk2_ardour/vca_master_strip.cc +++ b/gtk2_ardour/vca_master_strip.cc @@ -166,17 +166,17 @@ VCAMasterStrip::VCAMasterStrip (Session* s, std::shared_ptr v) Mixer_UI::instance()->show_spill_change.connect (sigc::mem_fun (*this, &VCAMasterStrip::spill_change)); - _vca->PropertyChanged.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::vca_property_changed, this, _1), gui_context()); - _vca->presentation_info().PropertyChanged.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::vca_property_changed, this, _1), gui_context()); - _vca->DropReferences.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::self_delete, this), gui_context()); + _vca->PropertyChanged.connect (vca_connections, invalidator (*this), std::bind (&VCAMasterStrip::vca_property_changed, this, _1), gui_context()); + _vca->presentation_info().PropertyChanged.connect (vca_connections, invalidator (*this), std::bind (&VCAMasterStrip::vca_property_changed, this, _1), gui_context()); + _vca->DropReferences.connect (vca_connections, invalidator (*this), std::bind (&VCAMasterStrip::self_delete, this), gui_context()); - _vca->solo_control()->Changed.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::solo_changed, this), gui_context()); - _vca->mute_control()->Changed.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::mute_changed, this), gui_context()); + _vca->solo_control()->Changed.connect (vca_connections, invalidator (*this), std::bind (&VCAMasterStrip::solo_changed, this), gui_context()); + _vca->mute_control()->Changed.connect (vca_connections, invalidator (*this), std::bind (&VCAMasterStrip::mute_changed, this), gui_context()); - _session->MonitorBusAddedOrRemoved.connect (*this, invalidator (*this), boost::bind (&VCAMasterStrip::set_button_names, this), gui_context()); + _session->MonitorBusAddedOrRemoved.connect (*this, invalidator (*this), std::bind (&VCAMasterStrip::set_button_names, this), gui_context()); - s->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&VCAMasterStrip::parameter_changed, this, _1), gui_context()); - Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&VCAMasterStrip::parameter_changed, this, _1), gui_context()); + s->config.ParameterChanged.connect (*this, invalidator (*this), std::bind (&VCAMasterStrip::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&VCAMasterStrip::parameter_changed, this, _1), gui_context()); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &VCAMasterStrip::parameter_changed)); } diff --git a/gtk2_ardour/vca_time_axis.cc b/gtk2_ardour/vca_time_axis.cc index f3dfdb18a6..3554ce2622 100644 --- a/gtk2_ardour/vca_time_axis.cc +++ b/gtk2_ardour/vca_time_axis.cc @@ -113,10 +113,10 @@ VCATimeAxisView::VCATimeAxisView (PublicEditor& ed, Session* s, ArdourCanvas::Ca controls_ebox.set_name (controls_base_unselected_name); time_axis_frame.set_name (controls_base_unselected_name); - s->MonitorBusAddedOrRemoved.connect (*this, invalidator (*this), boost::bind (&VCATimeAxisView::set_button_names, this), gui_context()); + s->MonitorBusAddedOrRemoved.connect (*this, invalidator (*this), std::bind (&VCATimeAxisView::set_button_names, this), gui_context()); - s->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&VCATimeAxisView::parameter_changed, this, _1), gui_context()); - Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&VCATimeAxisView::parameter_changed, this, _1), gui_context()); + s->config.ParameterChanged.connect (*this, invalidator (*this), std::bind (&VCATimeAxisView::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&VCATimeAxisView::parameter_changed, this, _1), gui_context()); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &VCATimeAxisView::parameter_changed)); } @@ -177,11 +177,11 @@ VCATimeAxisView::set_vca (std::shared_ptr v) // Mixer_UI::instance()->show_vca_change.connect (sigc::mem_fun (*this, &VCAMasterStrip::spill_change)); - _vca->PropertyChanged.connect (vca_connections, invalidator (*this), boost::bind (&VCATimeAxisView::vca_property_changed, this, _1), gui_context()); + _vca->PropertyChanged.connect (vca_connections, invalidator (*this), std::bind (&VCATimeAxisView::vca_property_changed, this, _1), gui_context()); - _vca->solo_control()->Changed.connect (vca_connections, invalidator (*this), boost::bind (&VCATimeAxisView::update_solo_display, this), gui_context()); - _vca->mute_control()->Changed.connect (vca_connections, invalidator (*this), boost::bind (&VCATimeAxisView::update_mute_display, this), gui_context()); - _vca->DropReferences.connect (vca_connections, invalidator (*this), boost::bind (&VCATimeAxisView::self_delete, this), gui_context()); + _vca->solo_control()->Changed.connect (vca_connections, invalidator (*this), std::bind (&VCATimeAxisView::update_solo_display, this), gui_context()); + _vca->mute_control()->Changed.connect (vca_connections, invalidator (*this), std::bind (&VCATimeAxisView::update_mute_display, this), gui_context()); + _vca->DropReferences.connect (vca_connections, invalidator (*this), std::bind (&VCATimeAxisView::self_delete, this), gui_context()); solo_button.set_controllable (_vca->solo_control()); mute_button.set_controllable (_vca->mute_control()); diff --git a/gtk2_ardour/video_monitor.cc b/gtk2_ardour/video_monitor.cc index b8c6cf6961..a83c303d5f 100644 --- a/gtk2_ardour/video_monitor.cc +++ b/gtk2_ardour/video_monitor.cc @@ -52,9 +52,9 @@ VideoMonitor::VideoMonitor (PublicEditor *ed, std::string xjadeo_bin_path) osdmode = 10; // 1: frameno, 2: timecode, 8: box process = new ARDOUR::SystemExec (xjadeo_bin_path, X_("-R -J"), true); - process->ReadStdout.connect_same_thread (*this, boost::bind (&VideoMonitor::parse_output, this, _1 ,_2)); - process->Terminated.connect (*this, invalidator (*this), boost::bind (&VideoMonitor::terminated, this), gui_context()); - XJKeyEvent.connect (*this, invalidator (*this), boost::bind (&VideoMonitor::forward_keyevent, this, _1), gui_context()); + process->ReadStdout.connect_same_thread (*this, std::bind (&VideoMonitor::parse_output, this, _1 ,_2)); + process->Terminated.connect (*this, invalidator (*this), std::bind (&VideoMonitor::terminated, this), gui_context()); + XJKeyEvent.connect (*this, invalidator (*this), std::bind (&VideoMonitor::forward_keyevent, this, _1), gui_context()); } VideoMonitor::~VideoMonitor () diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index 84af00551d..65714d4062 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -71,8 +71,8 @@ VideoTimeLine::VideoTimeLine (PublicEditor *ed, ArdourCanvas::Container *vbg, in video_server_url = video_get_server_url(Config); server_docroot = video_get_docroot(Config); - VtlUpdate.connect (*this, invalidator (*this), boost::bind (&PublicEditor::queue_visual_videotimeline_update, editor), gui_context()); - GuiUpdate.connect (*this, invalidator (*this), boost::bind (&VideoTimeLine::gui_update, this, _1), gui_context()); + VtlUpdate.connect (*this, invalidator (*this), std::bind (&PublicEditor::queue_visual_videotimeline_update, editor), gui_context()); + GuiUpdate.connect (*this, invalidator (*this), std::bind (&VideoTimeLine::gui_update, this, _1), gui_context()); } VideoTimeLine::~VideoTimeLine () @@ -143,7 +143,7 @@ VideoTimeLine::set_session (ARDOUR::Session *s) SessionHandlePtr::set_session (s); if (!_session) { return ; } - _session->SessionSaveUnderway.connect_same_thread (sessionsave, boost::bind (&VideoTimeLine::save_session, this)); + _session->SessionSaveUnderway.connect_same_thread (sessionsave, std::bind (&VideoTimeLine::save_session, this)); XMLNode* node = _session->extra_xml (X_("Videotimeline")); @@ -371,7 +371,7 @@ VideoTimeLine::update_video_timeline() while (video_frames.size() < visible_video_frames) { VideoImageFrame *frame; frame = new VideoImageFrame(*editor, *videotl_group, display_vframe_width, bar_height, video_server_url, translated_filename()); - frame->ImgChanged.connect (*this, invalidator (*this), boost::bind (&PublicEditor::queue_visual_videotimeline_update, editor), gui_context()); + frame->ImgChanged.connect (*this, invalidator (*this), std::bind (&PublicEditor::queue_visual_videotimeline_update, editor), gui_context()); video_frames.push_back(frame); } @@ -725,8 +725,8 @@ VideoTimeLine::find_xjadeo () { if (found_xjadeo ()) { ARDOUR::SystemExec version_check (_xjadeo_bin, X_("--version"), true); xjadeo_version = ""; - version_check.ReadStdout.connect_same_thread (*this, boost::bind (&VideoTimeLine::xjadeo_readversion, this, _1 ,_2)); - version_check.Terminated.connect_same_thread (*this, boost::bind (&VideoTimeLine::xjadeo_readversion, this, "\n" ,1)); + version_check.ReadStdout.connect_same_thread (*this, std::bind (&VideoTimeLine::xjadeo_readversion, this, _1 ,_2)); + version_check.Terminated.connect_same_thread (*this, std::bind (&VideoTimeLine::xjadeo_readversion, this, "\n" ,1)); if (version_check.start (ARDOUR::SystemExec::MergeWithStdin)) { warning << _( "Video-monitor 'xjadeo' cannot be launched." @@ -797,8 +797,8 @@ VideoTimeLine::find_harvid () { } ARDOUR::SystemExec version_check (harvid_bin, X_("--version"), true); harvid_version = ""; - version_check.ReadStdout.connect_same_thread (*this, boost::bind (&VideoTimeLine::harvid_readversion, this, _1 ,_2)); - version_check.Terminated.connect_same_thread (*this, boost::bind (&VideoTimeLine::harvid_readversion, this, "\n" ,1)); + version_check.ReadStdout.connect_same_thread (*this, std::bind (&VideoTimeLine::harvid_readversion, this, _1 ,_2)); + version_check.Terminated.connect_same_thread (*this, std::bind (&VideoTimeLine::harvid_readversion, this, "\n" ,1)); if (version_check.start (ARDOUR::SystemExec::MergeWithStdin)) { return; } @@ -834,7 +834,7 @@ VideoTimeLine::open_video_monitor() { vmonitor->set_session(_session); vmonitor->set_offset(video_offset); vmonitor->Terminated.connect (sigc::mem_fun (*this, &VideoTimeLine::terminated_video_monitor)); - vmonitor->UiState.connect (*this, invalidator (*this), boost::bind (&VideoTimeLine::gui_update, this, _1), gui_context()); + vmonitor->UiState.connect (*this, invalidator (*this), std::bind (&VideoTimeLine::gui_update, this, _1), gui_context()); } else if (vmonitor->is_started()) { return; } diff --git a/gtk2_ardour/virtual_keyboard_window.cc b/gtk2_ardour/virtual_keyboard_window.cc index eea24c794e..9aad93a6e5 100644 --- a/gtk2_ardour/virtual_keyboard_window.cc +++ b/gtk2_ardour/virtual_keyboard_window.cc @@ -160,7 +160,7 @@ VirtualKeyboardWindow::VirtualKeyboardWindow () _cc_key[i].StateChanged.connect (sigc::bind (sigc::mem_fun (*this, &VirtualKeyboardWindow::cc_key_changed), i)); _cc[i]->ValueChanged.connect_same_thread (_cc_connections, - boost::bind (&VirtualKeyboardWindow::control_change_knob_event_handler, this, i, _1)); + std::bind (&VirtualKeyboardWindow::control_change_knob_event_handler, this, i, _1)); update_cc (i, default_cc[i]); } @@ -203,11 +203,11 @@ VirtualKeyboardWindow::VirtualKeyboardWindow () /* GUI signals */ _pitch_adjustment.signal_value_changed ().connect (sigc::mem_fun (*this, &VirtualKeyboardWindow::pitch_slider_adjusted)); - _pitchbend->ValueChanged.connect_same_thread (_cc_connections, boost::bind (&VirtualKeyboardWindow::pitch_bend_event_handler, this, _1)); + _pitchbend->ValueChanged.connect_same_thread (_cc_connections, std::bind (&VirtualKeyboardWindow::pitch_bend_event_handler, this, _1)); _pitch_slider->StopGesture.connect (sigc::mem_fun (*this, &VirtualKeyboardWindow::pitch_bend_release)); _modwheel_adjustment.signal_value_changed ().connect (sigc::mem_fun (*this, &VirtualKeyboardWindow::modwheel_slider_adjusted)); - _modwheel->ValueChanged.connect_same_thread (_cc_connections, boost::bind (&VirtualKeyboardWindow::control_change_event_handler, this, 1, _1)); + _modwheel->ValueChanged.connect_same_thread (_cc_connections, std::bind (&VirtualKeyboardWindow::control_change_event_handler, this, 1, _1)); _piano_velocity.StateChanged.connect (sigc::mem_fun (*this, &VirtualKeyboardWindow::update_velocity_settings)); _piano_octave_key.StateChanged.connect (sigc::mem_fun (*this, &VirtualKeyboardWindow::update_octave_key)); diff --git a/gtk2_ardour/visibility_group.cc b/gtk2_ardour/visibility_group.cc index 0429f4e82b..351b3267ac 100644 --- a/gtk2_ardour/visibility_group.cc +++ b/gtk2_ardour/visibility_group.cc @@ -50,7 +50,7 @@ VisibilityGroup::VisibilityGroup (std::string const & name) */ void -VisibilityGroup::add (Gtk::Widget* widget, string const & id, string const & name, bool visible, boost::function ()> override) +VisibilityGroup::add (Gtk::Widget* widget, string const & id, string const & name, bool visible, std::function ()> override) { Member m; m.widget = widget; diff --git a/gtk2_ardour/visibility_group.h b/gtk2_ardour/visibility_group.h index 6aa95e0dda..0dbb75e85e 100644 --- a/gtk2_ardour/visibility_group.h +++ b/gtk2_ardour/visibility_group.h @@ -41,7 +41,7 @@ public: std::string const &, std::string const &, bool visible = false, - boost::function ()> = 0 + std::function ()> = 0 ); Gtk::Widget* list_view (); @@ -64,7 +64,7 @@ private: std::string id; std::string name; bool visible; - boost::function ()> override; + std::function ()> override; }; class ModelColumns : public Gtk::TreeModelColumnRecord { diff --git a/gtk2_ardour/vst3_nsview_plugin_ui.mm b/gtk2_ardour/vst3_nsview_plugin_ui.mm index a86446e943..263bbaf187 100644 --- a/gtk2_ardour/vst3_nsview_plugin_ui.mm +++ b/gtk2_ardour/vst3_nsview_plugin_ui.mm @@ -65,7 +65,7 @@ VST3NSViewPluginUI::VST3NSViewPluginUI (std::shared_ptr pib, std _gui_widget.signal_unmap ().connect (mem_fun (this, &VST3NSViewPluginUI::view_unmap)); _gui_widget.signal_scroll_event ().connect (sigc::mem_fun (*this, &VST3NSViewPluginUI::forward_scroll_event), false); - //vst->LoadPresetProgram.connect (_program_connection, invalidator (*this), boost::bind (&VST3NSViewPluginUI::set_program, this), gui_context()); + //vst->LoadPresetProgram.connect (_program_connection, invalidator (*this), std::bind (&VST3NSViewPluginUI::set_program, this), gui_context()); _ns_view = [[NSView new] retain]; diff --git a/gtk2_ardour/vst3_plugin_ui.cc b/gtk2_ardour/vst3_plugin_ui.cc index 69ad59b962..3042cda648 100644 --- a/gtk2_ardour/vst3_plugin_ui.cc +++ b/gtk2_ardour/vst3_plugin_ui.cc @@ -48,8 +48,8 @@ VST3PluginUI::VST3PluginUI (std::shared_ptr pib, std::shared_ptr add_common_widgets (&_ardour_buttons_box); - _vst3->OnResizeView.connect (_resize_connection, invalidator (*this), boost::bind (&VST3PluginUI::resize_callback, this, _1, _2), gui_context()); - //pib->plugin()->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&VST3PluginUI::queue_port_update, this), gui_context ()); + _vst3->OnResizeView.connect (_resize_connection, invalidator (*this), std::bind (&VST3PluginUI::resize_callback, this, _1, _2), gui_context()); + //pib->plugin()->PresetLoaded.connect (*this, invalidator (*this), std::bind (&VST3PluginUI::queue_port_update, this), gui_context ()); pack_start (_ardour_buttons_box, false, false); _ardour_buttons_box.show_all (); diff --git a/gtk2_ardour/window_manager.h b/gtk2_ardour/window_manager.h index 6b80561c07..0670b39dfa 100644 --- a/gtk2_ardour/window_manager.h +++ b/gtk2_ardour/window_manager.h @@ -24,7 +24,6 @@ #include #include -#include #include #include @@ -117,10 +116,10 @@ template class ProxyWithConstructor: public ProxyBase { public: - ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function& c) + ProxyWithConstructor (const std::string& name, const std::string& menu_name, const std::function& c) : ProxyBase (name, menu_name) , creator (c) {} - ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function& c, const XMLNode* node) + ProxyWithConstructor (const std::string& name, const std::string& menu_name, const std::function& c, const XMLNode* node) : ProxyBase (name, menu_name, *node) , creator (c) {} Gtk::Window* get (bool create = false) { @@ -163,7 +162,7 @@ public: } private: - boost::function creator; + std::function creator; }; template @@ -216,7 +215,7 @@ public: } private: - boost::function creator; + std::function creator; }; } /* namespace */ diff --git a/gtk2_ardour/windows_vst_plugin_ui.cc b/gtk2_ardour/windows_vst_plugin_ui.cc index 199acebf9a..17ebb79cf2 100644 --- a/gtk2_ardour/windows_vst_plugin_ui.cc +++ b/gtk2_ardour/windows_vst_plugin_ui.cc @@ -104,7 +104,7 @@ WindowsVSTPluginUI::package (Gtk::Window& win) VSTPluginUI::package (win); _vst->state()->gtk_window_parent = (void*) (&win); - _vst->VSTSizeWindow.connect (_resize_connection, invalidator (*this), boost::bind (&WindowsVSTPluginUI::resize_callback, this), gui_context()); + _vst->VSTSizeWindow.connect (_resize_connection, invalidator (*this), std::bind (&WindowsVSTPluginUI::resize_callback, this), gui_context()); resize_callback (); diff --git a/headless/load_session.cc b/headless/load_session.cc index ef06d35a73..f921b83676 100644 --- a/headless/load_session.cc +++ b/headless/load_session.cc @@ -262,8 +262,8 @@ main (int argc, char* argv[]) } PBD::ScopedConnectionList con; - BasicUI::AccessAction.connect_same_thread (con, boost::bind (&access_action, _1, _2)); - AudioEngine::instance ()->Halted.connect_same_thread (con, boost::bind (&engine_halted, _1)); + BasicUI::AccessAction.connect_same_thread (con, std::bind (&access_action, _1, _2)); + AudioEngine::instance ()->Halted.connect_same_thread (con, std::bind (&engine_halted, _1)); #ifndef PLATFORM_WINDOWS signal (SIGINT, wearedone); diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index 892182bd69..428d3a71eb 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -93,7 +93,7 @@ namespace ARDOUR { * copy should take place. */ LIBARDOUR_API void check_for_old_configuration_files (); - LIBARDOUR_API int handle_old_configuration_files (boost::function ui_handler); + LIBARDOUR_API int handle_old_configuration_files (std::function ui_handler); LIBARDOUR_API void reset_performance_meters (Session*); } diff --git a/libs/ardour/ardour/async_midi_port.h b/libs/ardour/ardour/async_midi_port.h index d7fb9248d8..695ab2b884 100644 --- a/libs/ardour/ardour/async_midi_port.h +++ b/libs/ardour/ardour/async_midi_port.h @@ -22,7 +22,6 @@ #include #include -#include #include "pbd/xml++.h" #include "pbd/crossthread.h" @@ -72,7 +71,7 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { /* Not selectable; use ios() */ int selectable() const { return -1; } - void set_timer (boost::function&); + void set_timer (std::function&); static void set_process_thread (pthread_t); static pthread_t get_process_thread () { return _process_thread; } @@ -83,7 +82,7 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { MIDI::timestamp_t _last_write_timestamp; bool _flush_at_cycle_start; bool have_timer; - boost::function timer; + std::function timer; PBD::RingBuffer< Evoral::Event > output_fifo; EventRingBuffer input_fifo; Glib::Threads::Mutex output_fifo_lock; diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h index 4d9140ddfb..e7cba2ed59 100644 --- a/libs/ardour/ardour/audio_backend.h +++ b/libs/ardour/ardour/audio_backend.h @@ -26,7 +26,6 @@ #include #include -#include #include "ardour/audioengine.h" #include "ardour/libardour_visibility.h" @@ -784,7 +783,7 @@ public: * * @param func process function to run */ - virtual int create_process_thread (boost::function func) = 0; + virtual int create_process_thread (std::function func) = 0; /** Wait for all processing threads to exit. * diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h index 13b6ba5857..a63913747c 100644 --- a/libs/ardour/ardour/audioengine.h +++ b/libs/ardour/ardour/audioengine.h @@ -104,7 +104,7 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr std::string get_last_backend_error () const { return _last_backend_error_string; } - int create_process_thread (boost::function func); + int create_process_thread (std::function func); int join_process_threads (); bool in_process_thread (); uint32_t process_thread_count (); diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index bf6472a81e..9ea6c25f60 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -29,7 +29,6 @@ #include #include -#include #include "ardour/source.h" #include "ardour/ardour.h" @@ -66,7 +65,7 @@ class LIBARDOUR_API AudioSource : virtual public Source, public ARDOUR::AudioRea samplepos_t start, samplecnt_t cnt, double samples_per_visual_peak) const; int build_peaks (); - bool peaks_ready (boost::function callWhenReady, PBD::ScopedConnection** connection_created_if_not_ready, PBD::EventLoop* event_loop) const; + bool peaks_ready (std::function callWhenReady, PBD::ScopedConnection** connection_created_if_not_ready, PBD::EventLoop* event_loop) const; mutable PBD::Signal PeaksReady; mutable PBD::Signal PeakRangeReady; diff --git a/libs/ardour/ardour/auv2_scan.h b/libs/ardour/ardour/auv2_scan.h index 97e7fcd5ab..7843c298e8 100644 --- a/libs/ardour/ardour/auv2_scan.h +++ b/libs/ardour/ardour/auv2_scan.h @@ -84,7 +84,7 @@ LIBARDOUR_API extern std::string auv2_valid_cache_file (CAComponentDescription const&, bool verbose = false, bool* is_new = NULL); LIBARDOUR_API extern bool -auv2_scan_and_cache (CAComponentDescription&, boost::function cb, bool verbose = false); +auv2_scan_and_cache (CAComponentDescription&, std::function cb, bool verbose = false); LIBARDOUR_API extern void auv2_list_plugins (std::vector& rv); diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h index 6a235c129b..64f1bb33c6 100644 --- a/libs/ardour/ardour/control_protocol_manager.h +++ b/libs/ardour/ardour/control_protocol_manager.h @@ -71,7 +71,7 @@ class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR void set_session (Session*); void discover_control_protocols (); - void foreach_known_protocol (boost::function); + void foreach_known_protocol (std::function); void midi_connectivity_established (bool); void drop_protocols (); void probe_midi_control_protocols (); diff --git a/libs/ardour/ardour/io_tasklist.h b/libs/ardour/ardour/io_tasklist.h index 7758b6c340..4a697bf5d3 100644 --- a/libs/ardour/ardour/io_tasklist.h +++ b/libs/ardour/ardour/io_tasklist.h @@ -20,7 +20,6 @@ #define _ardour_io_tasklist_h_ #include -#include #include #include @@ -39,14 +38,14 @@ public: /** process tasks in list in parallel, wait for them to complete */ void process (); - void push_back (boost::function fn); + void push_back (std::function fn); private: static void* _worker_thread (void*); void io_thread (); - std::vector> _tasks; + std::vector> _tasks; uint32_t _n_threads; std::atomic _n_workers; diff --git a/libs/ardour/ardour/library.h b/libs/ardour/ardour/library.h index cfd7c26839..e24aafd7d2 100644 --- a/libs/ardour/ardour/library.h +++ b/libs/ardour/ardour/library.h @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -66,10 +65,10 @@ class LIBARDOUR_API LibraryFetcher { int get_descriptions (); size_t n_descriptions() const { return _descriptions.size(); } - void foreach_description (boost::function f) const; + void foreach_description (std::function f) const; bool installed (LibraryDescription const & desc); - void foreach_description (boost::function f); + void foreach_description (std::function f); private: std::vector _descriptions; diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index ec59cc4f14..068d7af097 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -410,7 +410,7 @@ public: LV2PluginInfo (const char* plugin_uri); ~LV2PluginInfo (); - static PluginInfoList* discover (boost::function cb); + static PluginInfoList* discover (std::function cb); PluginPtr load (Session& session); std::vector get_presets (bool user_only) const; diff --git a/libs/ardour/ardour/midi_cursor.h b/libs/ardour/ardour/midi_cursor.h index 50509dd757..6e0615863e 100644 --- a/libs/ardour/ardour/midi_cursor.h +++ b/libs/ardour/ardour/midi_cursor.h @@ -38,7 +38,7 @@ struct MidiCursor { void connect(PBD::Signal& invalidated) { connections.drop_connections(); - invalidated.connect_same_thread (connections, boost::bind(&MidiCursor::invalidate, this, _1)); + invalidated.connect_same_thread (connections, std::bind(&MidiCursor::invalidate, this, _1)); } diff --git a/libs/ardour/ardour/midi_patch_manager.h b/libs/ardour/ardour/midi_patch_manager.h index 073b8dd1bd..0851d3d5d1 100644 --- a/libs/ardour/ardour/midi_patch_manager.h +++ b/libs/ardour/ardour/midi_patch_manager.h @@ -151,7 +151,7 @@ public: void load_midnams_in_thread (); void maybe_use (PBD::ScopedConnectionList& clist, PBD::EventLoop::InvalidationRecord* ir, - const boost::function& slot, + const std::function& slot, PBD::EventLoop* event_loop); private: bool load_midi_name_document(const std::string& file_path); diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h index b52a8c4d61..47017dddc1 100644 --- a/libs/ardour/ardour/midi_port.h +++ b/libs/ardour/ardour/midi_port.h @@ -61,7 +61,7 @@ class LIBARDOUR_API MidiPort : public Port { void set_trace (std::weak_ptr trace_parser); std::shared_ptr trace_parser() const; - typedef boost::function MidiFilter; + typedef std::function MidiFilter; void set_inbound_filter (MidiFilter); int add_shadow_port (std::string const &, MidiFilter); std::shared_ptr shadow_port() const { return _shadow_port; } diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index 7693f15b1f..0f83c44aea 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -186,7 +186,7 @@ public: virtual std::shared_ptr combine (const RegionList&, std::shared_ptr); virtual void uncombine (std::shared_ptr); void fade_range (std::list&); - void remove_gaps (timecnt_t const & gap_threshold, timecnt_t const & leave_gap, boost::function gap_callback); + void remove_gaps (timecnt_t const & gap_threshold, timecnt_t const & leave_gap, std::function gap_callback); void shuffle (std::shared_ptr, int dir); @@ -240,7 +240,7 @@ public: samplepos_t find_next_transient (timepos_t const & position, int dir); - void foreach_region (boost::function)>); + void foreach_region (std::function)>); XMLNode& get_state () const; virtual int set_state (const XMLNode&, int version); diff --git a/libs/ardour/ardour/proxy_controllable.h b/libs/ardour/ardour/proxy_controllable.h index 93aa927307..61137ae0ab 100644 --- a/libs/ardour/ardour/proxy_controllable.h +++ b/libs/ardour/ardour/proxy_controllable.h @@ -19,9 +19,11 @@ #pragma once -#include + +#include #include "pbd/controllable.h" +#include "ardour/libardour_visibility.h" namespace ARDOUR { @@ -32,8 +34,8 @@ namespace ARDOUR { class LIBARDOUR_API ProxyControllable : public PBD::Controllable { public: ProxyControllable (const std::string& name, PBD::Controllable::Flag flags, - boost::function1 setter, - boost::function0 getter) + std::function setter, + std::function getter) : PBD::Controllable (name, flags) , _setter (setter) , _getter (getter) @@ -48,8 +50,8 @@ class LIBARDOUR_API ProxyControllable : public PBD::Controllable { } private: - boost::function1 _setter; - boost::function0 _getter; + std::function _setter; + std::function _getter; }; } // namespace diff --git a/libs/ardour/ardour/rc_configuration.h b/libs/ardour/ardour/rc_configuration.h index d8c660f2f6..2fcfa58c62 100644 --- a/libs/ardour/ardour/rc_configuration.h +++ b/libs/ardour/ardour/rc_configuration.h @@ -42,7 +42,7 @@ class LIBARDOUR_API RCConfiguration : public PBD::Configuration RCConfiguration(); ~RCConfiguration(); - void map_parameters (boost::function&); + void map_parameters (std::function&); int set_state (XMLNode const &, int version); XMLNode& get_state () const; XMLNode& get_variables (std::string const & nodename) const; diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 612ae01f1f..861fb0a70f 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -529,7 +529,7 @@ public: return std::shared_ptr (); } - void foreach_plugin (boost::function)> method) const { + void foreach_plugin (std::function)> method) const { Glib::Threads::RWLock::ReaderLock lm (_fx_lock); for (auto const& i : _plugins) { method (std::weak_ptr (i)); diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index d1046724bf..f787ca5f8a 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -106,7 +106,7 @@ public: static uint32_t nregions (); - static void foreach_region (boost::function)> f) + static void foreach_region (std::function)> f) { Glib::Threads::Mutex::Lock ls (region_map_lock); for (RegionMap::const_iterator i = region_map.begin (); i != region_map.end (); ++i) { diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 4fd9c36fd6..e39cea2484 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -228,7 +228,7 @@ public: void flush_processors (); - void foreach_processor (boost::function)> method) const { + void foreach_processor (std::function)> method) const { Glib::Threads::RWLock::ReaderLock lm (_processor_lock); for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) { method (std::weak_ptr (*i)); diff --git a/libs/ardour/ardour/rt_task.h b/libs/ardour/ardour/rt_task.h index 7d4508ac69..ec2a118c49 100644 --- a/libs/ardour/ardour/rt_task.h +++ b/libs/ardour/ardour/rt_task.h @@ -19,7 +19,6 @@ #ifndef _ardour_rt_task_h_ #define _ardour_rt_task_h_ -#include #include "ardour/graphnode.h" @@ -31,14 +30,14 @@ class RTTaskList; class LIBARDOUR_API RTTask : public ProcessNode { public: - RTTask (Graph* g, boost::function const& fn); + RTTask (Graph* g, std::function const& fn); void prep (GraphChain const*) {} void run (GraphChain const*); private: friend class RTTaskList; - boost::function _f; + std::function _f; Graph* _graph; }; diff --git a/libs/ardour/ardour/rt_tasklist.h b/libs/ardour/ardour/rt_tasklist.h index a7bed1d389..ea100dc1b5 100644 --- a/libs/ardour/ardour/rt_tasklist.h +++ b/libs/ardour/ardour/rt_tasklist.h @@ -19,7 +19,6 @@ #ifndef _ardour_rt_tasklist_h_ #define _ardour_rt_tasklist_h_ -#include #include #include "ardour/libardour_visibility.h" @@ -36,7 +35,7 @@ public: /** process tasks in list in parallel, wait for them to complete */ void process (); - void push_back (boost::function fn); + void push_back (std::function fn); std::vector const& tasks () const { return _tasks; } diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 4053206f3f..42bd582e02 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -297,7 +297,7 @@ public: std::vector get_paths_for_new_sources (bool allow_replacing, const std::string& import_file_path, uint32_t channels, std::vector const & smf_track_names, bool use_smf_file_names); - int bring_all_sources_into_session (boost::function callback); + int bring_all_sources_into_session (std::function callback); void process (pframes_t nframes); @@ -713,7 +713,7 @@ public: PBD::Signal route_group_removed; PBD::Signal route_groups_reordered; - void foreach_route_group (boost::function f) { + void foreach_route_group (std::function f) { for (std::list::iterator i = _route_groups.begin(); i != _route_groups.end(); ++i) { f (*i); } @@ -1776,7 +1776,7 @@ private: struct timeval last_mmc_step; double step_speed; - typedef boost::function MidiTimeoutCallback; + typedef std::function MidiTimeoutCallback; typedef std::list MidiTimeoutList; MidiTimeoutList midi_timeouts; @@ -1967,7 +1967,7 @@ public: typedef std::map > SourceMap; - void foreach_source (boost::function )> f) { + void foreach_source (std::function )> f) { Glib::Threads::Mutex::Lock ls (source_lock); for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) { f ( (*i).second ); @@ -2200,7 +2200,7 @@ private: get_rt_event (std::shared_ptr rl, T targ, SessionEvent::RTeventCallback after, PBD::Controllable::GroupControlDisposition group_override, void (Session::*method) (std::shared_ptr, T, PBD::Controllable::GroupControlDisposition)) { SessionEvent* ev = new SessionEvent (SessionEvent::RealTimeOperation, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0); - ev->rt_slot = boost::bind (method, this, rl, targ, group_override); + ev->rt_slot = std::bind (method, this, rl, targ, group_override); ev->rt_return = after; ev->event_loop = PBD::EventLoop::get_event_loop_for_thread (); @@ -2212,7 +2212,7 @@ private: get_rt_event (std::shared_ptr rl, T1 t1arg, T2 t2arg, SessionEvent::RTeventCallback after, PBD::Controllable::GroupControlDisposition group_override, void (Session::*method) (std::shared_ptr, T1, T2, PBD::Controllable::GroupControlDisposition)) { SessionEvent* ev = new SessionEvent (SessionEvent::RealTimeOperation, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0); - ev->rt_slot = boost::bind (method, this, rl, t1arg, t2arg, group_override); + ev->rt_slot = std::bind (method, this, rl, t1arg, t2arg, group_override); ev->rt_return = after; ev->event_loop = PBD::EventLoop::get_event_loop_for_thread (); @@ -2222,7 +2222,7 @@ private: /* specialized version realtime "apply to set of controls" operations */ SessionEvent* get_rt_event (std::shared_ptr cl, double arg, PBD::Controllable::GroupControlDisposition group_override) { SessionEvent* ev = new SessionEvent (SessionEvent::RealTimeOperation, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0); - ev->rt_slot = boost::bind (&Session::rt_set_controls, this, cl, arg, group_override); + ev->rt_slot = std::bind (&Session::rt_set_controls, this, cl, arg, group_override); ev->rt_return = Session::rt_cleanup; ev->event_loop = PBD::EventLoop::get_event_loop_for_thread (); diff --git a/libs/ardour/ardour/session_configuration.h b/libs/ardour/ardour/session_configuration.h index 5e2800cf47..88474b6114 100644 --- a/libs/ardour/ardour/session_configuration.h +++ b/libs/ardour/ardour/session_configuration.h @@ -33,7 +33,7 @@ class LIBARDOUR_API SessionConfiguration : public PBD::Configuration public: SessionConfiguration (); - void map_parameters (boost::function&); + void map_parameters (std::function&); int set_state (XMLNode const &, int version); XMLNode& get_state () const; XMLNode& get_variables (std::string const & nodename) const; diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index f7d34fbe2e..b7698e29fb 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -24,7 +24,6 @@ #include #include -#include #include "pbd/pool.h" #include "pbd/ringbuffer.h" @@ -107,11 +106,11 @@ public: /* 5 members to handle a multi-group event handled in RT context */ - typedef boost::function RTeventCallback; + typedef std::function RTeventCallback; std::shared_ptr controls; /* apply to */ std::shared_ptr routes; /* apply to */ - boost::function rt_slot; /* what to call in RT context */ + std::function rt_slot; /* what to call in RT context */ RTeventCallback rt_return; /* called after rt_slot, with this event as an argument */ PBD::EventLoop* event_loop; @@ -166,7 +165,7 @@ public: virtual void queue_event (SessionEvent *ev) = 0; void clear_events (SessionEvent::Type type); - void clear_events (SessionEvent::Type type, boost::function after); + void clear_events (SessionEvent::Type type, std::function after); protected: PBD::RingBuffer pending_events; diff --git a/libs/ardour/ardour/session_playlists.h b/libs/ardour/ardour/session_playlists.h index 605e9a1753..1ee1faddd3 100644 --- a/libs/ardour/ardour/session_playlists.h +++ b/libs/ardour/ardour/session_playlists.h @@ -27,7 +27,6 @@ #include -#include #include "pbd/signals.h" @@ -57,7 +56,7 @@ public: uint32_t source_use_count (std::shared_ptr src) const; uint32_t region_use_count (std::shared_ptr region) const; template void foreach (T *obj, void (T::*func)(std::shared_ptr)); - void foreach (boost::function)> functor, bool incl_unused = true); + void foreach (std::function)> functor, bool incl_unused = true); void get (std::vector >&) const; void unassigned (std::list > & list); void destroy_region (std::shared_ptr); @@ -86,7 +85,7 @@ private: void find_equivalent_playlist_regions (std::shared_ptr, std::vector >& result); void update_after_tempo_map_change (); void add_state (XMLNode*, bool save_template, bool include_unused) const; - bool maybe_delete_unused (boost::function)>); + bool maybe_delete_unused (std::function)>); int load (Session &, const XMLNode&); int load_unused (Session &, const XMLNode&); std::shared_ptr XMLPlaylistFactory (Session &, const XMLNode&); diff --git a/libs/ardour/ardour/surround_pannable.h b/libs/ardour/ardour/surround_pannable.h index 2985339871..9f836caac4 100644 --- a/libs/ardour/ardour/surround_pannable.h +++ b/libs/ardour/ardour/surround_pannable.h @@ -61,7 +61,7 @@ public: return (_auto_state & Play) || ((_auto_state & (Touch | Latch)) && !touching()); } - void foreach_pan_control (boost::function)>) const; + void foreach_pan_control (std::function)>) const; void setup_visual_links (); void sync_visual_link_to (std::shared_ptr); diff --git a/libs/ardour/ardour/vst2_scan.h b/libs/ardour/ardour/vst2_scan.h index 62b151bd30..5341ae43fd 100644 --- a/libs/ardour/ardour/vst2_scan.h +++ b/libs/ardour/ardour/vst2_scan.h @@ -74,7 +74,7 @@ LIBARDOUR_API extern std::string vst2_valid_cache_file (std::string const& path, bool verbose = false, bool* is_new = NULL); LIBARDOUR_API extern bool -vst2_scan_and_cache (std::string const& path, ARDOUR::PluginType, boost::function cb, bool verbose = false); +vst2_scan_and_cache (std::string const& path, ARDOUR::PluginType, std::function cb, bool verbose = false); } // namespace ARDOUR diff --git a/libs/ardour/ardour/vst3_scan.h b/libs/ardour/ardour/vst3_scan.h index 9634887f34..0bd842cc2e 100644 --- a/libs/ardour/ardour/vst3_scan.h +++ b/libs/ardour/ardour/vst3_scan.h @@ -75,7 +75,7 @@ LIBARDOUR_API extern std::string vst3_valid_cache_file (std::string const& module_path, bool verbose = false, bool* is_new = NULL); LIBARDOUR_API extern bool -vst3_scan_and_cache (std::string const& module_path, std::string const& bundle_path, boost::function cb, bool verbose = false); +vst3_scan_and_cache (std::string const& module_path, std::string const& bundle_path, std::function cb, bool verbose = false); } // namespace ARDOUR diff --git a/libs/ardour/async_midi_port.cc b/libs/ardour/async_midi_port.cc index 7c4effa620..395182164b 100644 --- a/libs/ardour/async_midi_port.cc +++ b/libs/ardour/async_midi_port.cc @@ -62,7 +62,7 @@ AsyncMIDIPort::~AsyncMIDIPort () } void -AsyncMIDIPort::set_timer (boost::function& f) +AsyncMIDIPort::set_timer (std::function& f) { timer = f; have_timer = true; diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index baa1b9ccb3..6ffe63ee96 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -89,7 +89,7 @@ AudioTrack::set_state (const XMLNode& node, int version) pending_state = const_cast (&node); if (_session.loading ()) { - _session.StateReady.connect_same_thread (*this, boost::bind (&AudioTrack::set_state_part_two, this)); + _session.StateReady.connect_same_thread (*this, std::bind (&AudioTrack::set_state_part_two, this)); } else { set_state_part_two (); } diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 019dd3b7cf..99bb95f12b 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -767,13 +767,13 @@ AudioEngine::start_hw_event_processing() if (_hw_reset_event_thread == 0) { _hw_reset_request_count.store (0); _stop_hw_reset_processing.store (0); - _hw_reset_event_thread = PBD::Thread::create (boost::bind (&AudioEngine::do_reset_backend, this), "EngineWatchdog"); + _hw_reset_event_thread = PBD::Thread::create (std::bind (&AudioEngine::do_reset_backend, this), "EngineWatchdog"); } if (_hw_devicelist_update_thread == 0) { _hw_devicelist_update_count.store (0); _stop_hw_devicelist_processing.store (0); - _hw_devicelist_update_thread = PBD::Thread::create (boost::bind (&AudioEngine::do_devicelist_update, this), "DeviceList"); + _hw_devicelist_update_thread = PBD::Thread::create (std::bind (&AudioEngine::do_devicelist_update, this), "DeviceList"); } } @@ -1317,7 +1317,7 @@ AudioEngine::get_sync_offset (pframes_t& offset) const } int -AudioEngine::create_process_thread (boost::function func) +AudioEngine::create_process_thread (std::function func) { if (!_backend) { return -1; diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index bbbad9a443..90364e13ac 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -467,7 +467,7 @@ void AudioRegion::connect_to_analysis_changed () { for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) { - (*i)->AnalysisChanged.connect_same_thread (*this, boost::bind (&AudioRegion::maybe_invalidate_transients, this)); + (*i)->AnalysisChanged.connect_same_thread (*this, std::bind (&AudioRegion::maybe_invalidate_transients, this)); } } @@ -485,7 +485,7 @@ AudioRegion::connect_to_header_position_offset_changed () unique_srcs.insert (*i); std::shared_ptr afs = std::dynamic_pointer_cast (*i); if (afs) { - afs->HeaderPositionOffsetChanged.connect_same_thread (*this, boost::bind (&AudioRegion::source_offset_changed, this)); + afs->HeaderPositionOffsetChanged.connect_same_thread (*this, std::bind (&AudioRegion::source_offset_changed, this)); } } } @@ -494,9 +494,9 @@ AudioRegion::connect_to_header_position_offset_changed () void AudioRegion::listen_to_my_curves () { - _envelope->StateChanged.connect_same_thread (*this, boost::bind (&AudioRegion::envelope_changed, this)); - _fade_in->StateChanged.connect_same_thread (*this, boost::bind (&AudioRegion::fade_in_changed, this)); - _fade_out->StateChanged.connect_same_thread (*this, boost::bind (&AudioRegion::fade_out_changed, this)); + _envelope->StateChanged.connect_same_thread (*this, std::bind (&AudioRegion::envelope_changed, this)); + _fade_in->StateChanged.connect_same_thread (*this, std::bind (&AudioRegion::fade_in_changed, this)); + _fade_out->StateChanged.connect_same_thread (*this, std::bind (&AudioRegion::fade_out_changed, this)); } void @@ -2516,7 +2516,7 @@ AudioRegion::_add_plugin (std::shared_ptr rfx, std::shared_ptrdelegate (boost::bind (&AudioRegion::send_change, this, PropertyChange (Properties::region_fx))); + _session.butler ()->delegate (std::bind (&AudioRegion::send_change, this, PropertyChange (Properties::region_fx))); } } }); @@ -2531,8 +2531,8 @@ AudioRegion::_add_plugin (std::shared_ptr rfx, std::shared_ptrLatencyChanged.connect_same_thread (*this, boost::bind (&AudioRegion::fx_latency_changed, this, false)); - rfx->TailTimeChanged.connect_same_thread (*this, boost::bind (&AudioRegion::fx_tail_changed, this, false)); + rfx->LatencyChanged.connect_same_thread (*this, std::bind (&AudioRegion::fx_latency_changed, this, false)); + rfx->TailTimeChanged.connect_same_thread (*this, std::bind (&AudioRegion::fx_tail_changed, this, false)); rfx->set_block_size (_session.get_block_size ()); if (from_set_state) { diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 80e48f6369..9b1e993048 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -177,7 +177,7 @@ AudioSource::update_length (timepos_t const & dur) * @param event_loop Event loop for doThisWhenReady to be called in. */ bool -AudioSource::peaks_ready (boost::function doThisWhenReady, ScopedConnection** connect_here_if_not, EventLoop* event_loop) const +AudioSource::peaks_ready (std::function doThisWhenReady, ScopedConnection** connect_here_if_not, EventLoop* event_loop) const { bool ret; Glib::Threads::Mutex::Lock lm (_peaks_ready_lock); diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index d142aa9dff..95ac573741 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -84,7 +84,7 @@ Auditioner::init () lookup_fallback_synth (); } - _output->changed.connect_same_thread (*this, boost::bind (&Auditioner::output_changed, this, _1, _2)); + _output->changed.connect_same_thread (*this, std::bind (&Auditioner::output_changed, this, _1, _2)); return 0; } diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 01b42cd497..7f18dad53f 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -173,7 +173,7 @@ Automatable::add_control(std::shared_ptr ac) if ((!actl || !(actl->flags() & Controllable::NotAutomatable)) && al) { al->automation_state_changed.connect_same_thread ( _list_connections, - boost::bind (&Automatable::automation_list_automation_state_changed, + std::bind (&Automatable::automation_list_automation_state_changed, this, ac->parameter(), _1)); } diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 3fc0492946..8537e9940c 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -65,7 +65,7 @@ AutomationControl::AutomationControl(ARDOUR::Session& s } std::shared_ptr al = alist(); if (al) { - al->StateChanged.connect_same_thread (_state_changed_connection, boost::bind (&Session::set_dirty, &_session)); + al->StateChanged.connect_same_thread (_state_changed_connection, std::bind (&Session::set_dirty, &_session)); } } diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc index e2c7574249..19c6e28b9f 100644 --- a/libs/ardour/automation_list.cc +++ b/libs/ardour/automation_list.cc @@ -174,7 +174,7 @@ AutomationList::create_curve_if_necessary() break; } - WritePassStarted.connect_same_thread (_writepass_connection, boost::bind (&AutomationList::snapshot_history, this, false)); + WritePassStarted.connect_same_thread (_writepass_connection, std::bind (&AutomationList::snapshot_history, this, false)); } AutomationList& diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc index 20b6b093a9..2983f03084 100644 --- a/libs/ardour/automation_watch.cc +++ b/libs/ardour/automation_watch.cc @@ -106,7 +106,7 @@ AutomationWatch::add_automation_watch (std::shared_ptr ac) */ std::weak_ptr wac (ac); - ac->DropReferences.connect_same_thread (automation_connections[ac], boost::bind (&AutomationWatch::remove_weak_automation_watch, this, wac)); + ac->DropReferences.connect_same_thread (automation_connections[ac], std::bind (&AutomationWatch::remove_weak_automation_watch, this, wac)); } void @@ -223,9 +223,9 @@ AutomationWatch::set_session (Session* s) if (_session) { _run_thread = true; - _thread = PBD::Thread::create (boost::bind (&AutomationWatch::thread, this), "AutomationWatch"); + _thread = PBD::Thread::create (std::bind (&AutomationWatch::thread, this), "AutomationWatch"); - _session->TransportStateChange.connect_same_thread (transport_connection, boost::bind (&AutomationWatch::transport_state_change, this)); + _session->TransportStateChange.connect_same_thread (transport_connection, std::bind (&AutomationWatch::transport_state_change, this)); } } diff --git a/libs/ardour/auv2_scan.cc b/libs/ardour/auv2_scan.cc index 66e1af8cff..1d24332af9 100644 --- a/libs/ardour/auv2_scan.cc +++ b/libs/ardour/auv2_scan.cc @@ -444,7 +444,7 @@ auv2_save_cache_file (CAComponentDescription& desc, XMLNode* root, bool verbose) } bool -ARDOUR::auv2_scan_and_cache (CAComponentDescription& desc, boost::function cb, bool verbose) +ARDOUR::auv2_scan_and_cache (CAComponentDescription& desc, std::function cb, bool verbose) { XMLNode* root = new XMLNode ("AUv2Cache"); root->set_property ("version", 2); diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc index 274e2cf5ea..4ad4574069 100644 --- a/libs/ardour/butler.cc +++ b/libs/ardour/butler.cc @@ -69,7 +69,7 @@ Butler::Butler (Session& s) SessionEvent::pool->set_trash (&pool_trash); /* catch future changes to parameters */ - Config->ParameterChanged.connect_same_thread (*this, boost::bind (&Butler::config_changed, this, _1)); + Config->ParameterChanged.connect_same_thread (*this, std::bind (&Butler::config_changed, this, _1)); } Butler::~Butler () @@ -81,7 +81,7 @@ void Butler::map_parameters () { /* use any current ones that we care about */ - boost::function ff (boost::bind (&Butler::config_changed, this, _1)); + std::function ff (std::bind (&Butler::config_changed, this, _1)); Config->map_parameters (ff); } diff --git a/libs/ardour/control_group.cc b/libs/ardour/control_group.cc index b7fc39114a..df8d605deb 100644 --- a/libs/ardour/control_group.cc +++ b/libs/ardour/control_group.cc @@ -169,7 +169,7 @@ ControlGroup::add_control (std::shared_ptr ac, bool push) ac->set_group (shared_from_this()); } - ac->DropReferences.connect_same_thread (member_connections, boost::bind (&ControlGroup::control_going_away, this, std::weak_ptr(ac))); + ac->DropReferences.connect_same_thread (member_connections, std::bind (&ControlGroup::control_going_away, this, std::weak_ptr(ac))); return 0; } diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 4746162129..e7f1016a1b 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -503,7 +503,7 @@ ControlProtocolManager::get_descriptor (string path) } void -ControlProtocolManager::foreach_known_protocol (boost::function method) +ControlProtocolManager::foreach_known_protocol (std::function method) { for (list::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { method (*i); diff --git a/libs/ardour/convolver.cc b/libs/ardour/convolver.cc index 9dd1dfecf6..9eb49e1637 100644 --- a/libs/ardour/convolver.cc +++ b/libs/ardour/convolver.cc @@ -49,7 +49,7 @@ Convolution::Convolution (Session& session, uint32_t n_in, uint32_t n_out) , _n_inputs (n_in) , _n_outputs (n_out) { - AudioEngine::instance ()->BufferSizeChanged.connect_same_thread (*this, boost::bind (&Convolution::restart, this)); + AudioEngine::instance ()->BufferSizeChanged.connect_same_thread (*this, std::bind (&Convolution::restart, this)); } bool diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index b7efde08af..4433d18efc 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -74,7 +74,7 @@ Delivery::Delivery (Session& s, std::shared_ptr io, std::shared_ptrchanged.connect_same_thread (*this, boost::bind (&Delivery::output_changed, this, _1, _2)); + _output->changed.connect_same_thread (*this, std::bind (&Delivery::output_changed, this, _1, _2)); } } @@ -98,7 +98,7 @@ Delivery::Delivery (Session& s, std::shared_ptr pannable, std::shared_ _display_to_user = false; if (_output) { - _output->changed.connect_same_thread (*this, boost::bind (&Delivery::output_changed, this, _1, _2)); + _output->changed.connect_same_thread (*this, std::bind (&Delivery::output_changed, this, _1, _2)); } } @@ -494,7 +494,7 @@ Delivery::reset_panner () } else { panner_legal_c.disconnect (); - PannersLegal.connect_same_thread (panner_legal_c, boost::bind (&Delivery::panners_became_legal, this)); + PannersLegal.connect_same_thread (panner_legal_c, std::bind (&Delivery::panners_became_legal, this)); } } diff --git a/libs/ardour/disk_io.cc b/libs/ardour/disk_io.cc index cfd7832778..afc2e9212b 100644 --- a/libs/ardour/disk_io.cc +++ b/libs/ardour/disk_io.cc @@ -312,10 +312,10 @@ DiskIOProcessor::use_playlist (DataType dt, std::shared_ptr playlist) _playlists[dt] = playlist; playlist->use(); - playlist->ContentsChanged.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_modified, this)); - playlist->LayeringChanged.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_modified, this)); - playlist->DropReferences.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_deleted, this, std::weak_ptr(playlist))); - playlist->RangesMoved.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_ranges_moved, this, _1, _2)); + playlist->ContentsChanged.connect_same_thread (playlist_connections, std::bind (&DiskIOProcessor::playlist_modified, this)); + playlist->LayeringChanged.connect_same_thread (playlist_connections, std::bind (&DiskIOProcessor::playlist_modified, this)); + playlist->DropReferences.connect_same_thread (playlist_connections, std::bind (&DiskIOProcessor::playlist_deleted, this, std::weak_ptr(playlist))); + playlist->RangesMoved.connect_same_thread (playlist_connections, std::bind (&DiskIOProcessor::playlist_ranges_moved, this, _1, _2)); DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1 now using playlist %1 (%2)\n", name(), playlist->name(), playlist->id())); diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc index f5c525fad2..5529518ff2 100644 --- a/libs/ardour/disk_reader.cc +++ b/libs/ardour/disk_reader.cc @@ -1422,7 +1422,7 @@ DiskReader::playlist_ranges_moved (list const& movements, b } /* move processor automation */ - _track.foreach_processor (boost::bind (&DiskReader::move_processor_automation, this, _1, movements)); + _track.foreach_processor (std::bind (&DiskReader::move_processor_automation, this, _1, movements)); } void diff --git a/libs/ardour/export_channel.cc b/libs/ardour/export_channel.cc index 9e367fe3bc..e7f00edbdb 100644 --- a/libs/ardour/export_channel.cc +++ b/libs/ardour/export_channel.cc @@ -291,7 +291,7 @@ RegionExportChannelFactory::RegionExportChannelFactory (Session* session, AudioR throw ExportFailed ("Unhandled type in ExportChannelFactory constructor"); } - session->ProcessExport.connect_same_thread (export_connection, boost::bind (&RegionExportChannelFactory::new_cycle_started, this, _1)); + session->ProcessExport.connect_same_thread (export_connection, std::bind (&RegionExportChannelFactory::new_cycle_started, this, _1)); buffers.ensure_buffers (DataType::AUDIO, n_channels, samples_per_cycle); buffers.set_count (ChanCount (DataType::AUDIO, n_channels)); diff --git a/libs/ardour/export_format_manager.cc b/libs/ardour/export_format_manager.cc index 9f227a0fa8..38ee47fd8c 100644 --- a/libs/ardour/export_format_manager.cc +++ b/libs/ardour/export_format_manager.cc @@ -251,14 +251,14 @@ ExportFormatManager::add_compatibility (ExportFormatCompatibilityPtr ptr) { compatibilities.push_back (ptr); ptr->SelectChanged.connect_same_thread (*this, - boost::bind (&ExportFormatManager::change_compatibility_selection, + std::bind (&ExportFormatManager::change_compatibility_selection, this, _1, WeakExportFormatCompatibilityPtr (ptr))); } void ExportFormatManager::add_quality (QualityPtr ptr) { - ptr->SelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_quality_selection, this, _1, WeakQualityPtr (ptr))); + ptr->SelectChanged.connect_same_thread (*this, std::bind (&ExportFormatManager::change_quality_selection, this, _1, WeakQualityPtr (ptr))); qualities.push_back (ptr); } @@ -266,7 +266,7 @@ void ExportFormatManager::add_format (ExportFormatPtr ptr) { formats.push_back (ptr); - ptr->SelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_format_selection, this, _1, WeakExportFormatPtr (ptr))); + ptr->SelectChanged.connect_same_thread (*this, std::bind (&ExportFormatManager::change_format_selection, this, _1, WeakExportFormatPtr (ptr))); universal_set = universal_set->get_union (*ptr); /* Encoding options */ @@ -274,15 +274,15 @@ ExportFormatManager::add_format (ExportFormatPtr ptr) std::shared_ptr hsf; if ((hsf = std::dynamic_pointer_cast (ptr))) { - hsf->SampleFormatSelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_sample_format_selection, this, _1, _2)); - hsf->DitherTypeSelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_dither_type_selection, this, _1, _2)); + hsf->SampleFormatSelectChanged.connect_same_thread (*this, std::bind (&ExportFormatManager::change_sample_format_selection, this, _1, _2)); + hsf->DitherTypeSelectChanged.connect_same_thread (*this, std::bind (&ExportFormatManager::change_dither_type_selection, this, _1, _2)); } } void ExportFormatManager::add_sample_rate (SampleRatePtr ptr) { - ptr->SelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_sample_rate_selection, this, _1, WeakSampleRatePtr (ptr))); + ptr->SelectChanged.connect_same_thread (*this, std::bind (&ExportFormatManager::change_sample_rate_selection, this, _1, WeakSampleRatePtr (ptr))); sample_rates.push_back (ptr); } diff --git a/libs/ardour/export_formats.cc b/libs/ardour/export_formats.cc index 29364cf9ae..5c9ad5ef66 100644 --- a/libs/ardour/export_formats.cc +++ b/libs/ardour/export_formats.cc @@ -67,12 +67,12 @@ HasSampleFormat::add_sample_format (ExportFormatBase::SampleFormat format) SampleFormatPtr ptr (new SampleFormatState (format, get_sample_format_name (format))); sample_format_states.push_back (ptr); - ptr->SelectChanged.connect_same_thread (*this, boost::bind (&HasSampleFormat::update_sample_format_selection, this, _1)); + ptr->SelectChanged.connect_same_thread (*this, std::bind (&HasSampleFormat::update_sample_format_selection, this, _1)); // BOOST SIGNALS Could this be made any uglier? ptr->SelectChanged.connect_same_thread (*this, - boost::bind (boost::type (), boost::ref (SampleFormatSelectChanged), _1, WeakSampleFormatPtr (ptr))); + std::bind ( std::ref (SampleFormatSelectChanged), _1, WeakSampleFormatPtr (ptr))); ptr->CompatibleChanged.connect_same_thread (*this, - boost::bind (boost::type (), boost::ref (SampleFormatCompatibleChanged), _1, WeakSampleFormatPtr (ptr))); + std::bind ( std::ref (SampleFormatCompatibleChanged), _1, WeakSampleFormatPtr (ptr))); } void @@ -80,12 +80,12 @@ HasSampleFormat::add_dither_type (ExportFormatBase::DitherType type, string name { DitherTypePtr ptr (new DitherTypeState (type, name)); dither_type_states.push_back (ptr); - ptr->SelectChanged.connect_same_thread (*this, boost::bind (&HasSampleFormat::update_dither_type_selection, this, _1)); + ptr->SelectChanged.connect_same_thread (*this, std::bind (&HasSampleFormat::update_dither_type_selection, this, _1)); // BOOST SIGNALS Could this be made any uglier? ptr->SelectChanged.connect_same_thread (*this, - boost::bind (boost::type (), boost::ref (DitherTypeSelectChanged), _1, WeakDitherTypePtr (ptr))); + std::bind ( std::ref (DitherTypeSelectChanged), _1, WeakDitherTypePtr (ptr))); ptr->CompatibleChanged.connect_same_thread (*this, - boost::bind (boost::type (),boost::ref ( DitherTypeCompatibleChanged), _1, WeakDitherTypePtr (ptr))); + std::bind (std::ref ( DitherTypeCompatibleChanged), _1, WeakDitherTypePtr (ptr))); } HasSampleFormat::SampleFormatPtr diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc index a428e5f7df..5a4bd7d671 100644 --- a/libs/ardour/export_graph_builder.cc +++ b/libs/ardour/export_graph_builder.cc @@ -437,7 +437,7 @@ ExportGraphBuilder::Encoder::init_writer (std::shared_ptrget_path (config.format); writer.reset (new AudioGrapher::SndfileWriter (writer_filename, format, channels, config.format->sample_rate(), config.broadcast_info)); - writer->FileWritten.connect_same_thread (copy_files_connection, boost::bind (&ExportGraphBuilder::Encoder::copy_files, this, _1)); + writer->FileWritten.connect_same_thread (copy_files_connection, std::bind (&ExportGraphBuilder::Encoder::copy_files, this, _1)); if ((format & SF_FORMAT_SUBMASK) == ExportFormatBase::SF_Vorbis || (format & SF_FORMAT_TYPEMASK) == ExportFormatBase::F_MPEG || (format & SF_FORMAT_SUBMASK) == ExportFormatBase::SF_Opus) { @@ -557,7 +557,7 @@ ExportGraphBuilder::Encoder::init_writer (std::shared_ptrto_s () << "}" << endmsg; writer.reset (new AudioGrapher::CmdPipeWriter (exec, writer_filename, fd, tmpfile_name)); - writer->FileWritten.connect_same_thread (copy_files_connection, boost::bind (&ExportGraphBuilder::Encoder::copy_files, this, _1)); + writer->FileWritten.connect_same_thread (copy_files_connection, std::bind (&ExportGraphBuilder::Encoder::copy_files, this, _1)); } void @@ -802,9 +802,9 @@ ExportGraphBuilder::Intermediate::Intermediate (ExportGraphBuilder & parent, Fil } tmp_file->FileWritten.connect_same_thread (post_processing_connection, - boost::bind (&Intermediate::prepare_post_processing, this)); + std::bind (&Intermediate::prepare_post_processing, this)); tmp_file->FileFlushed.connect_same_thread (post_processing_connection, - boost::bind (&Intermediate::start_post_processing, this)); + std::bind (&Intermediate::start_post_processing, this)); add_child (new_config); diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index 91954eccfe..69afee431d 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -124,7 +124,7 @@ ExportHandler::ExportHandler (Session & session) pthread_mutex_init (&_timespan_mutex, 0); pthread_cond_init (&_timespan_cond, 0); _timespan_thread_active.store (1); - _timespan_thread = PBD::Thread::create (boost::bind (_timespan_thread_run, this), "ExportHandler"); + _timespan_thread = PBD::Thread::create (std::bind (_timespan_thread_run, this), "ExportHandler"); if (!_timespan_thread) { _timespan_thread_active.store (0); fatal << "Cannot create export handler helper thread" << endmsg; @@ -285,7 +285,7 @@ ExportHandler::start_timespan () /* start export */ post_processing = false; - session.ProcessExport.connect_same_thread (process_connection, boost::bind (&ExportHandler::process, this, _1)); + session.ProcessExport.connect_same_thread (process_connection, std::bind (&ExportHandler::process, this, _1)); process_position = current_timespan->get_start(); if (!region_export && !current_timespan->vapor ().empty () && session.surround_master ()) { @@ -528,7 +528,7 @@ ExportHandler::finish_timespan () ARDOUR::SystemExec *se = new ARDOUR::SystemExec(fmt->command(), subs, true); info << "Post-export command line : {" << se->to_s () << "}" << endmsg; - se->ReadStdout.connect_same_thread(command_connection, boost::bind(&ExportHandler::command_output, this, _1, _2)); + se->ReadStdout.connect_same_thread(command_connection, std::bind(&ExportHandler::command_output, this, _1, _2)); int ret = se->start (SystemExec::MergeWithStdin); if (ret == 0) { // successfully started diff --git a/libs/ardour/ffmpegfileimportable.cc b/libs/ardour/ffmpegfileimportable.cc index 6d85304af9..9ea0125305 100644 --- a/libs/ardour/ffmpegfileimportable.cc +++ b/libs/ardour/ffmpegfileimportable.cc @@ -69,7 +69,7 @@ FFMPEGFileImportableSource::FFMPEGFileImportableSource (const std::string& path, try { PBD::ScopedConnection c; std::string ffprobe_output; - exec->ReadStdout.connect_same_thread (c, boost::bind (&receive_stdout, &ffprobe_output, _1, _2)); + exec->ReadStdout.connect_same_thread (c, std::bind (&receive_stdout, &ffprobe_output, std::placeholders::_1, std::placeholders::_2)); /* wait for ffprobe process to exit */ exec->wait (); @@ -193,7 +193,7 @@ FFMPEGFileImportableSource::start_ffmpeg () throw std::runtime_error ("Failed to start ffmpeg"); } - _ffmpeg_exec->ReadStdout.connect_same_thread (_ffmpeg_conn, boost::bind (&FFMPEGFileImportableSource::did_read_data, this, _1, _2)); + _ffmpeg_exec->ReadStdout.connect_same_thread (_ffmpeg_conn, std::bind (&FFMPEGFileImportableSource::did_read_data, this, std::placeholders::_1, std::placeholders::_2)); } void diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 0339164e6d..8a7c88f7ad 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -589,7 +589,7 @@ ARDOUR::check_for_old_configuration_files () } int -ARDOUR::handle_old_configuration_files (boost::function ui_handler) +ARDOUR::handle_old_configuration_files (std::function ui_handler) { if (have_old_configuration_files) { int current_version = atoi (X_(PROGRAM_VERSION)); @@ -787,7 +787,7 @@ ARDOUR::init (bool try_optimization, const char* localedir, bool with_gui) MIDI::Name::MidiPatchManager::instance ().load_midnams_in_thread (); - Config->ParameterChanged.connect_same_thread (config_connection, boost::bind (&config_changed, _1)); + Config->ParameterChanged.connect_same_thread (config_connection, std::bind (&config_changed, _1)); libardour_initialized = true; diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc index 486dda0294..b07ad1e5b7 100644 --- a/libs/ardour/graph.cc +++ b/libs/ardour/graph.cc @@ -77,9 +77,9 @@ Graph::Graph (Session& session) /* pre-allocate memory */ _trigger_queue.reserve (1024); - ARDOUR::AudioEngine::instance ()->Running.connect_same_thread (engine_connections, boost::bind (&Graph::reset_thread_list, this)); - ARDOUR::AudioEngine::instance ()->Stopped.connect_same_thread (engine_connections, boost::bind (&Graph::engine_stopped, this)); - ARDOUR::AudioEngine::instance ()->Halted.connect_same_thread (engine_connections, boost::bind (&Graph::engine_stopped, this)); + ARDOUR::AudioEngine::instance ()->Running.connect_same_thread (engine_connections, std::bind (&Graph::reset_thread_list, this)); + ARDOUR::AudioEngine::instance ()->Stopped.connect_same_thread (engine_connections, std::bind (&Graph::engine_stopped, this)); + ARDOUR::AudioEngine::instance ()->Halted.connect_same_thread (engine_connections, std::bind (&Graph::engine_stopped, this)); reset_thread_list (); @@ -124,12 +124,12 @@ Graph::reset_thread_list () /* Allow threads to run */ _terminate.store (0); - if (AudioEngine::instance ()->create_process_thread (boost::bind (&Graph::main_thread, this)) != 0) { + if (AudioEngine::instance ()->create_process_thread (std::bind (&Graph::main_thread, this)) != 0) { throw failed_constructor (); } for (uint32_t i = 1; i < num_threads; ++i) { - if (AudioEngine::instance ()->create_process_thread (boost::bind (&Graph::helper_thread, this))) { + if (AudioEngine::instance ()->create_process_thread (std::bind (&Graph::helper_thread, this))) { throw failed_constructor (); } } diff --git a/libs/ardour/instrument_info.cc b/libs/ardour/instrument_info.cc index 791b8c1b58..d012b8940d 100644 --- a/libs/ardour/instrument_info.cc +++ b/libs/ardour/instrument_info.cc @@ -77,7 +77,7 @@ InstrumentInfo::set_internal_instrument (std::shared_ptr p) std::shared_ptr pi = std::dynamic_pointer_cast (p); if (pi && pi->plugin ()->has_midnam ()) { - pi->plugin()->UpdatedMidnam.connect_same_thread (_midnam_changed, boost::bind (&InstrumentInfo::emit_changed, this)); + pi->plugin()->UpdatedMidnam.connect_same_thread (_midnam_changed, std::bind (&InstrumentInfo::emit_changed, this)); } } diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc index 7b73e5745f..af340d1c01 100644 --- a/libs/ardour/internal_send.cc +++ b/libs/ardour/internal_send.cc @@ -68,8 +68,8 @@ InternalSend::InternalSend (Session& s, init_gain (); - _send_from->DropReferences.connect_same_thread (source_connection, boost::bind (&InternalSend::send_from_going_away, this)); - CycleStart.connect_same_thread (*this, boost::bind (&InternalSend::cycle_start, this, _1)); + _send_from->DropReferences.connect_same_thread (source_connection, std::bind (&InternalSend::send_from_going_away, this)); + CycleStart.connect_same_thread (*this, std::bind (&InternalSend::cycle_start, this, _1)); } InternalSend::~InternalSend () @@ -175,9 +175,9 @@ InternalSend::use_target (std::shared_ptr sendto, bool update_name) target_connections.drop_connections (); - _send_to->DropReferences.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_going_away, this)); - _send_to->PropertyChanged.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_property_changed, this, _1)); - _send_to->io_changed.connect_same_thread (target_connections, boost::bind (&InternalSend::target_io_changed, this)); + _send_to->DropReferences.connect_same_thread (target_connections, std::bind (&InternalSend::send_to_going_away, this)); + _send_to->PropertyChanged.connect_same_thread (target_connections, std::bind (&InternalSend::send_to_property_changed, this, _1)); + _send_to->io_changed.connect_same_thread (target_connections, std::bind (&InternalSend::target_io_changed, this)); return 0; } @@ -424,7 +424,7 @@ InternalSend::set_state (const XMLNode& node, int version) */ if (_session.loading()) { - Session::AfterConnect.connect_same_thread (connect_c, boost::bind (&InternalSend::after_connect, this)); + Session::AfterConnect.connect_same_thread (connect_c, std::bind (&InternalSend::after_connect, this)); } else { after_connect (); } diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 91141fe5d5..d20c5c1132 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -501,7 +501,7 @@ IO::reestablish_port_subscriptions () { _port_connections.drop_connections (); for (auto const& p : *ports ()) { - p->ConnectedOrDisconnected.connect_same_thread (*this, boost::bind (&IO::connection_change, this, _1, _2)); + p->ConnectedOrDisconnected.connect_same_thread (*this, std::bind (&IO::connection_change, this, _1, _2)); } } @@ -1506,7 +1506,7 @@ IO::bundles_connected () IO::UserBundleInfo::UserBundleInfo (IO* io, std::shared_ptr b) { bundle = b; - b->Changed.connect_same_thread (changed, boost::bind (&IO::bundle_changed, io, _1)); + b->Changed.connect_same_thread (changed, std::bind (&IO::bundle_changed, io, _1)); } std::string diff --git a/libs/ardour/io_plug.cc b/libs/ardour/io_plug.cc index 18df41dd26..2ce948f570 100644 --- a/libs/ardour/io_plug.cc +++ b/libs/ardour/io_plug.cc @@ -255,7 +255,7 @@ IOPlug::setup () } _plugin->reconfigure_io (_n_in, aux_in, _n_out); - _plugin->ParameterChangedExternally.connect_same_thread (*this, boost::bind (&IOPlug::parameter_changed_externally, this, _1, _2)); + _plugin->ParameterChangedExternally.connect_same_thread (*this, std::bind (&IOPlug::parameter_changed_externally, this, _1, _2)); _plugin->activate (); _plugin->set_insert (this, 0); } @@ -359,7 +359,7 @@ IOPlug::create_parameters () add_control (c); } - _plugin->PresetPortSetValue.connect_same_thread (*this, boost::bind (&IOPlug::preset_load_set_value, this, _1, _2)); + _plugin->PresetPortSetValue.connect_same_thread (*this, std::bind (&IOPlug::preset_load_set_value, this, _1, _2)); } void diff --git a/libs/ardour/io_tasklist.cc b/libs/ardour/io_tasklist.cc index d60a2816ec..d1756fe1fd 100644 --- a/libs/ardour/io_tasklist.cc +++ b/libs/ardour/io_tasklist.cc @@ -101,7 +101,7 @@ IOTaskList::~IOTaskList () } void -IOTaskList::push_back (boost::function fn) +IOTaskList::push_back (std::function fn) { _tasks.push_back (fn); } @@ -171,7 +171,7 @@ IOTaskList::io_thread () Temporal::TempoMap::fetch (); while (1) { - boost::function fn; + std::function fn; Glib::Threads::Mutex::Lock lm (_tasks_mutex); if (_tasks.empty ()) { break; diff --git a/libs/ardour/library.cc b/libs/ardour/library.cc index 4c06d03323..4b375f0c49 100644 --- a/libs/ardour/library.cc +++ b/libs/ardour/library.cc @@ -156,7 +156,7 @@ LibraryFetcher::add (std::string const & root_dir) } void -LibraryFetcher::foreach_description (boost::function f) +LibraryFetcher::foreach_description (std::function f) { for (auto ld : _descriptions) { f (ld); diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index 8c642485a9..2ba9e60b74 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -63,7 +63,7 @@ LTC_TransportMaster::LTC_TransportMaster (std::string const & name) { memset (&prev_frame, 0, sizeof(LTCFrameExt)); - AudioEngine::instance()->Xrun.connect_same_thread (port_connection, boost::bind (<C_TransportMaster::resync_xrun, this)); + AudioEngine::instance()->Xrun.connect_same_thread (port_connection, std::bind (<C_TransportMaster::resync_xrun, this)); } @@ -115,8 +115,8 @@ LTC_TransportMaster::set_session (Session *s) fps_detected = false; - _session->config.ParameterChanged.connect_same_thread (session_connections, boost::bind (<C_TransportMaster::parameter_changed, this, _1)); - _session->LatencyUpdated.connect_same_thread (session_connections, boost::bind (<C_TransportMaster::resync_latency, this, _1)); + _session->config.ParameterChanged.connect_same_thread (session_connections, std::bind (<C_TransportMaster::parameter_changed, this, _1)); + _session->LatencyUpdated.connect_same_thread (session_connections, std::bind (<C_TransportMaster::resync_latency, this, _1)); } else { _filter_enable = false; } diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index ec06287ec6..b4a5fae914 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -647,7 +647,7 @@ ARDOUR::LuaAPI::wait_for_process_callback (size_t n_cycles, int64_t timeout_ms) size_t cnt = 0; ScopedConnection c; - InternalSend::CycleStart.connect_same_thread (c, boost::bind (&proc_cycle_start, &cnt)); + InternalSend::CycleStart.connect_same_thread (c, std::bind (&proc_cycle_start, &cnt)); while (cnt <= n_cycles) { Glib::usleep (1000); if (timeout_ms > 0) { diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index a9dfac8e3b..186d104981 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -3792,7 +3792,7 @@ LV2PluginInfo::get_presets (bool user_only) const } PluginInfoList* -LV2PluginInfo::discover (boost::function cb) +LV2PluginInfo::discover (std::function cb) { LV2World world; world.load_bundled_plugins(); diff --git a/libs/ardour/midi_automation_list_binder.cc b/libs/ardour/midi_automation_list_binder.cc index 99f207d668..df3901d22a 100644 --- a/libs/ardour/midi_automation_list_binder.cc +++ b/libs/ardour/midi_automation_list_binder.cc @@ -29,7 +29,7 @@ MidiAutomationListBinder::MidiAutomationListBinder (MidiSource& s, Evoral::Param : _source (&s) , _parameter (p) { - _source->Destroyed.connect_same_thread (source_death_connection, boost::bind (&MidiAutomationListBinder::source_died, this)); + _source->Destroyed.connect_same_thread (source_death_connection, std::bind (&MidiAutomationListBinder::source_died, this)); } MidiAutomationListBinder::MidiAutomationListBinder (XMLNode* node, Session::SourceMap const & sources) diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc index 4843825a88..b2ead5452f 100644 --- a/libs/ardour/midi_clock_slave.cc +++ b/libs/ardour/midi_clock_slave.cc @@ -104,11 +104,11 @@ MIDIClock_TransportMaster::set_session (Session* s) */ if (_session) { - parser.timing.connect_same_thread (port_connections, boost::bind (&MIDIClock_TransportMaster::update_midi_clock, this, _1, _2)); - parser.start.connect_same_thread (port_connections, boost::bind (&MIDIClock_TransportMaster::start, this, _1, _2)); - parser.contineu.connect_same_thread (port_connections, boost::bind (&MIDIClock_TransportMaster::contineu, this, _1, _2)); - parser.stop.connect_same_thread (port_connections, boost::bind (&MIDIClock_TransportMaster::stop, this, _1, _2)); - parser.position.connect_same_thread (port_connections, boost::bind (&MIDIClock_TransportMaster::position, this, _1, _2, _3, _4)); + parser.timing.connect_same_thread (port_connections, std::bind (&MIDIClock_TransportMaster::update_midi_clock, this, _1, _2)); + parser.start.connect_same_thread (port_connections, std::bind (&MIDIClock_TransportMaster::start, this, _1, _2)); + parser.contineu.connect_same_thread (port_connections, std::bind (&MIDIClock_TransportMaster::contineu, this, _1, _2)); + parser.stop.connect_same_thread (port_connections, std::bind (&MIDIClock_TransportMaster::stop, this, _1, _2)); + parser.position.connect_same_thread (port_connections, std::bind (&MIDIClock_TransportMaster::position, this, _1, _2, _3, _4)); reset (true); } diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index 3f69842cf2..c35ab34291 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -63,16 +63,16 @@ MidiModel::MidiModel (MidiSource& s) : AutomatableSequence (s.session(), Temporal::TimeDomainProvider (Temporal::BeatTime)) , _midi_source (s) { - _midi_source.InterpolationChanged.connect_same_thread (_midi_source_connections, boost::bind (&MidiModel::source_interpolation_changed, this, _1, _2)); - _midi_source.AutomationStateChanged.connect_same_thread (_midi_source_connections, boost::bind (&MidiModel::source_automation_state_changed, this, _1, _2)); + _midi_source.InterpolationChanged.connect_same_thread (_midi_source_connections, std::bind (&MidiModel::source_interpolation_changed, this, _1, _2)); + _midi_source.AutomationStateChanged.connect_same_thread (_midi_source_connections, std::bind (&MidiModel::source_automation_state_changed, this, _1, _2)); } MidiModel::MidiModel (MidiModel const & other, MidiSource & s) : AutomatableSequence (other) , _midi_source (s) { - _midi_source.InterpolationChanged.connect_same_thread (_midi_source_connections, boost::bind (&MidiModel::source_interpolation_changed, this, _1, _2)); - _midi_source.AutomationStateChanged.connect_same_thread (_midi_source_connections, boost::bind (&MidiModel::source_automation_state_changed, this, _1, _2)); + _midi_source.InterpolationChanged.connect_same_thread (_midi_source_connections, std::bind (&MidiModel::source_interpolation_changed, this, _1, _2)); + _midi_source.AutomationStateChanged.connect_same_thread (_midi_source_connections, std::bind (&MidiModel::source_automation_state_changed, this, _1, _2)); } MidiModel::NoteDiffCommand* @@ -606,7 +606,7 @@ MidiModel::NoteDiffCommand::set_state (const XMLNode& diff_command, int /*versio if (added_notes) { XMLNodeList notes = added_notes->children(); transform(notes.begin(), notes.end(), back_inserter(_added_notes), - boost::bind (&NoteDiffCommand::unmarshal_note, this, _1)); + std::bind (&NoteDiffCommand::unmarshal_note, this, _1)); } @@ -617,7 +617,7 @@ MidiModel::NoteDiffCommand::set_state (const XMLNode& diff_command, int /*versio if (removed_notes) { XMLNodeList notes = removed_notes->children(); transform(notes.begin(), notes.end(), back_inserter(_removed_notes), - boost::bind (&NoteDiffCommand::unmarshal_note, this, _1)); + std::bind (&NoteDiffCommand::unmarshal_note, this, _1)); } @@ -630,7 +630,7 @@ MidiModel::NoteDiffCommand::set_state (const XMLNode& diff_command, int /*versio if (changed_notes) { XMLNodeList notes = changed_notes->children(); transform (notes.begin(), notes.end(), back_inserter(_changes), - boost::bind (&NoteDiffCommand::unmarshal_change, this, _1)); + std::bind (&NoteDiffCommand::unmarshal_change, this, _1)); } @@ -658,21 +658,21 @@ MidiModel::NoteDiffCommand::get_state () const XMLNode* changes = diff_command->add_child(DIFF_NOTES_ELEMENT); for_each(_changes.cbegin(), _changes.cend(), - boost::bind ( - boost::bind (&XMLNode::add_child_nocopy, changes, _1), - boost::bind (&NoteDiffCommand::marshal_change, this, _1))); + std::bind ( + std::bind (&XMLNode::add_child_nocopy, changes, _1), + std::bind (&NoteDiffCommand::marshal_change, this, _1))); XMLNode* added_notes = diff_command->add_child(ADDED_NOTES_ELEMENT); for_each(_added_notes.cbegin(), _added_notes.cend(), - boost::bind( - boost::bind (&XMLNode::add_child_nocopy, added_notes, _1), - boost::bind (&NoteDiffCommand::marshal_note, this, _1))); + std::bind( + std::bind (&XMLNode::add_child_nocopy, added_notes, _1), + std::bind (&NoteDiffCommand::marshal_note, this, _1))); XMLNode* removed_notes = diff_command->add_child(REMOVED_NOTES_ELEMENT); for_each(_removed_notes.cbegin(), _removed_notes.cend(), - boost::bind ( - boost::bind (&XMLNode::add_child_nocopy, removed_notes, _1), - boost::bind (&NoteDiffCommand::marshal_note, this, _1))); + std::bind ( + std::bind (&XMLNode::add_child_nocopy, removed_notes, _1), + std::bind (&NoteDiffCommand::marshal_note, this, _1))); /* if this command had side-effects, store that state too */ @@ -680,9 +680,9 @@ MidiModel::NoteDiffCommand::get_state () const if (!side_effect_removals.empty()) { XMLNode* side_effect_notes = diff_command->add_child(SIDE_EFFECT_REMOVALS_ELEMENT); for_each(side_effect_removals.begin(), side_effect_removals.end(), - boost::bind ( - boost::bind (&XMLNode::add_child_nocopy, side_effect_notes, _1), - boost::bind (&NoteDiffCommand::marshal_note, this, _1))); + std::bind ( + std::bind (&XMLNode::add_child_nocopy, side_effect_notes, _1), + std::bind (&NoteDiffCommand::marshal_note, this, _1))); } return *diff_command; @@ -843,7 +843,7 @@ MidiModel::SysExDiffCommand::set_state (const XMLNode& diff_command, int /*versi if (changed_sysexes) { XMLNodeList sysexes = changed_sysexes->children(); transform (sysexes.begin(), sysexes.end(), back_inserter (_changes), - boost::bind (&SysExDiffCommand::unmarshal_change, this, _1)); + std::bind (&SysExDiffCommand::unmarshal_change, this, _1)); } @@ -858,9 +858,9 @@ MidiModel::SysExDiffCommand::get_state () const XMLNode* changes = diff_command->add_child(DIFF_SYSEXES_ELEMENT); for_each (_changes.begin(), _changes.end(), - boost::bind ( - boost::bind (&XMLNode::add_child_nocopy, changes, _1), - boost::bind (&SysExDiffCommand::marshal_change, this, _1))); + std::bind ( + std::bind (&XMLNode::add_child_nocopy, changes, _1), + std::bind (&SysExDiffCommand::marshal_change, this, _1))); return *diff_command; } @@ -1175,21 +1175,21 @@ MidiModel::PatchChangeDiffCommand::set_state (const XMLNode& diff_command, int / XMLNode* added = diff_command.child (ADDED_PATCH_CHANGES_ELEMENT); if (added) { XMLNodeList p = added->children (); - transform (p.begin(), p.end(), back_inserter (_added), boost::bind (&PatchChangeDiffCommand::unmarshal_patch_change, this, _1)); + transform (p.begin(), p.end(), back_inserter (_added), std::bind (&PatchChangeDiffCommand::unmarshal_patch_change, this, _1)); } _removed.clear (); XMLNode* removed = diff_command.child (REMOVED_PATCH_CHANGES_ELEMENT); if (removed) { XMLNodeList p = removed->children (); - transform (p.begin(), p.end(), back_inserter (_removed), boost::bind (&PatchChangeDiffCommand::unmarshal_patch_change, this, _1)); + transform (p.begin(), p.end(), back_inserter (_removed), std::bind (&PatchChangeDiffCommand::unmarshal_patch_change, this, _1)); } _changes.clear (); XMLNode* changed = diff_command.child (DIFF_PATCH_CHANGES_ELEMENT); if (changed) { XMLNodeList p = changed->children (); - transform (p.begin(), p.end(), back_inserter (_changes), boost::bind (&PatchChangeDiffCommand::unmarshal_change, this, _1)); + transform (p.begin(), p.end(), back_inserter (_changes), std::bind (&PatchChangeDiffCommand::unmarshal_change, this, _1)); } return 0; @@ -1203,25 +1203,25 @@ MidiModel::PatchChangeDiffCommand::get_state () const XMLNode* added = diff_command->add_child (ADDED_PATCH_CHANGES_ELEMENT); for_each (_added.cbegin(), _added.cend(), - boost::bind ( - boost::bind (&XMLNode::add_child_nocopy, added, _1), - boost::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1) + std::bind ( + std::bind (&XMLNode::add_child_nocopy, added, _1), + std::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1) ) ); XMLNode* removed = diff_command->add_child (REMOVED_PATCH_CHANGES_ELEMENT); for_each (_removed.cbegin(), _removed.cend(), - boost::bind ( - boost::bind (&XMLNode::add_child_nocopy, removed, _1), - boost::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1) + std::bind ( + std::bind (&XMLNode::add_child_nocopy, removed, _1), + std::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1) ) ); XMLNode* changes = diff_command->add_child (DIFF_PATCH_CHANGES_ELEMENT); for_each (_changes.cbegin(), _changes.cend(), - boost::bind ( - boost::bind (&XMLNode::add_child_nocopy, changes, _1), - boost::bind (&PatchChangeDiffCommand::marshal_change, this, _1) + std::bind ( + std::bind (&XMLNode::add_child_nocopy, changes, _1), + std::bind (&PatchChangeDiffCommand::marshal_change, this, _1) ) ); diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc index 8933731fc6..85dcd42034 100644 --- a/libs/ardour/midi_patch_manager.cc +++ b/libs/ardour/midi_patch_manager.cc @@ -290,13 +290,13 @@ MidiPatchManager::load_midnams () void MidiPatchManager::load_midnams_in_thread () { - _midnam_load_thread = PBD::Thread::create (boost::bind (&MidiPatchManager::load_midnams, this), "MIDNAMLoader"); + _midnam_load_thread = PBD::Thread::create (std::bind (&MidiPatchManager::load_midnams, this), "MIDNAMLoader"); } void MidiPatchManager::maybe_use (PBD::ScopedConnectionList& cl, PBD::EventLoop::InvalidationRecord* ir, - const boost::function & midnam_info_method, + const std::function & midnam_info_method, PBD::EventLoop* event_loop) { { diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index 697df1fa35..f51d9ea8cd 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -76,7 +76,7 @@ MidiRegion::MidiRegion (const SourceList& srcs) */ override_opaqueness (false); - midi_source(0)->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this)); + midi_source(0)->ModelChanged.connect_same_thread (_source_connection, std::bind (&MidiRegion::model_changed, this)); model_changed (); assert(_name.val().find("/") == string::npos); assert(_type == DataType::MIDI); @@ -87,7 +87,7 @@ MidiRegion::MidiRegion (std::shared_ptr other) , _ignore_shift (false) { assert(_name.val().find("/") == string::npos); - midi_source(0)->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this)); + midi_source(0)->ModelChanged.connect_same_thread (_source_connection, std::bind (&MidiRegion::model_changed, this)); model_changed (); } @@ -98,7 +98,7 @@ MidiRegion::MidiRegion (std::shared_ptr other, timecnt_t const { assert(_name.val().find("/") == string::npos); - midi_source(0)->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this)); + midi_source(0)->ModelChanged.connect_same_thread (_source_connection, std::bind (&MidiRegion::model_changed, this)); model_changed (); } @@ -462,11 +462,11 @@ MidiRegion::model_changed () /* watch for changes to controls' AutoState */ midi_source()->AutomationStateChanged.connect_same_thread ( - _model_connection, boost::bind (&MidiRegion::model_automation_state_changed, this, _1) + _model_connection, std::bind (&MidiRegion::model_automation_state_changed, this, _1) ); - model()->ContentsShifted.connect_same_thread (_model_shift_connection, boost::bind (&MidiRegion::model_shifted, this, _1)); - model()->ContentsChanged.connect_same_thread (_model_changed_connection, boost::bind (&MidiRegion::model_contents_changed, this)); + model()->ContentsShifted.connect_same_thread (_model_shift_connection, std::bind (&MidiRegion::model_shifted, this, _1)); + model()->ContentsChanged.connect_same_thread (_model_changed_connection, std::bind (&MidiRegion::model_contents_changed, this)); } void @@ -643,5 +643,5 @@ MidiRegion::finish_domain_bounce (Temporal::DomainBounceInfo& cmd) _model_changed_connection.disconnect (); model()->ContentsChanged (); - model()->ContentsChanged.connect_same_thread (_model_changed_connection, boost::bind (&MidiRegion::model_contents_changed, this)); + model()->ContentsChanged.connect_same_thread (_model_changed_connection, std::bind (&MidiRegion::model_contents_changed, this)); } diff --git a/libs/ardour/midi_scene_changer.cc b/libs/ardour/midi_scene_changer.cc index 687260af83..e249d110d0 100644 --- a/libs/ardour/midi_scene_changer.cc +++ b/libs/ardour/midi_scene_changer.cc @@ -44,12 +44,12 @@ MIDISceneChanger::MIDISceneChanger (Session& s) { /* catch any add/remove/clear etc. for all Locations */ - _session.locations()->changed.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this)); - _session.locations()->added.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this)); - _session.locations()->removed.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this)); + _session.locations()->changed.connect_same_thread (*this, std::bind (&MIDISceneChanger::locations_changed, this)); + _session.locations()->added.connect_same_thread (*this, std::bind (&MIDISceneChanger::locations_changed, this)); + _session.locations()->removed.connect_same_thread (*this, std::bind (&MIDISceneChanger::locations_changed, this)); /* catch class-based signal that notifies of us changes in the scene change state of any Location */ - Location::scene_changed.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this)); + Location::scene_changed.connect_same_thread (*this, std::bind (&MIDISceneChanger::locations_changed, this)); } MIDISceneChanger::~MIDISceneChanger () @@ -254,8 +254,8 @@ MIDISceneChanger::set_input_port (std::shared_ptr mp) */ for (int channel = 0; channel < 16; ++channel) { - async->parser()->channel_bank_change[channel].connect_same_thread (incoming_connections, boost::bind (&MIDISceneChanger::bank_change_input, this, _1, _2, channel)); - async->parser()->channel_program_change[channel].connect_same_thread (incoming_connections, boost::bind (&MIDISceneChanger::program_change_input, this, _1, _2, channel)); + async->parser()->channel_bank_change[channel].connect_same_thread (incoming_connections, std::bind (&MIDISceneChanger::bank_change_input, this, _1, _2, channel)); + async->parser()->channel_program_change[channel].connect_same_thread (incoming_connections, std::bind (&MIDISceneChanger::program_change_input, this, _1, _2, channel)); } } } diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index da79ebaeb5..cc419c07fb 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -91,10 +91,10 @@ MidiTrack::MidiTrack (Session& sess, string name, TrackMode mode) , _input_active (true) , _restore_pgm_on_load (true) { - _session.SessionLoaded.connect_same_thread (*this, boost::bind (&MidiTrack::restore_controls, this)); + _session.SessionLoaded.connect_same_thread (*this, std::bind (&MidiTrack::restore_controls, this)); - _playback_filter.ChannelModeChanged.connect_same_thread (*this, boost::bind (&Track::playlist_modified, this)); - _playback_filter.ChannelMaskChanged.connect_same_thread (*this, boost::bind (&Track::playlist_modified, this)); + _playback_filter.ChannelModeChanged.connect_same_thread (*this, std::bind (&Track::playlist_modified, this)); + _playback_filter.ChannelMaskChanged.connect_same_thread (*this, std::bind (&Track::playlist_modified, this)); } MidiTrack::~MidiTrack () @@ -114,12 +114,12 @@ MidiTrack::init () _velocity_control.reset (new VelocityControl (_session)); add_control (_velocity_control); - _input->changed.connect_same_thread (*this, boost::bind (&MidiTrack::track_input_active, this, _1, _2)); + _input->changed.connect_same_thread (*this, std::bind (&MidiTrack::track_input_active, this, _1, _2)); _disk_writer->set_note_mode (_note_mode); _disk_reader->reset_tracker (); - _disk_writer->DataRecorded.connect_same_thread (*this, boost::bind (&MidiTrack::data_recorded, this, _1)); + _disk_writer->DataRecorded.connect_same_thread (*this, std::bind (&MidiTrack::data_recorded, this, _1)); #ifdef HAVE_BEATBOX _beatbox.reset (new BeatBox (_session)); @@ -229,7 +229,7 @@ MidiTrack::set_state (const XMLNode& node, int version) if (_session.loading ()) { _session.StateReady.connect_same_thread ( - *this, boost::bind (&MidiTrack::set_state_part_two, this)); + *this, std::bind (&MidiTrack::set_state_part_two, this)); } else { set_state_part_two (); } diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 23a3bd1bea..8df785c51a 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -118,9 +118,9 @@ MTC_TransportMaster::set_session (Session* s) parse_timecode_offset (); reset (true); - parser.mtc_time.connect_same_thread (port_connections, boost::bind (&MTC_TransportMaster::update_mtc_time, this, _1, _2, _3)); - parser.mtc_qtr.connect_same_thread (port_connections, boost::bind (&MTC_TransportMaster::update_mtc_qtr, this, _1, _2, _3)); - parser.mtc_status.connect_same_thread (port_connections, boost::bind (&MTC_TransportMaster::update_mtc_status, this, _1)); + parser.mtc_time.connect_same_thread (port_connections, std::bind (&MTC_TransportMaster::update_mtc_time, this, _1, _2, _3)); + parser.mtc_qtr.connect_same_thread (port_connections, std::bind (&MTC_TransportMaster::update_mtc_qtr, this, _1, _2, _3)); + parser.mtc_status.connect_same_thread (port_connections, std::bind (&MTC_TransportMaster::update_mtc_status, this, _1)); } } diff --git a/libs/ardour/pannable.cc b/libs/ardour/pannable.cc index 429e864fd1..d8d59dbfae 100644 --- a/libs/ardour/pannable.cc +++ b/libs/ardour/pannable.cc @@ -63,17 +63,17 @@ Pannable::Pannable (Session& s, Temporal::TimeDomainProvider const & tdp) /* all controls change state together */ - pan_azimuth_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1)); - pan_elevation_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1)); - pan_width_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1)); - pan_frontback_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1)); - pan_lfe_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1)); + pan_azimuth_control->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&Pannable::control_auto_state_changed, this, _1)); + pan_elevation_control->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&Pannable::control_auto_state_changed, this, _1)); + pan_width_control->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&Pannable::control_auto_state_changed, this, _1)); + pan_frontback_control->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&Pannable::control_auto_state_changed, this, _1)); + pan_lfe_control->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&Pannable::control_auto_state_changed, this, _1)); - pan_azimuth_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this)); - pan_elevation_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this)); - pan_width_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this)); - pan_frontback_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this)); - pan_lfe_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this)); + pan_azimuth_control->Changed.connect_same_thread (*this, std::bind (&Pannable::value_changed, this)); + pan_elevation_control->Changed.connect_same_thread (*this, std::bind (&Pannable::value_changed, this)); + pan_width_control->Changed.connect_same_thread (*this, std::bind (&Pannable::value_changed, this)); + pan_frontback_control->Changed.connect_same_thread (*this, std::bind (&Pannable::value_changed, this)); + pan_lfe_control->Changed.connect_same_thread (*this, std::bind (&Pannable::value_changed, this)); pan_azimuth_control->add_visually_linked_control (pan_width_control); pan_azimuth_control->add_visually_linked_control (pan_elevation_control); diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index e4894f653c..517a0e9296 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -91,7 +91,7 @@ Playlist::make_property_quarks () } RegionListProperty::RegionListProperty (Playlist& pl) - : SequenceProperty > > (Properties::regions.property_id, boost::bind (&Playlist::update, &pl, _1)) + : SequenceProperty > > (Properties::regions.property_id, std::bind (&Playlist::update, &pl, _1)) , _playlist (pl) { } @@ -355,10 +355,10 @@ Playlist::init (bool hide) _end_space = timecnt_t (_type == DataType::AUDIO ? Temporal::AudioTime : Temporal::BeatTime); _playlist_shift_active = false; - _session.history ().BeginUndoRedo.connect_same_thread (*this, boost::bind (&Playlist::begin_undo, this)); - _session.history ().EndUndoRedo.connect_same_thread (*this, boost::bind (&Playlist::end_undo, this)); + _session.history ().BeginUndoRedo.connect_same_thread (*this, std::bind (&Playlist::begin_undo, this)); + _session.history ().EndUndoRedo.connect_same_thread (*this, std::bind (&Playlist::end_undo, this)); - ContentsChanged.connect_same_thread (*this, boost::bind (&Playlist::mark_session_dirty, this)); + ContentsChanged.connect_same_thread (*this, std::bind (&Playlist::mark_session_dirty, this)); } Playlist::~Playlist () @@ -798,8 +798,8 @@ Playlist::add_region_internal (std::shared_ptr region, timepos_t const & notify_region_added (region); - region->PropertyChanged.connect_same_thread (region_state_changed_connections, boost::bind (&Playlist::region_changed_proxy, this, _1, std::weak_ptr (region))); - region->DropReferences.connect_same_thread (region_drop_references_connections, boost::bind (&Playlist::region_going_away, this, std::weak_ptr (region))); + region->PropertyChanged.connect_same_thread (region_state_changed_connections, std::bind (&Playlist::region_changed_proxy, this, _1, std::weak_ptr (region))); + region->DropReferences.connect_same_thread (region_drop_references_connections, std::bind (&Playlist::region_going_away, this, std::weak_ptr (region))); /* do not handle property changes of newly added regions. * Otherwise this would trigger Playlist::notify_region_moved() @@ -875,7 +875,7 @@ Playlist::remove_region_internal (std::shared_ptr region, ThawList& thaw } void -Playlist::remove_gaps (timecnt_t const & gap_threshold, timecnt_t const & leave_gap, boost::function gap_callback) +Playlist::remove_gaps (timecnt_t const & gap_threshold, timecnt_t const & leave_gap, std::function gap_callback) { bool closed = false; @@ -3061,7 +3061,7 @@ Playlist::update_after_tempo_map_change () } void -Playlist::foreach_region (boost::function)> func) +Playlist::foreach_region (std::function)> func) { RegionReadLock rl (this); for (auto & r : regions) { diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index 52444799d6..20c4d9065e 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -100,7 +100,7 @@ Plugin::Plugin (AudioEngine& e, Session& s) , _num (0) { _pending_stop_events.ensure_buffers (DataType::MIDI, 1, 4096); - PresetsChanged.connect_same_thread(_preset_connection, boost::bind (&Plugin::invalidate_preset_cache, this, _1, _2, _3)); + PresetsChanged.connect_same_thread(_preset_connection, std::bind (&Plugin::invalidate_preset_cache, this, _1, _2, _3)); } Plugin::Plugin (const Plugin& other) @@ -123,7 +123,7 @@ Plugin::Plugin (const Plugin& other) { _pending_stop_events.ensure_buffers (DataType::MIDI, 1, 4096); - PresetsChanged.connect_same_thread(_preset_connection, boost::bind (&Plugin::invalidate_preset_cache, this, _1, _2, _3)); + PresetsChanged.connect_same_thread(_preset_connection, std::bind (&Plugin::invalidate_preset_cache, this, _1, _2, _3)); } Plugin::~Plugin () diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index e69f67ea06..b72ada25bd 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -600,11 +600,11 @@ PluginInsert::create_automatable_parameters () _inverted_bypass_enable = type () == VST3; std::shared_ptr ac = automation_control (Evoral::Parameter (PluginAutomation, 0, _bypass_port)); if (0 == (ac->flags () & Controllable::NotAutomatable)) { - ac->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&PluginInsert::bypassable_changed, this)); - ac->Changed.connect_same_thread (*this, boost::bind (&PluginInsert::enable_changed, this)); + ac->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&PluginInsert::bypassable_changed, this)); + ac->Changed.connect_same_thread (*this, std::bind (&PluginInsert::enable_changed, this)); } } - plugin->PresetPortSetValue.connect_same_thread (*this, boost::bind (&PluginInsert::preset_load_set_value, this, _1, _2)); + plugin->PresetPortSetValue.connect_same_thread (*this, std::bind (&PluginInsert::preset_load_set_value, this, _1, _2)); } /** Called when something outside of this host has modified a plugin @@ -2982,7 +2982,7 @@ PluginInsert::get_impulse_analysis_plugin() _impulseAnalysisPlugin = ret; _plugins[0]->add_slave (ret, false); - ret->DropReferences.connect_same_thread (*this, boost::bind (&PluginInsert::plugin_removed, this, _impulseAnalysisPlugin)); + ret->DropReferences.connect_same_thread (*this, std::bind (&PluginInsert::plugin_removed, this, _impulseAnalysisPlugin)); } else { ret = _impulseAnalysisPlugin.lock(); } @@ -3020,9 +3020,9 @@ PluginInsert::add_plugin (std::shared_ptr plugin) if (_plugins.empty()) { /* first (and probably only) plugin instance - connect to relevant signals */ - plugin->ParameterChangedExternally.connect_same_thread (*this, boost::bind (&PluginInsert::parameter_changed_externally, this, _1, _2)); - plugin->StartTouch.connect_same_thread (*this, boost::bind (&PluginInsert::start_touch, this, _1)); - plugin->EndTouch.connect_same_thread (*this, boost::bind (&PluginInsert::end_touch, this, _1)); + plugin->ParameterChangedExternally.connect_same_thread (*this, std::bind (&PluginInsert::parameter_changed_externally, this, _1, _2)); + plugin->StartTouch.connect_same_thread (*this, std::bind (&PluginInsert::start_touch, this, _1)); + plugin->EndTouch.connect_same_thread (*this, std::bind (&PluginInsert::end_touch, this, _1)); _custom_sinks = plugin->get_info()->n_inputs; // cache sidechain port count _cached_sidechain_pins.reset (); @@ -3043,7 +3043,7 @@ PluginInsert::add_plugin (std::shared_ptr plugin) if (_plugins.size() > 1) { _plugins[0]->add_slave (plugin, true); - plugin->DropReferences.connect_same_thread (*this, boost::bind (&PluginInsert::plugin_removed, this, std::weak_ptr (plugin))); + plugin->DropReferences.connect_same_thread (*this, std::bind (&PluginInsert::plugin_removed, this, std::weak_ptr (plugin))); } } diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index e43f955654..4600f984dc 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -330,7 +330,7 @@ PluginManager::PluginManager () BootMessage (_("Discovering Plugins")); - LuaScripting::instance().scripts_changed.connect_same_thread (lua_refresh_connection, boost::bind (&PluginManager::lua_refresh_cb, this)); + LuaScripting::instance().scripts_changed.connect_same_thread (lua_refresh_connection, std::bind (&PluginManager::lua_refresh_cb, this)); } @@ -1204,7 +1204,7 @@ PluginManager::run_auv2_scanner_app (CAComponentDescription const& desc, AUv2Des stringstream scan_log; ARDOUR::SystemExec scanner (auv2_scanner_bin_path, argp); PBD::ScopedConnection c; - scanner.ReadStdout.connect_same_thread (c, boost::bind (&auv2_scanner_log, _1, &scan_log)); + scanner.ReadStdout.connect_same_thread (c, std::bind (&auv2_scanner_log, _1, &scan_log)); if (scanner.start (ARDOUR::SystemExec::MergeWithStdin)) { psle->msg (PluginScanLogEntry::Error, string_compose (_("Cannot launch AU scanner app '%1': %2"), auv2_scanner_bin_path, strerror (errno))); @@ -1500,7 +1500,7 @@ PluginManager::run_vst2_scanner_app (std::string path, PSLEPtr psle) const stringstream scan_log; ARDOUR::SystemExec scanner (vst2_scanner_bin_path, argp); PBD::ScopedConnection c; - scanner.ReadStdout.connect_same_thread (c, boost::bind (&vst2_scanner_log, _1, &scan_log)); + scanner.ReadStdout.connect_same_thread (c, std::bind (&vst2_scanner_log, _1, &scan_log)); if (scanner.start (ARDOUR::SystemExec::MergeWithStdin)) { psle->msg (PluginScanLogEntry::Error, string_compose (_("Cannot launch VST scanner app '%1': %2"), vst2_scanner_bin_path, strerror (errno))); @@ -2261,7 +2261,7 @@ PluginManager::run_vst3_scanner_app (std::string bundle_path, PSLEPtr psle) cons stringstream scan_log; ARDOUR::SystemExec scanner (vst3_scanner_bin_path, argp); PBD::ScopedConnection c; - scanner.ReadStdout.connect_same_thread (c, boost::bind (&vst3_scanner_log, _1, &scan_log)); + scanner.ReadStdout.connect_same_thread (c, std::bind (&vst3_scanner_log, _1, &scan_log)); if (scanner.start (ARDOUR::SystemExec::MergeWithStdin)) { psle->msg (PluginScanLogEntry::Error, string_compose (_("Cannot launch VST scanner app '%1': %2"), vst3_scanner_bin_path, strerror (errno))); diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc index 5f107ec089..dd55f5cc35 100644 --- a/libs/ardour/port.cc +++ b/libs/ardour/port.cc @@ -89,9 +89,9 @@ Port::Port (std::string const & n, DataType t, PortFlags f) } DEBUG_TRACE (DEBUG::Ports, string_compose ("registered port %1 handle %2\n", name(), _port_handle)); - PortDrop.connect_same_thread (drop_connection, boost::bind (&Port::session_global_drop, this)); - PortSignalDrop.connect_same_thread (drop_connection, boost::bind (&Port::signal_drop, this)); - port_manager->PortConnectedOrDisconnected.connect_same_thread (engine_connection, boost::bind (&Port::port_connected_or_disconnected, this, _1, _2, _3, _4, _5)); + PortDrop.connect_same_thread (drop_connection, std::bind (&Port::session_global_drop, this)); + PortSignalDrop.connect_same_thread (drop_connection, std::bind (&Port::signal_drop, this)); + port_manager->PortConnectedOrDisconnected.connect_same_thread (engine_connection, std::bind (&Port::port_connected_or_disconnected, this, _1, _2, _3, _4, _5)); } /** Port destructor */ @@ -697,7 +697,7 @@ Port::reestablish () reset (); - port_manager->PortConnectedOrDisconnected.connect_same_thread (engine_connection, boost::bind (&Port::port_connected_or_disconnected, this, _1, _2, _3, _4, _5)); + port_manager->PortConnectedOrDisconnected.connect_same_thread (engine_connection, std::bind (&Port::port_connected_or_disconnected, this, _1, _2, _3, _4, _5)); return 0; } diff --git a/libs/ardour/port_insert.cc b/libs/ardour/port_insert.cc index 3108db4c45..f912b42fc5 100644 --- a/libs/ardour/port_insert.cc +++ b/libs/ardour/port_insert.cc @@ -73,8 +73,8 @@ PortInsert::PortInsert (Session& s, std::shared_ptr pannable, std::sha _io_latency = _session.engine().samples_per_cycle(); - input ()->changed.connect_same_thread (*this, boost::bind (&PortInsert::io_changed, this, _1, _2)); - output ()->changed.connect_same_thread (*this, boost::bind (&PortInsert::io_changed, this, _1, _2)); + input ()->changed.connect_same_thread (*this, std::bind (&PortInsert::io_changed, this, _1, _2)); + output ()->changed.connect_same_thread (*this, std::bind (&PortInsert::io_changed, this, _1, _2)); } PortInsert::~PortInsert () diff --git a/libs/ardour/port_manager.cc b/libs/ardour/port_manager.cc index db611aec91..41e9078bd1 100644 --- a/libs/ardour/port_manager.cc +++ b/libs/ardour/port_manager.cc @@ -1295,10 +1295,10 @@ PortManager::cycle_start (pframes_t nframes, Session* s) if (tl && fabs (Port::resample_ratio ()) != 1.0) { for (auto const& p : *_cycle_ports) { if (!(p.second->flags () & TransportSyncPort)) { - tl->push_back (boost::bind (&Port::cycle_start, p.second, nframes)); + tl->push_back (std::bind (&Port::cycle_start, p.second, nframes)); } } - tl->push_back (boost::bind (&PortManager::run_input_meters, this, nframes, s ? s->nominal_sample_rate () : 0)); + tl->push_back (std::bind (&PortManager::run_input_meters, this, nframes, s ? s->nominal_sample_rate () : 0)); tl->process (); } else { for (auto const& p : *_cycle_ports) { @@ -1321,7 +1321,7 @@ PortManager::cycle_end (pframes_t nframes, Session* s) if (tl && fabs (Port::resample_ratio ()) != 1.0) { for (auto const& p : *_cycle_ports) { if (!(p.second->flags () & TransportSyncPort)) { - tl->push_back (boost::bind (&Port::cycle_end, p.second, nframes)); + tl->push_back (std::bind (&Port::cycle_end, p.second, nframes)); } } tl->process (); @@ -1439,7 +1439,7 @@ PortManager::cycle_end_fade_out (gain_t base_gain, gain_t gain_step, pframes_t n if (tl && fabs (Port::resample_ratio ()) != 1.0) { for (auto const& p : *_cycle_ports) { if (!(p.second->flags () & TransportSyncPort)) { - tl->push_back (boost::bind (&Port::cycle_end, p.second, nframes)); + tl->push_back (std::bind (&Port::cycle_end, p.second, nframes)); } } tl->process (); diff --git a/libs/ardour/rc_configuration.cc b/libs/ardour/rc_configuration.cc index fb9b439886..ebbf028bda 100644 --- a/libs/ardour/rc_configuration.cc +++ b/libs/ardour/rc_configuration.cc @@ -305,7 +305,7 @@ RCConfiguration::set_variables (const XMLNode& node) } void -RCConfiguration::map_parameters (boost::function& functor) +RCConfiguration::map_parameters (std::function& functor) { #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index a6e4825b50..acef5689a7 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -2152,13 +2152,13 @@ Region::subscribe_to_source_drop () for (auto const& i : _sources) { if (unique_srcs.find (i) == unique_srcs.end ()) { unique_srcs.insert (i); - i->DropReferences.connect_same_thread (_source_deleted_connections, boost::bind (&Region::source_deleted, this, std::weak_ptr(i))); + i->DropReferences.connect_same_thread (_source_deleted_connections, std::bind (&Region::source_deleted, this, std::weak_ptr(i))); } } for (auto const& i : _master_sources) { if (unique_srcs.find (i) == unique_srcs.end ()) { unique_srcs.insert (i); - i->DropReferences.connect_same_thread (_source_deleted_connections, boost::bind (&Region::source_deleted, this, std::weak_ptr(i))); + i->DropReferences.connect_same_thread (_source_deleted_connections, std::bind (&Region::source_deleted, this, std::weak_ptr(i))); } } } diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc index b611d08f17..07495f1be8 100644 --- a/libs/ardour/region_factory.cc +++ b/libs/ardour/region_factory.cc @@ -308,8 +308,8 @@ RegionFactory::map_add (std::shared_ptr r) region_list_connections = new ScopedConnectionList; } - r->DropReferences.connect_same_thread (*region_list_connections, boost::bind (&RegionFactory::map_remove, std::weak_ptr (r))); - r->PropertyChanged.connect_same_thread (*region_list_connections, boost::bind (&RegionFactory::region_changed, _1, std::weak_ptr (r))); + r->DropReferences.connect_same_thread (*region_list_connections, std::bind (&RegionFactory::map_remove, std::weak_ptr (r))); + r->PropertyChanged.connect_same_thread (*region_list_connections, std::bind (&RegionFactory::region_changed, _1, std::weak_ptr (r))); add_to_region_name_maps (r); } diff --git a/libs/ardour/region_fx_plugin.cc b/libs/ardour/region_fx_plugin.cc index b0547e94d5..c67729917a 100644 --- a/libs/ardour/region_fx_plugin.cc +++ b/libs/ardour/region_fx_plugin.cc @@ -424,9 +424,9 @@ RegionFxPlugin::add_plugin (std::shared_ptr plugin) if (_plugins.empty ()) { /* first (and probably only) plugin instance - connect to relevant signals */ - plugin->ParameterChangedExternally.connect_same_thread (*this, boost::bind (&RegionFxPlugin::parameter_changed_externally, this, _1, _2)); - plugin->StartTouch.connect_same_thread (*this, boost::bind (&RegionFxPlugin::start_touch, this, _1)); - plugin->EndTouch.connect_same_thread (*this, boost::bind (&RegionFxPlugin::end_touch, this, _1)); + plugin->ParameterChangedExternally.connect_same_thread (*this, std::bind (&RegionFxPlugin::parameter_changed_externally, this, _1, _2)); + plugin->StartTouch.connect_same_thread (*this, std::bind (&RegionFxPlugin::start_touch, this, _1)); + plugin->EndTouch.connect_same_thread (*this, std::bind (&RegionFxPlugin::end_touch, this, _1)); } plugin->set_insert (this, _plugins.size ()); @@ -435,7 +435,7 @@ RegionFxPlugin::add_plugin (std::shared_ptr plugin) if (_plugins.size () > 1) { _plugins[0]->add_slave (plugin, true); - plugin->DropReferences.connect_same_thread (*this, boost::bind (&RegionFxPlugin::plugin_removed, this, std::weak_ptr (plugin))); + plugin->DropReferences.connect_same_thread (*this, std::bind (&RegionFxPlugin::plugin_removed, this, std::weak_ptr (plugin))); } } @@ -580,7 +580,7 @@ RegionFxPlugin::create_parameters () add_control (c); } - plugin->PresetPortSetValue.connect_same_thread (*this, boost::bind (&RegionFxPlugin::preset_load_set_value, this, _1, _2)); + plugin->PresetPortSetValue.connect_same_thread (*this, std::bind (&RegionFxPlugin::preset_load_set_value, this, _1, _2)); } void diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 6db216edba..195bdf9c2a 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -178,7 +178,7 @@ Route::init () _solo_control.reset (new SoloControl (_session, X_("solo"), *this, *this, tdp)); add_control (_solo_control); - _solo_control->Changed.connect_same_thread (*this, boost::bind (&Route::solo_control_changed, this, _1, _2)); + _solo_control->Changed.connect_same_thread (*this, std::bind (&Route::solo_control_changed, this, _1, _2)); _mute_control.reset (new MuteControl (_session, X_("mute"), *this, tdp)); add_control (_mute_control); @@ -203,11 +203,11 @@ Route::init () _input.reset (new IO (_session, _name, IO::Input, _default_type)); _output.reset (new IO (_session, _name, IO::Output, _default_type)); - _input->changed.connect_same_thread (*this, boost::bind (&Route::input_change_handler, this, _1, _2)); - _input->PortCountChanging.connect_same_thread (*this, boost::bind (&Route::input_port_count_changing, this, _1)); + _input->changed.connect_same_thread (*this, std::bind (&Route::input_change_handler, this, _1, _2)); + _input->PortCountChanging.connect_same_thread (*this, std::bind (&Route::input_port_count_changing, this, _1)); - _output->changed.connect_same_thread (*this, boost::bind (&Route::output_change_handler, this, _1, _2)); - _output->PortCountChanging.connect_same_thread (*this, boost::bind (&Route::output_port_count_changing, this, _1)); + _output->changed.connect_same_thread (*this, std::bind (&Route::output_change_handler, this, _1, _2)); + _output->PortCountChanging.connect_same_thread (*this, std::bind (&Route::output_port_count_changing, this, _1)); /* add the amp/fader processor. * it should be the first processor to be added on every route. @@ -1204,7 +1204,7 @@ Route::add_processors (const ProcessorList& others, std::shared_ptr b if (pi && pi->has_sidechain ()) { pi->update_sidechain_name (); - pi->sidechain_input ()->changed.connect_same_thread (*pi, boost::bind (&Route::sidechain_change_handler, this, _1, _2)); + pi->sidechain_input ()->changed.connect_same_thread (*pi, std::bind (&Route::sidechain_change_handler, this, _1, _2)); } if ((*i)->active()) { @@ -1212,14 +1212,14 @@ Route::add_processors (const ProcessorList& others, std::shared_ptr b (*i)->activate (); } - (*i)->ActiveChanged.connect_same_thread (*this, boost::bind (&Session::queue_latency_recompute, &_session)); + (*i)->ActiveChanged.connect_same_thread (*this, std::bind (&Session::queue_latency_recompute, &_session)); std::shared_ptr send; if ((send = std::dynamic_pointer_cast (*i))) { send->SelfDestruct.connect_same_thread (**i, - boost::bind (&Route::processor_selfdestruct, this, std::weak_ptr (*i))); + std::bind (&Route::processor_selfdestruct, this, std::weak_ptr (*i))); if (send->output()) { - send->output()->changed.connect_same_thread (**i, boost::bind (&Route::output_change_handler, this, _1, _2)); + send->output()->changed.connect_same_thread (**i, std::bind (&Route::output_change_handler, this, _1, _2)); } } @@ -1676,7 +1676,7 @@ Route::replace_processor (std::shared_ptr old, std::shared_ptrenable (true); } - sub->ActiveChanged.connect_same_thread (*sub, boost::bind (&Session::queue_latency_recompute, &_session)); + sub->ActiveChanged.connect_same_thread (*sub, std::bind (&Session::queue_latency_recompute, &_session)); } reset_instrument_info (); @@ -2423,7 +2423,7 @@ Route::add_remove_sidechain (std::shared_ptr proc, bool add) if (pi->has_sidechain ()) { pi->reset_sidechain_map (); - pi->sidechain_input ()->changed.connect_same_thread (*pi, boost::bind (&Route::sidechain_change_handler, this, _1, _2)); + pi->sidechain_input ()->changed.connect_same_thread (*pi, std::bind (&Route::sidechain_change_handler, this, _1, _2)); } processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */ @@ -3280,7 +3280,7 @@ Route::set_processor_state (const XMLNode& node, int version) for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) { (*i)->set_owner (this); - (*i)->ActiveChanged.connect_same_thread (**i, boost::bind (&Session::queue_latency_recompute, &_session)); + (*i)->ActiveChanged.connect_same_thread (**i, std::bind (&Session::queue_latency_recompute, &_session)); std::shared_ptr pi; @@ -3355,9 +3355,9 @@ Route::set_processor_state (XMLNode const& node, int version, XMLProperty const* processor.reset (new Send (_session, _pannable, _mute_master, Delivery::Send, true)); std::shared_ptr send = std::dynamic_pointer_cast (processor); - send->SelfDestruct.connect_same_thread (*send, boost::bind (&Route::processor_selfdestruct, this, std::weak_ptr (processor))); + send->SelfDestruct.connect_same_thread (*send, std::bind (&Route::processor_selfdestruct, this, std::weak_ptr (processor))); if (send->output()) { - send->output()->changed.connect_same_thread (*send, boost::bind (&Route::output_change_handler, this, _1, _2)); + send->output()->changed.connect_same_thread (*send, std::bind (&Route::output_change_handler, this, _1, _2)); } } else if (prop->value() == "sursend") { @@ -3388,7 +3388,7 @@ Route::set_processor_state (XMLNode const& node, int version, XMLProperty const* /* subscribe to Sidechain IO changes */ if (pi && pi->has_sidechain ()) { - pi->sidechain_input ()->changed.connect_same_thread (*pi, boost::bind (&Route::sidechain_change_handler, this, _1, _2)); + pi->sidechain_input ()->changed.connect_same_thread (*pi, std::bind (&Route::sidechain_change_handler, this, _1, _2)); } /* we have to note the monitor send here, otherwise a new one will be created @@ -4846,7 +4846,7 @@ Route::set_active (bool yn, void* src) } if (_route_group && src != _route_group && _route_group->is_active() && _route_group->is_route_active()) { - _route_group->foreach_route (boost::bind (&Route::set_active, _1, yn, _route_group)); + _route_group->foreach_route (std::bind (&Route::set_active, _1, yn, _route_group)); return; } diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc index 99e60cce73..e5b532f980 100644 --- a/libs/ardour/route_group.cc +++ b/libs/ardour/route_group.cc @@ -137,7 +137,7 @@ RouteGroup::RouteGroup (Session& s, const string &n) add_property (_monitoring); add_property (_group_master_number); - s.SurroundMasterAddedOrRemoved.connect_same_thread (*this, boost::bind (&RouteGroup::update_surround_sends, this)); + s.SurroundMasterAddedOrRemoved.connect_same_thread (*this, std::bind (&RouteGroup::update_surround_sends, this)); } RouteGroup::~RouteGroup () @@ -199,7 +199,7 @@ RouteGroup::add (std::shared_ptr r) } r->set_route_group (this); - r->DropReferences.connect_same_thread (*this, boost::bind (&RouteGroup::remove_when_going_away, this, std::weak_ptr (r))); + r->DropReferences.connect_same_thread (*this, std::bind (&RouteGroup::remove_when_going_away, this, std::weak_ptr (r))); std::shared_ptr vca (group_master.lock()); @@ -353,7 +353,7 @@ RouteGroup::set_state (const XMLNode& node, int version) std::shared_ptr r = _session.route_by_id (subgroup_id); if (r) { _subgroup_bus = r; - _subgroup_bus->DropReferences.connect_same_thread (*this, boost::bind (&RouteGroup::unset_subgroup_bus, this)); + _subgroup_bus->DropReferences.connect_same_thread (*this, std::bind (&RouteGroup::unset_subgroup_bus, this)); } } @@ -691,7 +691,7 @@ RouteGroup::make_subgroup (bool aux, Placement placement) _subgroup_bus = rl.front(); _subgroup_bus->set_name (_name); - _subgroup_bus->DropReferences.connect_same_thread (*this, boost::bind (&RouteGroup::unset_subgroup_bus, this)); + _subgroup_bus->DropReferences.connect_same_thread (*this, std::bind (&RouteGroup::unset_subgroup_bus, this)); if (aux) { diff --git a/libs/ardour/rt_task.cc b/libs/ardour/rt_task.cc index 8eb66b9c59..3f64ab0d89 100644 --- a/libs/ardour/rt_task.cc +++ b/libs/ardour/rt_task.cc @@ -21,7 +21,7 @@ using namespace ARDOUR; -RTTask::RTTask (Graph* g, boost::function const& fn) +RTTask::RTTask (Graph* g, std::function const& fn) : _f (fn) , _graph (g) { diff --git a/libs/ardour/rt_tasklist.cc b/libs/ardour/rt_tasklist.cc index ef45edc0b5..3a0e258746 100644 --- a/libs/ardour/rt_tasklist.cc +++ b/libs/ardour/rt_tasklist.cc @@ -28,7 +28,7 @@ RTTaskList::RTTaskList (std::shared_ptr process_graph) } void -RTTaskList::push_back (boost::function fn) +RTTaskList::push_back (std::function fn) { _tasks.push_back (RTTask (_graph.get(), fn)); } diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index e5a5ad1e93..6dbc4c4a87 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -115,11 +115,11 @@ Send::Send (Session& s, std::shared_ptr p, std::shared_ptr } if (panner_shell()) { - panner_shell()->Changed.connect_same_thread (*this, boost::bind (&Send::panshell_changed, this)); - panner_shell()->PannableChanged.connect_same_thread (*this, boost::bind (&Send::pannable_changed, this)); + panner_shell()->Changed.connect_same_thread (*this, std::bind (&Send::panshell_changed, this)); + panner_shell()->PannableChanged.connect_same_thread (*this, std::bind (&Send::pannable_changed, this)); } if (_output) { - _output->changed.connect_same_thread (*this, boost::bind (&Send::snd_output_changed, this, _1, _2)); + _output->changed.connect_same_thread (*this, std::bind (&Send::snd_output_changed, this, _1, _2)); } } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 1c56aa0778..dd608d3faa 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -509,25 +509,25 @@ Session::Session (AudioEngine &eng, bool was_dirty = dirty(); - PresentationInfo::Change.connect_same_thread (*this, boost::bind (&Session::notify_presentation_info_change, this, _1)); + PresentationInfo::Change.connect_same_thread (*this, std::bind (&Session::notify_presentation_info_change, this, _1)); - Config->ParameterChanged.connect_same_thread (*this, boost::bind (&Session::config_changed, this, _1, false)); - config.ParameterChanged.connect_same_thread (*this, boost::bind (&Session::config_changed, this, _1, true)); + Config->ParameterChanged.connect_same_thread (*this, std::bind (&Session::config_changed, this, _1, false)); + config.ParameterChanged.connect_same_thread (*this, std::bind (&Session::config_changed, this, _1, true)); - StartTimeChanged.connect_same_thread (*this, boost::bind (&Session::start_time_changed, this, _1)); - EndTimeChanged.connect_same_thread (*this, boost::bind (&Session::end_time_changed, this, _1)); + StartTimeChanged.connect_same_thread (*this, std::bind (&Session::start_time_changed, this, _1)); + EndTimeChanged.connect_same_thread (*this, std::bind (&Session::end_time_changed, this, _1)); - LatentSend::ChangedLatency.connect_same_thread (*this, boost::bind (&Session::send_latency_compensation_change, this)); - LatentSend::QueueUpdate.connect_same_thread (*this, boost::bind (&Session::update_send_delaylines, this)); - Latent::DisableSwitchChanged.connect_same_thread (*this, boost::bind (&Session::queue_latency_recompute, this)); + LatentSend::ChangedLatency.connect_same_thread (*this, std::bind (&Session::send_latency_compensation_change, this)); + LatentSend::QueueUpdate.connect_same_thread (*this, std::bind (&Session::update_send_delaylines, this)); + Latent::DisableSwitchChanged.connect_same_thread (*this, std::bind (&Session::queue_latency_recompute, this)); - Controllable::ControlTouched.connect_same_thread (*this, boost::bind (&Session::controllable_touched, this, _1)); + Controllable::ControlTouched.connect_same_thread (*this, std::bind (&Session::controllable_touched, this, _1)); - Location::cue_change.connect_same_thread (*this, boost::bind (&Session::cue_marker_change, this, _1)); + Location::cue_change.connect_same_thread (*this, std::bind (&Session::cue_marker_change, this, _1)); - IOPluginsChanged.connect_same_thread (*this, boost::bind (&Session::resort_io_plugs, this)); + IOPluginsChanged.connect_same_thread (*this, std::bind (&Session::resort_io_plugs, this)); - TempoMap::MapChanged.connect_same_thread (*this, boost::bind (&Session::tempo_map_changed, this)); + TempoMap::MapChanged.connect_same_thread (*this, std::bind (&Session::tempo_map_changed, this)); emit_thread_start (); auto_connect_thread_start (); @@ -610,7 +610,7 @@ Session::immediately_post_engine () /* every time we reconnect, recompute worst case output latencies */ - _engine.Running.connect_same_thread (*this, boost::bind (&Session::initialize_latencies, this)); + _engine.Running.connect_same_thread (*this, std::bind (&Session::initialize_latencies, this)); /* Restart transport FSM */ @@ -618,7 +618,7 @@ Session::immediately_post_engine () /* every time we reconnect, do stuff ... */ - _engine.Running.connect_same_thread (*this, boost::bind (&Session::engine_running, this)); + _engine.Running.connect_same_thread (*this, std::bind (&Session::engine_running, this)); try { BootMessage (_("Set up LTC")); @@ -635,8 +635,8 @@ Session::immediately_post_engine () /* TODO, connect in different thread. (PortRegisteredOrUnregistered may be in RT context) * can we do that? */ - _engine.PortRegisteredOrUnregistered.connect_same_thread (*this, boost::bind (&Session::port_registry_changed, this)); - _engine.PortPrettyNameChanged.connect_same_thread (*this, boost::bind (&Session::setup_bundles, this)); + _engine.PortRegisteredOrUnregistered.connect_same_thread (*this, std::bind (&Session::port_registry_changed, this)); + _engine.PortPrettyNameChanged.connect_same_thread (*this, std::bind (&Session::setup_bundles, this)); // set samplerate for plugins added early // e.g from templates or MB channelstrip @@ -922,7 +922,7 @@ void Session::port_registry_changed() { setup_bundles (); - _butler->delegate (boost::bind (&Session::probe_ctrl_surfaces, this)); + _butler->delegate (std::bind (&Session::probe_ctrl_surfaces, this)); } void @@ -977,7 +977,7 @@ Session::setup_click () setup_click_state (0); } click_io_resync_latency (true); - LatencyUpdated.connect_same_thread (_click_io_connection, boost::bind (&Session::click_io_resync_latency, this, _1)); + LatencyUpdated.connect_same_thread (_click_io_connection, std::bind (&Session::click_io_resync_latency, this, _1)); } void @@ -1695,9 +1695,9 @@ Session::track_playlist_changed (std::weak_ptr wp) std::shared_ptr playlist; if ((playlist = track->playlist()) != 0) { - playlist->RegionAdded.connect_same_thread (*this, boost::bind (&Session::playlist_region_added, this, _1)); - playlist->RangesMoved.connect_same_thread (*this, boost::bind (&Session::playlist_ranges_moved, this, _1)); - playlist->RegionsExtended.connect_same_thread (*this, boost::bind (&Session::playlist_regions_extended, this, _1)); + playlist->RegionAdded.connect_same_thread (*this, std::bind (&Session::playlist_region_added, this, _1)); + playlist->RangesMoved.connect_same_thread (*this, std::bind (&Session::playlist_ranges_moved, this, _1)); + playlist->RegionsExtended.connect_same_thread (*this, std::bind (&Session::playlist_regions_extended, this, _1)); } } @@ -1915,9 +1915,9 @@ Session::set_auto_punch_location (Location* location) punch_connections.drop_connections (); - location->StartChanged.connect_same_thread (punch_connections, boost::bind (&Session::auto_punch_start_changed, this, location)); - location->EndChanged.connect_same_thread (punch_connections, boost::bind (&Session::auto_punch_end_changed, this, location)); - location->Changed.connect_same_thread (punch_connections, boost::bind (&Session::auto_punch_changed, this, location)); + location->StartChanged.connect_same_thread (punch_connections, std::bind (&Session::auto_punch_start_changed, this, location)); + location->EndChanged.connect_same_thread (punch_connections, std::bind (&Session::auto_punch_end_changed, this, location)); + location->Changed.connect_same_thread (punch_connections, std::bind (&Session::auto_punch_changed, this, location)); location->set_auto_punch (true, this); @@ -1972,10 +1972,10 @@ Session::set_auto_loop_location (Location* location) loop_connections.drop_connections (); - location->StartChanged.connect_same_thread (loop_connections, boost::bind (&Session::auto_loop_changed, this, location)); - location->EndChanged.connect_same_thread (loop_connections, boost::bind (&Session::auto_loop_changed, this, location)); - location->Changed.connect_same_thread (loop_connections, boost::bind (&Session::auto_loop_changed, this, location)); - location->FlagsChanged.connect_same_thread (loop_connections, boost::bind (&Session::auto_loop_changed, this, location)); + location->StartChanged.connect_same_thread (loop_connections, std::bind (&Session::auto_loop_changed, this, location)); + location->EndChanged.connect_same_thread (loop_connections, std::bind (&Session::auto_loop_changed, this, location)); + location->Changed.connect_same_thread (loop_connections, std::bind (&Session::auto_loop_changed, this, location)); + location->FlagsChanged.connect_same_thread (loop_connections, std::bind (&Session::auto_loop_changed, this, location)); location->set_auto_loop (true, this); @@ -2064,7 +2064,7 @@ Session::sync_locations_to_skips () /* This happens asynchronously (in the audioengine thread). After the clear is done, we will call * Session::_sync_locations_to_skips() from the audioengine thread. */ - clear_events (SessionEvent::Skip, boost::bind (&Session::_sync_locations_to_skips, this)); + clear_events (SessionEvent::Skip, std::bind (&Session::_sync_locations_to_skips, this)); } void @@ -2107,31 +2107,31 @@ Session::location_added (Location *location) if (location->is_mark()) { /* listen for per-location signals that require us to do any * global updates for marks */ - location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); - location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); - location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); - location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); - location->TimeDomainChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); + location->StartChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); + location->EndChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); + location->Changed.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); + location->FlagsChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); + location->TimeDomainChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); } if (location->is_range_marker()) { /* listen for per-location signals that require us to do any * global updates for marks */ - location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); - location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); - location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); - location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); - location->TimeDomainChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); + location->StartChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); + location->EndChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); + location->Changed.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); + location->FlagsChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); + location->TimeDomainChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); } if (location->is_skip()) { /* listen for per-location signals that require us to update skip-locate events */ - location->StartChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true)); - location->EndChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true)); - location->Changed.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, true)); - location->FlagsChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_skips, this, location, false)); - location->TimeDomainChanged.connect_same_thread (skip_update_connections, boost::bind (&Session::update_marks, this, location)); + location->StartChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_skips, this, location, true)); + location->EndChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_skips, this, location, true)); + location->Changed.connect_same_thread (skip_update_connections, std::bind (&Session::update_skips, this, location, true)); + location->FlagsChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_skips, this, location, false)); + location->TimeDomainChanged.connect_same_thread (skip_update_connections, std::bind (&Session::update_marks, this, location)); update_skips (location, true); } @@ -2601,7 +2601,7 @@ Session::rechain_process_graph (GraphNodeList& g) * However, the graph-chain may be in use (session process), and the last reference * be helf by the process-callback. So we delegate deletion to the butler thread. */ - _graph_chain = std::shared_ptr (new GraphChain (g, edges), boost::bind (&rt_safe_delete, this, _1)); + _graph_chain = std::shared_ptr (new GraphChain (g, edges), std::bind (&rt_safe_delete, this, _1)); } else { _graph_chain.reset (); } @@ -2634,7 +2634,7 @@ Session::rechain_ioplug_graph (bool pre) GraphEdges edges; if (topological_sort (gnl, edges)) { - _io_graph_chain[pre ? 0 : 1] = std::shared_ptr (new GraphChain (gnl, edges), boost::bind (&rt_safe_delete, this, _1)); + _io_graph_chain[pre ? 0 : 1] = std::shared_ptr (new GraphChain (gnl, edges), std::bind (&rt_safe_delete, this, _1)); return true; } return false; @@ -3551,12 +3551,12 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool std::weak_ptr wpr (*x); std::shared_ptr r (*x); - r->solo_control()->Changed.connect_same_thread (*this, boost::bind (&Session::route_solo_changed, this, _1, _2,wpr)); - r->solo_isolate_control()->Changed.connect_same_thread (*this, boost::bind (&Session::route_solo_isolated_changed, this, wpr)); - r->mute_control()->Changed.connect_same_thread (*this, boost::bind (&Session::route_mute_changed, this)); + r->solo_control()->Changed.connect_same_thread (*this, std::bind (&Session::route_solo_changed, this, _1, _2,wpr)); + r->solo_isolate_control()->Changed.connect_same_thread (*this, std::bind (&Session::route_solo_isolated_changed, this, wpr)); + r->mute_control()->Changed.connect_same_thread (*this, std::bind (&Session::route_mute_changed, this)); - r->processors_changed.connect_same_thread (*this, boost::bind (&Session::route_processors_changed, this, _1)); - r->processor_latency_changed.connect_same_thread (*this, boost::bind (&Session::queue_latency_recompute, this)); + r->processors_changed.connect_same_thread (*this, std::bind (&Session::route_processors_changed, this, _1)); + r->processor_latency_changed.connect_same_thread (*this, std::bind (&Session::queue_latency_recompute, this)); if (r->is_master()) { _master_out = r; @@ -3572,19 +3572,19 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool std::shared_ptr tr = std::dynamic_pointer_cast (r); if (tr) { - tr->PlaylistChanged.connect_same_thread (*this, boost::bind (&Session::track_playlist_changed, this, std::weak_ptr (tr))); + tr->PlaylistChanged.connect_same_thread (*this, std::bind (&Session::track_playlist_changed, this, std::weak_ptr (tr))); track_playlist_changed (std::weak_ptr (tr)); - tr->rec_enable_control()->Changed.connect_same_thread (*this, boost::bind (&Session::update_route_record_state, this)); + tr->rec_enable_control()->Changed.connect_same_thread (*this, std::bind (&Session::update_route_record_state, this)); std::shared_ptr mt = std::dynamic_pointer_cast (tr); if (mt) { - mt->StepEditStatusChange.connect_same_thread (*this, boost::bind (&Session::step_edit_status_change, this, _1)); - mt->presentation_info().PropertyChanged.connect_same_thread (*this, boost::bind (&Session::midi_track_presentation_info_changed, this, _1, std::weak_ptr(mt))); + mt->StepEditStatusChange.connect_same_thread (*this, std::bind (&Session::step_edit_status_change, this, _1)); + mt->presentation_info().PropertyChanged.connect_same_thread (*this, std::bind (&Session::midi_track_presentation_info_changed, this, _1, std::weak_ptr(mt))); } } if (r->triggerbox()) { - r->triggerbox()->EmptyStatusChanged.connect_same_thread (*this, boost::bind (&Session::handle_slots_empty_status, this, wpr)); + r->triggerbox()->EmptyStatusChanged.connect_same_thread (*this, std::bind (&Session::handle_slots_empty_status, this, wpr)); if (!r->triggerbox()->empty()) { tb_with_filled_slots++; } @@ -3680,7 +3680,7 @@ Session::load_and_connect_instruments (RouteList& new_routes, bool strict_io, st } } for (RouteList::iterator r = new_routes.begin(); r != new_routes.end(); ++r) { - (*r)->output()->changed.connect_same_thread (*this, boost::bind (&Session::midi_output_change_handler, this, _1, _2, std::weak_ptr(*r))); + (*r)->output()->changed.connect_same_thread (*this, std::bind (&Session::midi_output_change_handler, this, _1, _2, std::weak_ptr(*r))); } } @@ -4893,7 +4893,7 @@ Session::add_source (std::shared_ptr source) } } - source->DropReferences.connect_same_thread (*this, boost::bind (&Session::remove_source, this, std::weak_ptr (source), false)); + source->DropReferences.connect_same_thread (*this, std::bind (&Session::remove_source, this, std::weak_ptr (source), false)); SourceAdded (std::weak_ptr (source)); /* EMIT SIGNAL */ } else { @@ -5484,7 +5484,7 @@ Session::load_io_plugin (std::shared_ptr ioplugin) Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ()); ioplugin->ensure_io (); iop->push_back (ioplugin); - ioplugin->LatencyChanged.connect_same_thread (*this, boost::bind (&Session::update_latency_compensation, this, true, false)); + ioplugin->LatencyChanged.connect_same_thread (*this, std::bind (&Session::update_latency_compensation, this, true, false)); } IOPluginsChanged (); /* EMIT SIGNAL */ set_dirty(); diff --git a/libs/ardour/session_configuration.cc b/libs/ardour/session_configuration.cc index b6984c2a1d..8d908dc927 100644 --- a/libs/ardour/session_configuration.cc +++ b/libs/ardour/session_configuration.cc @@ -142,7 +142,7 @@ SessionConfiguration::set_variables (const XMLNode& node) } void -SessionConfiguration::map_parameters (boost::function& functor) +SessionConfiguration::map_parameters (std::function& functor) { #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index 7cedffa520..06c2228f23 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -155,7 +155,7 @@ SessionEventManager::clear_events (SessionEvent::Type type) } void -SessionEventManager::clear_events (SessionEvent::Type type, boost::function after) +SessionEventManager::clear_events (SessionEvent::Type type, std::function after) { SessionEvent* ev = new SessionEvent (type, SessionEvent::Clear, SessionEvent::Immediate, 0, 0); ev->rt_slot = after; @@ -167,7 +167,7 @@ SessionEventManager::clear_events (SessionEvent::Type type, boost::functionevent_loop = PBD::EventLoop::get_event_loop_for_thread (); if (ev->event_loop) { - ev->rt_return = boost::bind (&CrossThreadPool::flush_pending_with_ev, ev->event_pool(), _1); + ev->rt_return = std::bind (&CrossThreadPool::flush_pending_with_ev, ev->event_pool(), _1); } queue_event (ev); @@ -218,7 +218,7 @@ SessionEventManager::merge_event (SessionEvent* ev) } if (ev->event_loop) { /* run non-realtime callback (in some other thread) */ - ev->event_loop->call_slot (MISSING_INVALIDATOR, boost::bind (ev->rt_return, ev)); + ev->event_loop->call_slot (MISSING_INVALIDATOR, std::bind (ev->rt_return, ev)); } else { delete ev; } diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 0e2168c69c..9283ebbe42 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -101,7 +101,7 @@ Session::pre_export () _export_xruns = 0; _exporting = true; export_status->set_running (true); - export_status->Finished.connect_same_thread (*this, boost::bind (&Session::finalize_audio_export, this, _1)); + export_status->Finished.connect_same_thread (*this, std::bind (&Session::finalize_audio_export, this, _1)); /* disable MMC output early */ @@ -223,7 +223,7 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex export_status->stop = false; process_function = &Session::process_export_fw; /* this is required for ExportGraphBuilder::Intermediate::start_post_processing */ - _engine.Freewheel.connect_same_thread (export_freewheel_connection, boost::bind (&Session::process_export_fw, this, _1)); + _engine.Freewheel.connect_same_thread (export_freewheel_connection, std::bind (&Session::process_export_fw, this, _1)); reset_xrun_count (); return 0; } else { @@ -234,7 +234,7 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex _realtime_export = false; _export_rolling = true; export_status->stop = false; - _engine.Freewheel.connect_same_thread (export_freewheel_connection, boost::bind (&Session::process_export_fw, this, _1)); + _engine.Freewheel.connect_same_thread (export_freewheel_connection, std::bind (&Session::process_export_fw, this, _1)); reset_xrun_count (); return _engine.freewheel (true); } diff --git a/libs/ardour/session_handle.cc b/libs/ardour/session_handle.cc index 777267365a..a8dc792f3f 100644 --- a/libs/ardour/session_handle.cc +++ b/libs/ardour/session_handle.cc @@ -33,7 +33,7 @@ SessionHandlePtr::SessionHandlePtr (Session* s) : _session (s) { if (_session) { - _session->DropReferences.connect_same_thread (_session_connections, boost::bind (&SessionHandlePtr::session_going_away, this)); + _session->DropReferences.connect_same_thread (_session_connections, std::bind (&SessionHandlePtr::session_going_away, this)); } } @@ -48,7 +48,7 @@ SessionHandlePtr::set_session (Session* s) if (s) { _session = s; - _session->DropReferences.connect_same_thread (_session_connections, boost::bind (&SessionHandlePtr::session_going_away, this)); + _session->DropReferences.connect_same_thread (_session_connections, std::bind (&SessionHandlePtr::session_going_away, this)); } } @@ -64,8 +64,8 @@ SessionHandlePtr::session_going_away () SessionHandleRef::SessionHandleRef (Session& s) : _session (s) { - _session.DropReferences.connect_same_thread (*this, boost::bind (&SessionHandleRef::session_going_away, this)); - _session.Destroyed.connect_same_thread (*this, boost::bind (&SessionHandleRef::insanity_check, this)); + _session.DropReferences.connect_same_thread (*this, std::bind (&SessionHandleRef::session_going_away, this)); + _session.Destroyed.connect_same_thread (*this, std::bind (&SessionHandleRef::insanity_check, this)); } SessionHandleRef::~SessionHandleRef () diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc index 6dc59f3279..75b3305e32 100644 --- a/libs/ardour/session_ltc.cc +++ b/libs/ardour/session_ltc.cc @@ -85,8 +85,8 @@ Session::ltc_tx_initialize() ltc_prev_cycle = -1; ltc_tx_reset(); ltc_tx_resync_latency (true); - Xrun.connect_same_thread (ltc_tx_connections, boost::bind (&Session::ltc_tx_reset, this)); - LatencyUpdated.connect_same_thread (ltc_tx_connections, boost::bind (&Session::ltc_tx_resync_latency, this, _1)); + Xrun.connect_same_thread (ltc_tx_connections, std::bind (&Session::ltc_tx_reset, this)); + LatencyUpdated.connect_same_thread (ltc_tx_connections, std::bind (&Session::ltc_tx_resync_latency, this, _1)); restarting = false; } diff --git a/libs/ardour/session_playlists.cc b/libs/ardour/session_playlists.cc index afd1b0196c..32e05ab228 100644 --- a/libs/ardour/session_playlists.cc +++ b/libs/ardour/session_playlists.cc @@ -83,9 +83,9 @@ SessionPlaylists::add (std::shared_ptr playlist) } else { unused_playlists.insert (unused_playlists.begin(), playlist); } - playlist->InUse.connect_same_thread (*this, boost::bind (&SessionPlaylists::track, this, _1, std::weak_ptr(playlist))); + playlist->InUse.connect_same_thread (*this, std::bind (&SessionPlaylists::track, this, _1, std::weak_ptr(playlist))); playlist->DropReferences.connect_same_thread ( - *this, boost::bind (&SessionPlaylists::remove_weak, this, std::weak_ptr (playlist)) + *this, std::bind (&SessionPlaylists::remove_weak, this, std::weak_ptr (playlist)) ); } @@ -465,7 +465,7 @@ SessionPlaylists::add_state (XMLNode* node, bool save_template, bool include_unu /** @return true for `stop cleanup', otherwise false */ bool -SessionPlaylists::maybe_delete_unused (boost::function)> ask) +SessionPlaylists::maybe_delete_unused (std::function)> ask) { vector > playlists_tbd; @@ -670,7 +670,7 @@ SessionPlaylists::playlists_for_track (std::shared_ptr tr) const } void -SessionPlaylists::foreach (boost::function)> functor, bool incl_unused) +SessionPlaylists::foreach (std::function)> functor, bool incl_unused) { Glib::Threads::Mutex::Lock lm (lock); for (PlaylistSet::iterator i = playlists.begin(); i != playlists.end(); i++) { diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 00ecb4b87d..7d393f1585 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -1172,7 +1172,7 @@ Session::compute_stop_limit () const /* dedicated thread for signal emission. * * while sending cross-thread signals from the process thread - * is fine in general, PBD::Signal's use of boost::function and + * is fine in general, PBD::Signal's use of std::function and * boost:bind can produce a vast overhead which is not * acceptable for low latency. * diff --git a/libs/ardour/session_rtevents.cc b/libs/ardour/session_rtevents.cc index e07b231ba0..631b0ea9d4 100644 --- a/libs/ardour/session_rtevents.cc +++ b/libs/ardour/session_rtevents.cc @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include #include #include "pbd/error.h" @@ -191,9 +190,9 @@ Session::process_rtop (SessionEvent* ev) ev->rt_slot (); if (ev->event_loop) { - if (!ev->event_loop->call_slot (MISSING_INVALIDATOR, boost::bind (ev->rt_return, ev))) { + if (!ev->event_loop->call_slot (MISSING_INVALIDATOR, std::bind (ev->rt_return, ev))) { /* The event must be deleted, otherwise the SessionEvent Pool may fill up */ - if (!butler ()->delegate (boost::bind (ev->rt_return, ev))) { + if (!butler ()->delegate (std::bind (ev->rt_return, ev))) { ev->rt_return (ev); } } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 147106993e..7edb0f6f19 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -202,16 +202,16 @@ Session::pre_engine_init (string fullpath) _speakers->setup_default_speakers (2); _solo_cut_control.reset (new ProxyControllable (_("solo cut control (dB)"), PBD::Controllable::GainLike, - boost::bind (&RCConfiguration::set_solo_mute_gain, Config, _1), - boost::bind (&RCConfiguration::get_solo_mute_gain, Config))); + std::bind (&RCConfiguration::set_solo_mute_gain, Config, _1), + std::bind (&RCConfiguration::get_solo_mute_gain, Config))); add_controllable (_solo_cut_control); /* These are all static "per-class" signals */ - SourceFactory::SourceCreated.connect_same_thread (*this, boost::bind (&Session::add_source, this, _1)); - PlaylistFactory::PlaylistCreated.connect_same_thread (*this, boost::bind (&Session::add_playlist, this, _1)); - AutomationList::AutomationListCreated.connect_same_thread (*this, boost::bind (&Session::add_automation_list, this, _1)); - IO::PortCountChanged.connect_same_thread (*this, boost::bind (&Session::ensure_buffers, this, _1)); + SourceFactory::SourceCreated.connect_same_thread (*this, std::bind (&Session::add_source, this, _1)); + PlaylistFactory::PlaylistCreated.connect_same_thread (*this, std::bind (&Session::add_playlist, this, _1)); + AutomationList::AutomationListCreated.connect_same_thread (*this, std::bind (&Session::add_automation_list, this, _1)); + IO::PortCountChanged.connect_same_thread (*this, std::bind (&Session::ensure_buffers, this, _1)); /* stop IO objects from doing stuff until we're ready for them */ @@ -236,14 +236,14 @@ Session::post_engine_init () msc->set_input_port (std::dynamic_pointer_cast(scene_input_port())); msc->set_output_port (std::dynamic_pointer_cast(scene_output_port())); - boost::function timer_func (boost::bind (&Session::audible_sample, this, (bool*)(0))); + std::function timer_func (std::bind (&Session::audible_sample, this, (bool*)(0))); std::dynamic_pointer_cast(scene_input_port())->set_timer (timer_func); setup_midi_machine_control (); /* setup MTC generator */ mtc_tx_resync_latency (true); - LatencyUpdated.connect_same_thread (*this, boost::bind (&Session::mtc_tx_resync_latency, this, _1)); + LatencyUpdated.connect_same_thread (*this, std::bind (&Session::mtc_tx_resync_latency, this, _1)); if (_butler->start_thread()) { error << _("Butler did not start") << endmsg; @@ -258,8 +258,8 @@ Session::post_engine_init () setup_click_sounds (0); setup_midi_control (); - _engine.Halted.connect_same_thread (*this, boost::bind (&Session::engine_halted, this)); - _engine.Xrun.connect_same_thread (*this, boost::bind (&Session::xrun_recovery, this)); + _engine.Halted.connect_same_thread (*this, std::bind (&Session::engine_halted, this)); + _engine.Xrun.connect_same_thread (*this, std::bind (&Session::xrun_recovery, this)); try { @@ -270,8 +270,8 @@ Session::post_engine_init () /* crossfades require sample rate knowledge */ - _engine.GraphReordered.connect_same_thread (*this, boost::bind (&Session::graph_reordered, this, true)); - _engine.MidiSelectionPortsChanged.connect_same_thread (*this, boost::bind (&Session::rewire_midi_selection_ports, this)); + _engine.GraphReordered.connect_same_thread (*this, std::bind (&Session::graph_reordered, this, true)); + _engine.MidiSelectionPortsChanged.connect_same_thread (*this, std::bind (&Session::rewire_midi_selection_ports, this)); refresh_disk_space (); @@ -304,8 +304,8 @@ Session::post_engine_init () /* ENGINE */ - boost::function ff (boost::bind (&Session::config_changed, this, _1, false)); - boost::function ft (boost::bind (&Session::config_changed, this, _1, true)); + std::function ff (std::bind (&Session::config_changed, this, _1, false)); + std::function ft (std::bind (&Session::config_changed, this, _1, true)); Config->map_parameters (ff); config.map_parameters (ft); @@ -368,9 +368,9 @@ Session::post_engine_init () initialize_latencies (); - _locations->added.connect_same_thread (*this, boost::bind (&Session::location_added, this, _1)); - _locations->removed.connect_same_thread (*this, boost::bind (&Session::location_removed, this, _1)); - _locations->changed.connect_same_thread (*this, boost::bind (&Session::locations_changed, this)); + _locations->added.connect_same_thread (*this, std::bind (&Session::location_added, this, _1)); + _locations->removed.connect_same_thread (*this, std::bind (&Session::location_removed, this, _1)); + _locations->changed.connect_same_thread (*this, std::bind (&Session::locations_changed, this)); if (synced_to_engine()) { _engine.transport_stop (); @@ -1185,7 +1185,7 @@ void Session::collect_sources_of_this_snapshot (set>& s, bool incl_unused) const { _playlists->sync_all_regions_with_regions (); - _playlists->foreach (boost::bind (merge_all_sources, _1, &s), incl_unused); + _playlists->foreach (std::bind (merge_all_sources, _1, &s), incl_unused); std::shared_ptr rl = routes.reader(); for (auto const& r : *rl) { @@ -2092,7 +2092,7 @@ Session::set_state (const XMLNode& node, int version) std::shared_ptr iop = std::make_shared(*this); if (0 == iop->set_state (**n, version)) { iopl->push_back (iop); - iop->LatencyChanged.connect_same_thread (*this, boost::bind (&Session::update_latency_compensation, this, true, false)); + iop->LatencyChanged.connect_same_thread (*this, std::bind (&Session::update_latency_compensation, this, true, false)); } else { /* TODO Unknown I/O Plugin, retain state */ } @@ -2171,7 +2171,7 @@ Session::load_routes (const XMLNode& node, int version) std::shared_ptr mt = std::dynamic_pointer_cast (*r); bool is_midi_route = (*r)->n_inputs().n_midi() > 0 && (*r)->n_inputs().n_midi() > 0; if (mt || is_midi_route) { - (*r)->output()->changed.connect_same_thread (*this, boost::bind (&Session::midi_output_change_handler, this, _1, _2, std::weak_ptr(*r))); + (*r)->output()->changed.connect_same_thread (*this, std::bind (&Session::midi_output_change_handler, this, _1, _2, std::weak_ptr(*r))); } } @@ -3285,9 +3285,9 @@ Session::add_route_group (RouteGroup* g) _route_groups.push_back (g); route_group_added (g); /* EMIT SIGNAL */ - g->RouteAdded.connect_same_thread (*this, boost::bind (&Session::route_added_to_route_group, this, _1, _2)); - g->RouteRemoved.connect_same_thread (*this, boost::bind (&Session::route_removed_from_route_group, this, _1, _2)); - g->PropertyChanged.connect_same_thread (*this, boost::bind (&Session::route_group_property_changed, this, g)); + g->RouteAdded.connect_same_thread (*this, std::bind (&Session::route_added_to_route_group, this, _1, _2)); + g->RouteRemoved.connect_same_thread (*this, std::bind (&Session::route_removed_from_route_group, this, _1, _2)); + g->PropertyChanged.connect_same_thread (*this, std::bind (&Session::route_group_property_changed, this, g)); set_dirty (); } @@ -3637,7 +3637,7 @@ Session::cleanup_sources (CleanupReport& rep) /* consider deleting all unused playlists */ - if (_playlists->maybe_delete_unused (boost::bind (Session::ask_about_playlist_deletion, _1))) { + if (_playlists->maybe_delete_unused (std::bind (Session::ask_about_playlist_deletion, _1))) { ret = 0; goto out; } @@ -4524,25 +4524,25 @@ Session::setup_midi_machine_control () _mmc->set_ports (mmc_in, mmc_out); - _mmc->Play.connect_same_thread (*this, boost::bind (&Session::mmc_deferred_play, this, _1)); - _mmc->DeferredPlay.connect_same_thread (*this, boost::bind (&Session::mmc_deferred_play, this, _1)); - _mmc->Stop.connect_same_thread (*this, boost::bind (&Session::mmc_stop, this, _1)); - _mmc->FastForward.connect_same_thread (*this, boost::bind (&Session::mmc_fast_forward, this, _1)); - _mmc->Rewind.connect_same_thread (*this, boost::bind (&Session::mmc_rewind, this, _1)); - _mmc->Pause.connect_same_thread (*this, boost::bind (&Session::mmc_pause, this, _1)); - _mmc->RecordPause.connect_same_thread (*this, boost::bind (&Session::mmc_record_pause, this, _1)); - _mmc->RecordStrobe.connect_same_thread (*this, boost::bind (&Session::mmc_record_strobe, this, _1)); - _mmc->RecordExit.connect_same_thread (*this, boost::bind (&Session::mmc_record_exit, this, _1)); - _mmc->Locate.connect_same_thread (*this, boost::bind (&Session::mmc_locate, this, _1, _2)); - _mmc->Step.connect_same_thread (*this, boost::bind (&Session::mmc_step, this, _1, _2)); - _mmc->Shuttle.connect_same_thread (*this, boost::bind (&Session::mmc_shuttle, this, _1, _2, _3)); - _mmc->TrackRecordStatusChange.connect_same_thread (*this, boost::bind (&Session::mmc_record_enable, this, _1, _2, _3)); + _mmc->Play.connect_same_thread (*this, std::bind (&Session::mmc_deferred_play, this, _1)); + _mmc->DeferredPlay.connect_same_thread (*this, std::bind (&Session::mmc_deferred_play, this, _1)); + _mmc->Stop.connect_same_thread (*this, std::bind (&Session::mmc_stop, this, _1)); + _mmc->FastForward.connect_same_thread (*this, std::bind (&Session::mmc_fast_forward, this, _1)); + _mmc->Rewind.connect_same_thread (*this, std::bind (&Session::mmc_rewind, this, _1)); + _mmc->Pause.connect_same_thread (*this, std::bind (&Session::mmc_pause, this, _1)); + _mmc->RecordPause.connect_same_thread (*this, std::bind (&Session::mmc_record_pause, this, _1)); + _mmc->RecordStrobe.connect_same_thread (*this, std::bind (&Session::mmc_record_strobe, this, _1)); + _mmc->RecordExit.connect_same_thread (*this, std::bind (&Session::mmc_record_exit, this, _1)); + _mmc->Locate.connect_same_thread (*this, std::bind (&Session::mmc_locate, this, _1, _2)); + _mmc->Step.connect_same_thread (*this, std::bind (&Session::mmc_step, this, _1, _2)); + _mmc->Shuttle.connect_same_thread (*this, std::bind (&Session::mmc_shuttle, this, _1, _2, _3)); + _mmc->TrackRecordStatusChange.connect_same_thread (*this, std::bind (&Session::mmc_record_enable, this, _1, _2, _3)); /* also handle MIDI SPP because its so common */ - _mmc->SPPStart.connect_same_thread (*this, boost::bind (&Session::spp_start, this)); - _mmc->SPPContinue.connect_same_thread (*this, boost::bind (&Session::spp_continue, this)); - _mmc->SPPStop.connect_same_thread (*this, boost::bind (&Session::spp_stop, this)); + _mmc->SPPStart.connect_same_thread (*this, std::bind (&Session::spp_start, this)); + _mmc->SPPContinue.connect_same_thread (*this, std::bind (&Session::spp_continue, this)); + _mmc->SPPStop.connect_same_thread (*this, std::bind (&Session::spp_stop, this)); } std::shared_ptr @@ -4948,7 +4948,7 @@ typedef std::vector > SeveralFileSources; typedef std::map SourcePathMap; int -Session::bring_all_sources_into_session (boost::function callback) +Session::bring_all_sources_into_session (std::function callback) { uint32_t total = 0; uint32_t n = 0; @@ -5387,7 +5387,7 @@ Session::save_as (SaveAs& saveas) save_default_options (); if (saveas.copy_media && saveas.copy_external) { - if (bring_all_sources_into_session (boost::bind (&Session::save_as_bring_callback, this, _1, _2, _3))) { + if (bring_all_sources_into_session (std::bind (&Session::save_as_bring_callback, this, _1, _2, _3))) { throw Glib::FileError (Glib::FileError::NO_SPACE_LEFT, "consolidate failed"); } } diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index bd960563fe..720fccd7a7 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -2034,7 +2034,7 @@ Session::sync_source_changed (SyncSource type, samplepos_t pos, pframes_t cycle_ std::shared_ptr mtc_master = std::dynamic_pointer_cast (master); if (mtc_master) { - mtc_master->ActiveChanged.connect_same_thread (mtc_status_connection, boost::bind (&Session::mtc_status_changed, this, _1)); + mtc_master->ActiveChanged.connect_same_thread (mtc_status_connection, std::bind (&Session::mtc_status_changed, this, _1)); MTCSyncStateChanged(mtc_master->locked() ); } else { int canderef (1); @@ -2047,7 +2047,7 @@ Session::sync_source_changed (SyncSource type, samplepos_t pos, pframes_t cycle_ std::shared_ptr ltc_master = std::dynamic_pointer_cast (master); if (ltc_master) { - ltc_master->ActiveChanged.connect_same_thread (ltc_status_connection, boost::bind (&Session::ltc_status_changed, this, _1)); + ltc_master->ActiveChanged.connect_same_thread (ltc_status_connection, std::bind (&Session::ltc_status_changed, this, _1)); LTCSyncStateChanged (ltc_master->locked() ); } else { int canderef (1); diff --git a/libs/ardour/slavable.cc b/libs/ardour/slavable.cc index b80507d299..dde0436b80 100644 --- a/libs/ardour/slavable.cc +++ b/libs/ardour/slavable.cc @@ -41,7 +41,7 @@ PBD::Signal Slavable::Assign; /* signal sent once Slavable::Slavable () { - Assign.connect_same_thread (assign_connection, boost::bind (&Slavable::do_assign, this, _1)); + Assign.connect_same_thread (assign_connection, std::bind (&Slavable::do_assign, this, _1)); } XMLNode& @@ -161,8 +161,8 @@ Slavable::assign (std::shared_ptr v) */ - v->Drop.connect_same_thread (unassign_connections, boost::bind (&Slavable::weak_unassign, this, std::weak_ptr(v))); - v->DropReferences.connect_same_thread (unassign_connections, boost::bind (&Slavable::weak_unassign, this, std::weak_ptr(v))); + v->Drop.connect_same_thread (unassign_connections, std::bind (&Slavable::weak_unassign, this, std::weak_ptr(v))); + v->DropReferences.connect_same_thread (unassign_connections, std::bind (&Slavable::weak_unassign, this, std::weak_ptr(v))); } AssignmentChange (v, true); diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc index c9b8714f6d..16fa44aae6 100644 --- a/libs/ardour/slavable_automation_control.cc +++ b/libs/ardour/slavable_automation_control.cc @@ -198,7 +198,7 @@ SlavableAutomationControl::add_master (std::shared_ptr m) avoiding holding a reference to the control in the binding itself. */ - m->DropReferences.connect_same_thread (res.first->second.dropped_connection, boost::bind (&SlavableAutomationControl::master_going_away, this, std::weak_ptr(m))); + m->DropReferences.connect_same_thread (res.first->second.dropped_connection, std::bind (&SlavableAutomationControl::master_going_away, this, std::weak_ptr(m))); /* Store the connection inside the MasterRecord, so that when we destroy it, the connection is destroyed @@ -216,7 +216,7 @@ SlavableAutomationControl::add_master (std::shared_ptr m) because the change came from the master. */ - m->Changed.connect_same_thread (res.first->second.changed_connection, boost::bind (&SlavableAutomationControl::master_changed, this, _1, _2, std::weak_ptr(m))); + m->Changed.connect_same_thread (res.first->second.changed_connection, std::bind (&SlavableAutomationControl::master_changed, this, _1, _2, std::weak_ptr(m))); } } @@ -370,12 +370,12 @@ SlavableAutomationControl::remove_master (std::shared_ptr m) if (_list) { XMLNode* before = &alist ()->get_state (); if (master->automation_playback () && master->list()) { - _list->list_merge (*master->list().get(), boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, _2)); + _list->list_merge (*master->list().get(), std::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, _2)); printf ("y-t %s %f\n", name().c_str(), list_ratio); - _list->y_transform (boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, list_ratio)); + _list->y_transform (std::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, list_ratio)); } else { // do we need to freeze/thaw the list? probably no: iterators & positions don't change - _list->y_transform (boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, master_ratio)); + _list->y_transform (std::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, master_ratio)); } XMLNode* after = &alist ()->get_state (); if (*before != *after) { @@ -448,11 +448,11 @@ SlavableAutomationControl::clear_masters () XMLNode* before = &alist ()->get_state (); if (!masters.empty()) { for (AutomationControlList::const_iterator m = masters.begin(); m != masters.end(); ++m) { - _list->list_merge (*(*m)->list().get(), boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, _2)); + _list->list_merge (*(*m)->list().get(), std::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, _2)); } - _list->y_transform (boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, list_ratio)); + _list->y_transform (std::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, list_ratio)); } else { - _list->y_transform (boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, master_ratio)); + _list->y_transform (std::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, master_ratio)); } XMLNode* after = &alist ()->get_state (); if (*before != *after) { diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 42dba9d36e..4f03edc8e4 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -340,7 +340,7 @@ SndFileSource::init_sndfile () memset (&_info, 0, sizeof(_info)); - AudioFileSource::HeaderPositionOffsetChanged.connect_same_thread (header_position_connection, boost::bind (&SndFileSource::handle_header_position_change, this)); + AudioFileSource::HeaderPositionOffsetChanged.connect_same_thread (header_position_connection, std::bind (&SndFileSource::handle_header_position_change, this)); } void diff --git a/libs/ardour/surround_pannable.cc b/libs/ardour/surround_pannable.cc index 3c0cc1a34e..a3806ab427 100644 --- a/libs/ardour/surround_pannable.cc +++ b/libs/ardour/surround_pannable.cc @@ -89,17 +89,17 @@ SurroundPannable::SurroundPannable (Session& s, uint32_t chn, Temporal::TimeDoma add_control (sur_ramp); // hidden, volatile /* all controls change state together */ - pan_pos_x->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&SurroundPannable::control_auto_state_changed, this, _1)); - pan_pos_y->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&SurroundPannable::control_auto_state_changed, this, _1)); - pan_pos_z->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&SurroundPannable::control_auto_state_changed, this, _1)); - pan_size->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&SurroundPannable::control_auto_state_changed, this, _1)); - pan_snap->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&SurroundPannable::control_auto_state_changed, this, _1)); + pan_pos_x->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&SurroundPannable::control_auto_state_changed, this, _1)); + pan_pos_y->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&SurroundPannable::control_auto_state_changed, this, _1)); + pan_pos_z->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&SurroundPannable::control_auto_state_changed, this, _1)); + pan_size->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&SurroundPannable::control_auto_state_changed, this, _1)); + pan_snap->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&SurroundPannable::control_auto_state_changed, this, _1)); - pan_pos_x->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this)); - pan_pos_y->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this)); - pan_pos_z->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this)); - pan_size->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this)); - pan_snap->Changed.connect_same_thread (*this, boost::bind (&SurroundPannable::value_changed, this)); + pan_pos_x->Changed.connect_same_thread (*this, std::bind (&SurroundPannable::value_changed, this)); + pan_pos_y->Changed.connect_same_thread (*this, std::bind (&SurroundPannable::value_changed, this)); + pan_pos_z->Changed.connect_same_thread (*this, std::bind (&SurroundPannable::value_changed, this)); + pan_size->Changed.connect_same_thread (*this, std::bind (&SurroundPannable::value_changed, this)); + pan_snap->Changed.connect_same_thread (*this, std::bind (&SurroundPannable::value_changed, this)); setup_visual_links (); } @@ -139,11 +139,11 @@ SurroundPannable::sync_visual_link_to (std::shared_ptr other) void SurroundPannable::sync_auto_state_with (std::shared_ptr other) { - other->pan_pos_x->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&SurroundPannable::control_auto_state_changed, this, _1)); + other->pan_pos_x->alist()->automation_state_changed.connect_same_thread (*this, std::bind (&SurroundPannable::control_auto_state_changed, this, _1)); } void -SurroundPannable::foreach_pan_control (boost::function)> f) const +SurroundPannable::foreach_pan_control (std::function)> f) const { f (pan_pos_x); f (pan_pos_y); diff --git a/libs/ardour/surround_send.cc b/libs/ardour/surround_send.cc index 675df6229f..a652f9102b 100644 --- a/libs/ardour/surround_send.cc +++ b/libs/ardour/surround_send.cc @@ -57,12 +57,12 @@ SurroundSend::SurroundSend (Session& s, std::shared_ptr mm) add_control (_gain_control); _send_enable_control = std::shared_ptr (new AutomationControl (_session, BusSendEnable, ParameterDescriptor(BusSendEnable))); - _send_enable_control->Changed.connect_same_thread (*this, boost::bind (&SurroundSend::send_enable_changed, this)); + _send_enable_control->Changed.connect_same_thread (*this, std::bind (&SurroundSend::send_enable_changed, this)); _send_enable_control->clear_flag (PBD::Controllable::RealTime); - ActiveChanged.connect_same_thread (*this, boost::bind (&SurroundSend::proc_active_changed, this)); + ActiveChanged.connect_same_thread (*this, std::bind (&SurroundSend::proc_active_changed, this)); - InternalSend::CycleStart.connect_same_thread (*this, boost::bind (&SurroundSend::cycle_start, this, _1)); + InternalSend::CycleStart.connect_same_thread (*this, std::bind (&SurroundSend::cycle_start, this, _1)); } SurroundSend::~SurroundSend () diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc index 5cd852ce55..5fdb7bdf12 100644 --- a/libs/ardour/ticker.cc +++ b/libs/ardour/ticker.cc @@ -50,7 +50,7 @@ MidiClockTicker::MidiClockTicker (Session& s) , _transport_pos (-1) { resync_latency (true); - _session.LatencyUpdated.connect_same_thread (_latency_connection, boost::bind (&MidiClockTicker::resync_latency, this, _1)); + _session.LatencyUpdated.connect_same_thread (_latency_connection, std::bind (&MidiClockTicker::resync_latency, this, _1)); } MidiClockTicker::~MidiClockTicker () diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index e2336e7a6f..3a26d38505 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -141,17 +141,17 @@ Track::init () set_name (name ()); } - _session.config.ParameterChanged.connect_same_thread (*this, boost::bind (&Track::parameter_changed, this, _1)); - _session.RecordStateChanged.connect_same_thread (*this, boost::bind (&Track::update_input_meter, this)); - _session.TransportStateChange.connect_same_thread (*this, boost::bind (&Track::update_input_meter, this)); + _session.config.ParameterChanged.connect_same_thread (*this, std::bind (&Track::parameter_changed, this, _1)); + _session.RecordStateChanged.connect_same_thread (*this, std::bind (&Track::update_input_meter, this)); + _session.TransportStateChange.connect_same_thread (*this, std::bind (&Track::update_input_meter, this)); - _monitoring_control->Changed.connect_same_thread (*this, boost::bind (&Track::monitoring_changed, this, _1, _2)); - _record_safe_control->Changed.connect_same_thread (*this, boost::bind (&Track::record_safe_changed, this, _1, _2)); - _record_enable_control->Changed.connect_same_thread (*this, boost::bind (&Track::record_enable_changed, this, _1, _2)); + _monitoring_control->Changed.connect_same_thread (*this, std::bind (&Track::monitoring_changed, this, _1, _2)); + _record_safe_control->Changed.connect_same_thread (*this, std::bind (&Track::record_safe_changed, this, _1, _2)); + _record_enable_control->Changed.connect_same_thread (*this, std::bind (&Track::record_enable_changed, this, _1, _2)); - _input->changed.connect_same_thread (*this, boost::bind (&Track::input_changed, this)); + _input->changed.connect_same_thread (*this, std::bind (&Track::input_changed, this)); - _disk_reader->ConfigurationChanged.connect_same_thread (*this, boost::bind (&Track::chan_count_changed, this)); + _disk_reader->ConfigurationChanged.connect_same_thread (*this, std::bind (&Track::chan_count_changed, this)); return 0; } diff --git a/libs/ardour/transport_master.cc b/libs/ardour/transport_master.cc index e2f35e4f5d..db11508850 100644 --- a/libs/ardour/transport_master.cc +++ b/libs/ardour/transport_master.cc @@ -78,8 +78,8 @@ TransportMaster::TransportMaster (SyncSource t, std::string const & name) { register_properties (); - ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect_same_thread (port_connection, boost::bind (&TransportMaster::connection_handler, this, _1, _2, _3, _4, _5)); - ARDOUR::AudioEngine::instance()->Running.connect_same_thread (backend_connection, boost::bind (&TransportMaster::check_backend, this)); + ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect_same_thread (port_connection, std::bind (&TransportMaster::connection_handler, this, _1, _2, _3, _4, _5)); + ARDOUR::AudioEngine::instance()->Running.connect_same_thread (backend_connection, std::bind (&TransportMaster::check_backend, this)); } TransportMaster::~TransportMaster() @@ -574,8 +574,8 @@ TransportMasterViaMIDI::set_session (Session* s) return; } - s->config.ParameterChanged.connect_same_thread (session_connections, boost::bind (&TransportMasterViaMIDI::parameter_changed, this, _1)); - s->LatencyUpdated.connect_same_thread (session_connections, boost::bind (&TransportMasterViaMIDI::resync_latency, this, _1)); + s->config.ParameterChanged.connect_same_thread (session_connections, std::bind (&TransportMasterViaMIDI::parameter_changed, this, _1)); + s->LatencyUpdated.connect_same_thread (session_connections, std::bind (&TransportMasterViaMIDI::resync_latency, this, _1)); } void diff --git a/libs/ardour/transport_master_manager.cc b/libs/ardour/transport_master_manager.cc index 9741c4b3d6..4020ca9997 100644 --- a/libs/ardour/transport_master_manager.cc +++ b/libs/ardour/transport_master_manager.cc @@ -115,7 +115,7 @@ TransportMasterManager::set_session (Session* s) } if (_session) { - _session->config.ParameterChanged.connect_same_thread (config_connection, boost::bind (&TransportMasterManager::parameter_changed, this, _1)); + _session->config.ParameterChanged.connect_same_thread (config_connection, std::bind (&TransportMasterManager::parameter_changed, this, _1)); } } diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 1162d86ecd..09adf400c6 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -2943,7 +2943,7 @@ MIDITrigger::set_region_in_worker_thread_from_capture (std::shared_ptr r set_name (mr->name()); _model = mr->model(); - _model->ContentsChanged.connect_same_thread (content_connection, boost::bind (&MIDITrigger::model_contents_changed, this)); + _model->ContentsChanged.connect_same_thread (content_connection, std::bind (&MIDITrigger::model_contents_changed, this)); /* we've changed some of our internal values; we need to update our queued UIState or they will be lost when UIState is applied */ copy_to_ui_state (); @@ -2978,7 +2978,7 @@ MIDITrigger::set_region_in_worker_thread (std::shared_ptr r) set_name (mr->name()); _model = mr->model(); - _model->ContentsChanged.connect_same_thread (content_connection, boost::bind (&MIDITrigger::model_contents_changed, this)); + _model->ContentsChanged.connect_same_thread (content_connection, std::bind (&MIDITrigger::model_contents_changed, this)); loop_start = r->start ().beats(); loop_end = r->length ().beats(); @@ -3470,8 +3470,8 @@ void TriggerBox::static_init (Session & s) { input_parser = std::shared_ptr(new MIDI::Parser); /* leak */ - Config->ParameterChanged.connect_same_thread (static_connections, boost::bind (&TriggerBox::static_parameter_changed, _1)); - input_parser->any.connect_same_thread (midi_input_connection, boost::bind (&TriggerBox::midi_input_handler, _1, _2, _3, _4)); + Config->ParameterChanged.connect_same_thread (static_connections, std::bind (&TriggerBox::static_parameter_changed, _1)); + input_parser->any.connect_same_thread (midi_input_connection, std::bind (&TriggerBox::midi_input_handler, _1, _2, _3, _4)); std::dynamic_pointer_cast (s.trigger_input_port())->set_trace (input_parser); std::string const& dtip (Config->get_default_trigger_input_port()); if (!dtip.empty () && s.engine().get_port_by_name (dtip)) { @@ -3522,8 +3522,8 @@ TriggerBox::TriggerBox (Session& s, DataType dt) pending.push_back (std::atomic(0)); } - Config->ParameterChanged.connect_same_thread (*this, boost::bind (&TriggerBox::parameter_changed, this, _1)); - _session.config.ParameterChanged.connect_same_thread (*this, boost::bind (&TriggerBox::parameter_changed, this, _1)); + Config->ParameterChanged.connect_same_thread (*this, std::bind (&TriggerBox::parameter_changed, this, _1)); + _session.config.ParameterChanged.connect_same_thread (*this, std::bind (&TriggerBox::parameter_changed, this, _1)); } void diff --git a/libs/ardour/vst2_scan.cc b/libs/ardour/vst2_scan.cc index c2a5cf0da8..0233b27c74 100644 --- a/libs/ardour/vst2_scan.cc +++ b/libs/ardour/vst2_scan.cc @@ -665,7 +665,7 @@ vst2_save_cache_file (std::string const& path, XMLNode* root, bool verbose) } bool -ARDOUR::vst2_scan_and_cache (std::string const& path, ARDOUR::PluginType type, boost::function cb, bool verbose) +ARDOUR::vst2_scan_and_cache (std::string const& path, ARDOUR::PluginType type, std::function cb, bool verbose) { XMLNode* root = new XMLNode ("VST2Cache"); root->set_property ("version", 1); diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index 10cb6a42f2..d1ab7846c6 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -95,8 +95,8 @@ VST3Plugin::init () Vst::ProcessContext& context (_plug->context ()); context.sampleRate = _session.nominal_sample_rate (); _plug->set_block_size (_session.get_block_size ()); - _plug->OnResizeView.connect_same_thread (_connections, boost::bind (&VST3Plugin::forward_resize_view, this, _1, _2)); - _plug->OnParameterChange.connect_same_thread (_connections, boost::bind (&VST3Plugin::parameter_change_handler, this, _1, _2, _3)); + _plug->OnResizeView.connect_same_thread (_connections, std::bind (&VST3Plugin::forward_resize_view, this, _1, _2)); + _plug->OnParameterChange.connect_same_thread (_connections, std::bind (&VST3Plugin::parameter_change_handler, this, _1, _2, _3)); /* assume only default active busses are connected */ for (auto const& abi : _plug->bus_info_in ()) { @@ -238,7 +238,7 @@ VST3Plugin::set_automation_control (uint32_t port, std::shared_ptralist () || !_plug->subscribe_to_automation_changes ()) { return; } - ac->alist ()->automation_state_changed.connect_same_thread (_connections, boost::bind (&VST3PI::automation_state_changed, _plug, port, _1, std::weak_ptr (ac->alist ()))); + ac->alist ()->automation_state_changed.connect_same_thread (_connections, std::bind (&VST3PI::automation_state_changed, _plug, port, _1, std::weak_ptr (ac->alist ()))); } std::set @@ -2737,8 +2737,8 @@ VST3PI::setup_info_listener () DEBUG_TRACE (DEBUG::VST3Config, "VST3PI::setup_info_listener\n"); Stripable* s = dynamic_cast (_owner); - s->PropertyChanged.connect_same_thread (_strip_connections, boost::bind (&VST3PI::stripable_property_changed, this, _1)); - s->presentation_info ().PropertyChanged.connect_same_thread (_strip_connections, boost::bind (&VST3PI::stripable_property_changed, this, _1)); + s->PropertyChanged.connect_same_thread (_strip_connections, std::bind (&VST3PI::stripable_property_changed, this, _1)); + s->presentation_info ().PropertyChanged.connect_same_thread (_strip_connections, std::bind (&VST3PI::stripable_property_changed, this, _1)); /* send initial change */ stripable_property_changed (PropertyChange ()); @@ -3148,7 +3148,7 @@ VST3PI::psl_subscribe_to (std::shared_ptr ac, FIDStri } DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::psl_subscribe_to: %1\n", ac->name ())); - ac->Changed.connect_same_thread (_ac_connection_list, boost::bind (&VST3PI::forward_signal, this, nfo2.get (), id)); + ac->Changed.connect_same_thread (_ac_connection_list, std::bind (&VST3PI::forward_signal, this, nfo2.get (), id)); } void @@ -3208,8 +3208,8 @@ VST3PI::setup_psl_info_handler () } Stripable* s = dynamic_cast (_owner); - s->PropertyChanged.connect_same_thread (_strip_connections, boost::bind (&VST3PI::psl_stripable_property_changed, this, _1)); - s->presentation_info ().PropertyChanged.connect_same_thread (_strip_connections, boost::bind (&VST3PI::psl_stripable_property_changed, this, _1)); + s->PropertyChanged.connect_same_thread (_strip_connections, std::bind (&VST3PI::psl_stripable_property_changed, this, _1)); + s->presentation_info ().PropertyChanged.connect_same_thread (_strip_connections, std::bind (&VST3PI::psl_stripable_property_changed, this, _1)); return true; } diff --git a/libs/ardour/vst3_scan.cc b/libs/ardour/vst3_scan.cc index efb05ec07b..ed8a62fa45 100644 --- a/libs/ardour/vst3_scan.cc +++ b/libs/ardour/vst3_scan.cc @@ -474,7 +474,7 @@ vst3_save_cache_file (std::string const& module_path, XMLNode* root, bool verbos } bool -ARDOUR::vst3_scan_and_cache (std::string const& module_path, std::string const& bundle_path, boost::function cb, bool verbose) +ARDOUR::vst3_scan_and_cache (std::string const& module_path, std::string const& bundle_path, std::function cb, bool verbose) { XMLNode* root = new XMLNode ("VST3Cache"); root->set_property ("version", ARDOUR_VST3_CACHE_FILE_VERSION); diff --git a/libs/ardour/worker.cc b/libs/ardour/worker.cc index e8fbe3abfd..7d13e91762 100644 --- a/libs/ardour/worker.cc +++ b/libs/ardour/worker.cc @@ -41,7 +41,7 @@ Worker::Worker(Workee* workee, uint32_t ring_size, bool threaded) , _synchronous(!threaded) { if (threaded) { - _thread = PBD::Thread::create (boost::bind (&Worker::run, this), "LV2Worker"); + _thread = PBD::Thread::create (std::bind (&Worker::run, this), "LV2Worker"); } } diff --git a/libs/audiographer/audiographer/general/cmdpipe_writer.h b/libs/audiographer/audiographer/general/cmdpipe_writer.h index c79c1b96f8..867b7f3464 100644 --- a/libs/audiographer/audiographer/general/cmdpipe_writer.h +++ b/libs/audiographer/audiographer/general/cmdpipe_writer.h @@ -42,7 +42,7 @@ public: } else if (proc->start (ARDOUR::SystemExec::ShareWithParent)) { throw ARDOUR::ExportFailed ("External encoder (ffmpeg) cannot be started."); } - proc->Terminated.connect_same_thread (exec_connections, boost::bind (&CmdPipeWriter::encode_complete, this)); + proc->Terminated.connect_same_thread (exec_connections, std::bind (&CmdPipeWriter::encode_complete, this)); } virtual ~CmdPipeWriter () { diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc index 6578242f44..27ee52c6de 100644 --- a/libs/backends/alsa/alsa_audiobackend.cc +++ b/libs/backends/alsa/alsa_audiobackend.cc @@ -1139,14 +1139,14 @@ void* AlsaAudioBackend::alsa_process_thread (void* arg) { ThreadData* td = reinterpret_cast (arg); - boost::function f = td->f; + std::function f = td->f; delete td; f (); return 0; } int -AlsaAudioBackend::create_process_thread (boost::function func) +AlsaAudioBackend::create_process_thread (std::function func) { pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC); @@ -2105,7 +2105,7 @@ AlsaAudioBackend::add_slave (const char* device, PBD::error << string_compose (_("Failed to start slave device '%1'\n"), device) << endmsg; goto errout; } - s->UpdateLatency.connect_same_thread (s->latency_connection, boost::bind (&AlsaAudioBackend::update_latencies, this)); + s->UpdateLatency.connect_same_thread (s->latency_connection, std::bind (&AlsaAudioBackend::update_latencies, this)); _slaves.push_back (s); return true; @@ -2132,7 +2132,7 @@ AlsaAudioBackend::AudioSlave::AudioSlave ( , halt (false) , dead (false) { - Halted.connect_same_thread (_halted_connection, boost::bind (&AudioSlave::halted, this)); + Halted.connect_same_thread (_halted_connection, std::bind (&AudioSlave::halted, this)); } AlsaAudioBackend::AudioSlave::~AudioSlave () @@ -2392,8 +2392,8 @@ AlsaDeviceReservation::acquire_device (const char* device_name, bool silent) argp[4] = 0; _device_reservation = new ARDOUR::SystemExec (request_device_exe, argp); - _device_reservation->ReadStdout.connect_same_thread (_reservation_connection, boost::bind (&AlsaDeviceReservation::reservation_stdout, this, _1, _2)); - _device_reservation->Terminated.connect_same_thread (_reservation_connection, boost::bind (&AlsaDeviceReservation::release_device, this)); + _device_reservation->ReadStdout.connect_same_thread (_reservation_connection, std::bind (&AlsaDeviceReservation::reservation_stdout, this, _1, _2)); + _device_reservation->Terminated.connect_same_thread (_reservation_connection, std::bind (&AlsaDeviceReservation::release_device, this)); if (_device_reservation->start (SystemExec::ShareWithParent)) { if (!silent) { diff --git a/libs/backends/alsa/alsa_audiobackend.h b/libs/backends/alsa/alsa_audiobackend.h index 6b0ecb3fa2..1b593cf879 100644 --- a/libs/backends/alsa/alsa_audiobackend.h +++ b/libs/backends/alsa/alsa_audiobackend.h @@ -205,7 +205,7 @@ class AlsaAudioBackend : public AudioBackend, public PortEngineSharedImpl samplepos_t sample_time_at_cycle_start (); pframes_t samples_since_cycle_start (); - int create_process_thread (boost::function func); + int create_process_thread (std::function func); int join_process_threads (); bool in_process_thread (); uint32_t process_thread_count (); @@ -346,10 +346,10 @@ class AlsaAudioBackend : public AudioBackend, public PortEngineSharedImpl struct ThreadData { AlsaAudioBackend* engine; - boost::function f; + std::function f; size_t stacksize; - ThreadData (AlsaAudioBackend* e, boost::function fp, size_t stacksz) + ThreadData (AlsaAudioBackend* e, std::function fp, size_t stacksz) : engine (e) , f (fp) , stacksize (stacksz) {} }; diff --git a/libs/backends/coreaudio/coreaudio_backend.cc b/libs/backends/coreaudio/coreaudio_backend.cc index d939bd97eb..05c59220d0 100644 --- a/libs/backends/coreaudio/coreaudio_backend.cc +++ b/libs/backends/coreaudio/coreaudio_backend.cc @@ -803,7 +803,7 @@ CoreAudioBackend::coreaudio_process_thread (void *arg) } #endif - boost::function f = td->f; + std::function f = td->f; f (); #if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000 @@ -816,7 +816,7 @@ CoreAudioBackend::coreaudio_process_thread (void *arg) } int -CoreAudioBackend::create_process_thread (boost::function func) +CoreAudioBackend::create_process_thread (std::function func) { pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC, 1e9 * _samples_per_period / _samplerate); diff --git a/libs/backends/coreaudio/coreaudio_backend.h b/libs/backends/coreaudio/coreaudio_backend.h index b4db80ea6e..8aa6bbccc5 100644 --- a/libs/backends/coreaudio/coreaudio_backend.h +++ b/libs/backends/coreaudio/coreaudio_backend.h @@ -245,7 +245,7 @@ class CoreAudioBackend : public AudioBackend, public PortEngineSharedImpl { samplepos_t sample_time_at_cycle_start (); pframes_t samples_since_cycle_start (); - int create_process_thread (boost::function func); + int create_process_thread (std::function func); int join_process_threads (); bool in_process_thread (); uint32_t process_thread_count (); @@ -379,7 +379,7 @@ class CoreAudioBackend : public AudioBackend, public PortEngineSharedImpl { struct ThreadData { CoreAudioBackend* engine; - boost::function f; + std::function f; size_t stacksize; double period_ns; @@ -389,7 +389,7 @@ class CoreAudioBackend : public AudioBackend, public PortEngineSharedImpl { os_workgroup_join_token_s _join_token; #endif - ThreadData (CoreAudioBackend* e, boost::function fp, size_t stacksz, double period) + ThreadData (CoreAudioBackend* e, std::function fp, size_t stacksz, double period) : engine (e) , f (fp) , stacksize (stacksz), period_ns (period) {} }; diff --git a/libs/backends/dummy/dummy_audiobackend.cc b/libs/backends/dummy/dummy_audiobackend.cc index 9c6f961e96..60b30b6460 100644 --- a/libs/backends/dummy/dummy_audiobackend.cc +++ b/libs/backends/dummy/dummy_audiobackend.cc @@ -517,14 +517,14 @@ void * DummyAudioBackend::dummy_process_thread (void *arg) { ThreadData* td = reinterpret_cast (arg); - boost::function f = td->f; + std::function f = td->f; delete td; f (); return 0; } int -DummyAudioBackend::create_process_thread (boost::function func) +DummyAudioBackend::create_process_thread (std::function func) { pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC); diff --git a/libs/backends/dummy/dummy_audiobackend.h b/libs/backends/dummy/dummy_audiobackend.h index 614aa3eae4..bde876e87c 100644 --- a/libs/backends/dummy/dummy_audiobackend.h +++ b/libs/backends/dummy/dummy_audiobackend.h @@ -266,7 +266,7 @@ class DummyAudioBackend : public AudioBackend, public PortEngineSharedImpl samplepos_t sample_time_at_cycle_start (); pframes_t samples_since_cycle_start (); - int create_process_thread (boost::function func); + int create_process_thread (std::function func); int join_process_threads (); bool in_process_thread (); uint32_t process_thread_count (); @@ -388,10 +388,10 @@ class DummyAudioBackend : public AudioBackend, public PortEngineSharedImpl struct ThreadData { DummyAudioBackend* engine; - boost::function f; + std::function f; size_t stacksize; - ThreadData (DummyAudioBackend* e, boost::function fp, size_t stacksz) + ThreadData (DummyAudioBackend* e, std::function fp, size_t stacksz) : engine (e) , f (fp) , stacksize (stacksz) {} }; diff --git a/libs/backends/jack/jack_audiobackend.cc b/libs/backends/jack/jack_audiobackend.cc index 14e5362ee9..8f4f1f0a78 100644 --- a/libs/backends/jack/jack_audiobackend.cc +++ b/libs/backends/jack/jack_audiobackend.cc @@ -68,8 +68,8 @@ JACKAudioBackend::JACKAudioBackend (AudioEngine& e, AudioBackendInfo& info, std: , _jack_ports (new JackPorts) , _session (0) { - _jack_connection->Connected.connect_same_thread (jack_connection_connection, boost::bind (&JACKAudioBackend::when_connected_to_jack, this)); - _jack_connection->Disconnected.connect_same_thread (disconnect_connection, boost::bind (&JACKAudioBackend::disconnected, this, _1)); + _jack_connection->Connected.connect_same_thread (jack_connection_connection, std::bind (&JACKAudioBackend::when_connected_to_jack, this)); + _jack_connection->Disconnected.connect_same_thread (disconnect_connection, std::bind (&JACKAudioBackend::disconnected, this, _1)); } JACKAudioBackend::~JACKAudioBackend() @@ -799,7 +799,7 @@ JACKAudioBackend::_latency_callback (jack_latency_callback_mode_t mode, void* ar } int -JACKAudioBackend::create_process_thread (boost::function f) +JACKAudioBackend::create_process_thread (std::function f) { GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1); @@ -889,7 +889,7 @@ void* JACKAudioBackend::_start_process_thread (void* arg) { ThreadData* td = reinterpret_cast (arg); - boost::function f = td->f; + std::function f = td->f; delete td; f (); diff --git a/libs/backends/jack/jack_audiobackend.h b/libs/backends/jack/jack_audiobackend.h index ec01613fc2..21c775e47f 100644 --- a/libs/backends/jack/jack_audiobackend.h +++ b/libs/backends/jack/jack_audiobackend.h @@ -112,7 +112,7 @@ class JACKAudioBackend : public AudioBackend { size_t raw_buffer_size (DataType t); - int create_process_thread (boost::function func); + int create_process_thread (std::function func); int join_process_threads (); bool in_process_thread (); uint32_t process_thread_count (); @@ -256,10 +256,10 @@ class JACKAudioBackend : public AudioBackend { struct ThreadData { JACKAudioBackend* engine; - boost::function f; + std::function f; size_t stacksize; - ThreadData (JACKAudioBackend* e, boost::function fp, size_t stacksz) + ThreadData (JACKAudioBackend* e, std::function fp, size_t stacksz) : engine (e) , f (fp) , stacksize (stacksz) {} }; diff --git a/libs/backends/portaudio/portaudio_backend.cc b/libs/backends/portaudio/portaudio_backend.cc index 5bc0a9cace..b1feb1271d 100644 --- a/libs/backends/portaudio/portaudio_backend.cc +++ b/libs/backends/portaudio/portaudio_backend.cc @@ -1075,7 +1075,7 @@ void * PortAudioBackend::portaudio_process_thread (void *arg) { ThreadData* td = reinterpret_cast (arg); - boost::function f = td->f; + std::function f = td->f; delete td; #ifdef USE_MMCSS_THREAD_PRIORITIES @@ -1098,7 +1098,7 @@ PortAudioBackend::portaudio_process_thread (void *arg) } int -PortAudioBackend::create_process_thread (boost::function func) +PortAudioBackend::create_process_thread (std::function func) { pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC); diff --git a/libs/backends/portaudio/portaudio_backend.h b/libs/backends/portaudio/portaudio_backend.h index 3d4bd99df1..4c82e87a76 100644 --- a/libs/backends/portaudio/portaudio_backend.h +++ b/libs/backends/portaudio/portaudio_backend.h @@ -179,7 +179,7 @@ class PortAudioBackend : public AudioBackend, public PortEngineSharedImpl { samplepos_t sample_time_at_cycle_start (); pframes_t samples_since_cycle_start (); - int create_process_thread (boost::function func); + int create_process_thread (std::function func); int join_process_threads (); bool in_process_thread (); uint32_t process_thread_count (); @@ -349,10 +349,10 @@ class PortAudioBackend : public AudioBackend, public PortEngineSharedImpl { struct ThreadData { PortAudioBackend* engine; - boost::function f; + std::function f; size_t stacksize; - ThreadData (PortAudioBackend* e, boost::function fp, size_t stacksz) + ThreadData (PortAudioBackend* e, std::function fp, size_t stacksz) : engine (e) , f (fp) , stacksize (stacksz) {} }; diff --git a/libs/backends/pulseaudio/pulseaudio_backend.cc b/libs/backends/pulseaudio/pulseaudio_backend.cc index e6fd11b399..889190d4ad 100644 --- a/libs/backends/pulseaudio/pulseaudio_backend.cc +++ b/libs/backends/pulseaudio/pulseaudio_backend.cc @@ -691,14 +691,14 @@ void* PulseAudioBackend::pulse_process_thread (void* arg) { ThreadData* td = reinterpret_cast (arg); - boost::function f = td->f; + std::function f = td->f; delete td; f (); return 0; } int -PulseAudioBackend::create_process_thread (boost::function func) +PulseAudioBackend::create_process_thread (std::function func) { pthread_t thread_id; ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC); diff --git a/libs/backends/pulseaudio/pulseaudio_backend.h b/libs/backends/pulseaudio/pulseaudio_backend.h index 417b9c51d6..1e8c981990 100644 --- a/libs/backends/pulseaudio/pulseaudio_backend.h +++ b/libs/backends/pulseaudio/pulseaudio_backend.h @@ -163,7 +163,7 @@ public: samplepos_t sample_time_at_cycle_start (); pframes_t samples_since_cycle_start (); - int create_process_thread (boost::function func); + int create_process_thread (std::function func); int join_process_threads (); bool in_process_thread (); uint32_t process_thread_count (); @@ -275,10 +275,10 @@ private: struct ThreadData { PulseAudioBackend* engine; - boost::function f; + std::function f; size_t stacksize; - ThreadData (PulseAudioBackend* e, boost::function fp, size_t stacksz) + ThreadData (PulseAudioBackend* e, std::function fp, size_t stacksz) : engine (e), f (fp), stacksize (stacksz) {} }; diff --git a/libs/canvas/image.cc b/libs/canvas/image.cc index fd8dcf6261..9392cfedc4 100644 --- a/libs/canvas/image.cc +++ b/libs/canvas/image.cc @@ -30,7 +30,7 @@ Image::Image (Canvas* canvas, Cairo::Format fmt, int width, int height) , _height (height) , _need_render (false) { - DataReady.connect (data_connections, MISSING_INVALIDATOR, boost::bind (&Image::accept_data, this), gui_context()); + DataReady.connect (data_connections, MISSING_INVALIDATOR, std::bind (&Image::accept_data, this), gui_context()); } Image::Image (Item* parent, Cairo::Format fmt, int width, int height) @@ -40,7 +40,7 @@ Image::Image (Item* parent, Cairo::Format fmt, int width, int height) , _height (height) , _need_render (false) { - DataReady.connect (data_connections, MISSING_INVALIDATOR, boost::bind (&Image::accept_data, this), gui_context()); + DataReady.connect (data_connections, MISSING_INVALIDATOR, std::bind (&Image::accept_data, this), gui_context()); } void diff --git a/libs/ctrl-interface/control_protocol/control_protocol.cc b/libs/ctrl-interface/control_protocol/control_protocol.cc index 4eec33470d..18fe398759 100644 --- a/libs/ctrl-interface/control_protocol/control_protocol.cc +++ b/libs/ctrl-interface/control_protocol/control_protocol.cc @@ -67,12 +67,12 @@ const std::string ControlProtocol::state_node_name ("Protocol"); ControlProtocol::ControlProtocol (Session& s, string str) : BasicUI (s) , _name (str) - , glib_event_callback (boost::bind (&ControlProtocol::event_loop_precall, this)) + , glib_event_callback (std::bind (&ControlProtocol::event_loop_precall, this)) , _active (false) { if (!selection_connected) { /* this is all static, connect it only once (and early), for all ControlProtocols */ - ControlProtocolManager::StripableSelectionChanged.connect_same_thread (selection_connection, boost::bind (&ControlProtocol::notify_stripable_selection_changed, _1)); + ControlProtocolManager::StripableSelectionChanged.connect_same_thread (selection_connection, std::bind (&ControlProtocol::notify_stripable_selection_changed, _1)); selection_connected = true; } } diff --git a/libs/ctrl-interface/midi_surface/midi_surface.cc b/libs/ctrl-interface/midi_surface/midi_surface.cc index e451d3299f..a295ac3df2 100644 --- a/libs/ctrl-interface/midi_surface/midi_surface.cc +++ b/libs/ctrl-interface/midi_surface/midi_surface.cc @@ -59,9 +59,9 @@ MIDISurface::port_setup () ports_acquire (); if (!input_port_name().empty() || !output_port_name().empty()) { - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (port_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::port_registration_handler, this), this); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (port_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::port_registration_handler, this), this); } - ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::connection_handler, this, _1, _2, _3, _4, _5), this); + ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::connection_handler, this, _1, _2, _3, _4, _5), this); port_registration_handler (); } @@ -105,7 +105,7 @@ MIDISurface::ports_acquire () */ if (with_pad_filter) { - std::dynamic_pointer_cast(_async_in)->add_shadow_port (string_compose (_("%1 Pads"), port_name_prefix), boost::bind (&MIDISurface::pad_filter, this, _1, _2)); + std::dynamic_pointer_cast(_async_in)->add_shadow_port (string_compose (_("%1 Pads"), port_name_prefix), std::bind (&MIDISurface::pad_filter, this, _1, _2)); std::shared_ptr shadow_port = std::dynamic_pointer_cast(_async_in)->shadow_port(); if (shadow_port) { @@ -396,17 +396,17 @@ MIDISurface::connect_to_port_parser (MIDI::Port& port) DEBUG_TRACE (DEBUG::MIDISurface, string_compose ("Connecting to signals on port %1 using parser %2\n", port.name(), p)); /* Incoming sysex */ - p->sysex.connect_same_thread (*this, boost::bind (&MIDISurface::handle_midi_sysex, this, _1, _2, _3)); + p->sysex.connect_same_thread (*this, std::bind (&MIDISurface::handle_midi_sysex, this, _1, _2, _3)); /* V-Pot messages are Controller */ - p->controller.connect_same_thread (*this, boost::bind (&MIDISurface::handle_midi_controller_message, this, _1, _2)); + p->controller.connect_same_thread (*this, std::bind (&MIDISurface::handle_midi_controller_message, this, _1, _2)); /* Button messages are NoteOn */ - p->note_on.connect_same_thread (*this, boost::bind (&MIDISurface::handle_midi_note_on_message, this, _1, _2)); + p->note_on.connect_same_thread (*this, std::bind (&MIDISurface::handle_midi_note_on_message, this, _1, _2)); /* Button messages are NoteOn but libmidi++ sends note-on w/velocity = 0 as note-off so catch them too */ - p->note_off.connect_same_thread (*this, boost::bind (&MIDISurface::handle_midi_note_off_message, this, _1, _2)); + p->note_off.connect_same_thread (*this, std::bind (&MIDISurface::handle_midi_note_off_message, this, _1, _2)); /* Fader messages are Pitchbend */ - p->channel_pitchbend[0].connect_same_thread (*this, boost::bind (&MIDISurface::handle_midi_pitchbend_message, this, _1, _2)); + p->channel_pitchbend[0].connect_same_thread (*this, std::bind (&MIDISurface::handle_midi_pitchbend_message, this, _1, _2)); - p->poly_pressure.connect_same_thread (*this, boost::bind (&MIDISurface::handle_midi_polypressure_message, this, _1, _2)); + p->poly_pressure.connect_same_thread (*this, std::bind (&MIDISurface::handle_midi_polypressure_message, this, _1, _2)); } void @@ -424,20 +424,20 @@ void MIDISurface::connect_session_signals() { // receive routes added - //session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_routes_added, this, _1), this); + //session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_routes_added, this, _1), this); // receive VCAs added - //session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::notify_vca_added, this, _1), this); + //session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::notify_vca_added, this, _1), this); // receive record state toggled - session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::notify_record_state_changed, this), this); + session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::notify_record_state_changed, this), this); // receive transport state changed - session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::notify_transport_state_changed, this), this); - session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::notify_loop_state_changed, this), this); + session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::notify_transport_state_changed, this), this); + session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::notify_loop_state_changed, this), this); // receive punch-in and punch-out - Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::notify_parameter_changed, this, _1), this); - session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::notify_parameter_changed, this, _1), this); + Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::notify_parameter_changed, this, _1), this); + session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::notify_parameter_changed, this, _1), this); // receive rude solo changed - session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MIDISurface::notify_solo_active_changed, this, _1), this); + session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MIDISurface::notify_solo_active_changed, this, _1), this); } XMLNode& diff --git a/libs/evoral/Control.cc b/libs/evoral/Control.cc index 1d0b04b734..cc2e871551 100644 --- a/libs/evoral/Control.cc +++ b/libs/evoral/Control.cc @@ -60,7 +60,7 @@ Control::set_list(std::shared_ptr list) _list = list; if (_list) { - _list->Dirty.connect_same_thread (_list_marked_dirty_connection, boost::bind (&Control::list_marked_dirty, this)); + _list->Dirty.connect_same_thread (_list_marked_dirty_connection, std::bind (&Control::list_marked_dirty, this)); } } diff --git a/libs/evoral/ControlList.cc b/libs/evoral/ControlList.cc index a6a3395b6f..1d041859c2 100644 --- a/libs/evoral/ControlList.cc +++ b/libs/evoral/ControlList.cc @@ -300,7 +300,7 @@ ControlList::extend_to (timepos_t const& end) } void -ControlList::y_transform (boost::function callback) +ControlList::y_transform (std::function callback) { { Glib::Threads::RWLock::WriterLock lm (_lock); @@ -313,7 +313,7 @@ ControlList::y_transform (boost::function callback) } void -ControlList::list_merge (ControlList const& other, boost::function callback) +ControlList::list_merge (ControlList const& other, std::function callback) { { Glib::Threads::RWLock::WriterLock lm (_lock); diff --git a/libs/evoral/ControlSet.cc b/libs/evoral/ControlSet.cc index 405a756d66..19f87a40fc 100644 --- a/libs/evoral/ControlSet.cc +++ b/libs/evoral/ControlSet.cc @@ -45,12 +45,12 @@ ControlSet::add_control(std::shared_ptr ac) { _controls[ac->parameter()] = ac; - ac->ListMarkedDirty.connect_same_thread (_control_connections, boost::bind (&ControlSet::control_list_marked_dirty, this)); + ac->ListMarkedDirty.connect_same_thread (_control_connections, std::bind (&ControlSet::control_list_marked_dirty, this)); if (ac->list()) { ac->list()->InterpolationChanged.connect_same_thread ( _list_connections, - boost::bind (&ControlSet::control_list_interpolation_changed, + std::bind (&ControlSet::control_list_interpolation_changed, this, ac->parameter(), _1)); } } diff --git a/libs/evoral/evoral/ControlList.h b/libs/evoral/evoral/ControlList.h index 7fafc63c4e..0d8933b88f 100644 --- a/libs/evoral/evoral/ControlList.h +++ b/libs/evoral/evoral/ControlList.h @@ -142,8 +142,8 @@ public: void slide (iterator before, Temporal::timecnt_t const & distance); void shift (Temporal::timepos_t const & before, Temporal::timecnt_t const & distance); - void y_transform (boost::function callback); - void list_merge (ControlList const& other, boost::function callback); + void y_transform (std::function callback); + void list_merge (ControlList const& other, std::function callback); /** Add an event to this list. * diff --git a/libs/gtkmm2ext/gtkmm2ext/gui_thread.h b/libs/gtkmm2ext/gtkmm2ext/gui_thread.h index d83a55aa09..bb9cd7d10d 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gui_thread.h +++ b/libs/gtkmm2ext/gtkmm2ext/gui_thread.h @@ -20,7 +20,6 @@ #include #include -#include #include #include "gtkmm2ext/visibility.h" @@ -28,7 +27,7 @@ #define ENSURE_GUI_THREAD(obj,method, ...) if (!Gtkmm2ext::UI::instance()->caller_is_self()) { abort (); } #define gui_context() Gtkmm2ext::UI::instance() /* a UICallback-derived object that specifies the event loop for GUI signal handling */ -#define ui_bind(f, ...) boost::protect (boost::bind (f, __VA_ARGS__)) +#define ui_bind(f, ...) boost::protect (std::bind (f, __VA_ARGS__)) #define invalidator(x) PBD::EventLoop::__invalidator ((x), __FILE__, __LINE__) diff --git a/libs/midi++2/channel.cc b/libs/midi++2/channel.cc index b5cabd9f8d..c7833127b1 100644 --- a/libs/midi++2/channel.cc +++ b/libs/midi++2/channel.cc @@ -40,15 +40,15 @@ Channel::Channel (MIDI::byte channelnum, Port &p) void Channel::connect_signals () { - _port.parser()->channel_pressure[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_chanpress, this, _1, _2)); - _port.parser()->channel_note_on[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_note_on, this, _1, _2)); - _port.parser()->channel_note_off[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_note_off, this, _1, _2)); - _port.parser()->channel_poly_pressure[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_polypress, this, _1, _2)); - _port.parser()->channel_program_change[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_program_change, this, _1, _2)); - _port.parser()->channel_controller[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_controller, this, _1, _2)); - _port.parser()->channel_pitchbend[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_pitchbend, this, _1, _2)); + _port.parser()->channel_pressure[_channel_number].connect_same_thread (*this, std::bind (&Channel::process_chanpress, this, _1, _2)); + _port.parser()->channel_note_on[_channel_number].connect_same_thread (*this, std::bind (&Channel::process_note_on, this, _1, _2)); + _port.parser()->channel_note_off[_channel_number].connect_same_thread (*this, std::bind (&Channel::process_note_off, this, _1, _2)); + _port.parser()->channel_poly_pressure[_channel_number].connect_same_thread (*this, std::bind (&Channel::process_polypress, this, _1, _2)); + _port.parser()->channel_program_change[_channel_number].connect_same_thread (*this, std::bind (&Channel::process_program_change, this, _1, _2)); + _port.parser()->channel_controller[_channel_number].connect_same_thread (*this, std::bind (&Channel::process_controller, this, _1, _2)); + _port.parser()->channel_pitchbend[_channel_number].connect_same_thread (*this, std::bind (&Channel::process_pitchbend, this, _1, _2)); - _port.parser()->reset.connect_same_thread (*this, boost::bind (&Channel::process_reset, this, _1)); + _port.parser()->reset.connect_same_thread (*this, std::bind (&Channel::process_reset, this, _1)); } void diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc index 6cffa432ca..b577a88c0a 100644 --- a/libs/midi++2/mmc.cc +++ b/libs/midi++2/mmc.cc @@ -220,10 +220,10 @@ MachineControl::set_ports (MIDI::Port* ip, MIDI::Port* op) _input_port = ip; _output_port = op; - _input_port->parser()->mmc.connect_same_thread (port_connections, boost::bind (&MachineControl::process_mmc_message, this, _1, _2, _3)); - _input_port->parser()->start.connect_same_thread (port_connections, boost::bind (&MachineControl::spp_start, this)); - _input_port->parser()->contineu.connect_same_thread (port_connections, boost::bind (&MachineControl::spp_continue, this)); - _input_port->parser()->stop.connect_same_thread (port_connections, boost::bind (&MachineControl::spp_stop, this)); + _input_port->parser()->mmc.connect_same_thread (port_connections, std::bind (&MachineControl::process_mmc_message, this, _1, _2, _3)); + _input_port->parser()->start.connect_same_thread (port_connections, std::bind (&MachineControl::spp_start, this)); + _input_port->parser()->contineu.connect_same_thread (port_connections, std::bind (&MachineControl::spp_continue, this)); + _input_port->parser()->stop.connect_same_thread (port_connections, std::bind (&MachineControl::spp_stop, this)); } void diff --git a/libs/midi++2/parser.cc b/libs/midi++2/parser.cc index 9907d48b09..6996a418d3 100644 --- a/libs/midi++2/parser.cc +++ b/libs/midi++2/parser.cc @@ -314,7 +314,7 @@ Parser::trace (bool onoff, ostream *o, const string &prefix) if (onoff) { trace_stream = o; trace_prefix = prefix; - any.connect_same_thread (trace_connection, boost::bind (&Parser::trace_event, this, _1, _2, _3, _4)); + any.connect_same_thread (trace_connection, std::bind (&Parser::trace_event, this, _1, _2, _3, _4)); } else { trace_prefix = ""; trace_stream = 0; diff --git a/libs/panners/1in2out/panner_1in2out.cc b/libs/panners/1in2out/panner_1in2out.cc index bbb8993f62..d40888281b 100644 --- a/libs/panners/1in2out/panner_1in2out.cc +++ b/libs/panners/1in2out/panner_1in2out.cc @@ -91,7 +91,7 @@ Panner1in2out::Panner1in2out (std::shared_ptr p) left_interp = left; right_interp = right; - _pannable->pan_azimuth_control->Changed.connect_same_thread (*this, boost::bind (&Panner1in2out::update, this)); + _pannable->pan_azimuth_control->Changed.connect_same_thread (*this, std::bind (&Panner1in2out::update, this)); } Panner1in2out::~Panner1in2out () diff --git a/libs/panners/2in2out/panner_2in2out.cc b/libs/panners/2in2out/panner_2in2out.cc index 94a86fd2c2..17748b2434 100644 --- a/libs/panners/2in2out/panner_2in2out.cc +++ b/libs/panners/2in2out/panner_2in2out.cc @@ -101,8 +101,8 @@ Panner2in2out::Panner2in2out (std::shared_ptr p) left_interp[1] = left[1] = desired_left[1]; right_interp[1] = right[1] = desired_right[1]; - _pannable->pan_azimuth_control->Changed.connect_same_thread (*this, boost::bind (&Panner2in2out::update, this)); - _pannable->pan_width_control->Changed.connect_same_thread (*this, boost::bind (&Panner2in2out::update, this)); + _pannable->pan_azimuth_control->Changed.connect_same_thread (*this, std::bind (&Panner2in2out::update, this)); + _pannable->pan_width_control->Changed.connect_same_thread (*this, std::bind (&Panner2in2out::update, this)); } Panner2in2out::~Panner2in2out () diff --git a/libs/panners/stereobalance/panner_balance.cc b/libs/panners/stereobalance/panner_balance.cc index 08460f797d..94802a4b2c 100644 --- a/libs/panners/stereobalance/panner_balance.cc +++ b/libs/panners/stereobalance/panner_balance.cc @@ -89,7 +89,7 @@ Pannerbalance::Pannerbalance (std::shared_ptr p) /* RIGHT SIGNAL */ pos_interp[1] = pos[1] = desired_pos[1]; - _pannable->pan_azimuth_control->Changed.connect_same_thread (*this, boost::bind (&Pannerbalance::update, this)); + _pannable->pan_azimuth_control->Changed.connect_same_thread (*this, std::bind (&Pannerbalance::update, this)); } Pannerbalance::~Pannerbalance () diff --git a/libs/panners/vbap/vbap.cc b/libs/panners/vbap/vbap.cc index 1161698d2d..12768d0f66 100644 --- a/libs/panners/vbap/vbap.cc +++ b/libs/panners/vbap/vbap.cc @@ -84,9 +84,9 @@ VBAPanner::VBAPanner (std::shared_ptr p, std::shared_ptr s) : Panner (p) , _speakers (new VBAPSpeakers (s)) { - _pannable->pan_azimuth_control->Changed.connect_same_thread (*this, boost::bind (&VBAPanner::update, this)); - _pannable->pan_elevation_control->Changed.connect_same_thread (*this, boost::bind (&VBAPanner::update, this)); - _pannable->pan_width_control->Changed.connect_same_thread (*this, boost::bind (&VBAPanner::update, this)); + _pannable->pan_azimuth_control->Changed.connect_same_thread (*this, std::bind (&VBAPanner::update, this)); + _pannable->pan_elevation_control->Changed.connect_same_thread (*this, std::bind (&VBAPanner::update, this)); + _pannable->pan_width_control->Changed.connect_same_thread (*this, std::bind (&VBAPanner::update, this)); if (!_pannable->has_state ()) { reset (); } diff --git a/libs/panners/vbap/vbap_speakers.cc b/libs/panners/vbap/vbap_speakers.cc index 10cb79a54f..df3afae0a3 100644 --- a/libs/panners/vbap/vbap_speakers.cc +++ b/libs/panners/vbap/vbap_speakers.cc @@ -49,7 +49,7 @@ VBAPSpeakers::VBAPSpeakers (std::shared_ptr s) : _dimension (2) , _parent (s) { - _parent->Changed.connect_same_thread (speaker_connection, boost::bind (&VBAPSpeakers::update, this)); + _parent->Changed.connect_same_thread (speaker_connection, std::bind (&VBAPSpeakers::update, this)); update (); } diff --git a/libs/pbd/base_ui.cc b/libs/pbd/base_ui.cc index 4b4a65edb7..b15a548cfa 100644 --- a/libs/pbd/base_ui.cc +++ b/libs/pbd/base_ui.cc @@ -121,7 +121,7 @@ BaseUI::run () attach_request_source (); Glib::Threads::Mutex::Lock lm (_run_lock); - _run_loop_thread = PBD::Thread::create (boost::bind (&BaseUI::main_thread, this), string_compose ("UI:%1", event_loop_name ())); + _run_loop_thread = PBD::Thread::create (std::bind (&BaseUI::main_thread, this), string_compose ("UI:%1", event_loop_name ())); _running.wait (_run_lock); } diff --git a/libs/pbd/controllable.cc b/libs/pbd/controllable.cc index cbc1c1576e..c27a09bd6a 100644 --- a/libs/pbd/controllable.cc +++ b/libs/pbd/controllable.cc @@ -118,8 +118,8 @@ Controllable::add (Controllable& ctl) { Glib::Threads::RWLock::WriterLock lm (registry_lock); registry.insert (&ctl); - ctl.DropReferences.connect_same_thread (registry_connections, boost::bind (&Controllable::remove, &ctl)); - ctl.Destroyed.connect_same_thread (registry_connections, boost::bind (&Controllable::remove, &ctl)); + ctl.DropReferences.connect_same_thread (registry_connections, std::bind (&Controllable::remove, &ctl)); + ctl.Destroyed.connect_same_thread (registry_connections, std::bind (&Controllable::remove, &ctl)); } void diff --git a/libs/pbd/downloader.cc b/libs/pbd/downloader.cc index 9acf3ff360..bcc75ef7e5 100644 --- a/libs/pbd/downloader.cc +++ b/libs/pbd/downloader.cc @@ -98,7 +98,7 @@ Downloader::start () _cancel = false; _status = 0; /* unknown at this point */ - return 0 != (thread = PBD::Thread::create (boost::bind (&Downloader::download, this), "Downloader")); + return 0 != (thread = PBD::Thread::create (std::bind (&Downloader::download, this), "Downloader")); } void diff --git a/libs/pbd/glib_event_source.cc b/libs/pbd/glib_event_source.cc index cace0759e8..eaca832ed3 100644 --- a/libs/pbd/glib_event_source.cc +++ b/libs/pbd/glib_event_source.cc @@ -18,7 +18,7 @@ #include "pbd/glib_event_source.h" -GlibEventLoopCallback::GlibEventLoopCallback (boost::function callback) +GlibEventLoopCallback::GlibEventLoopCallback (std::function callback) : _callback (callback) { funcs.prepare = c_prepare;; diff --git a/libs/pbd/inflater.cc b/libs/pbd/inflater.cc index 4a747f8ffe..a8314779cf 100644 --- a/libs/pbd/inflater.cc +++ b/libs/pbd/inflater.cc @@ -45,7 +45,7 @@ Inflater::~Inflater () int Inflater::start () { - return 0 != (thread = PBD::Thread::create (boost::bind (&Inflater::threaded_inflate, this), "Inflater")); + return 0 != (thread = PBD::Thread::create (std::bind (&Inflater::threaded_inflate, this), "Inflater")); } void diff --git a/libs/pbd/pbd/abstract_ui.cc b/libs/pbd/pbd/abstract_ui.cc index 0c3bfa9dd8..f3f735c973 100644 --- a/libs/pbd/pbd/abstract_ui.cc +++ b/libs/pbd/pbd/abstract_ui.cc @@ -79,7 +79,7 @@ AbstractUI::AbstractUI (const string& name) register_thread() is thread safe anyway. */ - PBD::ThreadCreatedWithRequestSize.connect_same_thread (new_thread_connection, boost::bind (pmf, this, _1, _2, _3)); + PBD::ThreadCreatedWithRequestSize.connect_same_thread (new_thread_connection, std::bind (pmf, this, _1, _2, _3)); /* find pre-registerer threads */ @@ -456,7 +456,7 @@ AbstractUI::send_request (RequestObject *req) } template bool -AbstractUI::call_slot (InvalidationRecord* invalidation, const boost::function& f) +AbstractUI::call_slot (InvalidationRecord* invalidation, const std::function& f) { if (caller_is_self()) { DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1/%2 direct dispatch of call slot via functor @ %3, invalidation %4\n", event_loop_name(), pthread_name(), &f, invalidation)); diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index 898eda9917..de119fc238 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -59,7 +59,7 @@ public: virtual ~AbstractUI(); void register_thread (pthread_t, std::string, uint32_t num_requests); - bool call_slot (EventLoop::InvalidationRecord*, const boost::function&); + bool call_slot (EventLoop::InvalidationRecord*, const std::function&); Glib::Threads::RWLock& slot_invalidation_rwlock() { return request_buffer_map_lock; } Glib::Threads::RWLock request_buffer_map_lock; diff --git a/libs/pbd/pbd/configuration.h b/libs/pbd/pbd/configuration.h index eb6351db71..47d2c0b295 100644 --- a/libs/pbd/pbd/configuration.h +++ b/libs/pbd/pbd/configuration.h @@ -23,7 +23,6 @@ #include #include -#include #include "pbd/signals.h" #include "pbd/stateful.h" #include "pbd/configuration_variable.h" @@ -38,7 +37,7 @@ class LIBPBD_API Configuration : public PBD::Stateful Configuration() {} virtual ~Configuration() {} - virtual void map_parameters (boost::function&) = 0; + virtual void map_parameters (std::function&) = 0; virtual int set_state (XMLNode const &, int) = 0; virtual XMLNode & get_state () const = 0; virtual XMLNode & get_variables (std::string const & nodename) const = 0; diff --git a/libs/pbd/pbd/event_loop.h b/libs/pbd/pbd/event_loop.h index baf5a21ec7..31df5d5925 100644 --- a/libs/pbd/pbd/event_loop.h +++ b/libs/pbd/pbd/event_loop.h @@ -23,8 +23,6 @@ #include #include #include -#include -#include /* we don't need this here, but anything calling call_slot() probably will, so this is convenient */ #include #include #include @@ -78,7 +76,7 @@ public: struct BaseRequestObject { RequestType type; InvalidationRecord* invalidation; - boost::function the_slot; + std::function the_slot; BaseRequestObject() : invalidation (0) {} ~BaseRequestObject() { @@ -88,7 +86,7 @@ public: } }; - virtual bool call_slot (InvalidationRecord*, const boost::function&) = 0; + virtual bool call_slot (InvalidationRecord*, const std::function&) = 0; virtual Glib::Threads::RWLock& slot_invalidation_rwlock() = 0; std::string event_loop_name() const { return _name; } diff --git a/libs/pbd/pbd/glib_event_source.h b/libs/pbd/pbd/glib_event_source.h index bbd097cc9d..e6088afc85 100644 --- a/libs/pbd/pbd/glib_event_source.h +++ b/libs/pbd/pbd/glib_event_source.h @@ -18,7 +18,6 @@ #pragma once -#include #include #include @@ -27,7 +26,7 @@ class LIBPBD_API GlibEventLoopCallback { public: - GlibEventLoopCallback (boost::function callback); + GlibEventLoopCallback (std::function callback); ~GlibEventLoopCallback(); static gboolean c_prepare (GSource*, gint* timeout); @@ -43,6 +42,6 @@ class LIBPBD_API GlibEventLoopCallback GSourceWithParent* gsource; GSourceFuncs funcs; - boost::function _callback; + std::function _callback; }; diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h index e9eb1fa3d0..06a4ee46c5 100644 --- a/libs/pbd/pbd/memento_command.h +++ b/libs/pbd/pbd/memento_command.h @@ -72,7 +72,7 @@ public: SimpleMementoCommandBinder (obj_T& o) : _object (o) { - _object.Destroyed.connect_same_thread (_object_death_connection, boost::bind (&SimpleMementoCommandBinder::object_died, this)); + _object.Destroyed.connect_same_thread (_object_death_connection, std::bind (&SimpleMementoCommandBinder::object_died, this)); } void set_state (XMLNode const & node , int version) const { _object.set_state (node, version); } @@ -107,14 +107,14 @@ public: : _binder (new SimpleMementoCommandBinder (a_object)), before (a_before), after (a_after) { /* The binder's object died, so we must die */ - _binder->DropReferences.connect_same_thread (_binder_death_connection, boost::bind (&MementoCommand::binder_dying, this)); + _binder->DropReferences.connect_same_thread (_binder_death_connection, std::bind (&MementoCommand::binder_dying, this)); } MementoCommand (MementoCommandBinder* b, XMLNode* a_before, XMLNode* a_after) : _binder (b), before (a_before), after (a_after) { /* The binder's object died, so we must die */ - _binder->DropReferences.connect_same_thread (_binder_death_connection, boost::bind (&MementoCommand::binder_dying, this)); + _binder->DropReferences.connect_same_thread (_binder_death_connection, std::bind (&MementoCommand::binder_dying, this)); } ~MementoCommand () { diff --git a/libs/pbd/pbd/pthread_utils.h b/libs/pbd/pbd/pthread_utils.h index 757278851c..b864205791 100644 --- a/libs/pbd/pbd/pthread_utils.h +++ b/libs/pbd/pbd/pthread_utils.h @@ -103,21 +103,21 @@ namespace PBD { class LIBPBD_API Thread { public: - static Thread* create (boost::function const&, std::string const& name); + static Thread* create (std::function const&, std::string const& name); static Thread* self (); void join (); bool caller_is_self () const; private: Thread (); - Thread (boost::function const&, std::string const& name = ""); + Thread (std::function const&, std::string const& name = ""); Thread (Thread const&); /* precent copy-construction */ static void* _run (void*); pthread_t _t; std::string _name; - boost::function _slot; + std::function _slot; bool _joinable; }; } diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h index 94ae1f3bba..b4843a1b03 100644 --- a/libs/pbd/pbd/sequence_property.h +++ b/libs/pbd/pbd/sequence_property.h @@ -25,7 +25,6 @@ #include #include -#include #include "pbd/libpbd_visibility.h" #include "pbd/convert.h" @@ -81,7 +80,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase ChangeContainer removed; }; - SequenceProperty (PropertyID id, const boost::function& update) + SequenceProperty (PropertyID id, const std::function& update) : PropertyBase (id), _update_callback (update) {} void invert () { @@ -173,7 +172,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase */ for (typename ChangeContainer::const_iterator i = a->changes().added.begin(); i != a->changes().added.end(); ++i) { - (*i)->DropReferences.connect_same_thread (*cmd, boost::bind (&Destructible::drop_references, cmd)); + (*i)->DropReferences.connect_same_thread (*cmd, std::bind (&Destructible::drop_references, cmd)); } } } @@ -359,7 +358,7 @@ protected: Container _val; ///< our actual container of things ChangeRecord _changes; ///< changes to the container (adds/removes) that have happened since clear_changes() was last called - boost::function _update_callback; + std::function _update_callback; private: virtual SequenceProperty* create () const = 0; diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h index 880489fd5f..97e5c70b0a 100644 --- a/libs/pbd/pbd/signals.h +++ b/libs/pbd/pbd/signals.h @@ -34,9 +34,7 @@ #include -#include #include -#include #include #include @@ -52,6 +50,8 @@ #include #endif +using namespace std::placeholders; + namespace PBD { class LIBPBD_API Connection; @@ -109,7 +109,7 @@ class SignalWithCombiner : public SignalBase { public: - typedef boost::function slot_function_type; + typedef std::function slot_function_type; private: @@ -119,7 +119,7 @@ private: public: - static void compositor (typename boost::function f, + static void compositor (typename std::function f, EventLoop* event_loop, EventLoop::InvalidationRecord* ir, A... a); @@ -296,11 +296,11 @@ class LIBPBD_API ScopedConnectionList template void -SignalWithCombiner::compositor (typename boost::function f, +SignalWithCombiner::compositor (typename std::function f, EventLoop* event_loop, EventLoop::InvalidationRecord* ir, A... a) { - event_loop->call_slot (ir, boost::bind (f, a...)); + event_loop->call_slot (ir, std::bind (f, a...)); } template diff --git a/libs/pbd/pthread_utils.cc b/libs/pbd/pthread_utils.cc index 3e007e1208..1d0d95dff4 100644 --- a/libs/pbd/pthread_utils.cc +++ b/libs/pbd/pthread_utils.cc @@ -532,7 +532,7 @@ pbd_mach_set_realtime_policy (pthread_t thread_id, double period_ns, bool main) } PBD::Thread* -PBD::Thread::create (boost::function const& slot, std::string const& name) +PBD::Thread::create (std::function const& slot, std::string const& name) { try { return new PBD::Thread (slot, name); @@ -554,7 +554,7 @@ PBD::Thread::Thread () _t = pthread_self (); } -PBD::Thread::Thread (boost::function const& slot, std::string const& name) +PBD::Thread::Thread (std::function const& slot, std::string const& name) : _name (name) , _slot (slot) , _joinable (true) diff --git a/libs/pbd/receiver.cc b/libs/pbd/receiver.cc index aec636784e..26d3a75295 100644 --- a/libs/pbd/receiver.cc +++ b/libs/pbd/receiver.cc @@ -46,6 +46,6 @@ Receiver::listen_to (Transmitter &transmitter) anonymous namespace which causes ambiguity with sigc++ (and will also do so with std::placeholder in the C++11 future */ - transmitter.sender().connect_same_thread (connections, boost::bind (&Receiver::receive, this, boost::arg<1>(), boost::arg<2>())); + transmitter.sender().connect_same_thread (connections, std::bind (&Receiver::receive, this, std::placeholders::_1, std::placeholders::_2)); } diff --git a/libs/pbd/stateful_diff_command.cc b/libs/pbd/stateful_diff_command.cc index b67baf5d0f..9cec042941 100644 --- a/libs/pbd/stateful_diff_command.cc +++ b/libs/pbd/stateful_diff_command.cc @@ -42,7 +42,7 @@ StatefulDiffCommand::StatefulDiffCommand (std::shared_ptr be sure to notify owners of this command. */ - s->DropReferences.connect_same_thread (*this, boost::bind (&Destructible::drop_references, this)); + s->DropReferences.connect_same_thread (*this, std::bind (&Destructible::drop_references, this)); } StatefulDiffCommand::StatefulDiffCommand (std::shared_ptr s, XMLNode const& n) @@ -63,7 +63,7 @@ StatefulDiffCommand::StatefulDiffCommand (std::shared_ptr be sure to notify owners of this command. */ - s->DropReferences.connect_same_thread (*this, boost::bind (&Destructible::drop_references, this)); + s->DropReferences.connect_same_thread (*this, std::bind (&Destructible::drop_references, this)); } StatefulDiffCommand::~StatefulDiffCommand () diff --git a/libs/pbd/test/signals_test.cc b/libs/pbd/test/signals_test.cc index 2a7b343e86..27a2aa8359 100644 --- a/libs/pbd/test/signals_test.cc +++ b/libs/pbd/test/signals_test.cc @@ -37,7 +37,7 @@ SignalsTest::testEmission () { Emitter* e = new Emitter; PBD::ScopedConnection c; - e->Fred.connect_same_thread (c, boost::bind (&receiver)); + e->Fred.connect_same_thread (c, std::bind (&receiver)); N = 0; e->emit (); @@ -45,7 +45,7 @@ SignalsTest::testEmission () CPPUNIT_ASSERT_EQUAL (2, N); PBD::ScopedConnection d; - e->Fred.connect_same_thread (d, boost::bind (&receiver)); + e->Fred.connect_same_thread (d, std::bind (&receiver)); N = 0; e->emit (); CPPUNIT_ASSERT_EQUAL (2, N); @@ -56,7 +56,7 @@ SignalsTest::testDestruction () { Emitter* e = new Emitter; PBD::ScopedConnection c; - e->Fred.connect_same_thread (c, boost::bind (&receiver)); + e->Fred.connect_same_thread (c, std::bind (&receiver)); e->emit (); delete e; c.disconnect (); @@ -68,7 +68,7 @@ class AReceiver : public PBD::ScopedConnectionList { public: AReceiver (Emitter* e) { - e->Fred.connect_same_thread (*this, boost::bind (&AReceiver::receiver, this)); + e->Fred.connect_same_thread (*this, std::bind (&AReceiver::receiver, this)); } void receiver () { diff --git a/libs/pbd/undo.cc b/libs/pbd/undo.cc index ebd0aa3a3c..7c12abf1a4 100644 --- a/libs/pbd/undo.cc +++ b/libs/pbd/undo.cc @@ -87,7 +87,7 @@ UndoTransaction::add_command (Command* const cmd) * so there is no need to manage this connection. */ - cmd->DropReferences.connect_same_thread (*this, boost::bind (&command_death, this, cmd)); + cmd->DropReferences.connect_same_thread (*this, std::bind (&command_death, this, cmd)); actions.push_back (cmd); } @@ -209,7 +209,7 @@ UndoHistory::add (UndoTransaction* const ut) { uint32_t current_depth = UndoList.size (); - ut->DropReferences.connect_same_thread (*this, boost::bind (&UndoHistory::remove, this, ut)); + ut->DropReferences.connect_same_thread (*this, std::bind (&UndoHistory::remove, this, ut)); /* if the current undo history is larger than or equal to the currently requested depth, then pop off at least 1 element to make space diff --git a/libs/surfaces/cc121/cc121.cc b/libs/surfaces/cc121/cc121.cc index 9f4b7d2edb..f7e34cfec6 100644 --- a/libs/surfaces/cc121/cc121.cc +++ b/libs/surfaces/cc121/cc121.cc @@ -117,7 +117,7 @@ CC121::CC121 (Session& s) /* Catch port connections and disconnections */ - ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&CC121::connection_handler, this, _1, _2, _3, _4, _5), this); + ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, std::bind (&CC121::connection_handler, this, _1, _2, _3, _4, _5), this); buttons.insert (std::make_pair (EButton, Button (*this, _("EButton"), EButton))); buttons.insert (std::make_pair (OpenVST, Button (*this, _("OpenVST"), OpenVST))); buttons.insert (std::make_pair (InputMonitor, Button (*this, _("InputMonitor"), InputMonitor))); @@ -153,30 +153,30 @@ CC121::CC121 (Session& s) buttons.insert (std::make_pair (Footswitch, Button (*this, _("Footswitch"), Footswitch))); buttons.insert (std::make_pair (FaderTouch, Button (*this, _("Fader (touch)"), FaderTouch))); - get_button (Left).set_action ( boost::bind (&CC121::left, this), true); - get_button (Right).set_action ( boost::bind (&CC121::right, this), true); + get_button (Left).set_action ( std::bind (&CC121::left, this), true); + get_button (Right).set_action ( std::bind (&CC121::right, this), true); - get_button (FP_Read).set_action (boost::bind (&CC121::read, this), true); - get_button (FP_Write).set_action (boost::bind (&CC121::write, this), true); - get_button (EButton).set_action (boost::bind (&CC121::touch, this), true); - get_button (OpenVST).set_action (boost::bind (&CC121::off, this), true); + get_button (FP_Read).set_action (std::bind (&CC121::read, this), true); + get_button (FP_Write).set_action (std::bind (&CC121::write, this), true); + get_button (EButton).set_action (std::bind (&CC121::touch, this), true); + get_button (OpenVST).set_action (std::bind (&CC121::off, this), true); - get_button (Play).set_action (boost::bind (&BasicUI::transport_play, this, true), true); - get_button (ToStart).set_action (boost::bind (&BasicUI::prev_marker, this), true); - get_button (ToEnd).set_action (boost::bind (&BasicUI::next_marker, this), true); - get_button (RecEnable).set_action (boost::bind (&BasicUI::rec_enable_toggle, this), true); - get_button (Stop).set_action (boost::bind (&BasicUI::transport_stop, this), true); - get_button (Ffwd).set_action (boost::bind (&BasicUI::ffwd, this), true); + get_button (Play).set_action (std::bind (&BasicUI::transport_play, this, true), true); + get_button (ToStart).set_action (std::bind (&BasicUI::prev_marker, this), true); + get_button (ToEnd).set_action (std::bind (&BasicUI::next_marker, this), true); + get_button (RecEnable).set_action (std::bind (&BasicUI::rec_enable_toggle, this), true); + get_button (Stop).set_action (std::bind (&BasicUI::transport_stop, this), true); + get_button (Ffwd).set_action (std::bind (&BasicUI::ffwd, this), true); - get_button (Rewind).set_action (boost::bind (&BasicUI::rewind, this), true); - get_button (Loop).set_action (boost::bind (&BasicUI::loop_toggle, this), true); + get_button (Rewind).set_action (std::bind (&BasicUI::rewind, this), true); + get_button (Loop).set_action (std::bind (&BasicUI::loop_toggle, this), true); - get_button (Jog).set_action (boost::bind (&CC121::jog, this), true); - get_button (Mute).set_action (boost::bind (&CC121::mute, this), true); - get_button (Solo).set_action (boost::bind (&CC121::solo, this), true); - get_button (Rec).set_action (boost::bind (&CC121::rec_enable, this), true); + get_button (Jog).set_action (std::bind (&CC121::jog, this), true); + get_button (Mute).set_action (std::bind (&CC121::mute, this), true); + get_button (Solo).set_action (std::bind (&CC121::solo, this), true); + get_button (Rec).set_action (std::bind (&CC121::rec_enable, this), true); - get_button (InputMonitor).set_action (boost::bind (&CC121::input_monitor, this), true); + get_button (InputMonitor).set_action (std::bind (&CC121::input_monitor, this), true); } CC121::~CC121 () @@ -207,13 +207,13 @@ void CC121::start_midi_handling () { /* handle buttons press */ - _input_port->parser()->channel_note_on[0].connect_same_thread (midi_connections, boost::bind (&CC121::button_press_handler, this, _1, _2)); + _input_port->parser()->channel_note_on[0].connect_same_thread (midi_connections, std::bind (&CC121::button_press_handler, this, _1, _2)); /* handle buttons release*/ - _input_port->parser()->channel_note_off[0].connect_same_thread (midi_connections, boost::bind (&CC121::button_release_handler, this, _1, _2)); + _input_port->parser()->channel_note_off[0].connect_same_thread (midi_connections, std::bind (&CC121::button_release_handler, this, _1, _2)); /* handle fader */ - _input_port->parser()->pitchbend.connect_same_thread (midi_connections, boost::bind (&CC121::fader_handler, this, _1, _2)); + _input_port->parser()->pitchbend.connect_same_thread (midi_connections, std::bind (&CC121::fader_handler, this, _1, _2)); /* handle encoder */ - _input_port->parser()->controller.connect_same_thread (midi_connections, boost::bind (&CC121::encoder_handler, this, _1, _2)); + _input_port->parser()->controller.connect_same_thread (midi_connections, std::bind (&CC121::encoder_handler, this, _1, _2)); /* This connection means that whenever data is ready from the input * port, the relevant thread will invoke our ::midi_input_handler() @@ -679,8 +679,8 @@ CC121::map_transport_state () void CC121::connect_session_signals() { - session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_recenable_state, this), this); - session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_transport_state, this), this); + session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_recenable_state, this), this); + session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_transport_state, this), this); } bool @@ -942,7 +942,7 @@ CC121::Button::get_action (bool press, CC121::ButtonState bs) } void -CC121::Button::set_action (boost::function f, bool when_pressed, CC121::ButtonState bs) +CC121::Button::set_action (std::function f, bool when_pressed, CC121::ButtonState bs) { ToDo todo; todo.type = InternalFunction; @@ -1059,26 +1059,26 @@ CC121::set_current_stripable (std::shared_ptr r) _current_stripable = r; if (_current_stripable) { - _current_stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&CC121::drop_current_stripable, this), this); + _current_stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&CC121::drop_current_stripable, this), this); - _current_stripable->mute_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_mute, this), this); - _current_stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_solo, this), this); + _current_stripable->mute_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_mute, this), this); + _current_stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_solo, this), this); std::shared_ptr t = std::dynamic_pointer_cast (_current_stripable); if (t) { - t->rec_enable_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_recenable, this), this); - t->monitoring_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_monitoring, this), this); + t->rec_enable_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_recenable, this), this); + t->monitoring_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_monitoring, this), this); } std::shared_ptr control = _current_stripable->gain_control (); if (control) { - control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_gain, this), this); - control->alist()->automation_state_changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_auto, this), this); + control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_gain, this), this); + control->alist()->automation_state_changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_auto, this), this); } std::shared_ptr mp = _current_stripable->monitor_control(); if (mp) { - mp->cut_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&CC121::map_cut, this), this); + mp->cut_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&CC121::map_cut, this), this); } } diff --git a/libs/surfaces/cc121/cc121.h b/libs/surfaces/cc121/cc121.h index fbb0bacc7e..6b10891c47 100644 --- a/libs/surfaces/cc121/cc121.h +++ b/libs/surfaces/cc121/cc121.h @@ -225,7 +225,7 @@ class CC121 : public ARDOUR::ControlProtocol, public AbstractUI { {} void set_action (std::string const& action_name, bool on_press, CC121::ButtonState = ButtonState (0)); - void set_action (boost::function function, bool on_press, CC121::ButtonState = ButtonState (0)); + void set_action (std::function function, bool on_press, CC121::ButtonState = ButtonState (0)); std::string get_action (bool press, CC121::ButtonState bs = ButtonState (0)); void set_led_state (std::shared_ptr, bool onoff); @@ -246,11 +246,11 @@ class CC121 : public ARDOUR::ControlProtocol, public AbstractUI { struct ToDo { ActionType type; - /* could be a union if boost::function didn't require a + /* could be a union if std::function didn't require a * constructor */ std::string action_name; - boost::function function; + std::function function; }; typedef std::map ToDoMap; diff --git a/libs/surfaces/cc121/gui.cc b/libs/surfaces/cc121/gui.cc index fb6fbca31f..3fbae1db89 100644 --- a/libs/surfaces/cc121/gui.cc +++ b/libs/surfaces/cc121/gui.cc @@ -288,9 +288,9 @@ CC121GUI::CC121GUI (CC121& p) /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&CC121GUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&CC121GUI::connection_handler, this), gui_context()); - fp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&CC121GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&CC121GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&CC121GUI::connection_handler, this), gui_context()); + fp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&CC121GUI::connection_handler, this), gui_context()); } CC121GUI::~CC121GUI () diff --git a/libs/surfaces/console1/c1_control.h b/libs/surfaces/console1/c1_control.h index 0b060230e4..b5972e9fe4 100644 --- a/libs/surfaces/console1/c1_control.h +++ b/libs/surfaces/console1/c1_control.h @@ -42,10 +42,10 @@ class ControllerButton : public Controller public: ControllerButton (Console1* console1, ControllerID id, - boost::function action, - boost::function shift_action = 0, - boost::function plugin_action = 0, - boost::function plugin_shift_action = 0 ) + std::function action, + std::function shift_action = 0, + std::function plugin_action = 0, + std::function plugin_shift_action = 0 ) : Controller (console1, id) , action (action) , shift_action (shift_action) @@ -57,8 +57,8 @@ class ControllerButton : public Controller ControllerType get_type () { return CONTROLLER_BUTTON; } - void set_plugin_action (boost::function action) { plugin_action = action; } - void set_plugin_shift_action (boost::function action) { plugin_shift_action = action; } + void set_plugin_action (std::function action) { plugin_action = action; } + void set_plugin_shift_action (std::function action) { plugin_shift_action = action; } virtual void set_led_state (bool onoff) { @@ -81,10 +81,10 @@ class ControllerButton : public Controller console1->write (buf, 3); } - boost::function action; - boost::function shift_action; - boost::function plugin_action; - boost::function plugin_shift_action; + std::function action; + std::function shift_action; + std::function plugin_action; + std::function plugin_shift_action; }; class MultiStateButton : public Controller @@ -93,10 +93,10 @@ class MultiStateButton : public Controller MultiStateButton (Console1* console1, ControllerID id, std::vector state_values, - boost::function action, - boost::function shift_action = 0, - boost::function plugin_action = 0, - boost::function plugin_shift_action = 0 + std::function action, + std::function shift_action = 0, + std::function plugin_action = 0, + std::function plugin_shift_action = 0 ) : Controller (console1, id) , action (action) @@ -122,15 +122,15 @@ class MultiStateButton : public Controller console1->write (buf, 3); } - void set_plugin_action (boost::function action) { plugin_action = action; } - void set_plugin_shift_action (boost::function action) { plugin_shift_action = action; } + void set_plugin_action (std::function action) { plugin_action = action; } + void set_plugin_shift_action (std::function action) { plugin_shift_action = action; } uint32_t state_count () { return state_values.size (); } - boost::function action; - boost::function shift_action; - boost::function plugin_action; - boost::function plugin_shift_action; + std::function action; + std::function shift_action; + std::function plugin_action; + std::function plugin_shift_action; private: std::vector state_values; @@ -141,8 +141,8 @@ class Meter : public Controller public: Meter (Console1* console1, ControllerID id, - boost::function action, - boost::function shift_action = 0) + std::function action, + std::function shift_action = 0) : Controller (console1, id) , action (action) , shift_action (shift_action) @@ -161,8 +161,8 @@ class Meter : public Controller console1->write (buf, 3); } - boost::function action; - boost::function shift_action; + std::function action; + std::function shift_action; }; class Encoder : public Controller @@ -170,10 +170,10 @@ class Encoder : public Controller public: Encoder (Console1* console1, ControllerID id, - boost::function action, - boost::function shift_action = 0, - boost::function plugin_action = 0, - boost::function plugin_shift_action = 0) + std::function action, + std::function shift_action = 0, + std::function plugin_action = 0, + std::function plugin_shift_action = 0) : Controller (console1, id) , action (action) , shift_action (shift_action) @@ -185,8 +185,8 @@ class Encoder : public Controller ControllerType get_type () { return ENCODER; } - void set_plugin_action (boost::function action) { plugin_action = action; } - void set_plugin_shift_action (boost::function action) { plugin_shift_action = action; } + void set_plugin_action (std::function action) { plugin_action = action; } + void set_plugin_shift_action (std::function action) { plugin_shift_action = action; } virtual void set_value (uint32_t value) { @@ -197,10 +197,10 @@ class Encoder : public Controller console1->write (buf, 3); } - boost::function action; - boost::function shift_action; - boost::function plugin_action; - boost::function plugin_shift_action; + std::function action; + std::function shift_action; + std::function plugin_action; + std::function plugin_shift_action; PBD::Signal* plugin_signal; }; diff --git a/libs/surfaces/console1/c1_gui.cc b/libs/surfaces/console1/c1_gui.cc index 845471b16f..5c2317b86a 100644 --- a/libs/surfaces/console1/c1_gui.cc +++ b/libs/surfaces/console1/c1_gui.cc @@ -162,11 +162,11 @@ C1GUI::C1GUI (Console1& p) /* catch future changes to connection state */ ARDOUR::AudioEngine::instance ()->PortRegisteredOrUnregistered.connect ( - _port_connections, invalidator (*this), boost::bind (&C1GUI::connection_handler, this), gui_context ()); + _port_connections, invalidator (*this), std::bind (&C1GUI::connection_handler, this), gui_context ()); ARDOUR::AudioEngine::instance ()->PortPrettyNameChanged.connect ( - _port_connections, invalidator (*this), boost::bind (&C1GUI::connection_handler, this), gui_context ()); + _port_connections, invalidator (*this), std::bind (&C1GUI::connection_handler, this), gui_context ()); c1.ConnectionChange.connect ( - _port_connections, invalidator (*this), boost::bind (&C1GUI::connection_handler, this), gui_context ()); + _port_connections, invalidator (*this), std::bind (&C1GUI::connection_handler, this), gui_context ()); } C1GUI::~C1GUI () {} diff --git a/libs/surfaces/console1/c1_plugin_operations.cc b/libs/surfaces/console1/c1_plugin_operations.cc index dfa8971464..6fd1d5ef48 100644 --- a/libs/surfaces/console1/c1_plugin_operations.cc +++ b/libs/surfaces/console1/c1_plugin_operations.cc @@ -325,7 +325,7 @@ Console1::spill_plugins (const int32_t plugin_index) try { ControllerButton* cb = get_button (ControllerID::MUTE); - boost::function plugin_mapping = [=] () -> void { cb->set_led_state (!plugin_insert->enabled ()); }; + std::function plugin_mapping = [=] () -> void { cb->set_led_state (!plugin_insert->enabled ()); }; cb->set_plugin_action ([=] (uint32_t val) { plugin_insert->enable (val == 0); DEBUG_TRACE (DEBUG::Console1, @@ -333,7 +333,7 @@ Console1::spill_plugins (const int32_t plugin_index) }); plugin_insert->ActiveChanged.connect ( - plugin_connections, MISSING_INVALIDATOR, boost::bind (plugin_mapping), this); + plugin_connections, MISSING_INVALIDATOR, std::bind (plugin_mapping), this); plugin_insert->ActiveChanged (); } catch (ControlNotFoundException const&) { DEBUG_TRACE (DEBUG::Console1, string_compose ("No ControllerButton found %1\n", n_controls)); @@ -387,7 +387,7 @@ Console1::spill_plugins (const int32_t plugin_index) if (!swtch) { try { Encoder* e = get_encoder (ppm.controllerId); - boost::function plugin_mapping = + std::function plugin_mapping = [=] (bool b, PBD::Controllable::GroupControlDisposition d) -> void { double v = parameterDescriptor.to_interface (c->get_value (), true); e->set_value (v * 127); @@ -404,7 +404,7 @@ Console1::spill_plugins (const int32_t plugin_index) string_compose ("->Encoder Plugin parameter %1: %2 - %3\n", n_controls, val, v)); }); c->Changed.connect ( - plugin_connections, MISSING_INVALIDATOR, boost::bind (plugin_mapping, _1, _2), this); + plugin_connections, MISSING_INVALIDATOR, std::bind (plugin_mapping, _1, _2), this); c->Changed (true, PBD::Controllable::GroupControlDisposition::UseGroup); continue; } catch (ControlNotFoundException const&) { @@ -413,7 +413,7 @@ Console1::spill_plugins (const int32_t plugin_index) } else { try { ControllerButton* cb = get_button (ppm.controllerId); - boost::function plugin_mapping = + std::function plugin_mapping = [=] (bool b, PBD::Controllable::GroupControlDisposition d) -> void { cb->set_led_state (c->get_value ()); DEBUG_TRACE (DEBUG::Console1, @@ -431,7 +431,7 @@ Console1::spill_plugins (const int32_t plugin_index) }); c->Changed.connect ( - plugin_connections, MISSING_INVALIDATOR, boost::bind (plugin_mapping, _1, _2), this); + plugin_connections, MISSING_INVALIDATOR, std::bind (plugin_mapping, _1, _2), this); c->Changed (true, PBD::Controllable::GroupControlDisposition::UseGroup); continue; } catch (ControlNotFoundException const&) { diff --git a/libs/surfaces/console1/console1.cc b/libs/surfaces/console1/console1.cc index 282da7d1ec..6269cf88d0 100644 --- a/libs/surfaces/console1/console1.cc +++ b/libs/surfaces/console1/console1.cc @@ -213,45 +213,45 @@ Console1::connect_session_signals () DEBUG_TRACE (DEBUG::Console1, "connect_session_signals\n"); // receive routes added session->RouteAdded.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::create_strip_inventory, this), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::create_strip_inventory, this), this); // receive VCAs added session->vca_manager ().VCAAdded.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::create_strip_inventory, this), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::create_strip_inventory, this), this); // receive record state toggled // session->RecordStateChanged.connect(session_connections, - // MISSING_INVALIDATOR, boost::bind + // MISSING_INVALIDATOR, std::bind // (&MIDISurface::notify_record_state_changed, this), this); receive // transport session->TransportStateChange.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::notify_transport_state_changed, this), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::notify_transport_state_changed, this), this); // session->TransportLooped.connect (session_connections, - // MISSING_INVALIDATOR, boost::bind + // MISSING_INVALIDATOR, std::bind // (&MIDISurface::notify_loop_state_changed, this), this); receive punch-in // and punch-out Config->ParameterChanged.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::notify_parameter_changed, this, _1), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::notify_parameter_changed, this, _1), this); session->config.ParameterChanged.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::notify_parameter_changed, this, _1), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::notify_parameter_changed, this, _1), this); // receive rude solo changed session->SoloActive.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::notify_solo_active_changed, this, _1), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::notify_solo_active_changed, this, _1), this); session->MonitorBusAddedOrRemoved.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::master_monitor_has_changed, this), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::master_monitor_has_changed, this), this); session->MonitorChanged.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::master_monitor_has_changed, this), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::master_monitor_has_changed, this), this); session->RouteAdded.connect ( - session_connections, MISSING_INVALIDATOR, boost::bind (&Console1::strip_inventory_changed, this, _1), this); + session_connections, MISSING_INVALIDATOR, std::bind (&Console1::strip_inventory_changed, this, _1), this); } void Console1::connect_internal_signals () { DEBUG_TRACE (DEBUG::Console1, "connect_internal_signals\n"); - BankChange.connect (console1_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_bank, this), this); - ShiftChange.connect (console1_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_shift, this, _1), this); + BankChange.connect (console1_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_bank, this), this); + ShiftChange.connect (console1_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_shift, this, _1), this); PluginStateChange.connect ( - console1_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_plugin_state, this, _1), this); + console1_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_plugin_state, this, _1), this); GotoView.connect ( console1_connections, MISSING_INVALIDATOR, @@ -270,151 +270,151 @@ Console1::setup_controls () for (uint32_t i = 0; i < 20; ++i) { new ControllerButton (this, ControllerID (FOCUS1 + i), - boost::function (boost::bind (&Console1::select, this, i)), + std::function (std::bind (&Console1::select, this, i)), 0, - boost::function (boost::bind (&Console1::select_plugin, this, i))); + std::function (std::bind (&Console1::select_plugin, this, i))); } new ControllerButton ( - this, ControllerID::PRESET, boost::function (boost::bind (&Console1::shift, this, _1))); + this, ControllerID::PRESET, std::function (std::bind (&Console1::shift, this, _1))); new ControllerButton (this, ControllerID::TRACK_GROUP, - boost::function (boost::bind (&Console1::plugin_state, this, _1))); + std::function (std::bind (&Console1::plugin_state, this, _1))); new ControllerButton ( - this, ControllerID::DISPLAY_ON, boost::function (boost::bind (&Console1::rude_solo, this, _1))); + this, ControllerID::DISPLAY_ON, std::function (std::bind (&Console1::rude_solo, this, _1))); new ControllerButton ( - this, ControllerID::MODE, boost::function (boost::bind (&Console1::zoom, this, _1))); + this, ControllerID::MODE, std::function (std::bind (&Console1::zoom, this, _1))); new MultiStateButton (this, ControllerID::EXTERNAL_SIDECHAIN, std::vector{ 0, 63, 127 }, - boost::function (boost::bind (&Console1::window, this, _1))); + std::function (std::bind (&Console1::window, this, _1))); new ControllerButton ( - this, ControllerID::PAGE_UP, boost::function (boost::bind (&Console1::bank, this, true))); + this, ControllerID::PAGE_UP, std::function (std::bind (&Console1::bank, this, true))); new ControllerButton ( - this, ControllerID::PAGE_DOWN, boost::function (boost::bind (&Console1::bank, this, false))); + this, ControllerID::PAGE_DOWN, std::function (std::bind (&Console1::bank, this, false))); new ControllerButton (this, swap_solo_mute ? ControllerID::SOLO : ControllerID::MUTE, - boost::function (boost::bind (&Console1::mute, this, _1))); + std::function (std::bind (&Console1::mute, this, _1))); new ControllerButton (this, swap_solo_mute ? ControllerID::MUTE : ControllerID::SOLO, - boost::function (boost::bind (&Console1::solo, this, _1))); + std::function (std::bind (&Console1::solo, this, _1))); new ControllerButton ( - this, ControllerID::PHASE_INV, boost::function (boost::bind (&Console1::phase, this, _1))); + this, ControllerID::PHASE_INV, std::function (std::bind (&Console1::phase, this, _1))); /* Console 1: Input Gain - Ardour / Mixbus: Trim */ - new Encoder (this, ControllerID::GAIN, boost::function (boost::bind (&Console1::trim, this, _1))); + new Encoder (this, ControllerID::GAIN, std::function (std::bind (&Console1::trim, this, _1))); /* Console 1: Volume - Ardour / Mixbus: Gain */ new Encoder ( - this, ControllerID::VOLUME, boost::function (boost::bind (&Console1::gain, this, _1))); + this, ControllerID::VOLUME, std::function (std::bind (&Console1::gain, this, _1))); - new Encoder (this, ControllerID::PAN, boost::function (boost::bind (&Console1::pan, this, _1))); + new Encoder (this, ControllerID::PAN, std::function (std::bind (&Console1::pan, this, _1))); /* Filter Section*/ new ControllerButton (this, ControllerID::FILTER_TO_COMPRESSORS, - boost::function (boost::bind (&Console1::filter, this, _1))); + std::function (std::bind (&Console1::filter, this, _1))); new Encoder ( - this, ControllerID::LOW_CUT, boost::function (boost::bind (&Console1::low_cut, this, _1))); + this, ControllerID::LOW_CUT, std::function (std::bind (&Console1::low_cut, this, _1))); new Encoder ( - this, ControllerID::HIGH_CUT, boost::function (boost::bind (&Console1::high_cut, this, _1))); + this, ControllerID::HIGH_CUT, std::function (std::bind (&Console1::high_cut, this, _1))); /* Gate Section */ new ControllerButton ( - this, ControllerID::SHAPE, boost::function (boost::bind (&Console1::gate, this, _1))); + this, ControllerID::SHAPE, std::function (std::bind (&Console1::gate, this, _1))); new ControllerButton (this, ControllerID::HARD_GATE, - boost::function (boost::bind (&Console1::gate_scf, this, _1)), - boost::function (boost::bind (&Console1::gate_listen, this, _1))); + std::function (std::bind (&Console1::gate_scf, this, _1)), + std::function (std::bind (&Console1::gate_listen, this, _1))); new Encoder (this, ControllerID::SHAPE_GATE, - boost::function (boost::bind (&Console1::gate_thresh, this, _1))); + std::function (std::bind (&Console1::gate_thresh, this, _1))); new Encoder (this, ControllerID::SHAPE_RELEASE, - boost::function (boost::bind (&Console1::gate_release, this, _1)), - boost::function (boost::bind (&Console1::gate_hyst, this, _1))); + std::function (std::bind (&Console1::gate_release, this, _1)), + std::function (std::bind (&Console1::gate_hyst, this, _1))); new Encoder (this, ControllerID::SHAPE_SUSTAIN, - boost::function (boost::bind (&Console1::gate_attack, this, _1)), - boost::function (boost::bind (&Console1::gate_hold, this, _1))); + std::function (std::bind (&Console1::gate_attack, this, _1)), + std::function (std::bind (&Console1::gate_hold, this, _1))); new Encoder (this, ControllerID::SHAPE_PUNCH, - boost::function (boost::bind (&Console1::gate_depth, this, _1)), - boost::function (boost::bind (&Console1::gate_filter_freq, this, _1))); + std::function (std::bind (&Console1::gate_depth, this, _1)), + std::function (std::bind (&Console1::gate_filter_freq, this, _1))); - new Meter (this, ControllerID::SHAPE_METER, boost::function ([] () {})); + new Meter (this, ControllerID::SHAPE_METER, std::function ([] () {})); /* EQ Section */ new ControllerButton ( - this, ControllerID::EQ, boost::function (boost::bind (&Console1::eq, this, _1))); + this, ControllerID::EQ, std::function (std::bind (&Console1::eq, this, _1))); for (uint32_t i = 0; i < 4; ++i) { new Encoder (this, eq_freq_controller_for_band (i), - boost::function (boost::bind (&Console1::eq_freq, this, i, _1)), - boost::function (boost::bind (&Console1::mb_send_level, this, i, _1))); + std::function (std::bind (&Console1::eq_freq, this, i, _1)), + std::function (std::bind (&Console1::mb_send_level, this, i, _1))); new Encoder (this, eq_gain_controller_for_band (i), - boost::function (boost::bind (&Console1::eq_gain, this, i, _1)), - boost::function (boost::bind (&Console1::mb_send_level, this, i + 4, _1))); + std::function (std::bind (&Console1::eq_gain, this, i, _1)), + std::function (std::bind (&Console1::mb_send_level, this, i + 4, _1))); } new Encoder (this, ControllerID::LOW_MID_SHAPE, - boost::function (boost::bind (&Console1::mb_send_level, this, 10, _1)), - boost::function (boost::bind (&Console1::mb_send_level, this, 8, _1))); + std::function (std::bind (&Console1::mb_send_level, this, 10, _1)), + std::function (std::bind (&Console1::mb_send_level, this, 8, _1))); new Encoder (this, ControllerID::HIGH_MID_SHAPE, - boost::function (boost::bind (&Console1::mb_send_level, this, 11, _1)), - boost::function (boost::bind (&Console1::mb_send_level, this, 9, _1))); + std::function (std::bind (&Console1::mb_send_level, this, 11, _1)), + std::function (std::bind (&Console1::mb_send_level, this, 9, _1))); new ControllerButton (this, ControllerID::LOW_SHAPE, - boost::function (boost::bind (&Console1::eq_low_shape, this, _1))); + std::function (std::bind (&Console1::eq_low_shape, this, _1))); new ControllerButton (this, ControllerID::HIGH_SHAPE, - boost::function (boost::bind (&Console1::eq_high_shape, this, _1))); + std::function (std::bind (&Console1::eq_high_shape, this, _1))); new Encoder ( - this, ControllerID::CHARACTER, boost::function (boost::bind (&Console1::drive, this, _1))); + this, ControllerID::CHARACTER, std::function (std::bind (&Console1::drive, this, _1))); /* Compressor Section */ new ControllerButton ( - this, ControllerID::COMP, boost::function (boost::bind (&Console1::comp, this, _1))); + this, ControllerID::COMP, std::function (std::bind (&Console1::comp, this, _1))); new MultiStateButton (this, ControllerID::ORDER, std::vector{ 0, 63, 127 }, - boost::function (boost::bind (&Console1::comp_mode, this, _1))); + std::function (std::bind (&Console1::comp_mode, this, _1))); new Encoder (this, ControllerID::COMP_THRESH, - boost::function (boost::bind (&Console1::comp_thresh, this, _1))); + std::function (std::bind (&Console1::comp_thresh, this, _1))); new Encoder (this, ControllerID::COMP_ATTACK, - boost::function (boost::bind (&Console1::comp_attack, this, _1))); + std::function (std::bind (&Console1::comp_attack, this, _1))); new Encoder (this, ControllerID::COMP_RELEASE, - boost::function (boost::bind (&Console1::comp_release, this, _1))); + std::function (std::bind (&Console1::comp_release, this, _1))); new Encoder ( - this, ControllerID::COMP_RATIO, boost::function (boost::bind (&Console1::comp_ratio, this, _1))); + this, ControllerID::COMP_RATIO, std::function (std::bind (&Console1::comp_ratio, this, _1))); new Encoder ( - this, ControllerID::COMP_PAR, boost::function (boost::bind (&Console1::comp_makeup, this, _1))); + this, ControllerID::COMP_PAR, std::function (std::bind (&Console1::comp_makeup, this, _1))); new Encoder ( - this, ControllerID::DRIVE, boost::function (boost::bind (&Console1::comp_emph, this, _1))); + this, ControllerID::DRIVE, std::function (std::bind (&Console1::comp_emph, this, _1))); - new Meter (this, ControllerID::COMP_METER, boost::function ([] () {})); + new Meter (this, ControllerID::COMP_METER, std::function ([] () {})); /* Output Section */ - new Meter (this, ControllerID::OUTPUT_METER_L, boost::function ([] () {})); - new Meter (this, ControllerID::OUTPUT_METER_R, boost::function ([] () {})); + new Meter (this, ControllerID::OUTPUT_METER_L, std::function ([] () {})); + new Meter (this, ControllerID::OUTPUT_METER_R, std::function ([] () {})); } void @@ -545,7 +545,7 @@ Console1::set_current_stripable (std::shared_ptr r) if (_current_stripable) { DEBUG_TRACE (DEBUG::Console1, "current_stripable found: \n"); - r->MappedControlsChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::set_current_stripable, this, r), this); + r->MappedControlsChanged.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::set_current_stripable, this, r), this); current_plugin_index = -1; @@ -575,154 +575,154 @@ Console1::set_current_stripable (std::shared_ptr r) std::shared_ptr pan_control = current_pan_control; if (pan_control) pan_control->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_pan, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_pan, this), this); _current_stripable->DropReferences.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::drop_current_stripable, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::drop_current_stripable, this), this); if (_current_stripable->mute_control ()) { _current_stripable->mute_control ()->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_mute, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_mute, this), this); } if (_current_stripable->solo_control ()) { _current_stripable->solo_control ()->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_solo, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_solo, this), this); } if (_current_stripable->phase_control ()) { _current_stripable->phase_control ()->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_phase, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_phase, this), this); } // Rec Enabled std::shared_ptr t = std::dynamic_pointer_cast (_current_stripable); if (t) { t->rec_enable_control ()->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_recenable, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_recenable, this), this); } // Monitor if (_current_stripable->monitoring_control ()) { _current_stripable->monitoring_control ()->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_monitoring, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_monitoring, this), this); } // Trim std::shared_ptr trim_control = _current_stripable->trim_control (); if (trim_control) { trim_control->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_trim, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_trim, this), this); } // Gain std::shared_ptr gain_control = _current_stripable->gain_control (); if (gain_control) { gain_control->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gain, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gain, this), this); // control->alist()->automation_state_changed.connect - // (stripable_connections, MISSING_INVALIDATOR, boost::bind + // (stripable_connections, MISSING_INVALIDATOR, std::bind // (&Console1::map_auto, this), this); } // Filter Section if (_current_stripable->mapped_control (HPF_Enable)) { _current_stripable->mapped_control (HPF_Enable)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_filter, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_filter, this), this); } if (_current_stripable->mapped_control (HPF_Freq)) { _current_stripable->mapped_control (HPF_Freq)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_low_cut, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_low_cut, this), this); } if (_current_stripable->mapped_control (LPF_Freq)) { _current_stripable->mapped_control (LPF_Freq)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_high_cut, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_high_cut, this), this); } // Gate Section if (_current_stripable->mapped_control (Gate_Enable)) { _current_stripable->mapped_control (Gate_Enable)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate, this), this); } if (_current_stripable->mapped_control (Gate_KeyFilterEnable)) { _current_stripable->mapped_control (Gate_KeyFilterEnable)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_scf, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_scf, this), this); } if (_current_stripable->mapped_control (Gate_KeyListen)) { _current_stripable->mapped_control (Gate_KeyListen)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_listen, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_listen, this), this); } if (_current_stripable->mapped_control (Gate_Threshold)) { _current_stripable->mapped_control (Gate_Threshold)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_thresh, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_thresh, this), this); } if (_current_stripable->mapped_control (Gate_Depth)) { _current_stripable->mapped_control (Gate_Depth)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_depth, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_depth, this), this); } if (_current_stripable->mapped_control (Gate_Release)) { _current_stripable->mapped_control (Gate_Release)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_release, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_release, this), this); } if (_current_stripable->mapped_control (Gate_Attack)) { _current_stripable->mapped_control (Gate_Attack)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_attack, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_attack, this), this); } if (_current_stripable->mapped_control (Gate_Hysteresis)) { _current_stripable->mapped_control (Gate_Hysteresis)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_hyst, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_hyst, this), this); } if (_current_stripable->mapped_control (Gate_Hold)) { _current_stripable->mapped_control (Gate_Hold)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_hold, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_hold, this), this); } if (_current_stripable->mapped_control (Gate_KeyFilterFreq)) { _current_stripable->mapped_control (Gate_KeyFilterFreq)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_gate_filter_freq, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_gate_filter_freq, this), this); } // EQ Section if (_current_stripable->mapped_control (EQ_Enable)) { _current_stripable->mapped_control (EQ_Enable)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_eq, this), this); } for (uint32_t i = 0; i < _current_stripable->eq_band_cnt (); ++i) { if (_current_stripable->mapped_control (EQ_BandFreq, i)) { _current_stripable->mapped_control (EQ_BandFreq, i)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_freq, this, i), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_eq_freq, this, i), this); } if (_current_stripable->mapped_control (EQ_BandGain, i)) { _current_stripable->mapped_control (EQ_BandGain, i)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_gain, this, i), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_eq_gain, this, i), this); } } if (_current_stripable->mapped_control (EQ_BandShape, 0)) { _current_stripable->mapped_control (EQ_BandShape, 0)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_low_shape, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_eq_low_shape, this), this); } if (_current_stripable->mapped_control (EQ_BandShape, 3)) { _current_stripable->mapped_control (EQ_BandShape, 3)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_high_shape, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_eq_high_shape, this), this); } // Drive if (_current_stripable->mapped_control (TapeDrive_Drive)) { _current_stripable->mapped_control (TapeDrive_Drive)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_drive, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_drive, this), this); } // Mixbus Sends @@ -731,7 +731,7 @@ Console1::set_current_stripable (std::shared_ptr r) _current_stripable->send_level_controllable (i)->Changed.connect ( stripable_connections, MISSING_INVALIDATOR, - boost::bind (&Console1::map_mb_send_level, this, i), + std::bind (&Console1::map_mb_send_level, this, i), this); } } @@ -739,42 +739,42 @@ Console1::set_current_stripable (std::shared_ptr r) // Comp Section if (_current_stripable->mapped_control (Comp_Enable)) { _current_stripable->mapped_control (Comp_Enable)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_comp, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_comp, this), this); } if (_current_stripable->mapped_control (Comp_Mode)) { _current_stripable->mapped_control (Comp_Mode)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_comp_mode, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_comp_mode, this), this); } if (_current_stripable->mapped_control (Comp_Threshold)) { _current_stripable->mapped_control (Comp_Threshold)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_comp_thresh, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_comp_thresh, this), this); } if (_current_stripable->mapped_control (Comp_Attack)) { _current_stripable->mapped_control (Comp_Attack)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_comp_attack, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_comp_attack, this), this); } if (_current_stripable->mapped_control (Comp_Release)) { _current_stripable->mapped_control (Comp_Release)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_comp_release, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_comp_release, this), this); } if (_current_stripable->mapped_control (Comp_Ratio)) { _current_stripable->mapped_control (Comp_Ratio)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_comp_ratio, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_comp_ratio, this), this); } if (_current_stripable->mapped_control (Comp_Makeup)) { _current_stripable->mapped_control (Comp_Makeup)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_comp_makeup, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_comp_makeup, this), this); } if (_current_stripable->mapped_control (Comp_KeyFilterFreq)) { _current_stripable->mapped_control (Comp_KeyFilterFreq)->Changed.connect ( - stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_comp_emph, this), this); + stripable_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_comp_emph, this), this); } uint32_t index = get_index_by_inventory_order (pi.order ()); diff --git a/libs/surfaces/console1/console1.h b/libs/surfaces/console1/console1.h index 006ce20625..ed0d93d998 100644 --- a/libs/surfaces/console1/console1.h +++ b/libs/surfaces/console1/console1.h @@ -311,8 +311,8 @@ private: std::weak_ptr pre_monitor_stripable; void create_encoder (ControllerID id, - boost::function action, - boost::function shift_action = 0); + std::function action, + std::function shift_action = 0); void setup_controls (); diff --git a/libs/surfaces/contourdesign/contourdesign_gui.cc b/libs/surfaces/contourdesign/contourdesign_gui.cc index 711e1f065f..51f72ce673 100644 --- a/libs/surfaces/contourdesign/contourdesign_gui.cc +++ b/libs/surfaces/contourdesign/contourdesign_gui.cc @@ -195,8 +195,8 @@ ContourDesignGUI::ContourDesignGUI (ContourDesignControlProtocol& ccp) pack_start (*top_box); pack_start (*btn_action_sample); - _ccp.ButtonPress.connect (*this, invalidator (*this), boost::bind (&ContourDesignGUI::test_button_press, this, _1), gui_context ()); - _ccp.ButtonRelease.connect (*this, invalidator (*this), boost::bind (&ContourDesignGUI::test_button_release, this, _1), gui_context ()); + _ccp.ButtonPress.connect (*this, invalidator (*this), std::bind (&ContourDesignGUI::test_button_press, this, _1), gui_context ()); + _ccp.ButtonRelease.connect (*this, invalidator (*this), std::bind (&ContourDesignGUI::test_button_release, this, _1), gui_context ()); signal_map().connect (sigc::mem_fun (*this, &ContourDesignGUI::init_on_show)); update_device_state (); diff --git a/libs/surfaces/faderport/faderport.cc b/libs/surfaces/faderport/faderport.cc index e03ba53f29..5e298c4e59 100644 --- a/libs/surfaces/faderport/faderport.cc +++ b/libs/surfaces/faderport/faderport.cc @@ -110,52 +110,52 @@ FaderPort::FaderPort (Session& s) get_button (Trns).set_flash (true); get_button (User).set_flash (true); - get_button (Left).set_action ( boost::bind (&FaderPort::left, this), true); - get_button (Right).set_action ( boost::bind (&FaderPort::right, this), true); + get_button (Left).set_action ( std::bind (&FaderPort::left, this), true); + get_button (Right).set_action ( std::bind (&FaderPort::right, this), true); - get_button (Undo).set_action (boost::bind (&FaderPort::undo, this), true); - get_button (Undo).set_action (boost::bind (&FaderPort::redo, this), true, ShiftDown); + get_button (Undo).set_action (std::bind (&FaderPort::undo, this), true); + get_button (Undo).set_action (std::bind (&FaderPort::redo, this), true, ShiftDown); get_button (Undo).set_flash (true); - get_button (FP_Read).set_action (boost::bind (&FaderPort::read, this), true); - get_button (FP_Read).set_action (boost::bind (&FaderPort::off, this), false, LongPress); - get_button (FP_Write).set_action (boost::bind (&FaderPort::write, this), true); - get_button (FP_Write).set_action (boost::bind (&FaderPort::off, this), false, LongPress); - get_button (FP_Touch).set_action (boost::bind (&FaderPort::touch, this), true); - get_button (FP_Touch).set_action (boost::bind (&FaderPort::off, this), false, LongPress); - get_button (FP_Off).set_action (boost::bind (&FaderPort::off, this), true); + get_button (FP_Read).set_action (std::bind (&FaderPort::read, this), true); + get_button (FP_Read).set_action (std::bind (&FaderPort::off, this), false, LongPress); + get_button (FP_Write).set_action (std::bind (&FaderPort::write, this), true); + get_button (FP_Write).set_action (std::bind (&FaderPort::off, this), false, LongPress); + get_button (FP_Touch).set_action (std::bind (&FaderPort::touch, this), true); + get_button (FP_Touch).set_action (std::bind (&FaderPort::off, this), false, LongPress); + get_button (FP_Off).set_action (std::bind (&FaderPort::off, this), true); - get_button (Play).set_action (boost::bind (&BasicUI::transport_play, this, true), true); - get_button (RecEnable).set_action (boost::bind (&BasicUI::rec_enable_toggle, this), true); + get_button (Play).set_action (std::bind (&BasicUI::transport_play, this, true), true); + get_button (RecEnable).set_action (std::bind (&BasicUI::rec_enable_toggle, this), true); /* Stop is a modifier, so we have to use its own button state to get the default action (since StopDown will be set when looking for the action to invoke. */ - get_button (Stop).set_action (boost::bind (&BasicUI::transport_stop, this), true, StopDown); - get_button (Ffwd).set_action (boost::bind (&BasicUI::ffwd, this), true); + get_button (Stop).set_action (std::bind (&BasicUI::transport_stop, this), true, StopDown); + get_button (Ffwd).set_action (std::bind (&BasicUI::ffwd, this), true); /* See comments about Stop above .. */ - get_button (Rewind).set_action (boost::bind (&BasicUI::rewind, this), true, RewindDown); - get_button (Rewind).set_action (boost::bind (&BasicUI::goto_zero, this), true, ButtonState (RewindDown|StopDown)); - get_button (Rewind).set_action (boost::bind (&BasicUI::goto_start, this, false), true, ButtonState (RewindDown|ShiftDown)); + get_button (Rewind).set_action (std::bind (&BasicUI::rewind, this), true, RewindDown); + get_button (Rewind).set_action (std::bind (&BasicUI::goto_zero, this), true, ButtonState (RewindDown|StopDown)); + get_button (Rewind).set_action (std::bind (&BasicUI::goto_start, this, false), true, ButtonState (RewindDown|ShiftDown)); - get_button (Ffwd).set_action (boost::bind (&BasicUI::ffwd, this), true); - get_button (Ffwd).set_action (boost::bind (&BasicUI::goto_end, this), true, ShiftDown); + get_button (Ffwd).set_action (std::bind (&BasicUI::ffwd, this), true); + get_button (Ffwd).set_action (std::bind (&BasicUI::goto_end, this), true, ShiftDown); - get_button (Punch).set_action (boost::bind (&FaderPort::punch, this), true); + get_button (Punch).set_action (std::bind (&FaderPort::punch, this), true); - get_button (Loop).set_action (boost::bind (&BasicUI::loop_toggle, this), true); - get_button (Loop).set_action (boost::bind (&BasicUI::add_marker, this, string()), true, ShiftDown); + get_button (Loop).set_action (std::bind (&BasicUI::loop_toggle, this), true); + get_button (Loop).set_action (std::bind (&BasicUI::add_marker, this, string()), true, ShiftDown); - get_button (Punch).set_action (boost::bind (&BasicUI::prev_marker, this), true, ShiftDown); - get_button (User).set_action (boost::bind (&BasicUI::next_marker, this), true, ShiftDown); + get_button (Punch).set_action (std::bind (&BasicUI::prev_marker, this), true, ShiftDown); + get_button (User).set_action (std::bind (&BasicUI::next_marker, this), true, ShiftDown); - get_button (Mute).set_action (boost::bind (&FaderPort::mute, this), true); - get_button (Solo).set_action (boost::bind (&FaderPort::solo, this), true); - get_button (Rec).set_action (boost::bind (&FaderPort::rec_enable, this), true); + get_button (Mute).set_action (std::bind (&FaderPort::mute, this), true); + get_button (Solo).set_action (std::bind (&FaderPort::solo, this), true); + get_button (Rec).set_action (std::bind (&FaderPort::rec_enable, this), true); - get_button (Output).set_action (boost::bind (&FaderPort::use_master, this), true); - get_button (Output).set_action (boost::bind (&FaderPort::use_monitor, this), true, ShiftDown); + get_button (Output).set_action (std::bind (&FaderPort::use_master, this), true); + get_button (Output).set_action (std::bind (&FaderPort::use_monitor, this), true, ShiftDown); run_event_loop (); port_setup (); @@ -787,7 +787,7 @@ FaderPort::Button::get_action (bool press, FaderPort::ButtonState bs) } void -FaderPort::Button::set_action (boost::function f, bool when_pressed, FaderPort::ButtonState bs) +FaderPort::Button::set_action (std::function f, bool when_pressed, FaderPort::ButtonState bs) { ToDo todo; todo.type = InternalFunction; @@ -920,25 +920,25 @@ FaderPort::set_current_stripable (std::shared_ptr r) get_button(Output).set_led_state (false); if (_current_stripable) { - _current_stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::drop_current_stripable, this), this); + _current_stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&FaderPort::drop_current_stripable, this), this); - _current_stripable->mute_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_mute, this), this); - _current_stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_solo, this), this); + _current_stripable->mute_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&FaderPort::map_mute, this), this); + _current_stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&FaderPort::map_solo, this), this); std::shared_ptr t = std::dynamic_pointer_cast (_current_stripable); if (t) { - t->rec_enable_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_recenable, this), this); + t->rec_enable_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&FaderPort::map_recenable, this), this); } std::shared_ptr control = _current_stripable->gain_control (); if (control) { - control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_gain, this), this); - control->alist()->automation_state_changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_auto, this), this); + control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&FaderPort::map_gain, this), this); + control->alist()->automation_state_changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&FaderPort::map_auto, this), this); } std::shared_ptr mp = _current_stripable->monitor_control(); if (mp) { - mp->cut_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_cut, this), this); + mp->cut_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&FaderPort::map_cut, this), this); } } diff --git a/libs/surfaces/faderport/faderport.h b/libs/surfaces/faderport/faderport.h index 62931dc15e..2baf4a9dbd 100644 --- a/libs/surfaces/faderport/faderport.h +++ b/libs/surfaces/faderport/faderport.h @@ -192,7 +192,7 @@ class FaderPort : public MIDISurface { {} void set_action (std::string const& action_name, bool on_press, FaderPort::ButtonState = ButtonState (0)); - void set_action (boost::function function, bool on_press, FaderPort::ButtonState = ButtonState (0)); + void set_action (std::function function, bool on_press, FaderPort::ButtonState = ButtonState (0)); std::string get_action (bool press, FaderPort::ButtonState bs = ButtonState (0)); void set_led_state (bool onoff); @@ -214,11 +214,11 @@ class FaderPort : public MIDISurface { struct ToDo { ActionType type; - /* could be a union if boost::function didn't require a + /* could be a union if std::function didn't require a * constructor */ std::string action_name; - boost::function function; + std::function function; }; typedef std::map ToDoMap; diff --git a/libs/surfaces/faderport/gui.cc b/libs/surfaces/faderport/gui.cc index a11eba78e4..594e2b39d8 100644 --- a/libs/surfaces/faderport/gui.cc +++ b/libs/surfaces/faderport/gui.cc @@ -272,9 +272,9 @@ FPGUI::FPGUI (FaderPort& p) /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&FPGUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&FPGUI::connection_handler, this), gui_context()); - fp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&FPGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&FPGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&FPGUI::connection_handler, this), gui_context()); + fp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&FPGUI::connection_handler, this), gui_context()); } FPGUI::~FPGUI () diff --git a/libs/surfaces/faderport8/actions.cc b/libs/surfaces/faderport8/actions.cc index f26cc16eac..e5f09d56e1 100644 --- a/libs/surfaces/faderport8/actions.cc +++ b/libs/surfaces/faderport8/actions.cc @@ -41,20 +41,20 @@ using namespace ArdourSurface::FP_NAMESPACE; using namespace ArdourSurface::FP_NAMESPACE::FP8Types; #define BindMethod(ID, CB) \ - _ctrls.button (FP8Controls::ID).released.connect_same_thread (button_connections, boost::bind (&FaderPort8:: CB, this)); + _ctrls.button (FP8Controls::ID).released.connect_same_thread (button_connections, std::bind (&FaderPort8:: CB, this)); #define BindMethod2(ID, ACT, CB) \ - _ctrls.button (FP8Controls::ID). ACT .connect_same_thread (button_connections, boost::bind (&FaderPort8:: CB, this)); + _ctrls.button (FP8Controls::ID). ACT .connect_same_thread (button_connections, std::bind (&FaderPort8:: CB, this)); #define BindFunction(ID, ACT, CB, ...) \ - _ctrls.button (FP8Controls::ID). ACT .connect_same_thread (button_connections, boost::bind (&FaderPort8:: CB, this, __VA_ARGS__)); + _ctrls.button (FP8Controls::ID). ACT .connect_same_thread (button_connections, std::bind (&FaderPort8:: CB, this, __VA_ARGS__)); #define BindAction(ID, GRP, ITEM) \ - _ctrls.button (FP8Controls::ID).released.connect_same_thread (button_connections, boost::bind (&FaderPort8::button_action, this, GRP, ITEM)); + _ctrls.button (FP8Controls::ID).released.connect_same_thread (button_connections, std::bind (&FaderPort8::button_action, this, GRP, ITEM)); #define BindUserAction(ID) \ - _ctrls.button (ID).pressed.connect_same_thread (button_connections, boost::bind (&FaderPort8::button_user, this, true, ID)); \ -_ctrls.button (ID).released.connect_same_thread (button_connections, boost::bind (&FaderPort8::button_user, this, false, ID)); + _ctrls.button (ID).pressed.connect_same_thread (button_connections, std::bind (&FaderPort8::button_user, this, true, ID)); \ +_ctrls.button (ID).released.connect_same_thread (button_connections, std::bind (&FaderPort8::button_user, this, false, ID)); /* Bind button signals (press, release) to callback methods @@ -99,11 +99,11 @@ FaderPort8::setup_actions () BindFunction (BtnAWrite, released, button_automation, ARDOUR::Write); BindFunction (BtnALatch, released, button_automation, ARDOUR::Latch); - _ctrls.button (FP8Controls::BtnEncoder).pressed.connect_same_thread (button_connections, boost::bind (&FaderPort8::button_encoder, this)); + _ctrls.button (FP8Controls::BtnEncoder).pressed.connect_same_thread (button_connections, std::bind (&FaderPort8::button_encoder, this)); #ifdef FADERPORT2 - _ctrls.button (FP8Controls::BtnParam).pressed.connect_same_thread (button_connections, boost::bind (&FaderPort8::button_encoder, this)); + _ctrls.button (FP8Controls::BtnParam).pressed.connect_same_thread (button_connections, std::bind (&FaderPort8::button_encoder, this)); #else - _ctrls.button (FP8Controls::BtnParam).pressed.connect_same_thread (button_connections, boost::bind (&FaderPort8::button_parameter, this)); + _ctrls.button (FP8Controls::BtnParam).pressed.connect_same_thread (button_connections, std::bind (&FaderPort8::button_parameter, this)); #endif diff --git a/libs/surfaces/faderport8/callbacks.cc b/libs/surfaces/faderport8/callbacks.cc index 1c440758c9..2113805ac9 100644 --- a/libs/surfaces/faderport8/callbacks.cc +++ b/libs/surfaces/faderport8/callbacks.cc @@ -38,20 +38,20 @@ using namespace ArdourSurface::FP_NAMESPACE::FP8Types; void FaderPort8::connect_session_signals () { - session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_stripable_added_or_removed, this), this); - PresentationInfo::Change.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_pi_property_changed, this, _1), this); + session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_stripable_added_or_removed, this), this); + PresentationInfo::Change.connect(session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_pi_property_changed, this, _1), this); - Config->ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_parameter_changed, this, _1), this); - session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_parameter_changed, this, _1), this); + Config->ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_parameter_changed, this, _1), this); + session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_parameter_changed, this, _1), this); - session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_transport_state_changed, this), this); - session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_loop_state_changed, this), this); - session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_record_state_changed, this), this); + session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_transport_state_changed, this), this); + session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_loop_state_changed, this), this); + session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_record_state_changed, this), this); - session->DirtyChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_session_dirty_changed, this), this); - session->SoloChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_solo_changed, this), this); - session->MuteChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_mute_changed, this), this); - session->history().Changed.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_history_changed, this), this); + session->DirtyChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_session_dirty_changed, this), this); + session->SoloChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_solo_changed, this), this); + session->MuteChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_mute_changed, this), this); + session->history().Changed.connect (session_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_history_changed, this), this); } void diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index e20ad05345..7854acb8da 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -212,15 +212,15 @@ FaderPort8::FaderPort8 (Session& s) session->engine().make_port_name_non_relative (outp->name()) ); - ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::connection_handler, this, _2, _4), this); - ARDOUR::AudioEngine::instance()->Stopped.connect (port_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::engine_reset, this), this); - ARDOUR::Port::PortDrop.connect (port_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::engine_reset, this), this); + ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::connection_handler, this, _2, _4), this); + ARDOUR::AudioEngine::instance()->Stopped.connect (port_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::engine_reset, this), this); + ARDOUR::Port::PortDrop.connect (port_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::engine_reset, this), this); /* bind button events to call libardour actions */ setup_actions (); - _ctrls.FaderModeChanged.connect_same_thread (modechange_connections, boost::bind (&FaderPort8::notify_fader_mode_changed, this)); - _ctrls.MixModeChanged.connect_same_thread (modechange_connections, boost::bind (&FaderPort8::assign_strips, this)); + _ctrls.FaderModeChanged.connect_same_thread (modechange_connections, std::bind (&FaderPort8::notify_fader_mode_changed, this)); + _ctrls.MixModeChanged.connect_same_thread (modechange_connections, std::bind (&FaderPort8::assign_strips, this)); std::string pn_in, pn_out; if (probe (pn_in, pn_out)) { @@ -569,14 +569,14 @@ FaderPort8::midi_input_handler (Glib::IOCondition ioc, std::weak_ptrparser()->sysex.connect_same_thread (midi_connections, boost::bind (&FaderPort8::sysex_handler, this, _1, _2, _3)); - _input_port->parser()->poly_pressure.connect_same_thread (midi_connections, boost::bind (&FaderPort8::polypressure_handler, this, _1, _2)); + _input_port->parser()->sysex.connect_same_thread (midi_connections, std::bind (&FaderPort8::sysex_handler, this, _1, _2, _3)); + _input_port->parser()->poly_pressure.connect_same_thread (midi_connections, std::bind (&FaderPort8::polypressure_handler, this, _1, _2)); for (uint8_t i = 0; i < 16; ++i) { - _input_port->parser()->channel_pitchbend[i].connect_same_thread (midi_connections, boost::bind (&FaderPort8::pitchbend_handler, this, _1, i, _2)); + _input_port->parser()->channel_pitchbend[i].connect_same_thread (midi_connections, std::bind (&FaderPort8::pitchbend_handler, this, _1, i, _2)); } - _input_port->parser()->controller.connect_same_thread (midi_connections, boost::bind (&FaderPort8::controller_handler, this, _1, _2)); - _input_port->parser()->note_on.connect_same_thread (midi_connections, boost::bind (&FaderPort8::note_on_handler, this, _1, _2)); - _input_port->parser()->note_off.connect_same_thread (midi_connections, boost::bind (&FaderPort8::note_off_handler, this, _1, _2)); + _input_port->parser()->controller.connect_same_thread (midi_connections, std::bind (&FaderPort8::controller_handler, this, _1, _2)); + _input_port->parser()->note_on.connect_same_thread (midi_connections, std::bind (&FaderPort8::note_on_handler, this, _1, _2)); + _input_port->parser()->note_off.connect_same_thread (midi_connections, std::bind (&FaderPort8::note_off_handler, this, _1, _2)); /* This connection means that whenever data is ready from the input * port, the relevant thread will invoke our ::midi_input_handler() @@ -1076,17 +1076,17 @@ FaderPort8::assign_stripables (bool select_only) _assigned_strips[*s] = id; (*s)->DropReferences.connect (assigned_stripable_connections, MISSING_INVALIDATOR, - boost::bind (&FaderPort8::notify_stripable_added_or_removed, this), this); + std::bind (&FaderPort8::notify_stripable_added_or_removed, this), this); (*s)->PropertyChanged.connect (assigned_stripable_connections, MISSING_INVALIDATOR, - boost::bind (&FaderPort8::notify_stripable_property_changed, this, std::weak_ptr (*s), _1), this); + std::bind (&FaderPort8::notify_stripable_property_changed, this, std::weak_ptr (*s), _1), this); (*s)->presentation_info ().PropertyChanged.connect (assigned_stripable_connections, MISSING_INVALIDATOR, - boost::bind (&FaderPort8::notify_stripable_property_changed, this, std::weak_ptr (*s), _1), this); + std::bind (&FaderPort8::notify_stripable_property_changed, this, std::weak_ptr (*s), _1), this); if (std::shared_ptr r = std::dynamic_pointer_cast(*s)) { if (r->panner_shell()) { r->panner_shell()->Changed.connect (assigned_stripable_connections, MISSING_INVALIDATOR, - boost::bind (&FaderPort8::notify_stripable_property_changed, this, std::weak_ptr (*s), PropertyChange()), this); + std::bind (&FaderPort8::notify_stripable_property_changed, this, std::weak_ptr (*s), PropertyChange()), this); } } @@ -1101,7 +1101,7 @@ FaderPort8::assign_stripables (bool select_only) _ctrls.strip(id).set_stripable (*s, _ctrls.fader_mode() == ModePan); } - boost::function cb (boost::bind (&FaderPort8::select_strip, this, std::weak_ptr (*s))); + std::function cb (std::bind (&FaderPort8::select_strip, this, std::weak_ptr (*s))); _ctrls.strip(id).set_select_cb (cb); if (++id == N_STRIPS) { @@ -1149,7 +1149,7 @@ FaderPort8::lock_link () if (!ac) { return; } - ac->DropReferences.connect (link_locked_connection, MISSING_INVALIDATOR, boost::bind (&FaderPort8::unlock_link, this, true), this); + ac->DropReferences.connect (link_locked_connection, MISSING_INVALIDATOR, std::bind (&FaderPort8::unlock_link, this, true), this); // stop watching for focus events link_connection.disconnect (); @@ -1182,7 +1182,7 @@ FaderPort8::start_link () _ctrls.button (FP8Controls::BtnLock).set_active (true); nofity_focus_control (_link_control); // update BtnLink, BtnLock colors - PBD::Controllable::GUIFocusChanged.connect (link_connection, MISSING_INVALIDATOR, boost::bind (&FaderPort8::nofity_focus_control, this, _1), this); + PBD::Controllable::GUIFocusChanged.connect (link_connection, MISSING_INVALIDATOR, std::bind (&FaderPort8::nofity_focus_control, this, _1), this); } @@ -1295,7 +1295,7 @@ FaderPort8::assign_plugin_presets (std::shared_ptr pi) uint8_t id = 0; for (size_t i = _parameter_off; i < (size_t)n_parameters; ++i) { _ctrls.strip(id).unset_controllables (FP8Strip::CTRL_ALL & ~FP8Strip::CTRL_TEXT01 & ~FP8Strip::CTRL_TEXT3 & ~FP8Strip::CTRL_SELECT); - boost::function cb (boost::bind (&FaderPort8::select_plugin_preset, this, i)); + std::function cb (std::bind (&FaderPort8::select_plugin_preset, this, i)); _ctrls.strip(id).set_select_cb (cb); _ctrls.strip(id).select_button ().set_active (true); if (active != presets.at(i)) { @@ -1322,7 +1322,7 @@ FaderPort8::assign_plugin_presets (std::shared_ptr pi) // pin clear-preset to the last slot assert (id == (N_STRIPS - 1)); _ctrls.strip(id).unset_controllables (FP8Strip::CTRL_ALL & ~FP8Strip::CTRL_TEXT0 & ~FP8Strip::CTRL_TEXT3 & ~FP8Strip::CTRL_SELECT); - boost::function cb (boost::bind (&FaderPort8::select_plugin_preset, this, SIZE_MAX)); + std::function cb (std::bind (&FaderPort8::select_plugin_preset, this, SIZE_MAX)); _ctrls.strip(id).set_select_cb (cb); _ctrls.strip(id).select_button ().set_blinking (false); _ctrls.strip(id).select_button ().set_color (active.uri.empty() ? 0x00ffffff : 0x0000ffff); @@ -1419,7 +1419,7 @@ FaderPort8::select_plugin (int num) if (num < 0) { processor_connections.drop_connections (); - r->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); + r->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); build_well_known_processor_ctrls (r, -num); assign_processor_ctrls (); @@ -1461,12 +1461,12 @@ FaderPort8::select_plugin (int num) _plugin_insert = std::weak_ptr (pi); std::shared_ptr plugin = pi->plugin (); - plugin->PresetAdded.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::preset_changed, this), this); - plugin->PresetRemoved.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::preset_changed, this), this); - plugin->PresetLoaded.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::preset_changed, this), this); - plugin->PresetDirty.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::preset_changed, this), this); + plugin->PresetAdded.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::preset_changed, this), this); + plugin->PresetRemoved.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::preset_changed, this), this); + plugin->PresetLoaded.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::preset_changed, this), this); + plugin->PresetDirty.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::preset_changed, this), this); - r->MappedControlsChanged.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::stripable_selection_changed, this), this); + r->MappedControlsChanged.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::stripable_selection_changed, this), this); if (_auto_pluginui) { pi->ShowUI (); /* EMIT SIGNAL */ @@ -1485,7 +1485,7 @@ FaderPort8::select_plugin (int num) // disconnect signals from spill_plugins: processors_changed and ActiveChanged processor_connections.drop_connections (); - r->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); + r->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); std::shared_ptr pi = std::dynamic_pointer_cast (proc); assert (pi); // nth_plugin() always returns a PI. @@ -1497,13 +1497,13 @@ FaderPort8::select_plugin (int num) #endif { _plugin_insert = std::weak_ptr (pi); - pi->ActiveChanged.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_plugin_active_changed, this), this); + pi->ActiveChanged.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_plugin_active_changed, this), this); std::shared_ptr plugin = pi->plugin (); - plugin->PresetAdded.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::preset_changed, this), this); - plugin->PresetRemoved.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::preset_changed, this), this); - plugin->PresetLoaded.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::preset_changed, this), this); - plugin->PresetDirty.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::preset_changed, this), this); + plugin->PresetAdded.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::preset_changed, this), this); + plugin->PresetRemoved.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::preset_changed, this), this); + plugin->PresetLoaded.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::preset_changed, this), this); + plugin->PresetDirty.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::preset_changed, this), this); if (_auto_pluginui) { pi->ShowUI (); /* EMIT SIGNAL */ @@ -1512,7 +1512,7 @@ FaderPort8::select_plugin (int num) // switching to "Mode Track" -> calls FaderPort8::notify_fader_mode_changed() // which drops the references, disconnects the signal and re-spills tracks - proc->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); + proc->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); // build params _proc_params.clear(); @@ -1570,10 +1570,10 @@ FaderPort8::spill_plugins () // switching to "Mode Track" -> calls FaderPort8::notify_fader_mode_changed() // which drops the references, disconnects the signal and re-spills tracks - r->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); + r->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); // update when processor change - r->processors_changed.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::spill_plugins, this), this); + r->processors_changed.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::spill_plugins, this), this); // count available std::shared_ptr proc; @@ -1644,7 +1644,7 @@ FaderPort8::spill_plugins () break; } std::shared_ptr pi = std::dynamic_pointer_cast (proc); - boost::function cb (boost::bind (&FaderPort8::select_plugin, this, procs[i])); + std::function cb (std::bind (&FaderPort8::select_plugin, this, procs[i])); _ctrls.strip(id).unset_controllables (FP8Strip::CTRL_ALL & ~FP8Strip::CTRL_TEXT & ~FP8Strip::CTRL_SELECT); _ctrls.strip(id).set_select_cb (cb); @@ -1656,7 +1656,7 @@ FaderPort8::spill_plugins () _ctrls.strip(id).set_text_line (2, PluginManager::plugin_type_name (pi->type())); _ctrls.strip(id).set_text_line (3, ""); - pi->ActiveChanged.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::spill_plugins, this), this); + pi->ActiveChanged.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::spill_plugins, this), this); if (++id == spillwidth) { break; @@ -1669,7 +1669,7 @@ FaderPort8::spill_plugins () if (have_well_known_gate) { assert (id < N_STRIPS); - boost::function cb (boost::bind (&FaderPort8::select_plugin, this, -3)); + std::function cb (std::bind (&FaderPort8::select_plugin, this, -3)); _ctrls.strip(id).unset_controllables (FP8Strip::CTRL_ALL & ~FP8Strip::CTRL_TEXT & ~FP8Strip::CTRL_SELECT); _ctrls.strip(id).set_select_cb (cb); _ctrls.strip(id).select_button ().set_color (0xffff00ff); @@ -1683,7 +1683,7 @@ FaderPort8::spill_plugins () } if (have_well_known_eq) { assert (id < N_STRIPS); - boost::function cb (boost::bind (&FaderPort8::select_plugin, this, -1)); + std::function cb (std::bind (&FaderPort8::select_plugin, this, -1)); _ctrls.strip(id).unset_controllables (FP8Strip::CTRL_ALL & ~FP8Strip::CTRL_TEXT & ~FP8Strip::CTRL_SELECT); _ctrls.strip(id).set_select_cb (cb); _ctrls.strip(id).select_button ().set_color (0xffff00ff); @@ -1697,7 +1697,7 @@ FaderPort8::spill_plugins () } if (have_well_known_comp) { assert (id < N_STRIPS); - boost::function cb (boost::bind (&FaderPort8::select_plugin, this, -2)); + std::function cb (std::bind (&FaderPort8::select_plugin, this, -2)); _ctrls.strip(id).unset_controllables (FP8Strip::CTRL_ALL & ~FP8Strip::CTRL_TEXT & ~FP8Strip::CTRL_SELECT); _ctrls.strip(id).set_select_cb (cb); _ctrls.strip(id).select_button ().set_color (0xffff00ff); @@ -1735,7 +1735,7 @@ FaderPort8::assign_sends () } drop_ctrl_connections (); - s->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); + s->DropReferences.connect (processor_connections, MISSING_INVALIDATOR, std::bind (&FP8Controls::set_fader_mode, &_ctrls, ModeTrack), this); set_periodic_display_mode (FP8Strip::SendDisplay); @@ -2060,16 +2060,16 @@ FaderPort8::subscribe_to_strip_signals () std::shared_ptr ac; ac = s->gain_control(); if (ac && ac->alist()) { - ac->alist()->automation_state_changed.connect (route_state_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_route_state_changed, this), this); + ac->alist()->automation_state_changed.connect (route_state_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_route_state_changed, this), this); } ac = s->pan_azimuth_control(); if (ac && ac->alist()) { - ac->alist()->automation_state_changed.connect (route_state_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_route_state_changed, this), this); + ac->alist()->automation_state_changed.connect (route_state_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_route_state_changed, this), this); } #ifdef FADERPORT2 ac = s->rec_enable_control(); if (ac) { - ac->Changed.connect (route_state_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_route_state_changed, this), this); + ac->Changed.connect (route_state_connections, MISSING_INVALIDATOR, std::bind (&FaderPort8::notify_route_state_changed, this), this); } #endif } diff --git a/libs/surfaces/faderport8/faderport8.h b/libs/surfaces/faderport8/faderport8.h index ffc79b5945..cd28c4a770 100644 --- a/libs/surfaces/faderport8/faderport8.h +++ b/libs/surfaces/faderport8/faderport8.h @@ -343,7 +343,7 @@ private: ActionType _type; std::string _action_name; - //boost::function function; // unused + //std::function function; // unused void clear () { diff --git a/libs/surfaces/faderport8/fp8_button.h b/libs/surfaces/faderport8/fp8_button.h index 40960f9537..2a6ccfad69 100644 --- a/libs/surfaces/faderport8/fp8_button.h +++ b/libs/surfaces/faderport8/fp8_button.h @@ -116,7 +116,7 @@ public: void set_blinking (bool yes) { if (yes && !_blinking) { _blinking = true; - _base.BlinkIt.connect_same_thread (_blink_connection, boost::bind (&FP8ButtonBase::blink, this, _1)); + _base.BlinkIt.connect_same_thread (_blink_connection, std::bind (&FP8ButtonBase::blink, this, _1)); } else if (!yes && _blinking) { _blink_connection.disconnect (); _blinking = false; @@ -251,11 +251,11 @@ public: , _rgba (0) , _shift (false) { - _b0.ActiveChanged.connect_same_thread (_button_connections, boost::bind (&FP8DualButton::active_changed, this, false, _1)); - _b1.ActiveChanged.connect_same_thread (_button_connections, boost::bind (&FP8DualButton::active_changed, this, true, _1)); + _b0.ActiveChanged.connect_same_thread (_button_connections, std::bind (&FP8DualButton::active_changed, this, false, _1)); + _b1.ActiveChanged.connect_same_thread (_button_connections, std::bind (&FP8DualButton::active_changed, this, true, _1)); if (_has_color) { - _b0.ColourChanged.connect_same_thread (_button_connections, boost::bind (&FP8DualButton::colour_changed, this, false)); - _b1.ColourChanged.connect_same_thread (_button_connections, boost::bind (&FP8DualButton::colour_changed, this, true)); + _b0.ColourChanged.connect_same_thread (_button_connections, std::bind (&FP8DualButton::colour_changed, this, false)); + _b1.ColourChanged.connect_same_thread (_button_connections, std::bind (&FP8DualButton::colour_changed, this, true)); } } @@ -331,7 +331,7 @@ public: protected: void connect_toggle () { - _base.ShiftButtonChange.connect_same_thread (_shift_connection, boost::bind (&FP8ShiftSensitiveButton::shift_changed, this, _1)); + _base.ShiftButtonChange.connect_same_thread (_shift_connection, std::bind (&FP8ShiftSensitiveButton::shift_changed, this, _1)); } private: @@ -350,7 +350,7 @@ public: protected: void connect_toggle () { - _base.ARMButtonChange.connect_same_thread (_arm_connection, boost::bind (&FP8ARMSensitiveButton::shift_changed, this, _1)); + _base.ARMButtonChange.connect_same_thread (_arm_connection, std::bind (&FP8ARMSensitiveButton::shift_changed, this, _1)); } private: diff --git a/libs/surfaces/faderport8/fp8_controls.cc b/libs/surfaces/faderport8/fp8_controls.cc index 33e9b493cd..0133167e3c 100644 --- a/libs/surfaces/faderport8/fp8_controls.cc +++ b/libs/surfaces/faderport8/fp8_controls.cc @@ -153,12 +153,12 @@ FP8Controls::FP8Controls (FP8Base& b) /* internal bindings */ #define BindMethod(ID, CB) \ - button (ID).released.connect_same_thread (button_connections, boost::bind (&FP8Controls:: CB, this)); + button (ID).released.connect_same_thread (button_connections, std::bind (&FP8Controls:: CB, this)); BindMethod (FP8Controls::BtnTimecode, toggle_timecode); #define BindNav(BTN, MODE)\ - button (BTN).released.connect_same_thread (button_connections, boost::bind (&FP8Controls::set_nav_mode, this, MODE)) + button (BTN).released.connect_same_thread (button_connections, std::bind (&FP8Controls::set_nav_mode, this, MODE)) BindNav (BtnChannel, NavChannel); BindNav (BtnZoom, NavZoom); @@ -172,7 +172,7 @@ FP8Controls::FP8Controls (FP8Base& b) #endif #define BindFader(BTN, MODE)\ - button (BTN).released.connect_same_thread (button_connections, boost::bind (&FP8Controls::set_fader_mode, this, MODE)) + button (BTN).released.connect_same_thread (button_connections, std::bind (&FP8Controls::set_fader_mode, this, MODE)) BindFader (BtnTrack, ModeTrack); BindFader (BtnPlugins, ModePlugins); @@ -183,7 +183,7 @@ FP8Controls::FP8Controls (FP8Base& b) #define BindMix(BTN, MODE)\ - button (BTN).released.connect_same_thread (button_connections, boost::bind (&FP8Controls::set_mix_mode, this, MODE)) + button (BTN).released.connect_same_thread (button_connections, std::bind (&FP8Controls::set_mix_mode, this, MODE)) BindMix (BtnMAudio, MixAudio); BindMix (BtnMVI, MixInstrument); diff --git a/libs/surfaces/faderport8/fp8_strip.cc b/libs/surfaces/faderport8/fp8_strip.cc index 1005a9e20e..4a9dd18c48 100644 --- a/libs/surfaces/faderport8/fp8_strip.cc +++ b/libs/surfaces/faderport8/fp8_strip.cc @@ -109,11 +109,11 @@ FP8Strip::FP8Strip (FP8Base& b, uint8_t id) _last_fader = 65535; _last_meter = _last_redux = _last_barpos = 0xff; - _mute.StateChange.connect_same_thread (_button_connections, boost::bind (&FP8Strip::set_mute, this, _1)); - _solo.StateChange.connect_same_thread (_button_connections, boost::bind (&FP8Strip::set_solo, this, _1)); - select_button ().released.connect_same_thread (_button_connections, boost::bind (&FP8Strip::set_select, this)); - recarm_button ().released.connect_same_thread (_button_connections, boost::bind (&FP8Strip::set_recarm, this)); - b.Periodic.connect_same_thread (_base_connection, boost::bind (&FP8Strip::periodic, this)); + _mute.StateChange.connect_same_thread (_button_connections, std::bind (&FP8Strip::set_mute, this, _1)); + _solo.StateChange.connect_same_thread (_button_connections, std::bind (&FP8Strip::set_solo, this, _1)); + select_button ().released.connect_same_thread (_button_connections, std::bind (&FP8Strip::set_select, this)); + recarm_button ().released.connect_same_thread (_button_connections, std::bind (&FP8Strip::set_recarm, this)); + b.Periodic.connect_same_thread (_base_connection, std::bind (&FP8Strip::periodic, this)); } FP8Strip::~FP8Strip () @@ -141,7 +141,7 @@ FP8Strip::drop_automation_controls () _x_select_ctrl.reset (); _peak_meter.reset (); _redux_ctrl.reset (); - _select_plugin_functor.clear (); + _select_plugin_functor = {}; } void @@ -194,7 +194,7 @@ FP8Strip::initialize () #define GENERATE_SET_CTRL_FUNCTION(NAME) \ void \ -FP8Strip::set_ ##NAME##_controllable (std::shared_ptr ac) \ +FP8Strip::set_ ##NAME##_controllable (std::shared_ptr ac) \ { \ if (_##NAME##_ctrl == ac) { \ return; \ @@ -204,7 +204,7 @@ FP8Strip::set_ ##NAME##_controllable (std::shared_ptr ac) \ if (ac) { \ ac->Changed.connect (_##NAME##_connection, MISSING_INVALIDATOR, \ - boost::bind (&FP8Strip::notify_##NAME##_changed, this), fp8_context()); \ + std::bind (&FP8Strip::notify_##NAME##_changed, this), fp8_context()); \ } \ notify_##NAME##_changed (); \ } @@ -223,12 +223,12 @@ GENERATE_SET_CTRL_FUNCTION (x_select) void FP8Strip::set_select_controllable (std::shared_ptr ac) { - _select_plugin_functor.clear (); + _select_plugin_functor = {}; set_x_select_controllable (ac); } void -FP8Strip::set_select_cb (boost::function& functor) +FP8Strip::set_select_cb (std::function& functor) { set_select_controllable (std::shared_ptr()); _select_plugin_functor = functor; @@ -431,7 +431,7 @@ FP8Strip::set_recarm () void FP8Strip::set_select () { - if (!_select_plugin_functor.empty ()) { + if (_select_plugin_functor) { assert (!_x_select_ctrl); _select_plugin_functor (); } else if (_x_select_ctrl) { @@ -512,13 +512,13 @@ FP8Strip::notify_pan_changed () void FP8Strip::notify_x_select_changed () { - if (!_select_plugin_functor.empty ()) { + if (_select_plugin_functor) { assert (!_x_select_ctrl); return; } if (_x_select_ctrl) { - assert (_select_plugin_functor.empty ()); + assert (!_select_plugin_functor); select_button ().set_active (_x_select_ctrl->get_value() > 0.); select_button ().set_color (0xffff00ff); select_button ().set_blinking (false); diff --git a/libs/surfaces/faderport8/fp8_strip.h b/libs/surfaces/faderport8/fp8_strip.h index 2071e0d726..b722d39118 100644 --- a/libs/surfaces/faderport8/fp8_strip.h +++ b/libs/surfaces/faderport8/fp8_strip.h @@ -83,7 +83,7 @@ public: void initialize (); // call only when connected, sends midi - void set_select_cb (boost::function&); + void set_select_cb (std::function&); enum DisplayMode { Stripables, @@ -156,7 +156,7 @@ private: std::shared_ptr _redux_ctrl; void set_x_select_controllable (std::shared_ptr); - boost::function _select_plugin_functor; + std::function _select_plugin_functor; void drop_automation_controls (); diff --git a/libs/surfaces/faderport8/gui.cc b/libs/surfaces/faderport8/gui.cc index b81ee85593..788e3cae3d 100644 --- a/libs/surfaces/faderport8/gui.cc +++ b/libs/surfaces/faderport8/gui.cc @@ -215,9 +215,9 @@ FP8GUI::FP8GUI (FaderPort8& p) update_port_combos (); /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&FP8GUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&FP8GUI::connection_handler, this), gui_context()); - fp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&FP8GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&FP8GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&FP8GUI::connection_handler, this), gui_context()); + fp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&FP8GUI::connection_handler, this), gui_context()); } FP8GUI::~FP8GUI () diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index 612502964d..c1bf68a5bb 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -125,23 +125,23 @@ GenericMidiControlProtocol::GenericMidiControlProtocol (Session& s) * thread */ - Controllable::StartLearning.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::start_learning, this, _1)); - Controllable::StopLearning.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::stop_learning, this, _1)); + Controllable::StartLearning.connect_same_thread (*this, std::bind (&GenericMidiControlProtocol::start_learning, this, _1)); + Controllable::StopLearning.connect_same_thread (*this, std::bind (&GenericMidiControlProtocol::stop_learning, this, _1)); /* this signal is emitted by the process() callback, and if * send_feedback() is going to do anything, it should do it in the * context of the process() callback itself. */ - Session::SendFeedback.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::send_feedback, this)); + Session::SendFeedback.connect_same_thread (*this, std::bind (&GenericMidiControlProtocol::send_feedback, this)); /* this one is cross-thread */ - PresentationInfo::Change.connect (*this, MISSING_INVALIDATOR, boost::bind (&GenericMidiControlProtocol::reset_controllables, this), this); + PresentationInfo::Change.connect (*this, MISSING_INVALIDATOR, std::bind (&GenericMidiControlProtocol::reset_controllables, this), this); /* Catch port connections and disconnections (cross-thread) */ ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (_port_connection, MISSING_INVALIDATOR, - boost::bind (&GenericMidiControlProtocol::connection_handler, this, _1, _2, _3, _4, _5), + std::bind (&GenericMidiControlProtocol::connection_handler, this, _1, _2, _3, _4, _5), this); reload_maps (); @@ -463,7 +463,7 @@ GenericMidiControlProtocol::start_learning (std::weak_ptr wc) Glib::Threads::Mutex::Lock lm (pending_lock); MIDIPendingControllable* element = new MIDIPendingControllable (mc, own_mc); - c->LearningFinished.connect_same_thread (element->connection, boost::bind (&GenericMidiControlProtocol::learning_stopped, this, mc)); + c->LearningFinished.connect_same_thread (element->connection, std::bind (&GenericMidiControlProtocol::learning_stopped, this, mc)); pending_controllables.push_back (element); } diff --git a/libs/surfaces/generic_midi/gmcp_gui.cc b/libs/surfaces/generic_midi/gmcp_gui.cc index 7b8337c756..d6455a1f87 100644 --- a/libs/surfaces/generic_midi/gmcp_gui.cc +++ b/libs/surfaces/generic_midi/gmcp_gui.cc @@ -246,9 +246,9 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p) update_port_combos (); /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&GMCPGUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&GMCPGUI::connection_handler, this), gui_context()); - cp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&GMCPGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&GMCPGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&GMCPGUI::connection_handler, this), gui_context()); + cp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&GMCPGUI::connection_handler, this), gui_context()); } GMCPGUI::~GMCPGUI () diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc index f7239a3aa3..48c2fea86a 100644 --- a/libs/surfaces/generic_midi/midicontrollable.cc +++ b/libs/surfaces/generic_midi/midicontrollable.cc @@ -150,7 +150,7 @@ MIDIControllable::set_controllable (std::shared_ptr c) last_incoming = 256; if (c) { - c->DropReferences.connect_same_thread (controllable_death_connection, boost::bind (&MIDIControllable::drop_controllable, this)); + c->DropReferences.connect_same_thread (controllable_death_connection, std::bind (&MIDIControllable::drop_controllable, this)); } } @@ -161,7 +161,7 @@ MIDIControllable::bind_remap (std::shared_ptr s) if (!s) { return; } - s->MappedControlsChanged.connect (controllable_remapped_connection, MISSING_INVALIDATOR, boost::bind (&MIDIControllable::lookup_controllable, this), _surface); + s->MappedControlsChanged.connect (controllable_remapped_connection, MISSING_INVALIDATOR, std::bind (&MIDIControllable::lookup_controllable, this), _surface); } void @@ -178,7 +178,7 @@ void MIDIControllable::learn_about_external_control () { drop_external_control (); - _parser.any.connect_same_thread (midi_learn_connection, boost::bind (&MIDIControllable::midi_receiver, this, _1, _2, _3)); + _parser.any.connect_same_thread (midi_learn_connection, std::bind (&MIDIControllable::midi_receiver, this, _1, _2, _3)); } void @@ -587,7 +587,7 @@ MIDIControllable::bind_rpn_value (channel_t chn, uint16_t rpn) drop_external_control (); control_rpn = rpn; control_channel = chn; - _parser.channel_rpn[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::rpn_value_change, this, _1, _2, _3)); + _parser.channel_rpn[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::rpn_value_change, this, _1, _2, _3)); } void @@ -597,7 +597,7 @@ MIDIControllable::bind_nrpn_value (channel_t chn, uint16_t nrpn) drop_external_control (); control_nrpn = nrpn; control_channel = chn; - _parser.channel_nrpn[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::rpn_value_change, this, _1, _2, _3)); + _parser.channel_nrpn[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::rpn_value_change, this, _1, _2, _3)); } void @@ -607,7 +607,7 @@ MIDIControllable::bind_nrpn_change (channel_t chn, uint16_t nrpn) drop_external_control (); control_nrpn = nrpn; control_channel = chn; - _parser.channel_nrpn_change[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::rpn_change, this, _1, _2, _3)); + _parser.channel_nrpn_change[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::rpn_change, this, _1, _2, _3)); } void @@ -617,7 +617,7 @@ MIDIControllable::bind_rpn_change (channel_t chn, uint16_t rpn) drop_external_control (); control_rpn = rpn; control_channel = chn; - _parser.channel_rpn_change[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::nrpn_change, this, _1, _2, _3)); + _parser.channel_rpn_change[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::nrpn_change, this, _1, _2, _3)); } void @@ -634,40 +634,40 @@ MIDIControllable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional) int chn_i = chn; switch (ev) { case MIDI::off: - _parser.channel_note_off[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::midi_sense_note_off, this, _1, _2)); + _parser.channel_note_off[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::midi_sense_note_off, this, _1, _2)); /* if this is a togglee, connect to noteOn as well, and we'll toggle back and forth between the two. */ if (_momentary) { - _parser.channel_note_on[chn_i].connect_same_thread (midi_sense_connection[1], boost::bind (&MIDIControllable::midi_sense_note_on, this, _1, _2)); + _parser.channel_note_on[chn_i].connect_same_thread (midi_sense_connection[1], std::bind (&MIDIControllable::midi_sense_note_on, this, _1, _2)); } _control_description = "MIDI control: NoteOff"; break; case MIDI::on: - _parser.channel_note_on[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::midi_sense_note_on, this, _1, _2)); + _parser.channel_note_on[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::midi_sense_note_on, this, _1, _2)); if (_momentary) { - _parser.channel_note_off[chn_i].connect_same_thread (midi_sense_connection[1], boost::bind (&MIDIControllable::midi_sense_note_off, this, _1, _2)); + _parser.channel_note_off[chn_i].connect_same_thread (midi_sense_connection[1], std::bind (&MIDIControllable::midi_sense_note_off, this, _1, _2)); } _control_description = "MIDI control: NoteOn"; break; case MIDI::controller: - _parser.channel_controller[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::midi_sense_controller, this, _1, _2)); + _parser.channel_controller[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::midi_sense_controller, this, _1, _2)); snprintf (buf, sizeof (buf), "MIDI control: Controller %d", control_additional); _control_description = buf; break; case MIDI::program: - _parser.channel_program_change[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::midi_sense_program_change, this, _1, _2)); + _parser.channel_program_change[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::midi_sense_program_change, this, _1, _2)); _control_description = "MIDI control: ProgramChange"; break; case MIDI::pitchbend: - _parser.channel_pitchbend[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIControllable::midi_sense_pitchbend, this, _1, _2)); + _parser.channel_pitchbend[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIControllable::midi_sense_pitchbend, this, _1, _2)); _control_description = "MIDI control: Pitchbend"; break; diff --git a/libs/surfaces/generic_midi/midiinvokable.cc b/libs/surfaces/generic_midi/midiinvokable.cc index db10aac44a..e47ae4e2dc 100644 --- a/libs/surfaces/generic_midi/midiinvokable.cc +++ b/libs/surfaces/generic_midi/midiinvokable.cc @@ -135,27 +135,27 @@ MIDIInvokable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional) switch (ev) { case MIDI::off: - _parser.channel_note_off[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_note_off, this, _1, _2)); + _parser.channel_note_off[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIInvokable::midi_sense_note_off, this, _1, _2)); break; case MIDI::on: - _parser.channel_note_on[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_note_on, this, _1, _2)); + _parser.channel_note_on[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIInvokable::midi_sense_note_on, this, _1, _2)); break; case MIDI::controller: - _parser.channel_controller[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_controller, this, _1, _2)); + _parser.channel_controller[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIInvokable::midi_sense_controller, this, _1, _2)); break; case MIDI::program: - _parser.channel_program_change[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_program_change, this, _1, _2)); + _parser.channel_program_change[chn_i].connect_same_thread (midi_sense_connection[0], std::bind (&MIDIInvokable::midi_sense_program_change, this, _1, _2)); break; case MIDI::sysex: - _parser.sysex.connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_sysex, this, _1, _2, _3)); + _parser.sysex.connect_same_thread (midi_sense_connection[0], std::bind (&MIDIInvokable::midi_sense_sysex, this, _1, _2, _3)); break; case MIDI::any: - _parser.any.connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_any, this, _1, _2, _3)); + _parser.any.connect_same_thread (midi_sense_connection[0], std::bind (&MIDIInvokable::midi_sense_any, this, _1, _2, _3)); break; default: diff --git a/libs/surfaces/launch_control_xl/controllers.cc b/libs/surfaces/launch_control_xl/controllers.cc index 10b68a09e1..1ec10fc2b9 100644 --- a/libs/surfaces/launch_control_xl/controllers.cc +++ b/libs/surfaces/launch_control_xl/controllers.cc @@ -60,104 +60,104 @@ LaunchControlXL::build_maps () id_knob_map.insert (std::make_pair (knob->id(), knob)); if (!device_mode()) { /* mixer mode */ - MAKE_KNOB (SendA1, 13, 0, RedFull, RedLow, boost::function (boost::bind (&LaunchControlXL::knob_sendA, this, 0))); - MAKE_KNOB (SendA2, 14, 1, YellowFull, YellowLow, boost::function (boost::bind (&LaunchControlXL::knob_sendA, this, 1))); - MAKE_KNOB (SendA3, 15, 2, GreenFull, GreenLow, boost::function (boost::bind (&LaunchControlXL::knob_sendA, this, 2))); - MAKE_KNOB (SendA4, 16, 3, AmberFull, AmberLow, boost::function (boost::bind (&LaunchControlXL::knob_sendA, this, 3))); - MAKE_KNOB (SendA5, 17, 4, RedFull, RedLow, boost::function (boost::bind (&LaunchControlXL::knob_sendA, this, 4))); - MAKE_KNOB (SendA6, 18, 5, YellowFull, YellowLow, boost::function (boost::bind (&LaunchControlXL::knob_sendA, this, 5))); - MAKE_KNOB (SendA7, 19, 6, GreenFull, GreenLow, boost::function (boost::bind (&LaunchControlXL::knob_sendA, this, 6))); - MAKE_KNOB (SendA8, 20, 7, AmberFull, AmberLow, boost::function (boost::bind (&LaunchControlXL::knob_sendA, this, 7))); + MAKE_KNOB (SendA1, 13, 0, RedFull, RedLow, std::function (std::bind (&LaunchControlXL::knob_sendA, this, 0))); + MAKE_KNOB (SendA2, 14, 1, YellowFull, YellowLow, std::function (std::bind (&LaunchControlXL::knob_sendA, this, 1))); + MAKE_KNOB (SendA3, 15, 2, GreenFull, GreenLow, std::function (std::bind (&LaunchControlXL::knob_sendA, this, 2))); + MAKE_KNOB (SendA4, 16, 3, AmberFull, AmberLow, std::function (std::bind (&LaunchControlXL::knob_sendA, this, 3))); + MAKE_KNOB (SendA5, 17, 4, RedFull, RedLow, std::function (std::bind (&LaunchControlXL::knob_sendA, this, 4))); + MAKE_KNOB (SendA6, 18, 5, YellowFull, YellowLow, std::function (std::bind (&LaunchControlXL::knob_sendA, this, 5))); + MAKE_KNOB (SendA7, 19, 6, GreenFull, GreenLow, std::function (std::bind (&LaunchControlXL::knob_sendA, this, 6))); + MAKE_KNOB (SendA8, 20, 7, AmberFull, AmberLow, std::function (std::bind (&LaunchControlXL::knob_sendA, this, 7))); - MAKE_KNOB (SendB1, 29, 8, RedFull, RedLow, boost::function (boost::bind (&LaunchControlXL::knob_sendB, this, 0))); - MAKE_KNOB (SendB2, 30, 9, YellowFull, YellowLow, boost::function (boost::bind (&LaunchControlXL::knob_sendB, this, 1))); - MAKE_KNOB (SendB3, 31, 10, GreenFull, GreenLow, boost::function (boost::bind (&LaunchControlXL::knob_sendB, this, 2))); - MAKE_KNOB (SendB4, 32, 11, AmberFull, AmberLow, boost::function (boost::bind (&LaunchControlXL::knob_sendB, this, 3))); - MAKE_KNOB (SendB5, 33, 12, RedFull, RedLow, boost::function (boost::bind (&LaunchControlXL::knob_sendB, this, 4))); - MAKE_KNOB (SendB6, 34, 13, YellowFull, YellowLow, boost::function (boost::bind (&LaunchControlXL::knob_sendB, this, 5))); - MAKE_KNOB (SendB7, 35, 14, GreenFull, GreenLow, boost::function (boost::bind (&LaunchControlXL::knob_sendB, this, 6))); - MAKE_KNOB (SendB8, 36, 15, AmberFull, AmberLow, boost::function (boost::bind (&LaunchControlXL::knob_sendB, this, 7))); + MAKE_KNOB (SendB1, 29, 8, RedFull, RedLow, std::function (std::bind (&LaunchControlXL::knob_sendB, this, 0))); + MAKE_KNOB (SendB2, 30, 9, YellowFull, YellowLow, std::function (std::bind (&LaunchControlXL::knob_sendB, this, 1))); + MAKE_KNOB (SendB3, 31, 10, GreenFull, GreenLow, std::function (std::bind (&LaunchControlXL::knob_sendB, this, 2))); + MAKE_KNOB (SendB4, 32, 11, AmberFull, AmberLow, std::function (std::bind (&LaunchControlXL::knob_sendB, this, 3))); + MAKE_KNOB (SendB5, 33, 12, RedFull, RedLow, std::function (std::bind (&LaunchControlXL::knob_sendB, this, 4))); + MAKE_KNOB (SendB6, 34, 13, YellowFull, YellowLow, std::function (std::bind (&LaunchControlXL::knob_sendB, this, 5))); + MAKE_KNOB (SendB7, 35, 14, GreenFull, GreenLow, std::function (std::bind (&LaunchControlXL::knob_sendB, this, 6))); + MAKE_KNOB (SendB8, 36, 15, AmberFull, AmberLow, std::function (std::bind (&LaunchControlXL::knob_sendB, this, 7))); - MAKE_KNOB (Pan1, 49, 16, RedFull, RedLow, boost::function (boost::bind (&LaunchControlXL::knob_pan, this, 0))); - MAKE_KNOB (Pan2, 50, 17, YellowFull, YellowLow, boost::function (boost::bind (&LaunchControlXL::knob_pan, this, 1))); - MAKE_KNOB (Pan3, 51, 18, GreenFull, GreenLow, boost::function (boost::bind (&LaunchControlXL::knob_pan, this, 2))); - MAKE_KNOB (Pan4, 52, 19, AmberFull, AmberLow, boost::function (boost::bind (&LaunchControlXL::knob_pan, this, 3))); - MAKE_KNOB (Pan5, 53, 20, RedFull, RedLow, boost::function (boost::bind (&LaunchControlXL::knob_pan, this, 4))); - MAKE_KNOB (Pan6, 54, 21, YellowFull, YellowLow, boost::function (boost::bind (&LaunchControlXL::knob_pan, this, 5))); - MAKE_KNOB (Pan7, 55, 22, GreenFull, GreenLow, boost::function (boost::bind (&LaunchControlXL::knob_pan, this, 6))); - MAKE_KNOB (Pan8, 56, 23, AmberFull, AmberLow, boost::function (boost::bind (&LaunchControlXL::knob_pan, this, 7))); + MAKE_KNOB (Pan1, 49, 16, RedFull, RedLow, std::function (std::bind (&LaunchControlXL::knob_pan, this, 0))); + MAKE_KNOB (Pan2, 50, 17, YellowFull, YellowLow, std::function (std::bind (&LaunchControlXL::knob_pan, this, 1))); + MAKE_KNOB (Pan3, 51, 18, GreenFull, GreenLow, std::function (std::bind (&LaunchControlXL::knob_pan, this, 2))); + MAKE_KNOB (Pan4, 52, 19, AmberFull, AmberLow, std::function (std::bind (&LaunchControlXL::knob_pan, this, 3))); + MAKE_KNOB (Pan5, 53, 20, RedFull, RedLow, std::function (std::bind (&LaunchControlXL::knob_pan, this, 4))); + MAKE_KNOB (Pan6, 54, 21, YellowFull, YellowLow, std::function (std::bind (&LaunchControlXL::knob_pan, this, 5))); + MAKE_KNOB (Pan7, 55, 22, GreenFull, GreenLow, std::function (std::bind (&LaunchControlXL::knob_pan, this, 6))); + MAKE_KNOB (Pan8, 56, 23, AmberFull, AmberLow, std::function (std::bind (&LaunchControlXL::knob_pan, this, 7))); } else { /* device mode */ #ifdef MIXBUS // from here Mixbus Standard + 32C - MAKE_DM_KNOB (SendB5, 33, 12, RedFull, RedLow, boost::function - (boost::bind (&LaunchControlXL::dm_trim, this, SendB5)), - boost::bind(&LaunchControlXL::dm_check_trim, this)); - MAKE_DM_KNOB (SendB6, 34, 13, GreenFull, GreenLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_comp, this, SendB6, CompMakeup)), - boost::bind(&LaunchControlXL::dm_mb_comp_enabled,this)); - MAKE_DM_KNOB (SendB8, 36, 15, GreenFull, GreenLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_comp, this, SendB8, CompMode)), - boost::bind(&LaunchControlXL::dm_mb_comp_enabled, this)); + MAKE_DM_KNOB (SendB5, 33, 12, RedFull, RedLow, std::function + (std::bind (&LaunchControlXL::dm_trim, this, SendB5)), + std::bind(&LaunchControlXL::dm_check_trim, this)); + MAKE_DM_KNOB (SendB6, 34, 13, GreenFull, GreenLow, std::function + (std::bind (&LaunchControlXL::dm_mb_comp, this, SendB6, CompMakeup)), + std::bind(&LaunchControlXL::dm_mb_comp_enabled,this)); + MAKE_DM_KNOB (SendB8, 36, 15, GreenFull, GreenLow, std::function + (std::bind (&LaunchControlXL::dm_mb_comp, this, SendB8, CompMode)), + std::bind(&LaunchControlXL::dm_mb_comp_enabled, this)); /* Pan Knobs -> Sends */ for (uint8_t i = 0; i < 8; ++i) { - MAKE_DM_KNOB (static_cast(i + 16), (i + 49), (i + 16), GreenLow, YellowLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_sends, this, static_cast(i + 16))), - boost::function (boost::bind(&LaunchControlXL::dm_mb_check_send_knob, this, static_cast(i + 16)))); + MAKE_DM_KNOB (static_cast(i + 16), (i + 49), (i + 16), GreenLow, YellowLow, std::function + (std::bind (&LaunchControlXL::dm_mb_sends, this, static_cast(i + 16))), + std::function (std::bind(&LaunchControlXL::dm_mb_check_send_knob, this, static_cast(i + 16)))); } if (first_selected_stripable() && (first_selected_stripable()->is_master() || first_selected_stripable()->mixbus())) { - MAKE_DM_KNOB (SendA1, 13, 0, AmberFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA1, true, 0)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 0))); - MAKE_DM_KNOB (SendA2, 14, 1, AmberFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA2, true, 1)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 1))); - MAKE_DM_KNOB (SendA3, 15, 2, AmberFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA3, true, 2)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 2))); - MAKE_DM_KNOB (SendA6, 18, 5, RedLow, RedLow, boost::function - (boost::bind (&LaunchControlXL::dm_pan_width, this, SendA6)), - boost::bind(&LaunchControlXL::dm_check_pan_width, this)); - MAKE_DM_KNOB (SendA7, 19, 6, AmberLow, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_tapedrive, this, SendA7)), - boost::bind(&LaunchControlXL::dm_mb_has_tapedrive, this)); + MAKE_DM_KNOB (SendA1, 13, 0, AmberFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA1, true, 0)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 0))); + MAKE_DM_KNOB (SendA2, 14, 1, AmberFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA2, true, 1)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 1))); + MAKE_DM_KNOB (SendA3, 15, 2, AmberFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA3, true, 2)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 2))); + MAKE_DM_KNOB (SendA6, 18, 5, RedLow, RedLow, std::function + (std::bind (&LaunchControlXL::dm_pan_width, this, SendA6)), + std::bind(&LaunchControlXL::dm_check_pan_width, this)); + MAKE_DM_KNOB (SendA7, 19, 6, AmberLow, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_tapedrive, this, SendA7)), + std::bind(&LaunchControlXL::dm_mb_has_tapedrive, this)); } else { - MAKE_DM_KNOB (SendA1, 13, 0, AmberFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA1, false, 0)), - boost::bind(&LaunchControlXL::dm_mb_eq_freq_enabled, this)); - MAKE_DM_KNOB (SendA2, 14, 1, AmberFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA2, true, 0)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 0))); - MAKE_DM_KNOB (SendA3, 15, 2, YellowLow, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA3, false, 1)), - boost::bind(&LaunchControlXL::dm_mb_eq_freq_enabled, this)); - MAKE_DM_KNOB (SendA4, 16, 3, YellowLow, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA4, true, 1)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 1))); - MAKE_DM_KNOB (SendA5, 17, 4, AmberFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA5, false, 2)), - boost::bind(&LaunchControlXL::dm_mb_eq_freq_enabled, this)); - MAKE_DM_KNOB (SendA6, 18, 5, AmberFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA6, true, 2)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 2))); - MAKE_DM_KNOB (SendA7, 19, 6, YellowLow, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA7, false, 3)), - boost::bind(&LaunchControlXL::dm_mb_eq_freq_enabled, this)); - MAKE_DM_KNOB (SendA8, 20, 7, YellowLow, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_eq, this, SendA8, true, 3)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 3))); + MAKE_DM_KNOB (SendA1, 13, 0, AmberFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA1, false, 0)), + std::bind(&LaunchControlXL::dm_mb_eq_freq_enabled, this)); + MAKE_DM_KNOB (SendA2, 14, 1, AmberFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA2, true, 0)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 0))); + MAKE_DM_KNOB (SendA3, 15, 2, YellowLow, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA3, false, 1)), + std::bind(&LaunchControlXL::dm_mb_eq_freq_enabled, this)); + MAKE_DM_KNOB (SendA4, 16, 3, YellowLow, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA4, true, 1)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 1))); + MAKE_DM_KNOB (SendA5, 17, 4, AmberFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA5, false, 2)), + std::bind(&LaunchControlXL::dm_mb_eq_freq_enabled, this)); + MAKE_DM_KNOB (SendA6, 18, 5, AmberFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA6, true, 2)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 2))); + MAKE_DM_KNOB (SendA7, 19, 6, YellowLow, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA7, false, 3)), + std::bind(&LaunchControlXL::dm_mb_eq_freq_enabled, this)); + MAKE_DM_KNOB (SendA8, 20, 7, YellowLow, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_eq, this, SendA8, true, 3)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 3))); } - MAKE_DM_KNOB (SendB1, 29, 8, YellowFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_flt_frq, this, SendB1, true)), - boost::bind(&LaunchControlXL::dm_mb_flt_enabled, this)); - MAKE_DM_KNOB (SendB2, 30, 9, YellowFull, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_mb_flt_frq, this, SendB2, false)), - boost::bind(&LaunchControlXL::dm_mb_flt_enabled, this)); - MAKE_DM_KNOB (SendB4, 32, 11, RedLow, AmberLow, boost::function - (boost::bind (&LaunchControlXL::dm_pan_azi, this, SendB4)), - boost::bind(&LaunchControlXL::dm_check_pan_azi, this)); + MAKE_DM_KNOB (SendB1, 29, 8, YellowFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_flt_frq, this, SendB1, true)), + std::bind(&LaunchControlXL::dm_mb_flt_enabled, this)); + MAKE_DM_KNOB (SendB2, 30, 9, YellowFull, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_mb_flt_frq, this, SendB2, false)), + std::bind(&LaunchControlXL::dm_mb_flt_enabled, this)); + MAKE_DM_KNOB (SendB4, 32, 11, RedLow, AmberLow, std::function + (std::bind (&LaunchControlXL::dm_pan_azi, this, SendB4)), + std::bind(&LaunchControlXL::dm_check_pan_azi, this)); #else // from here Ardour #endif @@ -174,16 +174,16 @@ LaunchControlXL::build_maps () if (!device_mode()) { /* mix mode */ for (uint8_t i = 0; i < 8; ++i) { - MAKE_FADER(static_cast(i), i+77, boost::function - (boost::bind (&LaunchControlXL::fader, this, i))); + MAKE_FADER(static_cast(i), i+77, std::function + (std::bind (&LaunchControlXL::fader, this, i))); } } else { /* device mode */ - MAKE_FADER(Fader1, 77, boost::function - (boost::bind (&LaunchControlXL::dm_fader, this, Fader1))); + MAKE_FADER(Fader1, 77, std::function + (std::bind (&LaunchControlXL::dm_fader, this, Fader1))); #ifdef MIXBUS - MAKE_FADER(Fader2, 78, boost::function - (boost::bind (&LaunchControlXL::dm_mb_comp_thresh, this, Fader2))); + MAKE_FADER(Fader2, 78, std::function + (std::bind (&LaunchControlXL::dm_mb_comp_thresh, this, Fader2))); #endif } @@ -194,22 +194,22 @@ LaunchControlXL::build_maps () #define MAKE_TRACK_BUTTON_PRESS(i,nn,index,c_on,c_off,p,check) \ note_button.reset (new TrackButton ((i), (nn), (index), (c_on), (c_off), (p), \ - boost::bind(&LaunchControlXL::relax, this), boost::bind(&LaunchControlXL::relax, this), (check), (*this))); \ + std::bind(&LaunchControlXL::relax, this), std::bind(&LaunchControlXL::relax, this), (check), (*this))); \ nn_note_button_map.insert (std::make_pair (note_button->note_number(), note_button)); \ id_note_button_map.insert (std::make_pair (note_button->id(), note_button)) #define MAKE_CTRL_BUTTON_PRESS(i,nn,index,c_on,c_off,p,check) \ note_button.reset (new TrackButton ((i), (nn), (index), (c_on), (c_off), (p), \ - boost::bind(&LaunchControlXL::relax, this), boost::bind(&LaunchControlXL::relax, this), (check), (*this))); \ + std::bind(&LaunchControlXL::relax, this), std::bind(&LaunchControlXL::relax, this), (check), (*this))); \ nn_note_button_map.insert (std::make_pair (note_button->note_number(), note_button)); \ id_note_button_map.insert (std::make_pair (note_button->id(), note_button)) #define MAKE_SELECT_BUTTON_PRESS(i,cc,index,p) \ controller_button.reset (new SelectButton ((i), (cc), (index), (p), \ - boost::bind(&LaunchControlXL::relax, this), boost::bind(&LaunchControlXL::relax, this), (*this))); \ + std::bind(&LaunchControlXL::relax, this), std::bind(&LaunchControlXL::relax, this), (*this))); \ cc_controller_button_map.insert (std::make_pair (controller_button->controller_number(), controller_button)); \ id_controller_button_map.insert (std::make_pair (controller_button->id(), controller_button)) #define MAKE_TRACK_STATE_BUTTON_PRESS(i,nn,index,p) \ note_button.reset (new TrackStateButton ((i), (nn), (index), (p), \ - boost::bind(&LaunchControlXL::relax, this), boost::bind(&LaunchControlXL::relax, this), (*this))); \ + std::bind(&LaunchControlXL::relax, this), std::bind(&LaunchControlXL::relax, this), (*this))); \ nn_note_button_map.insert (std::make_pair (note_button->note_number(), note_button)); \ id_note_button_map.insert (std::make_pair (note_button->id(), note_button)) #define MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(i,nn,index, p,r,l) \ @@ -221,29 +221,29 @@ LaunchControlXL::build_maps () if (!device_mode()) { /* mixer mode */ for (uint8_t i = 0; i < 4; ++i) { MAKE_TRACK_BUTTON_PRESS(static_cast(i), i+41, i+24, YellowFull, YellowLow, - boost::function (boost::bind (&LaunchControlXL::button_track_focus, this, i)), - boost::function (boost::bind (&LaunchControlXL::dm_check_dummy, this, dev_nonexistant))); + std::function (std::bind (&LaunchControlXL::button_track_focus, this, i)), + std::function (std::bind (&LaunchControlXL::dm_check_dummy, this, dev_nonexistant))); } for (uint8_t i = 0; i < 4; ++i) { MAKE_TRACK_BUTTON_PRESS(static_cast(i+4), i+57, i+28, YellowFull, YellowLow, - boost::function (boost::bind (&LaunchControlXL::button_track_focus, this, i+4)), - boost::function (boost::bind (&LaunchControlXL::dm_check_dummy, this, dev_nonexistant))); + std::function (std::bind (&LaunchControlXL::button_track_focus, this, i+4)), + std::function (std::bind (&LaunchControlXL::dm_check_dummy, this, dev_nonexistant))); } } else { /* device mode */ #ifdef MIXBUS for (uint8_t i = 0; i < 4; ++i) { MAKE_TRACK_BUTTON_PRESS(static_cast(i), i+41, i+24, GreenFull, YellowLow, - boost::function (boost::bind (&LaunchControlXL::dm_mb_send_switch, this, static_cast(i))), - boost::function (boost::bind (&LaunchControlXL::dm_mb_check_send_button, this, i))); + std::function (std::bind (&LaunchControlXL::dm_mb_send_switch, this, static_cast(i))), + std::function (std::bind (&LaunchControlXL::dm_mb_check_send_button, this, i))); } for (uint8_t i = 0; i < 4; ++i) { MAKE_TRACK_BUTTON_PRESS(static_cast(i+4), i+57, i+28, GreenFull, YellowLow, - boost::function (boost::bind (&LaunchControlXL::dm_mb_send_switch, this, static_cast(i+4))), - boost::function (boost::bind (&LaunchControlXL::dm_mb_check_send_button, this, i+4))); + std::function (std::bind (&LaunchControlXL::dm_mb_send_switch, this, static_cast(i+4))), + std::function (std::bind (&LaunchControlXL::dm_mb_check_send_button, this, i+4))); } #endif } @@ -252,36 +252,36 @@ LaunchControlXL::build_maps () /* Control Buttons in mix mode change their color dynamically so we won't set them here */ for (uint8_t i = 0; i < 4; ++i) { MAKE_CTRL_BUTTON_PRESS(static_cast(i+8), i+73, i+32, Off, Off, - boost::function (boost::bind (&LaunchControlXL::button_press_track_control, this, i)), - boost::function (boost::bind (&LaunchControlXL::dm_check_dummy, this, dev_nonexistant))); + std::function (std::bind (&LaunchControlXL::button_press_track_control, this, i)), + std::function (std::bind (&LaunchControlXL::dm_check_dummy, this, dev_nonexistant))); } for (uint8_t i = 0; i < 4; ++i) { MAKE_CTRL_BUTTON_PRESS(static_cast(i+12), i+89, i+36, Off, Off, - boost::function (boost::bind (&LaunchControlXL::button_press_track_control, this, i+4)), - boost::function (boost::bind (&LaunchControlXL::dm_check_dummy, this, dev_nonexistant))); + std::function (std::bind (&LaunchControlXL::button_press_track_control, this, i+4)), + std::function (std::bind (&LaunchControlXL::dm_check_dummy, this, dev_nonexistant))); } } else { /*device mode */ #ifdef MIXBUS // from here Mixbus Standard + 32C - MAKE_CTRL_BUTTON_PRESS(Control1, 73, 32, YellowFull, YellowLow, (boost::bind (&LaunchControlXL::dm_mute_switch, this)), - boost::bind (&LaunchControlXL::dm_mute_enabled, this)); - MAKE_CTRL_BUTTON_PRESS(Control2, 74, 33, GreenFull, GreenLow, (boost::bind (&LaunchControlXL::dm_solo_switch, this)), - boost::bind (&LaunchControlXL::dm_solo_enabled, this)); - MAKE_CTRL_BUTTON_PRESS(Control3, 75, 34, AmberFull, AmberLow, (boost::bind (&LaunchControlXL::dm_mb_eq_switch, this)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 0))); + MAKE_CTRL_BUTTON_PRESS(Control1, 73, 32, YellowFull, YellowLow, (std::bind (&LaunchControlXL::dm_mute_switch, this)), + std::bind (&LaunchControlXL::dm_mute_enabled, this)); + MAKE_CTRL_BUTTON_PRESS(Control2, 74, 33, GreenFull, GreenLow, (std::bind (&LaunchControlXL::dm_solo_switch, this)), + std::bind (&LaunchControlXL::dm_solo_enabled, this)); + MAKE_CTRL_BUTTON_PRESS(Control3, 75, 34, AmberFull, AmberLow, (std::bind (&LaunchControlXL::dm_mb_eq_switch, this)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_gain_enabled, this, 0))); MAKE_CTRL_BUTTON_PRESS(Control4, 76, 35, AmberFull, AmberLow, - boost::function (boost::bind (&LaunchControlXL::dm_mb_eq_shape_switch, this, 0)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_shape_enabled, this, 0 ))); + std::function (std::bind (&LaunchControlXL::dm_mb_eq_shape_switch, this, 0)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_shape_enabled, this, 0 ))); MAKE_CTRL_BUTTON_PRESS(Control5, 89, 36, AmberFull, AmberLow, - boost::function (boost::bind (&LaunchControlXL::dm_mb_eq_shape_switch, this, 3)), - boost::function (boost::bind(&LaunchControlXL::dm_mb_eq_shape_enabled, this, 3 ))); - MAKE_CTRL_BUTTON_PRESS(Control6, 90, 37, YellowFull, YellowLow, (boost::bind (&LaunchControlXL::dm_mb_flt_switch, this)), - boost::bind(&LaunchControlXL::dm_mb_flt_enabled, this)); - MAKE_CTRL_BUTTON_PRESS(Control7, 91, 38, GreenFull, GreenLow, (boost::bind (&LaunchControlXL::dm_mb_master_assign_switch, this)), - boost::bind(&LaunchControlXL::dm_mb_master_assign_enabled, this)); - MAKE_CTRL_BUTTON_PRESS(Control8, 92, 39, GreenFull, GreenLow, (boost::bind (&LaunchControlXL::dm_mb_comp_switch, this)), - boost::bind(&LaunchControlXL::dm_mb_comp_enabled, this)); + std::function (std::bind (&LaunchControlXL::dm_mb_eq_shape_switch, this, 3)), + std::function (std::bind(&LaunchControlXL::dm_mb_eq_shape_enabled, this, 3 ))); + MAKE_CTRL_BUTTON_PRESS(Control6, 90, 37, YellowFull, YellowLow, (std::bind (&LaunchControlXL::dm_mb_flt_switch, this)), + std::bind(&LaunchControlXL::dm_mb_flt_enabled, this)); + MAKE_CTRL_BUTTON_PRESS(Control7, 91, 38, GreenFull, GreenLow, (std::bind (&LaunchControlXL::dm_mb_master_assign_switch, this)), + std::bind(&LaunchControlXL::dm_mb_master_assign_enabled, this)); + MAKE_CTRL_BUTTON_PRESS(Control8, 92, 39, GreenFull, GreenLow, (std::bind (&LaunchControlXL::dm_mb_comp_switch, this)), + std::bind(&LaunchControlXL::dm_mb_comp_enabled, this)); #else // Ardour #endif } @@ -289,38 +289,38 @@ LaunchControlXL::build_maps () /* Select and Mode Buttons on the right side */ /* Sends Select buttons are independent of mode */ - MAKE_SELECT_BUTTON_PRESS(SelectUp, 104, 44, boost::function (boost::bind (&LaunchControlXL::send_bank_switch, this, false))); - MAKE_SELECT_BUTTON_PRESS(SelectDown, 105, 45, boost::function (boost::bind (&LaunchControlXL::send_bank_switch, this, true))); + MAKE_SELECT_BUTTON_PRESS(SelectUp, 104, 44, std::function (std::bind (&LaunchControlXL::send_bank_switch, this, false))); + MAKE_SELECT_BUTTON_PRESS(SelectDown, 105, 45, std::function (std::bind (&LaunchControlXL::send_bank_switch, this, true))); /* Device Button needs to be always there */ MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Device, 105, 40, - boost::bind (&LaunchControlXL::relax, this) , - boost::bind (&LaunchControlXL::button_device, this), - boost::bind (&LaunchControlXL::button_device_long_press, this)); + std::bind (&LaunchControlXL::relax, this) , + std::bind (&LaunchControlXL::button_device, this), + std::bind (&LaunchControlXL::button_device_long_press, this)); /* Cancel all mute / solo is available in both modes */ MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Mute, 106, 41, - boost::bind (&LaunchControlXL::relax, this) , - boost::bind (&LaunchControlXL::button_mute, this), - boost::bind (&LaunchControlXL::button_mute_long_press, this)); + std::bind (&LaunchControlXL::relax, this) , + std::bind (&LaunchControlXL::button_mute, this), + std::bind (&LaunchControlXL::button_mute_long_press, this)); MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Solo, 107, 42, - boost::bind (&LaunchControlXL::relax, this) , - boost::bind (&LaunchControlXL::button_solo, this), - boost::bind (&LaunchControlXL::button_solo_long_press, this)); + std::bind (&LaunchControlXL::relax, this) , + std::bind (&LaunchControlXL::button_solo, this), + std::bind (&LaunchControlXL::button_solo_long_press, this)); if (!device_mode()) { /* mixer mode */ - MAKE_SELECT_BUTTON_PRESS(SelectLeft, 106, 46, boost::bind (&LaunchControlXL::button_select_left, this)); - MAKE_SELECT_BUTTON_PRESS(SelectRight, 107, 47, boost::bind (&LaunchControlXL::button_select_right, this)); + MAKE_SELECT_BUTTON_PRESS(SelectLeft, 106, 46, std::bind (&LaunchControlXL::button_select_left, this)); + MAKE_SELECT_BUTTON_PRESS(SelectRight, 107, 47, std::bind (&LaunchControlXL::button_select_right, this)); - MAKE_TRACK_STATE_BUTTON_PRESS(Record, 108, 43, boost::bind (&LaunchControlXL::button_record, this)); + MAKE_TRACK_STATE_BUTTON_PRESS(Record, 108, 43, std::bind (&LaunchControlXL::button_record, this)); } else { /* device mode */ - MAKE_SELECT_BUTTON_PRESS(SelectLeft, 106, 46, boost::bind (&LaunchControlXL::dm_select_prev_strip, this)); - MAKE_SELECT_BUTTON_PRESS(SelectRight, 107, 47, boost::bind (&LaunchControlXL::dm_select_next_strip, this)); + MAKE_SELECT_BUTTON_PRESS(SelectLeft, 106, 46, std::bind (&LaunchControlXL::dm_select_prev_strip, this)); + MAKE_SELECT_BUTTON_PRESS(SelectRight, 107, 47, std::bind (&LaunchControlXL::dm_select_next_strip, this)); } } diff --git a/libs/surfaces/launch_control_xl/gui.cc b/libs/surfaces/launch_control_xl/gui.cc index aa91dfc2d2..69ca90f510 100644 --- a/libs/surfaces/launch_control_xl/gui.cc +++ b/libs/surfaces/launch_control_xl/gui.cc @@ -162,9 +162,9 @@ LCXLGUI::LCXLGUI (LaunchControlXL& p) /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&LCXLGUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&LCXLGUI::connection_handler, this), gui_context()); - lcxl.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&LCXLGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&LCXLGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&LCXLGUI::connection_handler, this), gui_context()); + lcxl.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&LCXLGUI::connection_handler, this), gui_context()); } LCXLGUI::~LCXLGUI () diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc index 9e15164820..af77e5f225 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.cc +++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc @@ -102,10 +102,10 @@ LaunchControlXL::LaunchControlXL (ARDOUR::Session& s) ports_acquire (); /* Catch port connections and disconnections */ - ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::connection_handler, this, _1, _2, _3, _4, _5), this); + ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::connection_handler, this, _1, _2, _3, _4, _5), this); - session->RouteAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl); - session->vca_manager().VCAAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl); + session->RouteAdded.connect (session_connections, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::stripables_added, this), lcxl); + session->vca_manager().VCAAdded.connect (session_connections, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::stripables_added, this), lcxl); } LaunchControlXL::~LaunchControlXL () @@ -514,15 +514,15 @@ LaunchControlXL::connect_to_parser () MIDI::Parser* p = _input_port->parser(); /* Incoming sysex */ - p->sysex.connect_same_thread (*this, boost::bind (&LaunchControlXL::handle_midi_sysex, this, _1, _2, _3)); + p->sysex.connect_same_thread (*this, std::bind (&LaunchControlXL::handle_midi_sysex, this, _1, _2, _3)); for (MIDI::channel_t n = 0; n < 16; ++n) { /* Controller */ - p->channel_controller[(int)n].connect_same_thread (*this, boost::bind (&LaunchControlXL::handle_midi_controller_message, this, _1, _2, n)); + p->channel_controller[(int)n].connect_same_thread (*this, std::bind (&LaunchControlXL::handle_midi_controller_message, this, _1, _2, n)); /* Button messages are NoteOn */ - p->channel_note_on[(int)n].connect_same_thread (*this, boost::bind (&LaunchControlXL::handle_midi_note_on_message, this, _1, _2, n)); + p->channel_note_on[(int)n].connect_same_thread (*this, std::bind (&LaunchControlXL::handle_midi_note_on_message, this, _1, _2, n)); /* Button messages are NoteOn but libmidi++ sends note-on w/velocity = 0 as note-off so catch them too */ - p->channel_note_off[(int)n].connect_same_thread (*this, boost::bind (&LaunchControlXL::handle_midi_note_off_message, this, _1, _2, n)); + p->channel_note_off[(int)n].connect_same_thread (*this, std::bind (&LaunchControlXL::handle_midi_note_off_message, this, _1, _2, n)); } } @@ -675,16 +675,16 @@ void LaunchControlXL::connect_session_signals() { // receive transport state changed - session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_transport_state_changed, this), this); - session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_loop_state_changed, this), this); + session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::notify_transport_state_changed, this), this); + session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::notify_loop_state_changed, this), this); // receive punch-in and punch-out - Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_parameter_changed, this, _1), this); - session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_parameter_changed, this, _1), this); + Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::notify_parameter_changed, this, _1), this); + session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::notify_parameter_changed, this, _1), this); // receive rude solo changed - //session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_solo_active_changed, this, _1), this); + //session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::notify_solo_active_changed, this, _1), this); // receive record state toggled - //session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::notify_record_state_changed, this), this); + //session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&LaunchControlXL::notify_record_state_changed, this), this); } @@ -1122,26 +1122,26 @@ LaunchControlXL::switch_bank (uint32_t base) DEBUG_TRACE (DEBUG::LaunchControlXL, string_compose ("Binding Callbacks stripable[%1] exists\n", n)); stripable[n]->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, - boost::bind (&LaunchControlXL::switch_bank, this, bank_start), lcxl); + std::bind (&LaunchControlXL::switch_bank, this, bank_start), lcxl); stripable[n]->presentation_info().PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, - boost::bind (&LaunchControlXL::stripable_property_change, this, _1, n), lcxl); + std::bind (&LaunchControlXL::stripable_property_change, this, _1, n), lcxl); stripable[n]->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, - boost::bind (&LaunchControlXL::solo_changed, this, n), lcxl); + std::bind (&LaunchControlXL::solo_changed, this, n), lcxl); stripable[n]->mute_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, - boost::bind (&LaunchControlXL::mute_changed, this, n), lcxl); + std::bind (&LaunchControlXL::mute_changed, this, n), lcxl); if (stripable[n]->solo_isolate_control()) { /*VCAs are stripables without isolate solo */ stripable[n]->solo_isolate_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, - boost::bind (&LaunchControlXL::solo_iso_changed, this,n ), lcxl); + std::bind (&LaunchControlXL::solo_iso_changed, this,n ), lcxl); } #ifdef MIXBUS if (stripable[n]->master_send_enable_controllable()) { stripable[n]->master_send_enable_controllable()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, - boost::bind (&LaunchControlXL::master_send_changed, this,n ), lcxl); + std::bind (&LaunchControlXL::master_send_changed, this,n ), lcxl); } #endif if (stripable[n]->rec_enable_control()) { stripable[n]->rec_enable_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, - boost::bind (&LaunchControlXL::rec_changed, this, n), lcxl); + std::bind (&LaunchControlXL::rec_changed, this, n), lcxl); } @@ -1163,47 +1163,47 @@ LaunchControlXL::init_dm_callbacks() } if (first_selected_stripable()->mute_control()) { first_selected_stripable()->mute_control()->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_buttons),this), lcxl); } if (first_selected_stripable()->solo_control()) { first_selected_stripable()->solo_control()->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_buttons),this), lcxl); } if (first_selected_stripable()->rec_enable_control()) { first_selected_stripable()->rec_enable_control()->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_buttons),this), lcxl); } #ifdef MIXBUS if (first_selected_stripable()->mapped_control(EQ_Enable)) { first_selected_stripable()->mapped_control(EQ_Enable)->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_knobs_and_buttons,this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_knobs_and_buttons),this), lcxl); } if (first_selected_stripable()->mapped_control (EQ_BandShape, 0)) { first_selected_stripable()->mapped_control (EQ_BandShape, 0)->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_buttons),this), lcxl); } if (first_selected_stripable()->mapped_control (EQ_BandShape, 3)) { first_selected_stripable()->mapped_control (EQ_BandShape, 3)->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_buttons),this), lcxl); } if (first_selected_stripable()->mapped_control (Comp_Enable)) { first_selected_stripable()->mapped_control (Comp_Enable)->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_knobs_and_buttons,this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_knobs_and_buttons),this), lcxl); } if (first_selected_stripable()->mapped_control (HPF_Enable)) { // only handle one case, as Mixbus only has one first_selected_stripable()->mapped_control (HPF_Enable)->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_knobs_and_buttons, this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_knobs_and_buttons), this), lcxl); } if (first_selected_stripable()->master_send_enable_controllable()) { first_selected_stripable()->master_send_enable_controllable()->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_knobs_and_buttons, this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_knobs_and_buttons), this), lcxl); } for (uint8_t se = 0; se < 12 ; ++se) { if (first_selected_stripable()->send_enable_controllable(se)) { first_selected_stripable()->send_enable_controllable(se)->Changed.connect (stripable_connections, - MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_knobs_and_buttons, this), lcxl); + MISSING_INVALIDATOR, std::bind (static_cast(&LaunchControlXL::init_knobs_and_buttons), this), lcxl); } } #endif diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.h b/libs/surfaces/launch_control_xl/launch_control_xl.h index 260045249b..6262ef0e66 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.h +++ b/libs/surfaces/launch_control_xl/launch_control_xl.h @@ -157,7 +157,7 @@ public: #endif struct Controller { - Controller(uint8_t cn, uint8_t val, boost::function action) + Controller(uint8_t cn, uint8_t val, std::function action) : _controller_number(cn) , _value(val) , action_method(action) {} @@ -171,7 +171,7 @@ public: uint8_t _value; public: - boost::function action_method; + std::function action_method; }; struct LED { @@ -203,8 +203,8 @@ public: }; struct Button { - Button(ButtonID id, boost::function press, boost::function release, - boost::function long_press) + Button(ButtonID id, std::function press, std::function release, + std::function long_press) : press_method(press) , release_method(release) , long_press_method(long_press), @@ -214,9 +214,9 @@ public: ButtonID id() const { return _id; } - boost::function press_method; - boost::function release_method; - boost::function long_press_method; + std::function press_method; + std::function release_method; + std::function long_press_method; sigc::connection timeout_connection; @@ -226,9 +226,9 @@ public: struct ControllerButton : public Button { ControllerButton(ButtonID id, uint8_t cn, - boost::function press, - boost::function release, - boost::function long_release) + std::function press, + std::function release, + std::function long_release) : Button(id, press, release, long_release), _controller_number(cn) {} @@ -241,9 +241,9 @@ public: struct NoteButton : public Button { NoteButton(ButtonID id, uint8_t cn, - boost::function press, - boost::function release, - boost::function release_long) + std::function press, + std::function release, + std::function release_long) : Button(id, press, release, release_long), _note_number(cn) {} uint8_t note_number() const { return _note_number; } @@ -254,10 +254,10 @@ public: struct TrackButton : public NoteButton, public MultiColorLED { TrackButton(ButtonID id, uint8_t nn, uint8_t index, LEDColor c_on, LEDColor c_off, - boost::function press, - boost::function release, - boost::function release_long, - boost::function check, + std::function press, + std::function release, + std::function release_long, + std::function check, LaunchControlXL& l) : NoteButton(id, nn, press, release, release_long) , MultiColorLED(index, Off, l) @@ -272,7 +272,7 @@ public: LEDColor color_disabled() const { return _color_disabled; } void set_color_enabled (LEDColor c_on) { _color_enabled = c_on; } void set_color_disabled (LEDColor c_off) { _color_disabled = c_off; } - boost::function check_method; + std::function check_method; MidiByteArray state_msg(bool light = true) const; @@ -284,9 +284,9 @@ public: struct SelectButton : public ControllerButton, public LED { SelectButton(ButtonID id, uint8_t cn, uint8_t index, - boost::function press, - boost::function release, - boost::function long_release, + std::function press, + std::function release, + std::function long_release, LaunchControlXL& l) : ControllerButton(id, cn, press, release, long_release), LED(index, RedFull, l) {} @@ -296,9 +296,9 @@ public: struct TrackStateButton : public NoteButton, public LED { TrackStateButton(ButtonID id, uint8_t nn, uint8_t index, - boost::function press, - boost::function release, - boost::function release_long, + std::function press, + std::function release, + std::function release_long, LaunchControlXL& l) : NoteButton(id, nn, press, release, release_long) , LED(index, YellowLow, l) {} @@ -307,7 +307,7 @@ public: }; struct Fader : public Controller { - Fader(FaderID id, uint8_t cn, boost::function action) + Fader(FaderID id, uint8_t cn, std::function action) : Controller(cn, 0, action), _id(id) {} // minimal value FaderID id() const { return _id; } @@ -319,7 +319,7 @@ public: }; struct Knob : public Controller, public MultiColorLED { - Knob(KnobID id, uint8_t cn, uint8_t index, LEDColor c_on, LEDColor c_off, boost::function action, + Knob(KnobID id, uint8_t cn, uint8_t index, LEDColor c_on, LEDColor c_off, std::function action, LaunchControlXL &l) : Controller(cn, 64, action) , MultiColorLED(index, Off, l) @@ -327,8 +327,8 @@ public: , _color_enabled (c_on) , _color_disabled (c_off) {} // knob 50/50 value - Knob(KnobID id, uint8_t cn, uint8_t index, LEDColor c_on, LEDColor c_off, boost::function action, - boost::function check, LaunchControlXL &l) + Knob(KnobID id, uint8_t cn, uint8_t index, LEDColor c_on, LEDColor c_off, std::function action, + std::function check, LaunchControlXL &l) : Controller(cn, 64, action) , MultiColorLED(index, Off, l) , check_method(check) @@ -341,7 +341,7 @@ public: KnobID id() const { return _id; } LEDColor color_enabled() const { return _color_enabled; } LEDColor color_disabled() const { return _color_disabled; } - boost::function check_method; + std::function check_method; MidiByteArray state_msg(bool light = true) const; diff --git a/libs/surfaces/launchkey_4/gui.cc b/libs/surfaces/launchkey_4/gui.cc index bd87dd6800..f3114079db 100644 --- a/libs/surfaces/launchkey_4/gui.cc +++ b/libs/surfaces/launchkey_4/gui.cc @@ -142,9 +142,9 @@ LK4_GUI::LK4_GUI (LaunchKey4& p) /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&LK4_GUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&LK4_GUI::connection_handler, this), gui_context()); - _lp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&LK4_GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&LK4_GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&LK4_GUI::connection_handler, this), gui_context()); + _lp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&LK4_GUI::connection_handler, this), gui_context()); } LK4_GUI::~LK4_GUI () diff --git a/libs/surfaces/launchkey_4/launchkey_4.cc b/libs/surfaces/launchkey_4/launchkey_4.cc index de1ea9d6e7..ab5dfe218e 100644 --- a/libs/surfaces/launchkey_4/launchkey_4.cc +++ b/libs/surfaces/launchkey_4/launchkey_4.cc @@ -190,13 +190,13 @@ LaunchKey4::LaunchKey4 (ARDOUR::Session& s) build_color_map (); build_pad_map (); - Trigger::TriggerPropertyChange.connect (trigger_connections, invalidator (*this), boost::bind (&LaunchKey4::trigger_property_change, this, _1, _2), this); - ControlProtocol::PluginSelected.connect (session_connections, invalidator (*this), boost::bind (&LaunchKey4::plugin_selected, this, _1), this); + Trigger::TriggerPropertyChange.connect (trigger_connections, invalidator (*this), std::bind (&LaunchKey4::trigger_property_change, this, _1, _2), this); + ControlProtocol::PluginSelected.connect (session_connections, invalidator (*this), std::bind (&LaunchKey4::plugin_selected, this, _1), this); - session->RecordStateChanged.connect (session_connections, invalidator(*this), boost::bind (&LaunchKey4::record_state_changed, this), this); - session->TransportStateChange.connect (session_connections, invalidator(*this), boost::bind (&LaunchKey4::transport_state_changed, this), this); - session->RouteAdded.connect (session_connections, invalidator(*this), boost::bind (&LaunchKey4::stripables_added, this), this); - session->SoloChanged.connect (session_connections, invalidator(*this), boost::bind (&LaunchKey4::solo_changed, this), this); + session->RecordStateChanged.connect (session_connections, invalidator(*this), std::bind (&LaunchKey4::record_state_changed, this), this); + session->TransportStateChange.connect (session_connections, invalidator(*this), std::bind (&LaunchKey4::transport_state_changed, this), this); + session->RouteAdded.connect (session_connections, invalidator(*this), std::bind (&LaunchKey4::stripables_added, this), this); + session->SoloChanged.connect (session_connections, invalidator(*this), std::bind (&LaunchKey4::solo_changed, this), this); } LaunchKey4::~LaunchKey4 () @@ -1192,7 +1192,7 @@ LaunchKey4::connect_daw_ports () MIDI::Parser* p = _daw_in_port->parser(); /* fader messages are controllers but always on channel 0xf */ - p->channel_controller[15].connect_same_thread (*this, boost::bind (&LaunchKey4::handle_midi_controller_message_chnF, this, _1, _2)); + p->channel_controller[15].connect_same_thread (*this, std::bind (&LaunchKey4::handle_midi_controller_message_chnF, this, _1, _2)); /* Connect DAW input port to event loop */ @@ -2239,12 +2239,12 @@ LaunchKey4::switch_bank (uint32_t base) /* stripable goes away? refill the bank, starting at the same point */ - stripable[n]->DropReferences.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchKey4::switch_bank, this, bank_start), this); - stripable[n]->presentation_info().PropertyChanged.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchKey4::stripable_property_change, this, _1, n), this); - stripable[n]->mute_control()->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchKey4::mute_changed, this, n), this); + stripable[n]->DropReferences.connect (stripable_connections, invalidator (*this), std::bind (&LaunchKey4::switch_bank, this, bank_start), this); + stripable[n]->presentation_info().PropertyChanged.connect (stripable_connections, invalidator (*this), std::bind (&LaunchKey4::stripable_property_change, this, _1, n), this); + stripable[n]->mute_control()->Changed.connect (stripable_connections, invalidator (*this), std::bind (&LaunchKey4::mute_changed, this, n), this); std::shared_ptr ac = stripable[n]->rec_enable_control(); if (ac) { - ac->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchKey4::rec_enable_changed, this, n), this); + ac->Changed.connect (stripable_connections, invalidator (*this), std::bind (&LaunchKey4::rec_enable_changed, this, n), this); } } diff --git a/libs/surfaces/launchpad_pro/gui.cc b/libs/surfaces/launchpad_pro/gui.cc index fdcb19a84e..6c559deec0 100644 --- a/libs/surfaces/launchpad_pro/gui.cc +++ b/libs/surfaces/launchpad_pro/gui.cc @@ -134,9 +134,9 @@ LPPRO_GUI::LPPRO_GUI (LaunchPadPro& p) /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&LPPRO_GUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&LPPRO_GUI::connection_handler, this), gui_context()); - _lp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&LPPRO_GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&LPPRO_GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&LPPRO_GUI::connection_handler, this), gui_context()); + _lp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&LPPRO_GUI::connection_handler, this), gui_context()); } LPPRO_GUI::~LPPRO_GUI () diff --git a/libs/surfaces/launchpad_pro/lppro.cc b/libs/surfaces/launchpad_pro/lppro.cc index b05f8772aa..913bfc17e2 100644 --- a/libs/surfaces/launchpad_pro/lppro.cc +++ b/libs/surfaces/launchpad_pro/lppro.cc @@ -170,11 +170,11 @@ LaunchPadPro::LaunchPadPro (ARDOUR::Session& s) build_color_map (); build_pad_map (); - Trigger::TriggerPropertyChange.connect (trigger_connections, invalidator (*this), boost::bind (&LaunchPadPro::trigger_property_change, this, _1, _2), this); + Trigger::TriggerPropertyChange.connect (trigger_connections, invalidator (*this), std::bind (&LaunchPadPro::trigger_property_change, this, _1, _2), this); - session->RecordStateChanged.connect (session_connections, invalidator(*this), boost::bind (&LaunchPadPro::record_state_changed, this), this); - session->TransportStateChange.connect (session_connections, invalidator(*this), boost::bind (&LaunchPadPro::transport_state_changed, this), this); - session->RouteAdded.connect (session_connections, invalidator(*this), boost::bind (&LaunchPadPro::viewport_changed, this), this); + session->RecordStateChanged.connect (session_connections, invalidator(*this), std::bind (&LaunchPadPro::record_state_changed, this), this); + session->TransportStateChange.connect (session_connections, invalidator(*this), std::bind (&LaunchPadPro::transport_state_changed, this), this); + session->RouteAdded.connect (session_connections, invalidator(*this), std::bind (&LaunchPadPro::viewport_changed, this), this); } LaunchPadPro::~LaunchPadPro () @@ -1875,8 +1875,8 @@ LaunchPadPro::viewport_changed () for (int n = 0; n < 8; ++n) { std::shared_ptr r = session->get_remote_nth_route (scroll_x_offset + n); if (r) { - r->DropReferences.connect (route_connections, invalidator (*this), boost::bind (&LaunchPadPro::viewport_changed, this), this); - r->presentation_info().PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&LaunchPadPro::route_property_change, this, _1, n), this); + r->DropReferences.connect (route_connections, invalidator (*this), std::bind (&LaunchPadPro::viewport_changed, this), this); + r->presentation_info().PropertyChanged.connect (route_connections, invalidator (*this), std::bind (&LaunchPadPro::route_property_change, this, _1, n), this); } else { if (n == 0) { /* not even the first stripable ... so do nothing */ @@ -2059,7 +2059,7 @@ LaunchPadPro::map_faders () } if (ac) { - ac->Changed.connect (control_connections, invalidator (*this), boost::bind (&LaunchPadPro::automation_control_change, this, n, std::weak_ptr (ac)), this); + ac->Changed.connect (control_connections, invalidator (*this), std::bind (&LaunchPadPro::automation_control_change, this, n, std::weak_ptr (ac)), this); } daw_write (msg, 3); diff --git a/libs/surfaces/launchpad_x/gui.cc b/libs/surfaces/launchpad_x/gui.cc index 2939944b11..6ae1cf9a7d 100644 --- a/libs/surfaces/launchpad_x/gui.cc +++ b/libs/surfaces/launchpad_x/gui.cc @@ -145,9 +145,9 @@ LPX_GUI::LPX_GUI (LaunchPadX& p) /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&LPX_GUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&LPX_GUI::connection_handler, this), gui_context()); - _lp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&LPX_GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&LPX_GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&LPX_GUI::connection_handler, this), gui_context()); + _lp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&LPX_GUI::connection_handler, this), gui_context()); } LPX_GUI::~LPX_GUI () diff --git a/libs/surfaces/launchpad_x/lpx.cc b/libs/surfaces/launchpad_x/lpx.cc index 18bbf350f1..c2393f6df7 100644 --- a/libs/surfaces/launchpad_x/lpx.cc +++ b/libs/surfaces/launchpad_x/lpx.cc @@ -174,11 +174,11 @@ LaunchPadX::LaunchPadX (ARDOUR::Session& s) build_color_map (); build_pad_map (); - Trigger::TriggerPropertyChange.connect (trigger_connections, invalidator (*this), boost::bind (&LaunchPadX::trigger_property_change, this, _1, _2), this); + Trigger::TriggerPropertyChange.connect (trigger_connections, invalidator (*this), std::bind (&LaunchPadX::trigger_property_change, this, _1, _2), this); - session->RecordStateChanged.connect (session_connections, invalidator(*this), boost::bind (&LaunchPadX::record_state_changed, this), this); - session->TransportStateChange.connect (session_connections, invalidator(*this), boost::bind (&LaunchPadX::transport_state_changed, this), this); - session->RouteAdded.connect (session_connections, invalidator(*this), boost::bind (&LaunchPadX::viewport_changed, this), this); + session->RecordStateChanged.connect (session_connections, invalidator(*this), std::bind (&LaunchPadX::record_state_changed, this), this); + session->TransportStateChange.connect (session_connections, invalidator(*this), std::bind (&LaunchPadX::transport_state_changed, this), this); + session->RouteAdded.connect (session_connections, invalidator(*this), std::bind (&LaunchPadX::viewport_changed, this), this); } LaunchPadX::~LaunchPadX () @@ -1553,8 +1553,8 @@ LaunchPadX::viewport_changed () for (int n = 0; n < 8; ++n) { std::shared_ptr r = session->get_remote_nth_route (scroll_x_offset + n); if (r) { - r->DropReferences.connect (route_connections, invalidator (*this), boost::bind (&LaunchPadX::viewport_changed, this), this); - r->presentation_info().PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&LaunchPadX::route_property_change, this, _1, n), this); + r->DropReferences.connect (route_connections, invalidator (*this), std::bind (&LaunchPadX::viewport_changed, this), this); + r->presentation_info().PropertyChanged.connect (route_connections, invalidator (*this), std::bind (&LaunchPadX::route_property_change, this, _1, n), this); } else { if (n == 0) { /* not even the first stripable ... so do nothing */ @@ -1766,7 +1766,7 @@ LaunchPadX::map_faders () } if (ac) { - ac->Changed.connect (control_connections, invalidator (*this), boost::bind (&LaunchPadX::automation_control_change, this, n, std::weak_ptr (ac)), this); + ac->Changed.connect (control_connections, invalidator (*this), std::bind (&LaunchPadX::automation_control_change, this, n, std::weak_ptr (ac)), this); } daw_write (msg, 3); diff --git a/libs/surfaces/mackie/gui.cc b/libs/surfaces/mackie/gui.cc index ba824544cf..ca8dd60c1a 100644 --- a/libs/surfaces/mackie/gui.cc +++ b/libs/surfaces/mackie/gui.cc @@ -141,12 +141,12 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p) Gtkmm2ext::set_popdown_strings (_surface_combo, surfaces); _surface_combo.signal_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::surface_combo_changed)); - _cp.DeviceChanged.connect (device_change_connection, invalidator (*this), boost::bind (&MackieControlProtocolGUI::device_changed, this), gui_context()); + _cp.DeviceChanged.connect (device_change_connection, invalidator (*this), std::bind (&MackieControlProtocolGUI::device_changed, this), gui_context()); /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&MackieControlProtocolGUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&MackieControlProtocolGUI::connection_handler, this), gui_context()); - _cp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&MackieControlProtocolGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&MackieControlProtocolGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&MackieControlProtocolGUI::connection_handler, this), gui_context()); + _cp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&MackieControlProtocolGUI::connection_handler, this), gui_context()); ipmidi_base_port_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::ipmidi_spinner_changed)); diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 97dd94f955..61d8f70807 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -148,7 +148,7 @@ MackieControlProtocol::MackieControlProtocol (Session& session, const char* pnam _last_bank[i] = 0; } - PresentationInfo::Change.connect (gui_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_presentation_info_changed, this, _1), this); + PresentationInfo::Change.connect (gui_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_presentation_info_changed, this, _1), this); _instance = this; @@ -728,22 +728,22 @@ void MackieControlProtocol::connect_session_signals() { // receive routes added - session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_routes_added, this, _1), this); + session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_routes_added, this, _1), this); // receive VCAs added - session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_vca_added, this, _1), this); + session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_vca_added, this, _1), this); // receive record state toggled - session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_record_state_changed, this), this); + session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_record_state_changed, this), this); // receive transport state changed - session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_transport_state_changed, this), this); - session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_loop_state_changed, this), this); + session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_transport_state_changed, this), this); + session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_loop_state_changed, this), this); // receive punch-in and punch-out - Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this); - session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this); + Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this); + session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_parameter_changed, this, _1), this); // receive rude solo changed - session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_solo_active_changed, this, _1), this); + session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_solo_active_changed, this, _1), this); - session->MonitorBusAddedOrRemoved.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_monitor_added_or_removed, this), this); + session->MonitorBusAddedOrRemoved.connect (session_connections, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::notify_monitor_added_or_removed, this), this); // make sure remote id changed signals reach here // see also notify_stripable_added @@ -817,7 +817,7 @@ MackieControlProtocol::set_device (const string& device_name, bool force) loop, not in the thread where the PortConnectedOrDisconnected signal is emitted. */ - ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::connection_handler, this, _1, _2, _3, _4, _5), this); + ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, std::bind (&MackieControlProtocol::connection_handler, this, _1, _2, _3, _4, _5), this); } build_button_map(); @@ -1814,7 +1814,7 @@ MackieControlProtocol::set_subview_mode (MACKIE_NAMESPACE::Subview::Mode sm, std /* Catch the current subview stripable going away */ if (_subview->subview_stripable()) { _subview->subview_stripable()->DropReferences.connect (_subview->subview_stripable_connections(), MISSING_INVALIDATOR, - boost::bind (&MackieControlProtocol::notify_subview_stripable_deleted, this), + std::bind (&MackieControlProtocol::notify_subview_stripable_deleted, this), this); } @@ -1929,7 +1929,7 @@ MackieControlProtocol::check_fader_automation_state () r->gain_control()->alist()->automation_state_changed.connect (fader_automation_connections, MISSING_INVALIDATOR, - boost::bind (&MackieControlProtocol::update_fader_automation_state, this), + std::bind (&MackieControlProtocol::update_fader_automation_state, this), this); update_fader_automation_state (); diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 4e294778d2..a019bf8607 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -230,34 +230,34 @@ Strip::set_stripable (std::shared_ptr r, bool /*with_messages*/) _mute->set_control (_stripable->mute_control()); } - _stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); - _stripable->mute_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context()); + _stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_solo_changed, this), ui_context()); + _stripable->mute_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_mute_changed, this), ui_context()); std::shared_ptr pan_control = _stripable->pan_azimuth_control(); if (pan_control) { - pan_control->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_azi_changed, this, false), ui_context()); + pan_control->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_panner_azi_changed, this, false), ui_context()); } pan_control = _stripable->pan_width_control(); if (pan_control) { - pan_control->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_width_changed, this, false), ui_context()); + pan_control->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_panner_width_changed, this, false), ui_context()); } - _stripable->gain_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_gain_changed, this, false), ui_context()); - _stripable->PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context()); - _stripable->presentation_info().PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context()); + _stripable->gain_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_gain_changed, this, false), ui_context()); + _stripable->PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_property_changed, this, _1), ui_context()); + _stripable->presentation_info().PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_property_changed, this, _1), ui_context()); std::shared_ptr rec_enable_control = _stripable->rec_enable_control (); if (_recenable && rec_enable_control) { _recenable->set_control (rec_enable_control); - rec_enable_control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_record_enable_changed, this), ui_context()); + rec_enable_control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_record_enable_changed, this), ui_context()); } // TODO this works when a currently-banked stripable is made inactive, but not // when a stripable is activated which should be currently banked. - _stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_stripable_deleted, this), ui_context()); + _stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_stripable_deleted, this), ui_context()); /* setup legal VPot modes for this stripable */ diff --git a/libs/surfaces/mackie/subview.cc b/libs/surfaces/mackie/subview.cc index 154627a44f..b650169eb6 100644 --- a/libs/surfaces/mackie/subview.cc +++ b/libs/surfaces/mackie/subview.cc @@ -375,7 +375,7 @@ void EQSubview::setup_vpot( //If a controllable was found, connect it up, and put the labels in the display. if (pc) { - pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, boost::bind (&EQSubview::notify_change, this, std::weak_ptr(pc), global_strip_position, false), ui_context()); + pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, std::bind (&EQSubview::notify_change, this, std::weak_ptr(pc), global_strip_position, false), ui_context()); vpot->set_control (pc); if (!pot_id.empty()) { @@ -512,7 +512,7 @@ void DynamicsSubview::setup_vpot( pc = available[global_strip_position].first; std::string pot_id = available[global_strip_position].second; - pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, boost::bind (&DynamicsSubview::notify_change, this, std::weak_ptr(pc), global_strip_position, false, true), ui_context()); + pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, std::bind (&DynamicsSubview::notify_change, this, std::weak_ptr(pc), global_strip_position, false, true), ui_context()); vpot->set_control (pc); if (!pot_id.empty()) { @@ -612,7 +612,7 @@ void SendsSubview::setup_vpot( return; } - pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, boost::bind (&SendsSubview::notify_send_level_change, this, global_strip_position, false), ui_context()); + pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, std::bind (&SendsSubview::notify_send_level_change, this, global_strip_position, false), ui_context()); vpot->set_control (pc); pending_display[0] = PBD::short_version (_subview_stripable->send_name (global_strip_position), 6); @@ -789,7 +789,7 @@ void TrackViewSubview::setup_vpot( case 0: pc = _subview_stripable->trim_control (); if (pc) { - pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, boost::bind (&TrackViewSubview::notify_change, this, TrimAutomation, global_strip_position, false), ui_context()); + pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, std::bind (&TrackViewSubview::notify_change, this, TrimAutomation, global_strip_position, false), ui_context()); pending_display[0] = "Trim"; notify_change (TrimAutomation, global_strip_position, true); } @@ -798,7 +798,7 @@ void TrackViewSubview::setup_vpot( if (track) { pc = track->monitoring_control(); if (pc) { - pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, boost::bind (&TrackViewSubview::notify_change, this, MonitoringAutomation, global_strip_position, false), ui_context()); + pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, std::bind (&TrackViewSubview::notify_change, this, MonitoringAutomation, global_strip_position, false), ui_context()); pending_display[0] = "Mon"; notify_change (MonitoringAutomation, global_strip_position, true); } @@ -807,7 +807,7 @@ void TrackViewSubview::setup_vpot( case 2: pc = _subview_stripable->solo_isolate_control (); if (pc) { - pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, boost::bind (&TrackViewSubview::notify_change, this, SoloIsolateAutomation, global_strip_position, false), ui_context()); + pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, std::bind (&TrackViewSubview::notify_change, this, SoloIsolateAutomation, global_strip_position, false), ui_context()); notify_change (SoloIsolateAutomation, global_strip_position, true); pending_display[0] = "S-Iso"; } @@ -815,7 +815,7 @@ void TrackViewSubview::setup_vpot( case 3: pc = _subview_stripable->solo_safe_control (); if (pc) { - pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, boost::bind (&TrackViewSubview::notify_change, this, SoloSafeAutomation, global_strip_position, false), ui_context()); + pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, std::bind (&TrackViewSubview::notify_change, this, SoloSafeAutomation, global_strip_position, false), ui_context()); notify_change (SoloSafeAutomation, global_strip_position, true); pending_display[0] = "S-Safe"; } @@ -823,7 +823,7 @@ void TrackViewSubview::setup_vpot( case 4: pc = _subview_stripable->phase_control(); if (pc) { - pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, boost::bind (&TrackViewSubview::notify_change, this, PhaseAutomation, global_strip_position, false), ui_context()); + pc->Changed.connect (_subview_connections, MISSING_INVALIDATOR, std::bind (&TrackViewSubview::notify_change, this, PhaseAutomation, global_strip_position, false), ui_context()); notify_change (PhaseAutomation, global_strip_position, true); pending_display[0] = "Phase"; } @@ -909,7 +909,7 @@ void PluginSubview::connect_processors_changed_signal() std::shared_ptr route = std::dynamic_pointer_cast (_subview_stripable); if (route) { - route->processors_changed.connect(_subview_connections, MISSING_INVALIDATOR, boost::bind (&PluginSubview::handle_processors_changed, this), ui_context()); + route->processors_changed.connect(_subview_connections, MISSING_INVALIDATOR, std::bind (&PluginSubview::handle_processors_changed, this), ui_context()); } } @@ -1233,7 +1233,7 @@ void PluginEdit::setup_vpot( return; } - c->Changed.connect (_context.subview_connections(), MISSING_INVALIDATOR, boost::bind (&PluginEdit::notify_parameter_change, this, strip, vpot, pending_display, global_strip_position), ui_context()); + c->Changed.connect (_context.subview_connections(), MISSING_INVALIDATOR, std::bind (&PluginEdit::notify_parameter_change, this, strip, vpot, pending_display, global_strip_position), ui_context()); vpot->set_control (c); pending_display[0] = PluginSubviewState::shorten_display_text(c->desc().label, 6); notify_parameter_change (strip, vpot, pending_display, global_strip_position); diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index 520ddfdf23..cc876d4058 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -434,7 +434,7 @@ Surface::toggle_master_monitor () } else { return; } _master_fader->set_control (_master_stripable->gain_control()); - _master_stripable->gain_control()->Changed.connect (master_connection, MISSING_INVALIDATOR, boost::bind (&Surface::master_gain_changed, this), ui_context()); + _master_stripable->gain_control()->Changed.connect (master_connection, MISSING_INVALIDATOR, std::bind (&Surface::master_gain_changed, this), ui_context()); _last_master_gain_written = FLT_MAX; master_gain_changed (); } @@ -483,12 +483,12 @@ Surface::setup_master () } _master_fader->set_control (_master_stripable->gain_control()); - _master_stripable->gain_control()->Changed.connect (master_connection, MISSING_INVALIDATOR, boost::bind (&Surface::master_gain_changed, this), ui_context()); + _master_stripable->gain_control()->Changed.connect (master_connection, MISSING_INVALIDATOR, std::bind (&Surface::master_gain_changed, this), ui_context()); _last_master_gain_written = FLT_MAX; /* some essentially impossible value */ master_gain_changed (); if (_has_master_display) { - _master_stripable->PropertyChanged.connect (master_connection, MISSING_INVALIDATOR, boost::bind (&Surface::master_property_changed, this, _1), ui_context()); + _master_stripable->PropertyChanged.connect (master_connection, MISSING_INVALIDATOR, std::bind (&Surface::master_property_changed, this, _1), ui_context()); show_master_name(); } } @@ -695,20 +695,20 @@ Surface::connect_to_signals () MIDI::Parser* p = _port->input_port().parser(); /* Incoming sysex */ - p->sysex.connect_same_thread (*this, boost::bind (&Surface::handle_midi_sysex, this, _1, _2, _3)); + p->sysex.connect_same_thread (*this, std::bind (&Surface::handle_midi_sysex, this, _1, _2, _3)); /* V-Pot messages are Controller */ - p->controller.connect_same_thread (*this, boost::bind (&Surface::handle_midi_controller_message, this, _1, _2)); + p->controller.connect_same_thread (*this, std::bind (&Surface::handle_midi_controller_message, this, _1, _2)); /* Button messages are NoteOn */ - p->note_on.connect_same_thread (*this, boost::bind (&Surface::handle_midi_note_on_message, this, _1, _2)); + p->note_on.connect_same_thread (*this, std::bind (&Surface::handle_midi_note_on_message, this, _1, _2)); /* Button messages are NoteOn but libmidi++ sends note-on w/velocity = 0 as note-off so catch them too */ - p->note_off.connect_same_thread (*this, boost::bind (&Surface::handle_midi_note_on_message, this, _1, _2)); + p->note_off.connect_same_thread (*this, std::bind (&Surface::handle_midi_note_on_message, this, _1, _2)); /* Fader messages are Pitchbend */ uint32_t i; for (i = 0; i < _mcp.device_info().strip_cnt(); i++) { - p->channel_pitchbend[i].connect_same_thread (*this, boost::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, i)); + p->channel_pitchbend[i].connect_same_thread (*this, std::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, i)); } // Master fader - p->channel_pitchbend[_mcp.device_info().strip_cnt()].connect_same_thread (*this, boost::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, _mcp.device_info().strip_cnt())); + p->channel_pitchbend[_mcp.device_info().strip_cnt()].connect_same_thread (*this, std::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, _mcp.device_info().strip_cnt())); _connected = true; } diff --git a/libs/surfaces/maschine2/callbacks.cc b/libs/surfaces/maschine2/callbacks.cc index e6da938ea6..b842527129 100644 --- a/libs/surfaces/maschine2/callbacks.cc +++ b/libs/surfaces/maschine2/callbacks.cc @@ -40,13 +40,13 @@ Maschine2::connect_signals () // TODO: use some convenience macros here /* Signals */ - session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_transport_state_changed, this), this); - session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_loop_state_changed, this), this); - session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_record_state_changed, this), this); - Config->ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_parameter_changed, this, _1), this); - session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_parameter_changed, this, _1), this); - session->DirtyChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_session_dirty_changed, this), this); - session->history().Changed.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&Maschine2::notify_history_changed, this), this); + session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, std::bind (&Maschine2::notify_transport_state_changed, this), this); + session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, std::bind (&Maschine2::notify_loop_state_changed, this), this); + session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&Maschine2::notify_record_state_changed, this), this); + Config->ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&Maschine2::notify_parameter_changed, this, _1), this); + session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&Maschine2::notify_parameter_changed, this, _1), this); + session->DirtyChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&Maschine2::notify_session_dirty_changed, this), this); + session->history().Changed.connect (session_connections, MISSING_INVALIDATOR, std::bind (&Maschine2::notify_history_changed, this), this); /* Actions */ Glib::RefPtr tact; @@ -65,34 +65,34 @@ Maschine2::connect_signals () ract->signal_toggled ().connect (sigc::mem_fun (*this, &Maschine2::notify_snap_change)); /* Surface events */ - _ctrl->button (M2Contols::Play)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_play, this)); - _ctrl->button (M2Contols::Rec)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_record, this)); - _ctrl->button (M2Contols::Loop)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_loop, this)); - _ctrl->button (M2Contols::Metronom)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_metronom, this)); - _ctrl->button (M2Contols::GotoStart)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_rewind, this)); - _ctrl->button (M2Contols::FastRewind)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_action, this, "Transport", "RewindSlow")); - _ctrl->button (M2Contols::FastForward)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_action, this, "Transport", "ForwardSlow")); - _ctrl->button (M2Contols::Panic)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_action, this, "MIDI", "panic")); - _ctrl->button (M2Contols::JumpForward)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_action, this, "Editor", "jump-forward-to-mark")); - _ctrl->button (M2Contols::JumpBackward)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_action, this, "Editor", "jump-backward-to-mark")); + _ctrl->button (M2Contols::Play)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_play, this)); + _ctrl->button (M2Contols::Rec)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_record, this)); + _ctrl->button (M2Contols::Loop)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_loop, this)); + _ctrl->button (M2Contols::Metronom)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_metronom, this)); + _ctrl->button (M2Contols::GotoStart)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_rewind, this)); + _ctrl->button (M2Contols::FastRewind)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_action, this, "Transport", "RewindSlow")); + _ctrl->button (M2Contols::FastForward)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_action, this, "Transport", "ForwardSlow")); + _ctrl->button (M2Contols::Panic)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_action, this, "MIDI", "panic")); + _ctrl->button (M2Contols::JumpForward)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_action, this, "Editor", "jump-forward-to-mark")); + _ctrl->button (M2Contols::JumpBackward)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_action, this, "Editor", "jump-backward-to-mark")); - _ctrl->button (M2Contols::Grid)->pressed.connect (button_connections, invalidator (*this), boost::bind (&Maschine2::button_snap_pressed, this), gui_context()); - _ctrl->button (M2Contols::Grid)->released.connect (button_connections, invalidator (*this), boost::bind (&Maschine2::button_snap_released, this), gui_context()); - _ctrl->button (M2Contols::Grid)->changed.connect (button_connections, invalidator (*this), boost::bind (&Maschine2::button_snap_changed, this, _1), gui_context()); + _ctrl->button (M2Contols::Grid)->pressed.connect (button_connections, invalidator (*this), std::bind (&Maschine2::button_snap_pressed, this), gui_context()); + _ctrl->button (M2Contols::Grid)->released.connect (button_connections, invalidator (*this), std::bind (&Maschine2::button_snap_released, this), gui_context()); + _ctrl->button (M2Contols::Grid)->changed.connect (button_connections, invalidator (*this), std::bind (&Maschine2::button_snap_changed, this, _1), gui_context()); - _ctrl->button (M2Contols::Save)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_action, this, "Common", "Save")); - _ctrl->button (M2Contols::Undo)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_action, this, "Editor", "undo")); - _ctrl->button (M2Contols::Redo)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_action, this, "Editor", "redo")); + _ctrl->button (M2Contols::Save)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_action, this, "Common", "Save")); + _ctrl->button (M2Contols::Undo)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_action, this, "Editor", "undo")); + _ctrl->button (M2Contols::Redo)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_action, this, "Editor", "redo")); - _ctrl->button (M2Contols::MasterVolume)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::handle_master_change, this, MST_VOLUME)); - _ctrl->button (M2Contols::MasterTempo)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::handle_master_change, this, MST_TEMPO)); + _ctrl->button (M2Contols::MasterVolume)->released.connect_same_thread (button_connections, std::bind (&Maschine2::handle_master_change, this, MST_VOLUME)); + _ctrl->button (M2Contols::MasterTempo)->released.connect_same_thread (button_connections, std::bind (&Maschine2::handle_master_change, this, MST_TEMPO)); - _ctrl->button (M2Contols::EncoderWheel)->released.connect_same_thread (button_connections, boost::bind (&Maschine2::button_encoder, this)); - _ctrl->encoder (0)->changed.connect_same_thread (button_connections, boost::bind (&Maschine2::encoder_master, this, _1)); + _ctrl->button (M2Contols::EncoderWheel)->released.connect_same_thread (button_connections, std::bind (&Maschine2::button_encoder, this)); + _ctrl->encoder (0)->changed.connect_same_thread (button_connections, std::bind (&Maschine2::encoder_master, this, _1)); for (unsigned int pad = 0; pad < 16; ++pad) { - _ctrl->pad (pad)->event.connect_same_thread (button_connections, boost::bind (&Maschine2::pad_event, this, pad, _1, _2)); - _ctrl->pad (pad)->changed.connect_same_thread (button_connections, boost::bind (&Maschine2::pad_change, this, pad, _1)); + _ctrl->pad (pad)->event.connect_same_thread (button_connections, std::bind (&Maschine2::pad_event, this, pad, _1, _2)); + _ctrl->pad (pad)->changed.connect_same_thread (button_connections, std::bind (&Maschine2::pad_change, this, pad, _1)); } /* set initial values */ diff --git a/libs/surfaces/maschine2/canvas.cc b/libs/surfaces/maschine2/canvas.cc index 07addd5d5a..71b49429ca 100644 --- a/libs/surfaces/maschine2/canvas.cc +++ b/libs/surfaces/maschine2/canvas.cc @@ -49,7 +49,7 @@ Maschine2Canvas::Maschine2Canvas (Maschine2&m, M2Device* hw) _width = hw->surface ()->get_width (); _height = hw->surface ()->get_height (); - hw->vblank.connect_same_thread (vblank_connections, boost::bind (&Maschine2Canvas::expose, this)); + hw->vblank.connect_same_thread (vblank_connections, std::bind (&Maschine2Canvas::expose, this)); } Maschine2Canvas::~Maschine2Canvas () diff --git a/libs/surfaces/maschine2/m2_button.h b/libs/surfaces/maschine2/m2_button.h index ae838dde69..3c9706adcf 100644 --- a/libs/surfaces/maschine2/m2_button.h +++ b/libs/surfaces/maschine2/m2_button.h @@ -156,7 +156,7 @@ class M2ToggleButton : public M2Button : M2Button () , _active (false) { - changed.connect_same_thread (changed_connection, boost::bind (&M2ToggleButton::change_event, this, _1)); + changed.connect_same_thread (changed_connection, std::bind (&M2ToggleButton::change_event, this, _1)); } PBD::Signal toggled; @@ -182,7 +182,7 @@ class M2ToggleHoldButton : public M2Button , _active (false) , _active_on_release (false) { - changed.connect_same_thread (changed_connection, boost::bind (&M2ToggleHoldButton::change_event, this, _1)); + changed.connect_same_thread (changed_connection, std::bind (&M2ToggleHoldButton::change_event, this, _1)); } PBD::Signal toggled; diff --git a/libs/surfaces/maschine2/ui_knob.cc b/libs/surfaces/maschine2/ui_knob.cc index 50dec14762..5b311bad0d 100644 --- a/libs/surfaces/maschine2/ui_knob.cc +++ b/libs/surfaces/maschine2/ui_knob.cc @@ -172,7 +172,7 @@ Maschine2Knob::set_controllable (std::shared_ptr c) } _controllable = c; - _controllable->Changed.connect (watch_connection, invalidator(*this), boost::bind (&Maschine2Knob::controllable_changed, this), _eventloop); + _controllable->Changed.connect (watch_connection, invalidator(*this), std::bind (&Maschine2Knob::controllable_changed, this), _eventloop); controllable_changed (); // set _controllable->desc()->label @@ -186,7 +186,7 @@ Maschine2Knob::set_control (M2EncoderInterface* ctrl) if (!ctrl) { return; } - ctrl->changed.connect_same_thread (encoder_connection, boost::bind (&Maschine2Knob::encoder_changed, this, _1)); + ctrl->changed.connect_same_thread (encoder_connection, std::bind (&Maschine2Knob::encoder_changed, this, _1)); } void diff --git a/libs/surfaces/maschine2/ui_menu.cc b/libs/surfaces/maschine2/ui_menu.cc index 1a6d53c976..ff43322fbf 100644 --- a/libs/surfaces/maschine2/ui_menu.cc +++ b/libs/surfaces/maschine2/ui_menu.cc @@ -184,7 +184,7 @@ Maschine2Menu::set_control (M2EncoderInterface* ctrl) if (!ctrl) { return; } - ctrl->changed.connect_same_thread (encoder_connection, boost::bind (&Maschine2Menu::encoder_changed, this, _1)); + ctrl->changed.connect_same_thread (encoder_connection, std::bind (&Maschine2Menu::encoder_changed, this, _1)); } void diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index 6e30b6b139..78f3e1943d 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -131,7 +131,7 @@ OSC::OSC (Session& s, uint32_t port) { _instance = this; - session->Exported.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::session_exported, this, _1, _2), this); + session->Exported.connect (*this, MISSING_INVALIDATOR, std::bind (&OSC::session_exported, this, _1, _2), this); } OSC::~OSC() @@ -267,11 +267,11 @@ OSC::start () // catch track reordering // receive routes added - session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::notify_routes_added, this, _1), this); + session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSC::notify_routes_added, this, _1), this); // receive VCAs added - session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::notify_vca_added, this, _1), this); + session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSC::notify_vca_added, this, _1), this); // order changed - PresentationInfo::Change.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this); + PresentationInfo::Change.connect (session_connections, MISSING_INVALIDATOR, std::bind (&OSC::recalcbanks, this), this); _select = ControlProtocol::first_selected_stripable(); if(!_select) { @@ -1406,7 +1406,7 @@ OSC::clear_devices () link_sets.clear (); _ports.clear (); - PresentationInfo::Change.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this); + PresentationInfo::Change.connect (session_connections, MISSING_INVALIDATOR, std::bind (&OSC::recalcbanks, this), this); observer_busy = false; tick = true; @@ -4779,7 +4779,7 @@ OSC::_strip_select2 (std::shared_ptr s, OSCSurface *sur, lo_address a } while (sends); sur->nsends = nsends; - s->DropReferences.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this); + s->DropReferences.connect (*this, MISSING_INVALIDATOR, std::bind (&OSC::recalcbanks, this), this); OSCSelectObserver* so = dynamic_cast(sur->sel_obs); if (sur->feedback[13]) { @@ -4812,7 +4812,7 @@ OSC::_strip_select2 (std::shared_ptr s, OSCSurface *sur, lo_address a string address = lo_address_get_url (addr); std::shared_ptr r = std::dynamic_pointer_cast(s); if (r) { - r->processors_changed.connect (sur->proc_connection, MISSING_INVALIDATOR, boost::bind (&OSC::processor_changed, this, address), this); + r->processors_changed.connect (sur->proc_connection, MISSING_INVALIDATOR, std::bind (&OSC::processor_changed, this, address), this); _sel_plugin (sur->plugin_id, addr); } @@ -6374,7 +6374,7 @@ OSC::_cue_set (uint32_t aux, lo_address addr) if (aux == n+1) { // aux must be at least one - stp->DropReferences.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::_cue_set, this, aux, addr), this); + stp->DropReferences.connect (*this, MISSING_INVALIDATOR, std::bind (&OSC::_cue_set, this, aux, addr), this); // make a list of stripables with sends that go to this bus s->sends = cue_get_sorted_stripables(stp, aux, addr); if (s->cue_obs) { @@ -6729,7 +6729,7 @@ OSC::cue_get_sorted_stripables(std::shared_ptr aux, uint32_t id, lo_a std::shared_ptr aux_rt = std::dynamic_pointer_cast (aux); for (auto const& s : aux_rt->signal_sources (true)) { sorted.push_back (s); - s->DropReferences.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::_cue_set, this, id, addr), this); + s->DropReferences.connect (*this, MISSING_INVALIDATOR, std::bind (&OSC::_cue_set, this, id, addr), this); } sort (sorted.begin(), sorted.end(), StripableByPresentationOrder()); diff --git a/libs/surfaces/osc/osc_controllable.cc b/libs/surfaces/osc/osc_controllable.cc index c11a77f667..91b081bae8 100644 --- a/libs/surfaces/osc/osc_controllable.cc +++ b/libs/surfaces/osc/osc_controllable.cc @@ -36,7 +36,7 @@ OSCControllable::OSCControllable (lo_address a, const std::string& p, std::share , path (p) { addr = lo_address_new (lo_address_get_hostname(a) , lo_address_get_port(a)); - c->Changed.connect (changed_connection, MISSING_INVALIDATOR, boost::bind (&OSCControllable::send_change_message, this), OSC::instance()); + c->Changed.connect (changed_connection, MISSING_INVALIDATOR, std::bind (&OSCControllable::send_change_message, this), OSC::instance()); } OSCControllable::~OSCControllable () diff --git a/libs/surfaces/osc/osc_cue_observer.cc b/libs/surfaces/osc/osc_cue_observer.cc index 169587751c..a4c86d2252 100644 --- a/libs/surfaces/osc/osc_cue_observer.cc +++ b/libs/surfaces/osc/osc_cue_observer.cc @@ -84,18 +84,18 @@ OSCCueObserver::refresh_strip (std::shared_ptr new_strip, Sor send_end (new_sends.size ()); _strip = new_strip; - _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::clear_observer, this), OSC::instance()); + _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::clear_observer, this), OSC::instance()); sends = new_sends; - _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::name_changed, this, boost::lambda::_1, 0), OSC::instance()); + _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::name_changed, this,_1, 0), OSC::instance()); name_changed (ARDOUR::Properties::name, 0); - _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::send_change_message, this, X_("/cue/mute"), 0, _strip->mute_control()), OSC::instance()); + _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_change_message, this, X_("/cue/mute"), 0, _strip->mute_control()), OSC::instance()); send_change_message (X_("/cue/mute"), 0, _strip->mute_control()); gain_timeout.push_back (0); _last_gain.push_back (-1.0); - _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::send_gain_message, this, 0, _strip->gain_control(), false), OSC::instance()); + _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_gain_message, this, 0, _strip->gain_control(), false), OSC::instance()); send_gain_message (0, _strip->gain_control(), true); send_init (); @@ -149,13 +149,13 @@ OSCCueObserver::send_init() std::shared_ptr r = std::dynamic_pointer_cast (sends[i]); std::shared_ptr send = r->internal_send_for (std::dynamic_pointer_cast (_strip)); if (r) { - r->processors_changed.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::send_restart, this), OSC::instance()); + r->processors_changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_restart, this), OSC::instance()); } if (send) { // send name if (r) { - sends[i]->PropertyChanged.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::name_changed, this, boost::lambda::_1, i + 1), OSC::instance()); + sends[i]->PropertyChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::name_changed, this,_1, i + 1), OSC::instance()); name_changed (ARDOUR::Properties::name, i + 1); } @@ -163,12 +163,12 @@ OSCCueObserver::send_init() if (send->gain_control()) { gain_timeout.push_back (0); _last_gain.push_back (-1.0); - send->gain_control()->Changed.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::send_gain_message, this, i + 1, send->gain_control(), false), OSC::instance()); + send->gain_control()->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_gain_message, this, i + 1, send->gain_control(), false), OSC::instance()); send_gain_message (i + 1, send->gain_control(), true); } std::shared_ptr proc = std::dynamic_pointer_cast (send); - proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::send_enabled_message, this, X_("/cue/send/enable"), i + 1, proc), OSC::instance()); + proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_enabled_message, this, X_("/cue/send/enable"), i + 1, proc), OSC::instance()); send_enabled_message (X_("/cue/send/enable"), i + 1, proc); } } diff --git a/libs/surfaces/osc/osc_global_observer.cc b/libs/surfaces/osc/osc_global_observer.cc index 563b5a4b3b..7b6f82481d 100644 --- a/libs/surfaces/osc/osc_global_observer.cc +++ b/libs/surfaces/osc/osc_global_observer.cc @@ -62,7 +62,7 @@ OSCGlobalObserver::OSCGlobalObserver (OSC& o, Session& s, ArdourSurface::OSC::OS if (feedback[16]) { //Mixer Scenes - MixerScene::Change.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::update_mixer_scene_state, this), OSC::instance()); + MixerScene::Change.connect (session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::update_mixer_scene_state, this), OSC::instance()); update_mixer_scene_state(); } @@ -80,21 +80,21 @@ OSCGlobalObserver::OSCGlobalObserver (OSC& o, Session& s, ArdourSurface::OSC::OS std::shared_ptr strip = session->master_out(); std::shared_ptr mute_controllable = std::dynamic_pointer_cast(strip->mute_control()); - mute_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_change_message, this, X_("/master/mute"), strip->mute_control()), OSC::instance()); + mute_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/master/mute"), strip->mute_control()), OSC::instance()); send_change_message (X_("/master/mute"), mute_controllable); std::shared_ptr trim_controllable = std::dynamic_pointer_cast(strip->trim_control()); - trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_trim_message, this, X_("/master/trimdB"), strip->trim_control()), OSC::instance()); + trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_trim_message, this, X_("/master/trimdB"), strip->trim_control()), OSC::instance()); send_trim_message (X_("/master/trimdB"), trim_controllable); std::shared_ptr pan_controllable = std::dynamic_pointer_cast(strip->pan_azimuth_control()); if (pan_controllable) { - pan_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_change_message, this, X_("/master/pan_stereo_position"), strip->pan_azimuth_control()), OSC::instance()); + pan_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/master/pan_stereo_position"), strip->pan_azimuth_control()), OSC::instance()); send_change_message (X_("/master/pan_stereo_position"), pan_controllable); } std::shared_ptr gain_controllable = std::dynamic_pointer_cast(strip->gain_control()); - gain_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_gain_message, this, X_("/master/"), strip->gain_control()), OSC::instance()); + gain_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_gain_message, this, X_("/master/"), strip->gain_control()), OSC::instance()); send_gain_message (X_("/master/"), gain_controllable); // monitor stuff next @@ -103,43 +103,43 @@ OSCGlobalObserver::OSCGlobalObserver (OSC& o, Session& s, ArdourSurface::OSC::OS _osc.text_message (X_("/monitor/name"), "Monitor", addr); std::shared_ptr mon_mute_cont = strip->monitor_control()->cut_control(); - mon_mute_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/mute"), mon_mute_cont), OSC::instance()); + mon_mute_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/mute"), mon_mute_cont), OSC::instance()); send_change_message (X_("/monitor/mute"), mon_mute_cont); std::shared_ptr mon_dim_cont = strip->monitor_control()->dim_control(); - mon_dim_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/dim"), mon_dim_cont), OSC::instance()); + mon_dim_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/dim"), mon_dim_cont), OSC::instance()); send_change_message (X_("/monitor/dim"), mon_dim_cont); std::shared_ptr mon_mono_cont = strip->monitor_control()->mono_control(); - mon_mono_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/mono"), mon_mono_cont), OSC::instance()); + mon_mono_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/mono"), mon_mono_cont), OSC::instance()); send_change_message (X_("/monitor/mono"), mon_mono_cont); gain_controllable = std::dynamic_pointer_cast(strip->gain_control()); - gain_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_gain_message, this, X_("/monitor/"), strip->gain_control()), OSC::instance()); + gain_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_gain_message, this, X_("/monitor/"), strip->gain_control()), OSC::instance()); send_gain_message (X_("/monitor/"), gain_controllable); } //Transport feedback - session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_transport_state_changed, this), OSC::instance()); + session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_transport_state_changed, this), OSC::instance()); send_transport_state_changed (); - session->TransportLooped.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_transport_state_changed, this), OSC::instance()); - session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_record_state_changed, this), OSC::instance()); + session->TransportLooped.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_transport_state_changed, this), OSC::instance()); + session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_record_state_changed, this), OSC::instance()); send_record_state_changed (); marks_changed (); // session feedback - session->StateSaved.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::session_name, this, X_("/session_name"), _1), OSC::instance()); + session->StateSaved.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::session_name, this, X_("/session_name"), _1), OSC::instance()); session_name (X_("/session_name"), session->snap_name()); - session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::solo_active, this, _1), OSC::instance()); + session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::solo_active, this, _1), OSC::instance()); solo_active (session->soloing() || session->listening()); std::shared_ptr click_controllable = std::dynamic_pointer_cast(session->click_gain()->gain_control()); - click_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_change_message, this, X_("/click/level"), click_controllable), OSC::instance()); + click_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/click/level"), click_controllable), OSC::instance()); send_change_message (X_("/click/level"), click_controllable); - session->route_group_added.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::group_changed, this, _1), OSC::instance()); - session->route_group_removed.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::group_changed, this), OSC::instance()); - session->route_groups_reordered.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::group_changed, this), OSC::instance()); + session->route_group_added.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this, _1), OSC::instance()); + session->route_group_removed.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this), OSC::instance()); + session->route_groups_reordered.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this), OSC::instance()); _osc.send_group_list (addr); extra_check (); diff --git a/libs/surfaces/osc/osc_route_observer.cc b/libs/surfaces/osc/osc_route_observer.cc index 3585fec481..39b595790f 100644 --- a/libs/surfaces/osc/osc_route_observer.cc +++ b/libs/surfaces/osc/osc_route_observer.cc @@ -138,28 +138,28 @@ OSCRouteObserver::refresh_strip (std::shared_ptr new_strip, b clear_strip (); return; } - _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::no_strip, this), OSC::instance()); + _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::no_strip, this), OSC::instance()); as = ARDOUR::Off; if (feedback[0]) { // buttons are separate feedback - _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::name_changed, this, boost::lambda::_1), OSC::instance()); + _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::name_changed, this,_1), OSC::instance()); name_changed (ARDOUR::Properties::name); std::shared_ptr rt = std::dynamic_pointer_cast (_strip); if (rt) { - rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::group_name, this), OSC::instance()); + rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::group_name, this), OSC::instance()); group_name (); } - _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::pi_changed, this, _1), OSC::instance()); + _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::pi_changed, this, _1), OSC::instance()); _osc.int_message_with_id (X_("/strip/hide"), ssid, _strip->is_hidden (), in_line, addr); - _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/mute"), _strip->mute_control()), OSC::instance()); - _strip->mute_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_automation, this, X_("/strip/mute"), _strip->mute_control()), OSC::instance()); + _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/mute"), _strip->mute_control()), OSC::instance()); + _strip->mute_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/mute"), _strip->mute_control()), OSC::instance()); send_automation (X_("/strip/mute"), _strip->mute_control()); send_change_message (X_("/strip/mute"), _strip->mute_control()); - _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo"), _strip->solo_control()), OSC::instance()); + _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo"), _strip->solo_control()), OSC::instance()); send_change_message (X_("/strip/solo"), _strip->solo_control()); if (_strip->solo_isolate_control()) { @@ -174,35 +174,35 @@ OSCRouteObserver::refresh_strip (std::shared_ptr new_strip, b std::shared_ptr track = std::dynamic_pointer_cast (_strip); if (track) { - track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_monitor_status, this, track->monitoring_control()), OSC::instance()); + track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_monitor_status, this, track->monitoring_control()), OSC::instance()); send_monitor_status (track->monitoring_control()); } std::shared_ptr rec_controllable = _strip->rec_enable_control (); if (rec_controllable) { - rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/recenable"), _strip->rec_enable_control()), OSC::instance()); + rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/recenable"), _strip->rec_enable_control()), OSC::instance()); send_change_message (X_("/strip/recenable"), _strip->rec_enable_control()); } std::shared_ptr recsafe_controllable = _strip->rec_safe_control (); if (rec_controllable) { - recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/record_safe"), _strip->rec_safe_control()), OSC::instance()); + recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/record_safe"), _strip->rec_safe_control()), OSC::instance()); send_change_message (X_("/strip/record_safe"), _strip->rec_safe_control()); } - _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_select_status, this, _1), OSC::instance()); + _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_select_status, this, _1), OSC::instance()); send_select_status (ARDOUR::Properties::selected); } if (feedback[1]) { // level controls _gain_control = _strip->gain_control(); - _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::gain_automation, this), OSC::instance()); - _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_gain_message, this), OSC::instance()); + _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::gain_automation, this), OSC::instance()); + _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_gain_message, this), OSC::instance()); gain_automation (); std::shared_ptr trim_control = std::dynamic_pointer_cast(_strip->trim_control()); if (trim_control) { - _strip->trim_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_automation, this, X_("/strip/trimdB"), _strip->trim_control()), OSC::instance()); + _strip->trim_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/trimdB"), _strip->trim_control()), OSC::instance()); send_automation (X_("/strip/trimdB"), _strip->trim_control()); - trim_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_trim_message, this), OSC::instance()); + trim_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_trim_message, this), OSC::instance()); send_trim_message (); } @@ -212,7 +212,7 @@ OSCRouteObserver::refresh_strip (std::shared_ptr new_strip, b current_pan_shell = pan_sh; if (pan_sh) { - pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::panner_changed, this, current_pan_shell), OSC::instance()); + pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::panner_changed, this, current_pan_shell), OSC::instance()); } panner_changed (pan_sh); } else { @@ -251,24 +251,24 @@ OSCRouteObserver::refresh_send (std::shared_ptr new_send, bool for } _send = new_send; send_clear (); - _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::no_strip, this), OSC::instance()); + _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::no_strip, this), OSC::instance()); as = ARDOUR::Off; if (feedback[0]) { // buttons are separate feedback - _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::name_changed, this, boost::lambda::_1), OSC::instance()); + _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::name_changed, this,_1), OSC::instance()); name_changed (ARDOUR::Properties::name); } if (feedback[1]) { // level controls _gain_control = _send->gain_control(); - _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::gain_automation, this), OSC::instance()); - _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_gain_message, this), OSC::instance()); + _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::gain_automation, this), OSC::instance()); + _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_gain_message, this), OSC::instance()); gain_automation (); std::shared_ptr pan_sh = _send->panner_shell(); current_pan_shell = pan_sh; if (pan_sh) { - pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::panner_changed, this, current_pan_shell), OSC::instance()); + pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::panner_changed, this, current_pan_shell), OSC::instance()); } panner_changed (pan_sh); @@ -469,8 +469,8 @@ OSCRouteObserver::panner_changed (std::shared_ptr pan_sh) if (pan_controllable) { std::shared_ptrat = std::dynamic_pointer_cast (pan_controllable); - pan_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_position"), current_pan_shell->panner()->pannable()->pan_azimuth_control), OSC::instance()); - at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_automation, this, X_("/strip/pan_stereo_position"), current_pan_shell->panner()->pannable()->pan_azimuth_control), OSC::instance()); + pan_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_position"), current_pan_shell->panner()->pannable()->pan_azimuth_control), OSC::instance()); + at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/pan_stereo_position"), current_pan_shell->panner()->pannable()->pan_azimuth_control), OSC::instance()); send_change_message (X_("/strip/pan_stereo_position"), pan_controllable); send_automation (X_("/strip/pan_stereo_position"), pan_controllable); } else { @@ -479,8 +479,8 @@ OSCRouteObserver::panner_changed (std::shared_ptr pan_sh) std::shared_ptr width_controllable = std::dynamic_pointer_cast(pan_sh->panner()->pannable()->pan_width_control); if (width_controllable) { std::shared_ptrat = std::dynamic_pointer_cast (width_controllable); - width_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_width"), current_pan_shell->panner()->pannable()->pan_width_control), OSC::instance()); - at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_automation, this, X_("/strip/pan_stereo_width"), current_pan_shell->panner()->pannable()->pan_width_control), OSC::instance()); + width_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_width"), current_pan_shell->panner()->pannable()->pan_width_control), OSC::instance()); + at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/pan_stereo_width"), current_pan_shell->panner()->pannable()->pan_width_control), OSC::instance()); send_change_message (X_("/strip/pan_stereo_width"), width_controllable); send_automation (X_("/strip/pan_stereo_width"), width_controllable); } else { diff --git a/libs/surfaces/osc/osc_select_observer.cc b/libs/surfaces/osc/osc_select_observer.cc index 5efb441ebc..b7eec337ae 100644 --- a/libs/surfaces/osc/osc_select_observer.cc +++ b/libs/surfaces/osc/osc_select_observer.cc @@ -142,30 +142,30 @@ OSCSelectObserver::refresh_strip (std::shared_ptr new_strip, return; } - _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::no_strip, this), OSC::instance()); + _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::no_strip, this), OSC::instance()); as = ARDOUR::Off; _comp_redux = 1; nsends = s_nsends; _last_gain = -1.0; _last_trim = -1.0; - _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::name_changed, this, boost::lambda::_1), OSC::instance()); + _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::name_changed, this,_1), OSC::instance()); name_changed (ARDOUR::Properties::name); std::shared_ptr rt = std::dynamic_pointer_cast (_strip); if (rt) { - rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::group_name, this), OSC::instance()); + rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::group_name, this), OSC::instance()); group_name (); - rt->comment_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::comment_changed, this), OSC::instance()); + rt->comment_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::comment_changed, this), OSC::instance()); comment_changed (); - session->RouteGroupPropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::group_sharing, this, _1), OSC::instance()); + session->RouteGroupPropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::group_sharing, this, _1), OSC::instance()); group_sharing (rt->route_group ()); std::shared_ptr pan_sh = rt->panner_shell(); if (pan_sh) { - pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::panner_changed, this), OSC::instance()); + pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::panner_changed, this), OSC::instance()); } panner_changed (); @@ -173,63 +173,63 @@ OSCSelectObserver::refresh_strip (std::shared_ptr new_strip, group_sharing (0); } - _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::pi_changed, this, _1), OSC::instance()); + _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::pi_changed, this, _1), OSC::instance()); _osc.float_message (X_("/select/hide"), _strip->is_hidden (), addr); - _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/mute"), _strip->mute_control()), OSC::instance()); - _strip->mute_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_automation, this, X_("/select/mute"), _strip->mute_control()), OSC::instance()); + _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/mute"), _strip->mute_control()), OSC::instance()); + _strip->mute_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/mute"), _strip->mute_control()), OSC::instance()); change_message (X_("/select/mute"), _strip->mute_control()); send_automation (X_("/select/mute"), _strip->mute_control()); - _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/solo"), _strip->solo_control()), OSC::instance()); + _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo"), _strip->solo_control()), OSC::instance()); change_message (X_("/select/solo"), _strip->solo_control()); if (_strip->solo_isolate_control()) { - _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_iso"), _strip->solo_isolate_control()), OSC::instance()); + _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_iso"), _strip->solo_isolate_control()), OSC::instance()); change_message (X_("/select/solo_iso"), _strip->solo_isolate_control()); } if (_strip->solo_safe_control()) { - _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_safe"), _strip->solo_safe_control()), OSC::instance()); + _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_safe"), _strip->solo_safe_control()), OSC::instance()); change_message (X_("/select/solo_safe"), _strip->solo_safe_control()); } std::shared_ptr track = std::dynamic_pointer_cast (_strip); if (track) { - track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::monitor_status, this, track->monitoring_control()), OSC::instance()); + track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::monitor_status, this, track->monitoring_control()), OSC::instance()); monitor_status (track->monitoring_control()); } std::shared_ptr rec_controllable = _strip->rec_enable_control (); if (rec_controllable) { - rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/recenable"), _strip->rec_enable_control()), OSC::instance()); + rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/recenable"), _strip->rec_enable_control()), OSC::instance()); change_message (X_("/select/recenable"), _strip->rec_enable_control()); } std::shared_ptr recsafe_controllable = _strip->rec_safe_control (); if (recsafe_controllable) { - recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/record_safe"), _strip->rec_safe_control()), OSC::instance()); + recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/record_safe"), _strip->rec_safe_control()), OSC::instance()); change_message (X_("/select/record_safe"), _strip->rec_safe_control()); } std::shared_ptr phase_controllable = _strip->phase_control (); if (phase_controllable) { - phase_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/polarity"), _strip->phase_control()), OSC::instance()); + phase_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/polarity"), _strip->phase_control()), OSC::instance()); change_message (X_("/select/polarity"), _strip->phase_control()); } - _strip->gain_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::gain_automation, this), OSC::instance()); - _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::gain_message, this), OSC::instance()); + _strip->gain_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::gain_automation, this), OSC::instance()); + _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::gain_message, this), OSC::instance()); gain_automation (); std::shared_ptr slv = std::dynamic_pointer_cast (_strip); - slv->AssignmentChange.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::slaved_changed, this, _1, _2), OSC::instance()); + slv->AssignmentChange.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::slaved_changed, this, _1, _2), OSC::instance()); slaved_changed (std::shared_ptr(), false); std::shared_ptr trim_controllable = std::dynamic_pointer_cast(_strip->trim_control()); if (trim_controllable) { - trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::trim_message, this, X_("/select/trimdB"), _strip->trim_control()), OSC::instance()); - _strip->trim_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_automation, this, X_("/select/trimdB"), _strip->trim_control()), OSC::instance()); + trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::trim_message, this, X_("/select/trimdB"), _strip->trim_control()), OSC::instance()); + _strip->trim_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/trimdB"), _strip->trim_control()), OSC::instance()); trim_message (X_("/select/trimdB"), _strip->trim_control()); send_automation (X_("/select/trimdB"), _strip->trim_control()); } @@ -239,29 +239,29 @@ OSCSelectObserver::refresh_strip (std::shared_ptr new_strip, // but... MB master send enable is different if (_strip->master_send_enable_controllable ()) { - _strip->master_send_enable_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message, this, X_("/select/master_send_enable"), _strip->master_send_enable_controllable()), OSC::instance()); + _strip->master_send_enable_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/master_send_enable"), _strip->master_send_enable_controllable()), OSC::instance()); enable_message (X_("/select/master_send_enable"), _strip->master_send_enable_controllable()); } // Compressor if (_strip->mapped_control (Comp_Enable)) { - _strip->mapped_control (Comp_Enable)->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message, this, X_("/select/comp_enable"), _strip->mapped_control (Comp_Enable)), OSC::instance()); + _strip->mapped_control (Comp_Enable)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/comp_enable"), _strip->mapped_control (Comp_Enable)), OSC::instance()); enable_message (X_("/select/comp_enable"), _strip->mapped_control (Comp_Enable)); } if (_strip->mapped_control (Comp_Threshold)) { - _strip->mapped_control (Comp_Threshold)->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_threshold"), _strip->mapped_control (Comp_Threshold)), OSC::instance()); + _strip->mapped_control (Comp_Threshold)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_threshold"), _strip->mapped_control (Comp_Threshold)), OSC::instance()); change_message (X_("/select/comp_threshold"), _strip->mapped_control (Comp_Threshold)); } if (_strip->mapped_control (Comp_Mode)) { - _strip->mapped_control (Comp_Mode)->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::comp_mode, this), OSC::instance()); + _strip->mapped_control (Comp_Mode)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::comp_mode, this), OSC::instance()); comp_mode (); } if (_strip->mapped_control (Comp_Makeup)) { - _strip->mapped_control (Comp_Makeup)->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_makeup"), _strip->mapped_control (Comp_Makeup)), OSC::instance()); + _strip->mapped_control (Comp_Makeup)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_makeup"), _strip->mapped_control (Comp_Makeup)), OSC::instance()); change_message (X_("/select/comp_makeup"), _strip->mapped_control (Comp_Makeup)); } - _strip->MappedControlsChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::eq_restart, this, 0), OSC::instance ()); + _strip->MappedControlsChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::eq_restart, this, 0), OSC::instance ()); renew_sends (); renew_plugin (); @@ -393,7 +393,7 @@ OSCSelectObserver::send_init() bool send_valid = false; if (_strip->send_level_controllable (s)) { - _strip->send_level_controllable(s)->Changed.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_gain, this, c, _strip->send_level_controllable(s)), OSC::instance()); + _strip->send_level_controllable(s)->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_gain, this, c, _strip->send_level_controllable(s)), OSC::instance()); send_timeout.push_back (2); _last_send.push_back (20.0); send_gain (c, _strip->send_level_controllable(s)); @@ -405,7 +405,7 @@ OSCSelectObserver::send_init() } if (_strip->send_enable_controllable (s)) { - _strip->send_enable_controllable(s)->Changed.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message_with_id, this, X_("/select/send_enable"), c, _strip->send_enable_controllable(s)), OSC::instance()); + _strip->send_enable_controllable(s)->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message_with_id, this, X_("/select/send_enable"), c, _strip->send_enable_controllable(s)), OSC::instance()); enable_message_with_id (X_("/select/send_enable"), c, _strip->send_enable_controllable(s)); } else if (send_valid) { std::shared_ptr r = std::dynamic_pointer_cast (_strip); @@ -416,7 +416,7 @@ OSCSelectObserver::send_init() std::shared_ptr snd = std::dynamic_pointer_cast (r->nth_send(s)); if (snd) { std::shared_ptr proc = std::dynamic_pointer_cast (snd); - proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_enable, this, X_("/select/send_enable"), c, proc), OSC::instance()); + proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_enable, this, X_("/select/send_enable"), c, proc), OSC::instance()); _osc.float_message_with_id (X_("/select/send_enable"), c, proc->enabled(), in_line, addr); } } @@ -496,7 +496,7 @@ OSCSelectObserver::plugin_init() } std::shared_ptr pip = pi->plugin(); // we have a plugin we can ask if it is activated - proc->ActiveChanged.connect (plugin_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::plug_enable, this, X_("/select/plugin/activate"), proc), OSC::instance()); + proc->ActiveChanged.connect (plugin_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::plug_enable, this, X_("/select/plugin/activate"), proc), OSC::instance()); _osc.float_message (X_("/select/plugin/activate"), proc->enabled(), addr); bool ok = false; @@ -545,7 +545,7 @@ OSCSelectObserver::plugin_init() if (pd.integer_step && pd.upper == 1) { swtch = true; } - c->Changed.connect (plugin_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::plugin_parameter_changed, this, pid, swtch, c), OSC::instance()); + c->Changed.connect (plugin_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::plugin_parameter_changed, this, pid, swtch, c), OSC::instance()); plugin_parameter_changed (pid, swtch, c); } } @@ -698,8 +698,8 @@ OSCSelectObserver::panner_changed () std::shared_ptr pan_controllable = std::dynamic_pointer_cast(_strip->pan_azimuth_control()); if (pan_controllable) { std::shared_ptrat = std::dynamic_pointer_cast (pan_controllable); - pan_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), OSC::instance()); - at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_automation, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), OSC::instance()); + pan_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), OSC::instance()); + at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), OSC::instance()); change_message (X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()); send_automation (X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()); } @@ -707,23 +707,23 @@ OSCSelectObserver::panner_changed () std::shared_ptr width_controllable = std::dynamic_pointer_cast(_strip->pan_width_control()); if (width_controllable) { std::shared_ptrat = std::dynamic_pointer_cast (width_controllable); - width_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), OSC::instance()); - at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_automation, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), OSC::instance()); + width_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), OSC::instance()); + at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), OSC::instance()); change_message (X_("/select/pan_stereo_width"), _strip->pan_width_control()); send_automation (X_("/select/pan_stereo_width"), _strip->pan_width_control()); } // Rest of possible pan controls... Untested because I can't find a way to get them in the GUI :) if (_strip->pan_elevation_control ()) { - _strip->pan_elevation_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_elevation_position"), _strip->pan_elevation_control()), OSC::instance()); + _strip->pan_elevation_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_elevation_position"), _strip->pan_elevation_control()), OSC::instance()); change_message (X_("/select/pan_elevation_position"), _strip->pan_elevation_control()); } if (_strip->pan_frontback_control ()) { - _strip->pan_frontback_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_frontback_position"), _strip->pan_frontback_control()), OSC::instance()); + _strip->pan_frontback_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_frontback_position"), _strip->pan_frontback_control()), OSC::instance()); change_message (X_("/select/pan_frontback_position"), _strip->pan_frontback_control()); } if (_strip->pan_lfe_control ()) { - _strip->pan_lfe_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_lfe_control"), _strip->pan_lfe_control()), OSC::instance()); + _strip->pan_lfe_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_lfe_control"), _strip->pan_lfe_control()), OSC::instance()); change_message (X_("/select/pan_lfe_control"), _strip->pan_lfe_control()); } } else { @@ -1077,37 +1077,37 @@ OSCSelectObserver::eq_init() { // HPF and enable are special case, rest are in bands if (_strip->mapped_control (HPF_Enable)) { - _strip->mapped_control (HPF_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/enable"), _strip->mapped_control (HPF_Enable)), OSC::instance()); + _strip->mapped_control (HPF_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/enable"), _strip->mapped_control (HPF_Enable)), OSC::instance()); change_message (X_("/select/eq_hpf/enable"), _strip->mapped_control (HPF_Enable)); } if (_strip->mapped_control (LPF_Enable)) { - _strip->mapped_control (LPF_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/enable"), _strip->mapped_control (LPF_Enable)), OSC::instance()); + _strip->mapped_control (LPF_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/enable"), _strip->mapped_control (LPF_Enable)), OSC::instance()); change_message (X_("/select/eq_lpf/enable"), _strip->mapped_control (LPF_Enable)); } if (_strip->mapped_control (HPF_Freq)) { - _strip->mapped_control (HPF_Freq)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/freq"), _strip->mapped_control (HPF_Freq)), OSC::instance()); + _strip->mapped_control (HPF_Freq)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/freq"), _strip->mapped_control (HPF_Freq)), OSC::instance()); change_message (X_("/select/eq_hpf/freq"), _strip->mapped_control (HPF_Freq)); } if (_strip->mapped_control (LPF_Freq)) { - _strip->mapped_control (LPF_Freq)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/freq"), _strip->mapped_control (LPF_Freq)), OSC::instance()); + _strip->mapped_control (LPF_Freq)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/freq"), _strip->mapped_control (LPF_Freq)), OSC::instance()); change_message (X_("/select/eq_lpf/freq"), _strip->mapped_control (LPF_Freq)); } if (_strip->mapped_control (HPF_Slope)) { - _strip->mapped_control (HPF_Slope)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/slope"), _strip->mapped_control (HPF_Slope)), OSC::instance()); + _strip->mapped_control (HPF_Slope)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/slope"), _strip->mapped_control (HPF_Slope)), OSC::instance()); change_message (X_("/select/eq_hpf/slope"), _strip->mapped_control (HPF_Slope)); } if (_strip->mapped_control (LPF_Slope)) { - _strip->mapped_control (LPF_Slope)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/slope"), _strip->mapped_control (LPF_Slope)), OSC::instance()); + _strip->mapped_control (LPF_Slope)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/slope"), _strip->mapped_control (LPF_Slope)), OSC::instance()); change_message (X_("/select/eq_lpf/slope"), _strip->mapped_control (LPF_Slope)); } if (_strip->mapped_control (EQ_Enable)) { - _strip->mapped_control (EQ_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message, this, X_("/select/eq_enable"), _strip->mapped_control(EQ_Enable)), OSC::instance()); + _strip->mapped_control (EQ_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/eq_enable"), _strip->mapped_control(EQ_Enable)), OSC::instance()); enable_message (X_("/select/eq_enable"), _strip->mapped_control(EQ_Enable)); } @@ -1124,19 +1124,19 @@ OSCSelectObserver::eq_init() _osc.text_message_with_id (X_("/select/eq_band_name"), i + 1, _strip->eq_band_name (i), in_line, addr); } if (_strip->mapped_control (EQ_BandGain, i)) { - _strip->mapped_control(EQ_BandGain, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i)), OSC::instance()); + _strip->mapped_control(EQ_BandGain, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i)), OSC::instance()); change_message_with_id (X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i)); } if (_strip->mapped_control (EQ_BandFreq, i)) { - _strip->mapped_control (EQ_BandFreq, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i)), OSC::instance()); + _strip->mapped_control (EQ_BandFreq, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i)), OSC::instance()); change_message_with_id (X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i)); } if (_strip->mapped_control (EQ_BandQ, i)) { - _strip->mapped_control (EQ_BandQ, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i)), OSC::instance()); + _strip->mapped_control (EQ_BandQ, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i)), OSC::instance()); change_message_with_id (X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i)); } if (_strip->mapped_control (EQ_BandShape, i)) { - _strip->mapped_control (EQ_BandShape, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i)), OSC::instance()); + _strip->mapped_control (EQ_BandShape, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i)), OSC::instance()); change_message_with_id (X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i)); } } diff --git a/libs/surfaces/push2/cues.cc b/libs/surfaces/push2/cues.cc index f2a228cadf..5feb43dd03 100644 --- a/libs/surfaces/push2/cues.cc +++ b/libs/surfaces/push2/cues.cc @@ -151,7 +151,7 @@ CueLayout::CueLayout (Push2& p, Session & s, std::string const & name) _clip_label_text.push_back (t); } - _session.RouteAdded.connect (_session_connections, invalidator(*this), boost::bind (&CueLayout::viewport_changed, this), &_p2); + _session.RouteAdded.connect (_session_connections, invalidator(*this), std::bind (&CueLayout::viewport_changed, this), &_p2); } CueLayout::~CueLayout () @@ -375,8 +375,8 @@ CueLayout::viewport_changed () std::shared_ptr lower_button = _p2.lower_button_by_column (n); if (r) { - _route[n]->DropReferences.connect (_route_connections, invalidator (*this), boost::bind (&CueLayout::viewport_changed, this), &_p2); - _route[n]->presentation_info().PropertyChanged.connect (_route_connections, invalidator (*this), boost::bind (&CueLayout::route_property_change, this, _1, n), &_p2); + _route[n]->DropReferences.connect (_route_connections, invalidator (*this), std::bind (&CueLayout::viewport_changed, this), &_p2); + _route[n]->presentation_info().PropertyChanged.connect (_route_connections, invalidator (*this), std::bind (&CueLayout::route_property_change, this, _1, n), &_p2); std::string shortname = short_version (r->name(), 10); _lower_text[n]->set (shortname); @@ -425,7 +425,7 @@ CueLayout::viewport_changed () std::shared_ptr tb = r->triggerbox (); if (tb) { - tb->PropertyChanged.connect (_route_connections, invalidator (*this), boost::bind (&CueLayout::triggerbox_property_change, this, _1, n), &_p2); + tb->PropertyChanged.connect (_route_connections, invalidator (*this), std::bind (&CueLayout::triggerbox_property_change, this, _1, n), &_p2); } for (int y = 0; y < 8; ++y) { @@ -435,7 +435,7 @@ CueLayout::viewport_changed () if (tp && tp->playable()) { /* trigger in slot */ pad->set_color (color); - tp->PropertyChanged.connect (_trig_connections[n * 8 + y], invalidator (*this), boost::bind (&CueLayout::trigger_property_change, this, _1, n, y), &_p2); + tp->PropertyChanged.connect (_trig_connections[n * 8 + y], invalidator (*this), std::bind (&CueLayout::trigger_property_change, this, _1, n, y), &_p2); } else { /* no trigger */ diff --git a/libs/surfaces/push2/gui.cc b/libs/surfaces/push2/gui.cc index eaa8d57dd8..e4e563b053 100644 --- a/libs/surfaces/push2/gui.cc +++ b/libs/surfaces/push2/gui.cc @@ -144,9 +144,9 @@ P2GUI::P2GUI (Push2& p) /* catch future changes to connection state */ - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&P2GUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&P2GUI::connection_handler, this), gui_context()); - _p2.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&P2GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&P2GUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&P2GUI::connection_handler, this), gui_context()); + _p2.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&P2GUI::connection_handler, this), gui_context()); } P2GUI::~P2GUI () diff --git a/libs/surfaces/push2/knob.cc b/libs/surfaces/push2/knob.cc index ecab3119e3..225ffcae2e 100644 --- a/libs/surfaces/push2/knob.cc +++ b/libs/surfaces/push2/knob.cc @@ -266,7 +266,7 @@ Push2Knob::set_controllable (std::shared_ptr c) } _controllable = c; - _controllable->Changed.connect (watch_connection, invalidator(*this), boost::bind (&Push2Knob::controllable_changed, this), &_p2); + _controllable->Changed.connect (watch_connection, invalidator(*this), std::bind (&Push2Knob::controllable_changed, this), &_p2); controllable_changed (); } diff --git a/libs/surfaces/push2/level_meter.cc b/libs/surfaces/push2/level_meter.cc index 302af2c29f..df40ec8291 100644 --- a/libs/surfaces/push2/level_meter.cc +++ b/libs/surfaces/push2/level_meter.cc @@ -55,7 +55,7 @@ LevelMeter::LevelMeter (Push2& p, Item* parent, int len, Meter::Orientation o) , _meter_count (0) , _max_visible_meters (0) { - Config->ParameterChanged.connect (_parameter_connection, invalidator(*this), boost::bind (&LevelMeter::parameter_changed, this, _1), &_p2); + Config->ParameterChanged.connect (_parameter_connection, invalidator(*this), std::bind (&LevelMeter::parameter_changed, this, _1), &_p2); if (_meter_orientation == Meter::Vertical) { _meter_packer = new HBox (this); @@ -86,8 +86,8 @@ LevelMeter::set_meter (PeakMeter* meter) _meter = meter; if (_meter) { - _meter->ConfigurationChanged.connect (_configuration_connection, invalidator(*this), boost::bind (&LevelMeter::configuration_changed, this, _1, _2), &_p2); - _meter->MeterTypeChanged.connect (_meter_type_connection, invalidator (*this), boost::bind (&LevelMeter::meter_type_changed, this, _1), &_p2); + _meter->ConfigurationChanged.connect (_configuration_connection, invalidator(*this), std::bind (&LevelMeter::configuration_changed, this, _1, _2), &_p2); + _meter->MeterTypeChanged.connect (_meter_type_connection, invalidator (*this), std::bind (&LevelMeter::meter_type_changed, this, _1), &_p2); } setup_meters (_meter_length, _regular_meter_width, _thin_meter_width); diff --git a/libs/surfaces/push2/mix.cc b/libs/surfaces/push2/mix.cc index 2990a1c90b..d6eca91d23 100644 --- a/libs/surfaces/push2/mix.cc +++ b/libs/surfaces/push2/mix.cc @@ -159,8 +159,8 @@ MixLayout::MixLayout (Push2& p, Session & s, std::string const & name) _mode_button = _p2.button_by_id (Push2::Upper1); - _session.RouteAdded.connect (_session_connections, invalidator(*this), boost::bind (&MixLayout::stripables_added, this), &_p2); - _session.vca_manager().VCAAdded.connect (_session_connections, invalidator (*this), boost::bind (&MixLayout::stripables_added, this), &_p2); + _session.RouteAdded.connect (_session_connections, invalidator(*this), std::bind (&MixLayout::stripables_added, this), &_p2); + _session.vca_manager().VCAAdded.connect (_session_connections, invalidator (*this), std::bind (&MixLayout::stripables_added, this), &_p2); } MixLayout::~MixLayout () @@ -579,10 +579,10 @@ MixLayout::switch_bank (uint32_t base) /* stripable goes away? refill the bank, starting at the same point */ - _stripable[n]->DropReferences.connect (_stripable_connections, invalidator (*this), boost::bind (&MixLayout::switch_bank, this, _bank_start), &_p2); - _stripable[n]->presentation_info().PropertyChanged.connect (_stripable_connections, invalidator (*this), boost::bind (&MixLayout::stripable_property_change, this, _1, n), &_p2); - _stripable[n]->solo_control()->Changed.connect (_stripable_connections, invalidator (*this), boost::bind (&MixLayout::solo_changed, this, n), &_p2); - _stripable[n]->mute_control()->Changed.connect (_stripable_connections, invalidator (*this), boost::bind (&MixLayout::mute_changed, this, n), &_p2); + _stripable[n]->DropReferences.connect (_stripable_connections, invalidator (*this), std::bind (&MixLayout::switch_bank, this, _bank_start), &_p2); + _stripable[n]->presentation_info().PropertyChanged.connect (_stripable_connections, invalidator (*this), std::bind (&MixLayout::stripable_property_change, this, _1, n), &_p2); + _stripable[n]->solo_control()->Changed.connect (_stripable_connections, invalidator (*this), std::bind (&MixLayout::solo_changed, this, n), &_p2); + _stripable[n]->mute_control()->Changed.connect (_stripable_connections, invalidator (*this), std::bind (&MixLayout::mute_changed, this, n), &_p2); if (_stripable[n]->is_selected()) { show_selection (n); diff --git a/libs/surfaces/push2/scale.cc b/libs/surfaces/push2/scale.cc index fa190eb79e..a159c19990 100644 --- a/libs/surfaces/push2/scale.cc +++ b/libs/surfaces/push2/scale.cc @@ -200,7 +200,7 @@ ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name) build_scale_menu (); - _p2.ScaleChange.connect (_p2_connections, invalidator (*this), boost::bind (&ScaleLayout::show_root_state, this), &_p2); + _p2.ScaleChange.connect (_p2_connections, invalidator (*this), std::bind (&ScaleLayout::show_root_state, this), &_p2); } ScaleLayout::~ScaleLayout () @@ -501,7 +501,7 @@ ScaleLayout::build_scale_menu () v.push_back ("Algeria"); _scale_menu = new Push2Menu (this, v); - _scale_menu->Rearranged.connect (_menu_connections, invalidator (*this), boost::bind (&ScaleLayout::menu_rearranged, this), &_p2); + _scale_menu->Rearranged.connect (_menu_connections, invalidator (*this), std::bind (&ScaleLayout::menu_rearranged, this), &_p2); _scale_menu->set_layout (6, 6); _scale_menu->set_text_color (_p2.get_color (Push2::ParameterName)); @@ -518,7 +518,7 @@ ScaleLayout::build_scale_menu () /* listen for changes */ - _scale_menu->ActiveChanged.connect (_menu_connections, invalidator (*this), boost::bind (&ScaleLayout::mode_changed, this), &_p2); + _scale_menu->ActiveChanged.connect (_menu_connections, invalidator (*this), std::bind (&ScaleLayout::mode_changed, this), &_p2); } void diff --git a/libs/surfaces/push2/track_mix.cc b/libs/surfaces/push2/track_mix.cc index a1028aa1dc..fd8c338686 100644 --- a/libs/surfaces/push2/track_mix.cc +++ b/libs/surfaces/push2/track_mix.cc @@ -467,22 +467,22 @@ TrackMixLayout::set_stripable (std::shared_ptr s) if (_stripable) { - _stripable->DropReferences.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::drop_stripable, this), &_p2); + _stripable->DropReferences.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::drop_stripable, this), &_p2); - _stripable->PropertyChanged.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::stripable_property_change, this, _1), &_p2); - _stripable->presentation_info().PropertyChanged.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::stripable_property_change, this, _1), &_p2); + _stripable->PropertyChanged.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::stripable_property_change, this, _1), &_p2); + _stripable->presentation_info().PropertyChanged.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::stripable_property_change, this, _1), &_p2); - _stripable->solo_control()->Changed.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::solo_mute_change, this), &_p2); - _stripable->mute_control()->Changed.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::solo_mute_change, this), &_p2); - _stripable->solo_isolate_control()->Changed.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::solo_iso_change, this), &_p2); - _stripable->solo_safe_control()->Changed.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::solo_safe_change, this), &_p2); + _stripable->solo_control()->Changed.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::solo_mute_change, this), &_p2); + _stripable->mute_control()->Changed.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::solo_mute_change, this), &_p2); + _stripable->solo_isolate_control()->Changed.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::solo_iso_change, this), &_p2); + _stripable->solo_safe_control()->Changed.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::solo_safe_change, this), &_p2); if (_stripable->rec_enable_control()) { - _stripable->rec_enable_control()->Changed.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::rec_enable_change, this), &_p2); + _stripable->rec_enable_control()->Changed.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::rec_enable_change, this), &_p2); } if (_stripable->monitoring_control()) { - _stripable->monitoring_control()->Changed.connect (_stripable_connections, invalidator (*this), boost::bind (&TrackMixLayout::monitoring_change, this), &_p2); + _stripable->monitoring_control()->Changed.connect (_stripable_connections, invalidator (*this), std::bind (&TrackMixLayout::monitoring_change, this), &_p2); } _knobs[0]->set_controllable (_stripable->gain_control()); diff --git a/libs/surfaces/us2400/gui.cc b/libs/surfaces/us2400/gui.cc index 70709c4b1c..54847d74e3 100644 --- a/libs/surfaces/us2400/gui.cc +++ b/libs/surfaces/us2400/gui.cc @@ -105,10 +105,10 @@ US2400ProtocolGUI::US2400ProtocolGUI (US2400Protocol& p) table.set_border_width (12); table.set_homogeneous (false); - _cp.DeviceChanged.connect (device_change_connection, invalidator (*this), boost::bind (&US2400ProtocolGUI::device_changed, this), gui_context()); - _cp.ConnectionChange.connect (_port_connections, invalidator (*this), boost::bind (&US2400ProtocolGUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), boost::bind (&US2400ProtocolGUI::connection_handler, this), gui_context()); - ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), boost::bind (&US2400ProtocolGUI::connection_handler, this), gui_context()); + _cp.DeviceChanged.connect (device_change_connection, invalidator (*this), std::bind (&US2400ProtocolGUI::device_changed, this), gui_context()); + _cp.ConnectionChange.connect (_port_connections, invalidator (*this), std::bind (&US2400ProtocolGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortRegisteredOrUnregistered.connect (_port_connections, invalidator (*this), std::bind (&US2400ProtocolGUI::connection_handler, this), gui_context()); + ARDOUR::AudioEngine::instance()->PortPrettyNameChanged.connect (_port_connections, invalidator (*this), std::bind (&US2400ProtocolGUI::connection_handler, this), gui_context()); /* device-dependent part */ diff --git a/libs/surfaces/us2400/strip.cc b/libs/surfaces/us2400/strip.cc index c8a87996ae..7eda0c8c82 100644 --- a/libs/surfaces/us2400/strip.cc +++ b/libs/surfaces/us2400/strip.cc @@ -188,27 +188,27 @@ Strip::set_stripable (std::shared_ptr r, bool /*with_messages*/) _solo->set_control (_stripable->solo_control()); _mute->set_control (_stripable->mute_control()); - _stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); - _stripable->mute_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context()); + _stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_solo_changed, this), ui_context()); + _stripable->mute_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_mute_changed, this), ui_context()); std::shared_ptr pan_control = _stripable->pan_azimuth_control(); if (pan_control) { - pan_control->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_azi_changed, this, false), ui_context()); + pan_control->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_panner_azi_changed, this, false), ui_context()); } pan_control = _stripable->pan_width_control(); if (pan_control) { - pan_control->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_panner_width_changed, this, false), ui_context()); + pan_control->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_panner_width_changed, this, false), ui_context()); } - _stripable->gain_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_gain_changed, this, false), ui_context()); - _stripable->PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context()); - _stripable->presentation_info().PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context()); + _stripable->gain_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_gain_changed, this, false), ui_context()); + _stripable->PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_property_changed, this, _1), ui_context()); + _stripable->presentation_info().PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_property_changed, this, _1), ui_context()); // TODO this works when a currently-banked stripable is made inactive, but not // when a stripable is activated which should be currently banked. - _stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_stripable_deleted, this), ui_context()); + _stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_stripable_deleted, this), ui_context()); /* setup legal VPot modes for this stripable */ @@ -793,7 +793,7 @@ Strip::setup_trackview_vpot (std::shared_ptr r) return; } - r->MappedControlsChanged.connect (subview_connections, MISSING_INVALIDATOR, boost::bind (&Strip::subview_mode_changed, this), ui_context()); + r->MappedControlsChanged.connect (subview_connections, MISSING_INVALIDATOR, std::bind (&Strip::subview_mode_changed, this), ui_context()); std::shared_ptr pc; std::shared_ptr track = std::dynamic_pointer_cast (r); @@ -948,7 +948,7 @@ Strip::setup_trackview_vpot (std::shared_ptr r) if (pc) { //control found; set our knob to watch for changes in it _vpot->set_control (pc); - pc->Changed.connect (subview_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_vpot_change, this), ui_context()); + pc->Changed.connect (subview_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_vpot_change, this), ui_context()); } else { //no control, just set the knob to "empty" _vpot->reset_control (); } diff --git a/libs/surfaces/us2400/surface.cc b/libs/surfaces/us2400/surface.cc index c30e7c933d..a88961cfdf 100644 --- a/libs/surfaces/us2400/surface.cc +++ b/libs/surfaces/us2400/surface.cc @@ -413,7 +413,7 @@ Surface::setup_master () } _master_fader->set_control (m->gain_control()); - m->gain_control()->Changed.connect (master_connection, MISSING_INVALIDATOR, boost::bind (&Surface::master_gain_changed, this), ui_context()); + m->gain_control()->Changed.connect (master_connection, MISSING_INVALIDATOR, std::bind (&Surface::master_gain_changed, this), ui_context()); _last_master_gain_written = FLT_MAX; /* some essentially impossible value */ _port->write (_master_fader->set_position (0.0)); master_gain_changed (); @@ -474,20 +474,20 @@ Surface::connect_to_signals () MIDI::Parser* p = _port->input_port().parser(); /* Incoming sysex */ - p->sysex.connect_same_thread (*this, boost::bind (&Surface::handle_midi_sysex, this, _1, _2, _3)); + p->sysex.connect_same_thread (*this, std::bind (&Surface::handle_midi_sysex, this, _1, _2, _3)); /* V-Pot messages are Controller */ - p->controller.connect_same_thread (*this, boost::bind (&Surface::handle_midi_controller_message, this, _1, _2)); + p->controller.connect_same_thread (*this, std::bind (&Surface::handle_midi_controller_message, this, _1, _2)); /* Button messages are NoteOn */ - p->note_on.connect_same_thread (*this, boost::bind (&Surface::handle_midi_note_on_message, this, _1, _2)); + p->note_on.connect_same_thread (*this, std::bind (&Surface::handle_midi_note_on_message, this, _1, _2)); /* Button messages are NoteOn but libmidi++ sends note-on w/velocity = 0 as note-off so catch them too */ - p->note_off.connect_same_thread (*this, boost::bind (&Surface::handle_midi_note_on_message, this, _1, _2)); + p->note_off.connect_same_thread (*this, std::bind (&Surface::handle_midi_note_on_message, this, _1, _2)); /* Fader messages are Pitchbend */ uint32_t i; for (i = 0; i < _mcp.device_info().strip_cnt(); i++) { - p->channel_pitchbend[i].connect_same_thread (*this, boost::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, i)); + p->channel_pitchbend[i].connect_same_thread (*this, std::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, i)); } // Master fader - p->channel_pitchbend[_mcp.device_info().strip_cnt()].connect_same_thread (*this, boost::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, _mcp.device_info().strip_cnt())); + p->channel_pitchbend[_mcp.device_info().strip_cnt()].connect_same_thread (*this, std::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, _mcp.device_info().strip_cnt())); _connected = true; } diff --git a/libs/surfaces/us2400/us2400_control_protocol.cc b/libs/surfaces/us2400/us2400_control_protocol.cc index 9d5e61b201..e025526660 100644 --- a/libs/surfaces/us2400/us2400_control_protocol.cc +++ b/libs/surfaces/us2400/us2400_control_protocol.cc @@ -128,7 +128,7 @@ US2400Protocol::US2400Protocol (Session& session) _last_bank[i] = 0; } - PresentationInfo::Change.connect (gui_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_presentation_info_changed, this, _1), this); + PresentationInfo::Change.connect (gui_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_presentation_info_changed, this, _1), this); _instance = this; @@ -627,20 +627,20 @@ void US2400Protocol::connect_session_signals() { // receive routes added - session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_routes_added, this, _1), this); + session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_routes_added, this, _1), this); // receive VCAs added - session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_vca_added, this, _1), this); + session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_vca_added, this, _1), this); // receive record state toggled - session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_record_state_changed, this), this); + session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_record_state_changed, this), this); // receive transport state changed - session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_transport_state_changed, this), this); - session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_loop_state_changed, this), this); + session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_transport_state_changed, this), this); + session->TransportLooped.connect (session_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_loop_state_changed, this), this); // receive punch-in and punch-out - Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_parameter_changed, this, _1), this); - session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_parameter_changed, this, _1), this); + Config->ParameterChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_parameter_changed, this, _1), this); + session->config.ParameterChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_parameter_changed, this, _1), this); // receive rude solo changed - session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::notify_solo_active_changed, this, _1), this); + session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, std::bind (&US2400Protocol::notify_solo_active_changed, this, _1), this); // make sure remote id changed signals reach here // see also notify_stripable_added @@ -703,7 +703,7 @@ US2400Protocol::set_device (const string& device_name, bool force) loop, not in the thread where the PortConnectedOrDisconnected signal is emitted. */ - ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&US2400Protocol::connection_handler, this, _1, _2, _3, _4, _5), this); + ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, std::bind (&US2400Protocol::connection_handler, this, _1, _2, _3, _4, _5), this); if (create_surfaces ()) { return -1; @@ -1441,7 +1441,7 @@ US2400Protocol::set_subview_mode (SubViewMode sm, std::shared_ptr r) /* Catch the current subview stripable going away */ if (_subview_stripable) { _subview_stripable->DropReferences.connect (subview_stripable_connections, MISSING_INVALIDATOR, - boost::bind (&US2400Protocol::notify_subview_stripable_deleted, this), + std::bind (&US2400Protocol::notify_subview_stripable_deleted, this), this); } } diff --git a/libs/surfaces/websockets/feedback.cc b/libs/surfaces/websockets/feedback.cc index 6fa8205bd5..dd094052b8 100644 --- a/libs/surfaces/websockets/feedback.cc +++ b/libs/surfaces/websockets/feedback.cc @@ -227,11 +227,11 @@ ArdourFeedback::observe_transport () { ARDOUR::Session& sess = session (); sess.TransportStateChange.connect (_transport_connections, MISSING_INVALIDATOR, - boost::bind (TransportObserver (), this), event_loop ()); + std::bind (TransportObserver (), this), event_loop ()); sess.RecordStateChanged.connect (_transport_connections, MISSING_INVALIDATOR, - boost::bind (RecordStateObserver (), this), event_loop ()); + std::bind (RecordStateObserver (), this), event_loop ()); - Temporal::TempoMap::MapChanged.connect (_transport_connections, MISSING_INVALIDATOR, boost::bind (TempoObserver (), this), event_loop ()); + Temporal::TempoMap::MapChanged.connect (_transport_connections, MISSING_INVALIDATOR, std::bind (TempoObserver (), this), event_loop ()); } void @@ -244,15 +244,15 @@ ArdourFeedback::observe_mixer () std::shared_ptr stripable = strip->stripable (); stripable->gain_control ()->Changed.connect (*it->second, MISSING_INVALIDATOR, - boost::bind (StripGainObserver (), this, strip_id), event_loop ()); + std::bind (StripGainObserver (), this, strip_id), event_loop ()); if (stripable->pan_azimuth_control ()) { stripable->pan_azimuth_control ()->Changed.connect (*it->second, MISSING_INVALIDATOR, - boost::bind (StripPanObserver (), this, strip_id), event_loop ()); + std::bind (StripPanObserver (), this, strip_id), event_loop ()); } stripable->mute_control ()->Changed.connect (*it->second, MISSING_INVALIDATOR, - boost::bind (StripMuteObserver (), this, strip_id), event_loop ()); + std::bind (StripMuteObserver (), this, strip_id), event_loop ()); observe_strip_plugins (strip_id, strip->plugins ()); } @@ -271,7 +271,7 @@ ArdourFeedback::observe_strip_plugins (uint32_t strip_id, ArdourMixerStrip::Plug if (control) { control->Changed.connect (*plugin, MISSING_INVALIDATOR, - boost::bind (PluginBypassObserver (), this, strip_id, plugin_id), event_loop ()); + std::bind (PluginBypassObserver (), this, strip_id, plugin_id), event_loop ()); } for (uint32_t param_id = 0; param_id < plugin->param_count (); ++param_id) { @@ -279,7 +279,7 @@ ArdourFeedback::observe_strip_plugins (uint32_t strip_id, ArdourMixerStrip::Plug std::shared_ptr control = plugin->param_control (param_id); control->Changed.connect (*plugin, MISSING_INVALIDATOR, - boost::bind (PluginParamValueObserver (), this, strip_id, plugin_id, param_id, + std::bind (PluginParamValueObserver (), this, strip_id, plugin_id, param_id, std::weak_ptr(control)), event_loop ()); } catch (ArdourMixerNotFoundException& e) { diff --git a/libs/surfaces/websockets/mixer.cc b/libs/surfaces/websockets/mixer.cc index 0bd3600c35..cdbe533bf4 100644 --- a/libs/surfaces/websockets/mixer.cc +++ b/libs/surfaces/websockets/mixer.cc @@ -137,7 +137,7 @@ ArdourMixerStrip::ArdourMixerStrip (std::shared_ptr stripable if (insert) { _plugins[plugin_id] = std::shared_ptr (new ArdourMixerPlugin (insert)); insert->DropReferences.connect (*_plugins[plugin_id], MISSING_INVALIDATOR, - boost::bind (&ArdourMixerStrip::on_drop_plugin, this, plugin_id), event_loop); + std::bind (&ArdourMixerStrip::on_drop_plugin, this, plugin_id), event_loop); } } } @@ -297,7 +297,7 @@ ArdourMixer::start () for (StripableList::iterator it = strips.begin (); it != strips.end (); ++it) { _strips[strip_id] = std::shared_ptr (new ArdourMixerStrip (*it, event_loop ())); (*it)->DropReferences.connect (*_strips[strip_id], MISSING_INVALIDATOR, - boost::bind (&ArdourMixer::on_drop_strip, this, strip_id), event_loop ()); + std::bind (&ArdourMixer::on_drop_strip, this, strip_id), event_loop ()); strip_id++; } diff --git a/libs/surfaces/wiimote/wiimote.cc b/libs/surfaces/wiimote/wiimote.cc index 388161ad84..0578d0c42d 100644 --- a/libs/surfaces/wiimote/wiimote.cc +++ b/libs/surfaces/wiimote/wiimote.cc @@ -112,8 +112,8 @@ WiimoteControlProtocol::start () DEBUG_TRACE (DEBUG::WiimoteControl, "WiimoteControlProtocol::start init\n"); // update LEDs whenever the transport or recording state changes - session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&WiimoteControlProtocol::update_led_state, this), this); - session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&WiimoteControlProtocol::update_led_state, this), this); + session->TransportStateChange.connect (session_connections, MISSING_INVALIDATOR, std::bind (&WiimoteControlProtocol::update_led_state, this), this); + session->RecordStateChanged.connect (session_connections, MISSING_INVALIDATOR, std::bind (&WiimoteControlProtocol::update_led_state, this), this); // start the Wiimote control UI; it will run in its own thread context BaseUI::run (); diff --git a/libs/temporal/temporal/domain_provider.h b/libs/temporal/temporal/domain_provider.h index cf964c8136..50bdf444a7 100644 --- a/libs/temporal/temporal/domain_provider.h +++ b/libs/temporal/temporal/domain_provider.h @@ -85,7 +85,7 @@ class TimeDomainProvider { protected: void listen () { if (parent) { - parent->TimeDomainChanged.connect_same_thread (parent_connection, boost::bind (&TimeDomainProvider::time_domain_changed, this)); + parent->TimeDomainChanged.connect_same_thread (parent_connection, std::bind (&TimeDomainProvider::time_domain_changed, this)); } } diff --git a/libs/waveview/wave_view.cc b/libs/waveview/wave_view.cc index b3414ef4e4..e2c6523fa1 100644 --- a/libs/waveview/wave_view.cc +++ b/libs/waveview/wave_view.cc @@ -114,9 +114,9 @@ WaveView::init () _props->outline_color = _outline_color; VisualPropertiesChanged.connect_same_thread ( - invalidation_connection, boost::bind (&WaveView::handle_visual_property_change, this)); + invalidation_connection, std::bind (&WaveView::handle_visual_property_change, this)); ClipLevelChanged.connect_same_thread (invalidation_connection, - boost::bind (&WaveView::handle_clip_level_change, this)); + std::bind (&WaveView::handle_clip_level_change, this)); } WaveView::~WaveView () diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index 2c2c567110..a400b9df22 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -1054,7 +1054,7 @@ ArdourButton::watch () warning << _("button cannot watch state of non-existing Controllable\n") << endmsg; return; } - c->Changed.connect (watch_connection, invalidator(*this), boost::bind (&ArdourButton::controllable_changed, this), gui_context()); + c->Changed.connect (watch_connection, invalidator(*this), std::bind (&ArdourButton::controllable_changed, this), gui_context()); } void diff --git a/libs/widgets/ardour_ctrl_base.cc b/libs/widgets/ardour_ctrl_base.cc index 4a2d1dcde9..857efa3280 100644 --- a/libs/widgets/ardour_ctrl_base.cc +++ b/libs/widgets/ardour_ctrl_base.cc @@ -272,7 +272,7 @@ ArdourCtrlBase::set_controllable (std::shared_ptr c) binding_proxy.set_controllable (c); - c->Changed.connect (watch_connection, invalidator(*this), boost::bind (&ArdourCtrlBase::controllable_changed, this, false), gui_context()); + c->Changed.connect (watch_connection, invalidator(*this), std::bind (&ArdourCtrlBase::controllable_changed, this, false), gui_context()); _normal = c->internal_to_interface(c->normal()); diff --git a/libs/widgets/ardour_display.cc b/libs/widgets/ardour_display.cc index cb5f36c61d..3e2323f12d 100644 --- a/libs/widgets/ardour_display.cc +++ b/libs/widgets/ardour_display.cc @@ -123,7 +123,7 @@ ArdourDisplay::set_controllable (std::shared_ptr c) binding_proxy.set_controllable (c); - c->Changed.connect (watch_connection, invalidator(*this), boost::bind (&ArdourDisplay::controllable_changed, this), gui_context()); + c->Changed.connect (watch_connection, invalidator(*this), std::bind (&ArdourDisplay::controllable_changed, this), gui_context()); controllable_changed(); } diff --git a/libs/widgets/ardour_spinner.cc b/libs/widgets/ardour_spinner.cc index 01c772a22e..729bae7335 100644 --- a/libs/widgets/ardour_spinner.cc +++ b/libs/widgets/ardour_spinner.cc @@ -56,7 +56,7 @@ ArdourSpinner::ArdourSpinner (std::shared_ptr c, Gtk::Adjustm _spin_adj.signal_value_changed().connect (sigc::mem_fun(*this, &ArdourSpinner::spin_adjusted)); adj->signal_value_changed().connect (sigc::mem_fun(*this, &ArdourSpinner::ctrl_adjusted)); - c->Changed.connect (watch_connection, invalidator(*this), boost::bind (&ArdourSpinner::controllable_changed, this), gui_context()); + c->Changed.connect (watch_connection, invalidator(*this), std::bind (&ArdourSpinner::controllable_changed, this), gui_context()); #if 0 // this assume the "upper" value needs most space. diff --git a/libs/widgets/binding_proxy.cc b/libs/widgets/binding_proxy.cc index c65223584f..f375bea0ae 100644 --- a/libs/widgets/binding_proxy.cc +++ b/libs/widgets/binding_proxy.cc @@ -44,7 +44,7 @@ BindingProxy::BindingProxy (std::shared_ptr c) if (c) { c->DropReferences.connect ( _controllable_going_away_connection, invalidator (*this), - boost::bind (&BindingProxy::set_controllable, this, std::shared_ptr ()), + std::bind (&BindingProxy::set_controllable, this, std::shared_ptr ()), gui_context()); } } @@ -71,7 +71,7 @@ BindingProxy::set_controllable (std::shared_ptr c) if (c) { c->DropReferences.connect ( _controllable_going_away_connection, invalidator (*this), - boost::bind (&BindingProxy::set_controllable, this, std::shared_ptr ()), + std::bind (&BindingProxy::set_controllable, this, std::shared_ptr ()), gui_context()); } } @@ -101,7 +101,7 @@ BindingProxy::button_press_handler (GdkEventButton *ev) } prompter->set_text (prompt); prompter->touch (); // shows popup - controllable->LearningFinished.connect_same_thread (learning_connection, boost::bind (&BindingProxy::learning_finished, this)); + controllable->LearningFinished.connect_same_thread (learning_connection, std::bind (&BindingProxy::learning_finished, this)); } return true; } diff --git a/luasession/luasession.cc b/luasession/luasession.cc index 6d42102956..3e1d3c08a9 100644 --- a/luasession/luasession.cc +++ b/luasession/luasession.cc @@ -109,7 +109,7 @@ public: run_loop_thread = Glib::Threads::Thread::self (); } - bool call_slot (InvalidationRecord* ir, const boost::function& f) + bool call_slot (InvalidationRecord* ir, const std::function& f) { if (Glib::Threads::Thread::self () == run_loop_thread) { cout << string_compose ("%1/%2 direct dispatch of call slot via functor @ %3, invalidation %4\n", event_loop_name (), pthread_name (), &f, ir); @@ -450,7 +450,7 @@ setup_lua () AudioEngine::instance ()->stop (); - AudioEngine::instance ()->Halted.connect_same_thread (engine_connections, boost::bind (&engine_halted, _1)); + AudioEngine::instance ()->Halted.connect_same_thread (engine_connections, std::bind (&engine_halted, _1)); } static int diff --git a/session_utils/common.cc b/session_utils/common.cc index f9eb02cec5..c96907daaf 100644 --- a/session_utils/common.cc +++ b/session_utils/common.cc @@ -96,7 +96,7 @@ class MyEventLoop : public sigc::trackable, public EventLoop run_loop_thread = Glib::Threads::Thread::self(); } - bool call_slot (InvalidationRecord*, const boost::function& f) { + bool call_slot (InvalidationRecord*, const std::function& f) { if (Glib::Threads::Thread::self() == run_loop_thread) { f (); }