NOOP, remove trailing tabs/whitespace.
authorRobin Gareus <robin@gareus.org>
Mon, 5 Oct 2015 14:17:49 +0000 (16:17 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 5 Oct 2015 14:17:49 +0000 (16:17 +0200)
822 files changed:
gtk2_ardour/add_route_dialog.cc
gtk2_ardour/add_route_dialog.h
gtk2_ardour/ardour_button.cc
gtk2_ardour/ardour_button.h
gtk2_ardour/ardour_display.cc
gtk2_ardour/ardour_dropdown.cc
gtk2_ardour/ardour_knob.cc
gtk2_ardour/ardour_knob.h
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui.h
gtk2_ardour/ardour_ui2.cc
gtk2_ardour/ardour_ui_dialogs.cc
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/ardour_window.cc
gtk2_ardour/audio_clock.cc
gtk2_ardour/audio_clock.h
gtk2_ardour/audio_region_view.cc
gtk2_ardour/audio_region_view.h
gtk2_ardour/audio_streamview.cc
gtk2_ardour/audio_time_axis.cc
gtk2_ardour/automation_line.cc
gtk2_ardour/automation_line.h
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/axis_view.h
gtk2_ardour/big_clock_window.h
gtk2_ardour/bundle_env_cocoa.cc
gtk2_ardour/bundle_env_msvc.cc
gtk2_ardour/button_joiner.cc
gtk2_ardour/button_joiner.h
gtk2_ardour/canvas-waveview.c
gtk2_ardour/control_point.cc
gtk2_ardour/control_point.h
gtk2_ardour/edit_note_dialog.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_actions.cc
gtk2_ardour/editor_canvas.cc
gtk2_ardour/editor_canvas_events.cc
gtk2_ardour/editor_cursors.cc
gtk2_ardour/editor_cursors.h
gtk2_ardour/editor_drag.cc
gtk2_ardour/editor_drag.h
gtk2_ardour/editor_export_audio.cc
gtk2_ardour/editor_group_tabs.cc
gtk2_ardour/editor_keys.cc
gtk2_ardour/editor_markers.cc
gtk2_ardour/editor_mixer.cc
gtk2_ardour/editor_mouse.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/editor_regions.cc
gtk2_ardour/editor_route_groups.cc
gtk2_ardour/editor_routes.cc
gtk2_ardour/editor_rulers.cc
gtk2_ardour/editor_selection.cc
gtk2_ardour/editor_summary.cc
gtk2_ardour/editor_tempodisplay.cc
gtk2_ardour/editor_timefx.cc
gtk2_ardour/engine_dialog.cc
gtk2_ardour/export_dialog.cc
gtk2_ardour/export_file_notebook.cc
gtk2_ardour/export_filename_selector.cc
gtk2_ardour/export_format_dialog.h
gtk2_ardour/export_timespan_selector.cc
gtk2_ardour/floating_text_entry.cc
gtk2_ardour/gain_meter.cc
gtk2_ardour/generic_pluginui.cc
gtk2_ardour/ghostregion.h
gtk2_ardour/group_tabs.cc
gtk2_ardour/group_tabs.h
gtk2_ardour/gui_object.cc
gtk2_ardour/gui_object.h
gtk2_ardour/io_selector.cc
gtk2_ardour/keyeditor.cc
gtk2_ardour/linux_vst_gui_support.cc
gtk2_ardour/location_ui.cc
gtk2_ardour/lxvst_plugin_ui.cc
gtk2_ardour/lxvst_plugin_ui.h
gtk2_ardour/main.cc
gtk2_ardour/main_clock.h
gtk2_ardour/marker.cc
gtk2_ardour/meter_strip.h
gtk2_ardour/midi_channel_selector.cc
gtk2_ardour/midi_export_dialog.cc
gtk2_ardour/midi_list_editor.cc
gtk2_ardour/midi_region_view.cc
gtk2_ardour/midi_region_view.h
gtk2_ardour/midi_streamview.cc
gtk2_ardour/midi_time_axis.cc
gtk2_ardour/midi_tracer.cc
gtk2_ardour/midi_tracer.h
gtk2_ardour/midi_velocity_dialog.cc
gtk2_ardour/mixer_actor.cc
gtk2_ardour/mixer_group_tabs.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mixer_ui.cc
gtk2_ardour/monitor_selector.cc
gtk2_ardour/mono_panner.cc
gtk2_ardour/mono_panner.h
gtk2_ardour/mono_panner_editor.cc
gtk2_ardour/mono_panner_editor.h
gtk2_ardour/mouse_cursors.cc
gtk2_ardour/mouse_cursors.h
gtk2_ardour/msvc/winmain.cc
gtk2_ardour/option_editor.cc
gtk2_ardour/option_editor.h
gtk2_ardour/panner_interface.h
gtk2_ardour/patch_change.cc
gtk2_ardour/patch_change_dialog.cc
gtk2_ardour/piano_roll_header.cc
gtk2_ardour/pingback.cc
gtk2_ardour/playlist_selector.cc
gtk2_ardour/plugin_eq_gui.cc
gtk2_ardour/plugin_selector.cc
gtk2_ardour/plugin_ui.cc
gtk2_ardour/plugin_ui.h
gtk2_ardour/port_matrix.cc
gtk2_ardour/port_matrix_column_labels.cc
gtk2_ardour/port_matrix_grid.cc
gtk2_ardour/port_matrix_row_labels.cc
gtk2_ardour/processor_box.cc
gtk2_ardour/processor_box.h
gtk2_ardour/public_editor.h
gtk2_ardour/rc_option_editor.cc
gtk2_ardour/rc_option_editor.h
gtk2_ardour/region_layering_order_editor.cc
gtk2_ardour/region_view.cc
gtk2_ardour/route_group_dialog.cc
gtk2_ardour/route_processor_selection.cc
gtk2_ardour/route_sorter.h
gtk2_ardour/route_time_axis.cc
gtk2_ardour/route_ui.cc
gtk2_ardour/route_ui.h
gtk2_ardour/save_as_dialog.cc
gtk2_ardour/save_as_dialog.h
gtk2_ardour/session_dialog.cc
gtk2_ardour/session_option_editor.cc
gtk2_ardour/sfdb_freesound_mootcher.cc
gtk2_ardour/sfdb_ui.cc
gtk2_ardour/sfdb_ui.h
gtk2_ardour/shuttle_control.cc
gtk2_ardour/soundcloud_export_selector.h
gtk2_ardour/splash.cc
gtk2_ardour/startup.cc
gtk2_ardour/stereo_panner.cc
gtk2_ardour/stereo_panner.h
gtk2_ardour/stereo_panner_editor.cc
gtk2_ardour/stereo_panner_editor.h
gtk2_ardour/streamview.cc
gtk2_ardour/streamview.h
gtk2_ardour/sys_ex.cc
gtk2_ardour/sys_ex.h
gtk2_ardour/tempo_dialog.cc
gtk2_ardour/theme_manager.cc
gtk2_ardour/theme_manager.h
gtk2_ardour/time_axis_view.cc
gtk2_ardour/time_axis_view_item.cc
gtk2_ardour/time_fx_dialog.cc
gtk2_ardour/time_fx_dialog.h
gtk2_ardour/time_info_box.cc
gtk2_ardour/ui_config.cc
gtk2_ardour/ui_config.h
gtk2_ardour/utils.cc
gtk2_ardour/verbose_cursor.h
gtk2_ardour/visibility_group.cc
gtk2_ardour/visibility_group.h
gtk2_ardour/volume_controller.cc
gtk2_ardour/vst_plugin_ui.cc
gtk2_ardour/vst_plugin_ui.h
gtk2_ardour/window_manager.cc
gtk2_ardour/window_manager.h
gtk2_ardour/windows_vst_plugin_ui.cc
gtk2_ardour/windows_vst_plugin_ui.h
headless/load_session.cc
headless/misc.cc
libs/appleutility/AUOutputBL.cpp
libs/appleutility/AUOutputBL.h
libs/appleutility/AUParamInfo.cpp
libs/appleutility/AUParamInfo.h
libs/appleutility/CAAUParameter.cpp
libs/appleutility/CAAUParameter.h
libs/appleutility/CAAudioChannelLayout.cpp
libs/appleutility/CAAudioChannelLayout.h
libs/appleutility/CAAudioChannelLayoutObject.cpp
libs/appleutility/CAAudioFile.cpp
libs/appleutility/CAAudioFile.h
libs/appleutility/CAAudioUnit.cpp
libs/appleutility/CAAudioUnit.h
libs/appleutility/CABufferList.cpp
libs/appleutility/CABufferList.h
libs/appleutility/CACFDictionary.cpp
libs/appleutility/CACFDictionary.h
libs/appleutility/CACFNumber.cpp
libs/appleutility/CACFNumber.h
libs/appleutility/CACFString.cpp
libs/appleutility/CACFString.h
libs/appleutility/CAComponent.cpp
libs/appleutility/CAComponent.h
libs/appleutility/CAComponentDescription.cpp
libs/appleutility/CAComponentDescription.h
libs/appleutility/CADebugMacros.h
libs/appleutility/CAMath.h
libs/appleutility/CAReferenceCounted.h
libs/appleutility/CAStreamBasicDescription.cpp
libs/appleutility/CAStreamBasicDescription.h
libs/appleutility/CAXException.cpp
libs/appleutility/CAXException.h
libs/ardour/ardour/ardour.h
libs/ardour/ardour/async_midi_port.h
libs/ardour/ardour/audio_buffer.h
libs/ardour/ardour/audio_track.h
libs/ardour/ardour/audio_unit.h
libs/ardour/ardour/audioengine.h
libs/ardour/ardour/audioregion.h
libs/ardour/ardour/automation_list.h
libs/ardour/ardour/control_protocol_manager.h
libs/ardour/ardour/delivery.h
libs/ardour/ardour/engine_state_controller.h
libs/ardour/ardour/export_format_specification.h
libs/ardour/ardour/file_source.h
libs/ardour/ardour/graph.h
libs/ardour/ardour/graphnode.h
libs/ardour/ardour/midi_diskstream.h
libs/ardour/ardour/midi_port.h
libs/ardour/ardour/midi_scene_change.h
libs/ardour/ardour/midi_track.h
libs/ardour/ardour/midiport_manager.h
libs/ardour/ardour/panner.h
libs/ardour/ardour/playlist.h
libs/ardour/ardour/plugin.h
libs/ardour/ardour/plugin_insert.h
libs/ardour/ardour/plugin_manager.h
libs/ardour/ardour/port_manager.h
libs/ardour/ardour/region.h
libs/ardour/ardour/region_factory.h
libs/ardour/ardour/revision.h
libs/ardour/ardour/route.h
libs/ardour/ardour/route_graph.h
libs/ardour/ardour/scene_change.h
libs/ardour/ardour/scene_changer.h
libs/ardour/ardour/send.h
libs/ardour/ardour/session.h
libs/ardour/ardour/session_event.h
libs/ardour/ardour/session_route.h
libs/ardour/ardour/slave.h
libs/ardour/ardour/smf_source.h
libs/ardour/ardour/tempo.h
libs/ardour/ardour/track.h
libs/ardour/ardour/utils.h
libs/ardour/ardour/vst_plugin.h
libs/ardour/ardour/vst_types.h
libs/ardour/ardour/windows_vst_plugin.h
libs/ardour/async_midi_port.cc
libs/ardour/audio_diskstream.cc
libs/ardour/audio_playlist.cc
libs/ardour/audio_playlist_importer.cc
libs/ardour/audio_track.cc
libs/ardour/audio_track_importer.cc
libs/ardour/audio_unit.cc
libs/ardour/audioengine.cc
libs/ardour/audiofilesource.cc
libs/ardour/audioregion.cc
libs/ardour/audiosource.cc
libs/ardour/auditioner.cc
libs/ardour/automatable.cc
libs/ardour/automation_list.cc
libs/ardour/automation_watch.cc
libs/ardour/buffer_set.cc
libs/ardour/bundle.cc
libs/ardour/butler.cc
libs/ardour/control_protocol_manager.cc
libs/ardour/cycle_timer.cc
libs/ardour/delivery.cc
libs/ardour/diskstream.cc
libs/ardour/engine_slave.cc
libs/ardour/engine_state_controller.cc
libs/ardour/enums.cc
libs/ardour/event_type_map.cc
libs/ardour/export_filename.cc
libs/ardour/export_graph_builder.cc
libs/ardour/export_handler.cc
libs/ardour/export_profile_manager.cc
libs/ardour/file_source.cc
libs/ardour/filesystem_paths.cc
libs/ardour/filter.cc
libs/ardour/globals.cc
libs/ardour/graph.cc
libs/ardour/import.cc
libs/ardour/instrument_info.cc
libs/ardour/internal_return.cc
libs/ardour/internal_send.cc
libs/ardour/io.cc
libs/ardour/io_processor.cc
libs/ardour/ladspa_plugin.cc
libs/ardour/linux_vst_support.cc
libs/ardour/location.cc
libs/ardour/lv2_plugin.cc
libs/ardour/midi_buffer.cc
libs/ardour/midi_diskstream.cc
libs/ardour/midi_model.cc
libs/ardour/midi_patch_manager.cc
libs/ardour/midi_port.cc
libs/ardour/midi_ring_buffer.cc
libs/ardour/midi_scene_change.cc
libs/ardour/midi_scene_changer.cc
libs/ardour/midi_state_tracker.cc
libs/ardour/midi_track.cc
libs/ardour/midi_ui.cc
libs/ardour/midiport_manager.cc
libs/ardour/monitor_processor.cc
libs/ardour/pannable.cc
libs/ardour/panner_shell.cc
libs/ardour/playlist.cc
libs/ardour/playlist_factory.cc
libs/ardour/plugin.cc
libs/ardour/plugin_insert.cc
libs/ardour/port.cc
libs/ardour/port_insert.cc
libs/ardour/port_manager.cc
libs/ardour/port_set.cc
libs/ardour/processor.cc
libs/ardour/quantize.cc
libs/ardour/region.cc
libs/ardour/region_factory.cc
libs/ardour/route.cc
libs/ardour/route_graph.cc
libs/ardour/route_group.cc
libs/ardour/search_paths.cc
libs/ardour/send.cc
libs/ardour/session.cc
libs/ardour/session_click.cc
libs/ardour/session_events.cc
libs/ardour/session_export.cc
libs/ardour/session_metadata.cc
libs/ardour/session_midi.cc
libs/ardour/session_playlists.cc
libs/ardour/session_process.cc
libs/ardour/session_rtevents.cc
libs/ardour/session_transport.cc
libs/ardour/smf_source.cc
libs/ardour/sndfilesource.cc
libs/ardour/soundcloud_upload.cc
libs/ardour/source.cc
libs/ardour/source_factory.cc
libs/ardour/sse_functions_avx.cc
libs/ardour/template_utils.cc
libs/ardour/tempo.cc
libs/ardour/test/audio_region_read_test.cc
libs/ardour/test/audio_region_test.cc
libs/ardour/test/automation_list_property_test.cc
libs/ardour/test/bbt_test.cc
libs/ardour/test/combine_regions_test.cc
libs/ardour/test/control_surfaces_test.cc
libs/ardour/test/framepos_minus_beats_test.cc
libs/ardour/test/framepos_plus_beats_test.cc
libs/ardour/test/framewalk_to_beats_test.cc
libs/ardour/test/jack_utils_test.cc
libs/ardour/test/load_session.cc
libs/ardour/test/midi_clock_slave_test.h
libs/ardour/test/mtdm_test.cc
libs/ardour/test/playlist_equivalent_regions_test.cc
libs/ardour/test/playlist_read_test.cc
libs/ardour/test/playlist_read_test.h
libs/ardour/test/profiling/load_session.cc
libs/ardour/test/tempo_test.cc
libs/ardour/test/test_util.cc
libs/ardour/test/testrunner.cc
libs/ardour/ticker.cc
libs/ardour/track.cc
libs/ardour/utils.cc
libs/ardour/windows_vst_plugin.cc
libs/audiographer/audiographer/broadcast_info.h
libs/audiographer/audiographer/debug_utils.h
libs/audiographer/audiographer/flag_debuggable.h
libs/audiographer/audiographer/flag_field.h
libs/audiographer/audiographer/general/chunker.h
libs/audiographer/audiographer/general/deinterleaver.h
libs/audiographer/audiographer/general/interleaver.h
libs/audiographer/audiographer/general/normalizer.h
libs/audiographer/audiographer/general/peak_reader.h
libs/audiographer/audiographer/general/sample_format_converter.h
libs/audiographer/audiographer/general/silence_trimmer.h
libs/audiographer/audiographer/general/sr_converter.h
libs/audiographer/audiographer/general/threader.h
libs/audiographer/audiographer/process_context.h
libs/audiographer/audiographer/routines.h
libs/audiographer/audiographer/sink.h
libs/audiographer/audiographer/sndfile/sndfile.h
libs/audiographer/audiographer/sndfile/sndfile_base.h
libs/audiographer/audiographer/sndfile/sndfile_reader.h
libs/audiographer/audiographer/sndfile/sndfile_writer.h
libs/audiographer/audiographer/source.h
libs/audiographer/audiographer/type_utils.h
libs/audiographer/audiographer/types.h
libs/audiographer/audiographer/utils/listed_source.h
libs/audiographer/src/debug_utils.cc
libs/audiographer/src/general/normalizer.cc
libs/audiographer/src/general/sample_format_converter.cc
libs/audiographer/src/general/sr_converter.cc
libs/audiographer/tests/general/chunker_test.cc
libs/audiographer/tests/general/deinterleaver_test.cc
libs/audiographer/tests/general/interleaver_deinterleaver_test.cc
libs/audiographer/tests/general/interleaver_test.cc
libs/audiographer/tests/general/normalizer_test.cc
libs/audiographer/tests/general/peak_reader_test.cc
libs/audiographer/tests/general/sample_format_converter_test.cc
libs/audiographer/tests/general/silence_trimmer_test.cc
libs/audiographer/tests/general/sr_converter_test.cc
libs/audiographer/tests/general/threader_test.cc
libs/audiographer/tests/sndfile/tmp_file_test.cc
libs/audiographer/tests/type_utils_test.cc
libs/audiographer/tests/utils.h
libs/audiographer/tests/utils/identity_vertex_test.cc
libs/backends/asio/asio_backend.cc
libs/backends/coreaudio/coreaudio_backend.cc
libs/backends/jack/jack_audiobackend.cc
libs/backends/jack/jack_audiobackend.h
libs/backends/jack/jack_connection.cc
libs/backends/jack/jack_portengine.cc
libs/backends/jack/jack_session.cc
libs/backends/wavesaudio/portmidi/src/pm_win/pmwinmm.c
libs/backends/wavesaudio/waves_audiobackend.cc
libs/backends/wavesaudio/waves_midi_device.cc
libs/backends/wavesaudio/wavesapi/BasicTypes/WCFourCC.h
libs/backends/wavesaudio/wavesapi/BasicTypes/WTByteOrder.h
libs/backends/wavesaudio/wavesapi/BasicTypes/WUComPtr.h
libs/backends/wavesaudio/wavesapi/BasicTypes/WUMathConsts.h
libs/backends/wavesaudio/wavesapi/BasicTypes/WUTypes.h
libs/backends/wavesaudio/wavesapi/MiscUtils/MinMaxUtilities.h
libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.cpp
libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.h
libs/backends/wavesaudio/wavesapi/MiscUtils/WCFixedString.h
libs/backends/wavesaudio/wavesapi/MiscUtils/WUErrors.h
libs/backends/wavesaudio/wavesapi/MiscUtils/safe_delete.h
libs/backends/wavesaudio/wavesapi/Threads/WCThreadSafe.h
libs/backends/wavesaudio/wavesapi/WavesPublicAPI/wstdint.h
libs/backends/wavesaudio/wavesapi/akupara/basics.hpp
libs/backends/wavesaudio/wavesapi/akupara/compiletime_functions.hpp
libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops.hpp
libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops_gcc_x86.hpp
libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.cpp
libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.h
libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.h
libs/backends/wavesaudio/wavesapi/devicemanager/WCMRNativeAudio.cpp
libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp
libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.h
libs/canvas/arc.cc
libs/canvas/arrow.cc
libs/canvas/benchmark/benchmark.h
libs/canvas/benchmark/items_at_point.cc
libs/canvas/benchmark/render_from_log.cc
libs/canvas/benchmark/render_parts.cc
libs/canvas/benchmark/render_whole.cc
libs/canvas/canvas.cc
libs/canvas/canvas/arc.h
libs/canvas/canvas/arrow.h
libs/canvas/canvas/canvas.h
libs/canvas/canvas/circle.h
libs/canvas/canvas/colors.h
libs/canvas/canvas/fill.h
libs/canvas/canvas/flag.h
libs/canvas/canvas/item.h
libs/canvas/canvas/line.h
libs/canvas/canvas/line_set.h
libs/canvas/canvas/lookup_table.h
libs/canvas/canvas/outline.h
libs/canvas/canvas/poly_item.h
libs/canvas/canvas/poly_line.h
libs/canvas/canvas/polygon.h
libs/canvas/canvas/rectangle.h
libs/canvas/canvas/root_group.h
libs/canvas/canvas/ruler.h
libs/canvas/canvas/scroll_group.h
libs/canvas/canvas/tracking_text.h
libs/canvas/canvas/types.h
libs/canvas/canvas/wave_view.h
libs/canvas/canvas/widget.h
libs/canvas/colors.cc
libs/canvas/colorspace.cc
libs/canvas/curve.cc
libs/canvas/debug.cc
libs/canvas/fill.cc
libs/canvas/flag.cc
libs/canvas/image.cc
libs/canvas/item.cc
libs/canvas/line.cc
libs/canvas/line_set.cc
libs/canvas/lookup_table.cc
libs/canvas/pixbuf.cc
libs/canvas/poly_item.cc
libs/canvas/poly_line.cc
libs/canvas/polygon.cc
libs/canvas/rectangle.cc
libs/canvas/root_group.cc
libs/canvas/ruler.cc
libs/canvas/scroll_group.cc
libs/canvas/stateful_image.cc
libs/canvas/test/arrow.cc
libs/canvas/test/group.cc
libs/canvas/test/gtk_drag.cc
libs/canvas/test/gtk_many.cc
libs/canvas/test/gtk_movement.cc
libs/canvas/test/gtk_scene.cc
libs/canvas/test/gtk_viewport.cc
libs/canvas/test/optimizing_lookup_table.cc
libs/canvas/test/render.cc
libs/canvas/test/types.cc
libs/canvas/test/types.h
libs/canvas/test/wave_view.cc
libs/canvas/test/xml.cc
libs/canvas/test/xml.h
libs/canvas/text.cc
libs/canvas/tracking_text.cc
libs/canvas/utils.cc
libs/canvas/wave_view.cc
libs/canvas/xfade_curve.cc
libs/clearlooks-newer/animation.c
libs/clearlooks-newer/cairo-support.c
libs/clearlooks-newer/clearlooks_draw.c
libs/clearlooks-newer/clearlooks_draw_glossy.c
libs/clearlooks-newer/clearlooks_draw_gummy.c
libs/clearlooks-newer/clearlooks_draw_inverted.c
libs/clearlooks-newer/clearlooks_rc_style.c
libs/clearlooks-newer/clearlooks_style.c
libs/clearlooks-newer/clearlooks_style.h
libs/clearlooks-newer/clearlooks_types.h
libs/clearlooks-newer/support.c
libs/clearlooks-newer/widget-information.c
libs/clearlooks-older/clearlooks_draw.c
libs/clearlooks-older/clearlooks_draw.h
libs/clearlooks-older/clearlooks_rc_style.c
libs/clearlooks-older/clearlooks_style.c
libs/clearlooks-older/clearlooks_style.h
libs/clearlooks-older/support.c
libs/clearlooks-older/support.h
libs/evoral/evoral/ControlList.hpp
libs/evoral/evoral/ControlSet.hpp
libs/evoral/evoral/Range.hpp
libs/evoral/evoral/TimeConverter.hpp
libs/evoral/evoral/midi_util.h
libs/evoral/src/Control.cpp
libs/evoral/src/ControlList.cpp
libs/evoral/src/Curve.cpp
libs/evoral/src/Event.cpp
libs/evoral/src/Note.cpp
libs/evoral/src/Sequence.cpp
libs/evoral/src/libsmf/smf.c
libs/evoral/src/libsmf/smf_decode.c
libs/evoral/src/libsmf/smf_load.c
libs/evoral/src/libsmf/smf_save.c
libs/evoral/src/libsmf/smf_tempo.c
libs/evoral/src/libsmf/smfsh.c
libs/evoral/test/CurveTest.cpp
libs/evoral/test/RangeTest.hpp
libs/gtkmm2ext/actions.cc
libs/gtkmm2ext/binding_proxy.cc
libs/gtkmm2ext/cairo_packer.cc
libs/gtkmm2ext/cairo_widget.cc
libs/gtkmm2ext/cairocell.cc
libs/gtkmm2ext/cell_renderer_color_selector.cc
libs/gtkmm2ext/cell_renderer_pixbuf_multi.cc
libs/gtkmm2ext/cell_renderer_pixbuf_toggle.cc
libs/gtkmm2ext/choice.cc
libs/gtkmm2ext/click_box.cc
libs/gtkmm2ext/dndtreeview.cc
libs/gtkmm2ext/fader.cc
libs/gtkmm2ext/grouped_buttons.cc
libs/gtkmm2ext/gtk_ui.cc
libs/gtkmm2ext/gtkmm2ext/actions.h
libs/gtkmm2ext/gtkmm2ext/auto_spin.h
libs/gtkmm2ext/gtkmm2ext/barcontroller.h
libs/gtkmm2ext/gtkmm2ext/bindable_button.h
libs/gtkmm2ext/gtkmm2ext/binding_proxy.h
libs/gtkmm2ext/gtkmm2ext/cairo_widget.h
libs/gtkmm2ext/gtkmm2ext/cairocell.h
libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h
libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h
libs/gtkmm2ext/gtkmm2ext/dndtreeview.h
libs/gtkmm2ext/gtkmm2ext/dndvbox.h
libs/gtkmm2ext/gtkmm2ext/focus_entry.h
libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h
libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
libs/gtkmm2ext/gtkmm2ext/keyboard.h
libs/gtkmm2ext/gtkmm2ext/motionfeedback.h
libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h
libs/gtkmm2ext/gtkmm2ext/pixscroller.h
libs/gtkmm2ext/gtkmm2ext/scroomer.h
libs/gtkmm2ext/gtkmm2ext/slider_controller.h
libs/gtkmm2ext/gtkmm2ext/textviewer.h
libs/gtkmm2ext/gtkmm2ext/utils.h
libs/gtkmm2ext/gtkmm2ext/widget_state.h
libs/gtkmm2ext/idle_adjustment.cc
libs/gtkmm2ext/keyboard.cc
libs/gtkmm2ext/motionfeedback.cc
libs/gtkmm2ext/persistent_tooltip.cc
libs/gtkmm2ext/pixscroller.cc
libs/gtkmm2ext/popup.cc
libs/gtkmm2ext/prompter.cc
libs/gtkmm2ext/scroomer.cc
libs/gtkmm2ext/selector.cc
libs/gtkmm2ext/sync-menu.c
libs/gtkmm2ext/tearoff.cc
libs/gtkmm2ext/textviewer.cc
libs/gtkmm2ext/utils.cc
libs/gtkmm2ext/window_title.cc
libs/midi++2/channel.cc
libs/midi++2/ipmidi_port.cc
libs/midi++2/midi++/channel.h
libs/midi++2/midi++/ipmidi_port.h
libs/midi++2/midi++/midnam_patch.h
libs/midi++2/midi++/mmc.h
libs/midi++2/midi++/parser.h
libs/midi++2/midi++/port.h
libs/midi++2/miditrace.cc
libs/midi++2/midnam_patch.cc
libs/midi++2/mmc.cc
libs/midi++2/mmctest.cc
libs/midi++2/mtc.cc
libs/midi++2/parser.cc
libs/midi++2/port.cc
libs/panners/1in2out/panner_1in2out.cc
libs/panners/2in2out/panner_2in2out.cc
libs/panners/2in2out/panner_2in2out.h
libs/pbd/base_ui.cc
libs/pbd/boost_debug.cc
libs/pbd/controllable_descriptor.cc
libs/pbd/convert.cc
libs/pbd/crossthread.posix.cc
libs/pbd/crossthread.win.cc
libs/pbd/debug.cc
libs/pbd/enumwriter.cc
libs/pbd/epa.cc
libs/pbd/event_loop.cc
libs/pbd/ffs.cc
libs/pbd/fpu.cc
libs/pbd/id.cc
libs/pbd/malign.cc
libs/pbd/md5.cc
libs/pbd/mountpoint.cc
libs/pbd/msvc/getopt_long.c
libs/pbd/pathexpand.cc
libs/pbd/pbd.cc
libs/pbd/pbd/abstract_ui.cc
libs/pbd/pbd/abstract_ui.h
libs/pbd/pbd/atomic_counter.h
libs/pbd/pbd/base_ui.h
libs/pbd/pbd/command.h
libs/pbd/pbd/compose.h
libs/pbd/pbd/controllable.h
libs/pbd/pbd/crossthread.h
libs/pbd/pbd/debug_rt_alloc.h
libs/pbd/pbd/destructible.h
libs/pbd/pbd/enumwriter.h
libs/pbd/pbd/epa.h
libs/pbd/pbd/fastlog.h
libs/pbd/pbd/fpu.h
libs/pbd/pbd/functor_command.h
libs/pbd/pbd/id.h
libs/pbd/pbd/md5.h
libs/pbd/pbd/memento_command.h
libs/pbd/pbd/pool.h
libs/pbd/pbd/properties.h
libs/pbd/pbd/property_basics.h
libs/pbd/pbd/property_list.h
libs/pbd/pbd/receiver.h
libs/pbd/pbd/ringbuffer.h
libs/pbd/pbd/ringbufferNPT.h
libs/pbd/pbd/search_path.h
libs/pbd/pbd/selectable.h
libs/pbd/pbd/sequence_property.h
libs/pbd/pbd/signals.h
libs/pbd/pbd/stacktrace.h
libs/pbd/pbd/stateful.h
libs/pbd/pbd/stateful_diff_command.h
libs/pbd/pbd/stl_delete.h
libs/pbd/pbd/touchable.h
libs/pbd/pbd/transmitter.h
libs/pbd/pbd/undo.h
libs/pbd/pbd/unwind.h
libs/pbd/pbd/xml++.h
libs/pbd/pool.cc
libs/pbd/property_list.cc
libs/pbd/pthread_utils.cc
libs/pbd/search_path.cc
libs/pbd/semutils.cc
libs/pbd/shortpath.cc
libs/pbd/stacktrace.cc
libs/pbd/stateful.cc
libs/pbd/strsplit.cc
libs/pbd/system_exec.cc
libs/pbd/test/scalar_properties.cc
libs/pbd/test/scalar_properties.h
libs/pbd/test/signals_test.cc
libs/pbd/test/testrunner.cc
libs/pbd/test/xpath.cc
libs/pbd/textreceiver.cc
libs/pbd/transmitter.cc
libs/pbd/undo.cc
libs/pbd/whitespace.cc
libs/pbd/windows_special_dirs.cc
libs/pbd/xml++.cc
libs/ptformat/ptfformat.cc
libs/qm-dsp/base/Window.h
libs/qm-dsp/dsp/chromagram/Chromagram.cpp
libs/qm-dsp/dsp/chromagram/Chromagram.h
libs/qm-dsp/dsp/chromagram/ConstantQ.cpp
libs/qm-dsp/dsp/chromagram/ConstantQ.h
libs/qm-dsp/dsp/onsets/DetectionFunction.cpp
libs/qm-dsp/dsp/onsets/DetectionFunction.h
libs/qm-dsp/dsp/onsets/PeakPicking.cpp
libs/qm-dsp/dsp/onsets/PeakPicking.h
libs/qm-dsp/dsp/phasevocoder/PhaseVocoder.cpp
libs/qm-dsp/dsp/rateconversion/Decimator.h
libs/qm-dsp/dsp/segmentation/ClusterMeltSegmenter.cpp
libs/qm-dsp/dsp/segmentation/ClusterMeltSegmenter.h
libs/qm-dsp/dsp/segmentation/Segmenter.cpp
libs/qm-dsp/dsp/segmentation/Segmenter.h
libs/qm-dsp/dsp/segmentation/cluster_melt.c
libs/qm-dsp/dsp/segmentation/cluster_segmenter.c
libs/qm-dsp/dsp/signalconditioning/DFProcess.cpp
libs/qm-dsp/dsp/signalconditioning/DFProcess.h
libs/qm-dsp/dsp/signalconditioning/FiltFilt.cpp
libs/qm-dsp/dsp/signalconditioning/Filter.h
libs/qm-dsp/dsp/signalconditioning/Framer.cpp
libs/qm-dsp/dsp/tempotracking/DownBeat.cpp
libs/qm-dsp/dsp/tempotracking/TempoTrackV2.cpp
libs/qm-dsp/dsp/tonal/ChangeDetectionFunction.cpp
libs/qm-dsp/dsp/tonal/ChangeDetectionFunction.h
libs/qm-dsp/dsp/tonal/TCSgram.cpp
libs/qm-dsp/dsp/tonal/TCSgram.h
libs/qm-dsp/dsp/tonal/TonalEstimator.cpp
libs/qm-dsp/dsp/tonal/TonalEstimator.h
libs/qm-dsp/dsp/transforms/FFT.cpp
libs/qm-dsp/dsp/wavelet/Wavelet.cpp
libs/qm-dsp/hmm/hmm.c
libs/qm-dsp/maths/MathUtilities.cpp
libs/qm-dsp/maths/MathUtilities.h
libs/qm-dsp/maths/pca/pca.c
libs/surfaces/control_protocol/basic_ui.cc
libs/surfaces/control_protocol/control_protocol.cc
libs/surfaces/control_protocol/control_protocol/basic_ui.h
libs/surfaces/control_protocol/control_protocol/control_protocol.h
libs/surfaces/control_protocol/control_protocol/types.h
libs/surfaces/frontier/kernel_drivers/tests/tranzport.c
libs/surfaces/frontier/kernel_drivers/tests/tranzport_lights.c
libs/surfaces/frontier/kernel_drivers/tranzport.c
libs/surfaces/frontier/tests/tranzport_lights.c
libs/surfaces/frontier/tranzport/interface.cc
libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc
libs/surfaces/frontier/tranzport/tranzport_control_protocol.h
libs/surfaces/generic_midi/generic_midi_control_protocol.cc
libs/surfaces/generic_midi/generic_midi_control_protocol.h
libs/surfaces/generic_midi/gmcp_gui.cc
libs/surfaces/generic_midi/interface.cc
libs/surfaces/generic_midi/midicontrollable.cc
libs/surfaces/generic_midi/midicontrollable.h
libs/surfaces/generic_midi/midiinvokable.cc
libs/surfaces/generic_midi/midiinvokable.h
libs/surfaces/mackie/button.cc
libs/surfaces/mackie/button.h
libs/surfaces/mackie/control_group.h
libs/surfaces/mackie/controls.cc
libs/surfaces/mackie/controls.h
libs/surfaces/mackie/device_info.cc
libs/surfaces/mackie/device_info.h
libs/surfaces/mackie/device_profile.cc
libs/surfaces/mackie/device_profile.h
libs/surfaces/mackie/fader.cc
libs/surfaces/mackie/fader.h
libs/surfaces/mackie/gui.cc
libs/surfaces/mackie/gui.h
libs/surfaces/mackie/interface.cc
libs/surfaces/mackie/jog_wheel.h
libs/surfaces/mackie/led.cc
libs/surfaces/mackie/led.h
libs/surfaces/mackie/mackie_control_exception.h
libs/surfaces/mackie/mackie_control_protocol.h
libs/surfaces/mackie/mcp_buttons.cc
libs/surfaces/mackie/meter.cc
libs/surfaces/mackie/meter.h
libs/surfaces/mackie/midi_byte_array.cc
libs/surfaces/mackie/midi_byte_array.h
libs/surfaces/mackie/pot.cc
libs/surfaces/mackie/strip.cc
libs/surfaces/mackie/strip.h
libs/surfaces/mackie/surface.cc
libs/surfaces/mackie/surface.h
libs/surfaces/mackie/surface_port.cc
libs/surfaces/mackie/surface_port.h
libs/surfaces/mackie/timer.h
libs/surfaces/mackie/types.h
libs/surfaces/osc/interface.cc
libs/surfaces/osc/osc.h
libs/surfaces/osc/osc_controllable.cc
libs/surfaces/osc/osc_route_observer.cc
libs/surfaces/osc/osc_route_observer.h
libs/surfaces/tranzport/bling.cc
libs/surfaces/tranzport/buttons.cc
libs/surfaces/tranzport/general.cc
libs/surfaces/tranzport/init.cc
libs/surfaces/tranzport/interface.cc
libs/surfaces/tranzport/io.cc
libs/surfaces/tranzport/io_kernel.cc
libs/surfaces/tranzport/io_usb.cc
libs/surfaces/tranzport/lcd.cc
libs/surfaces/tranzport/show.cc
libs/surfaces/tranzport/state.cc
libs/surfaces/tranzport/tranzport_control_protocol.h
libs/surfaces/tranzport/wheel.cc
libs/surfaces/tranzport/wheel_modes.cc
libs/timecode/src/time.cc
libs/timecode/timecode/bbt_time.h
libs/timecode/timecode/time.h
libs/vamp-plugins/AmplitudeFollower.cpp
libs/vamp-plugins/AmplitudeFollower.h
tools/jacktest.c
tools/omf/loader.cc
tools/omf/omftool.cc
tools/omf/omftool.h
tools/readtest.c
tools/sanity_check/main.cpp
tools/sfrtest.cc
tools/sftest.cc

index 2e58c646eace273c21001cf61d7602b156d682c4..0a146470022cb70489bd39c080cd7811685f906d 100644 (file)
@@ -323,7 +323,7 @@ void
 AddRouteDialog::refill_track_modes ()
 {
        vector<string> s;
-       
+
        s.push_back (_("Normal"));
 
        if (!ARDOUR::Profile->get_sae ()) {
@@ -392,7 +392,7 @@ AddRouteDialog::channels ()
                ret.set (DataType::MIDI, 1);
                break;
        }
-               
+
        return ret;
 }
 
index d0fbeae3d461203aa6066552665f93b60a8508fe..eb38338f1f73d8ab8721a56484ddf85567a884ce 100644 (file)
@@ -64,7 +64,7 @@ class AddRouteDialog : public ArdourDialog
         bool name_template_is_default () const;
        std::string track_template ();
        ARDOUR::PluginInfoPtr requested_instrument ();
-       
+
        ARDOUR::TrackMode mode();
        ARDOUR::RouteGroup* route_group ();
        enum InsertAt {
index b2c2c83d701681180bc3937c0d23bf3778a84341..7eaa960980ba6b4117354c1e151bf84111e5f92a 100644 (file)
@@ -627,7 +627,7 @@ ArdourButton::set_colors ()
        /* The inactive color for the LED is just a fairly dark version of the
         * active color.
         */
-       
+
        ArdourCanvas::HSV inactive (led_active_color);
        inactive.v = 0.35;
 
index 9df108924686b386b5b4cd73cf20f98a27393ac5..27b40789509239640d86adcd0ca2bd4d87b6dfa9 100644 (file)
@@ -89,7 +89,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
        void set_layout_ellipsize_width (int w);
        void set_layout_font (const Pango::FontDescription&);
        void set_text_ellipsize (Pango::EllipsizeMode);
-       
+
        sigc::signal<void> signal_led_clicked;
        sigc::signal<void> signal_clicked;
 
index 4cfffbcbd420e9c52af4abdc0dba28c16d2b1729..17f3dc5dde171b101aedc71ae37108ac4a423dd0 100644 (file)
@@ -63,7 +63,7 @@ ArdourDisplay::~ArdourDisplay ()
 bool
 ArdourDisplay::on_button_press_event (GdkEventButton*)
 {
-       _menu.popup (1, gtk_get_current_event_time());  
+       _menu.popup (1, gtk_get_current_event_time());
        return true;
 }
 
@@ -84,12 +84,12 @@ ArdourDisplay::on_scroll_event (GdkEventScroll* ev)
        boost::shared_ptr<PBD::Controllable> c = binding_proxy.get_controllable();
        if (c) {
                float val = c->get_interface();
-       
+
                if ( ev->direction == GDK_SCROLL_UP )
                        val += 0.05 * scale;  //by default, we step in 1/20ths of the knob travel
                else
                        val -= 0.05 * scale;
-                       
+
                c->set_interface(val);
        }
 
index 221fe672d965cc3a3181f93a80d511ce1974979a..78100aa9529f0a22b1dd2bf28b10ea6478c41969 100644 (file)
@@ -138,7 +138,7 @@ ArdourDropdown::AddMenuElem (Menu_Helpers::Element e)
        using namespace Menu_Helpers;
 
        MenuList& items = _menu.items ();
-       
+
        items.push_back (e);
 }
 
index 99890ad2e7eb218bd9f6ae7ecb276c87c79b6068..f7e4a939f299c97607cedd86b6ee5cb1ef55d0b9 100644 (file)
@@ -80,13 +80,13 @@ void
 ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
 {
        cairo_pattern_t* shade_pattern;
-       
+
        float width = get_width();
        float height = get_height();
-       
+
        const float scale = min(width, height);
        const float pointer_thickness = 3.0 * (scale/80);  //(if the knob is 80 pixels wide, we want a 3-pix line on it)
-       
+
        const float start_angle = ((180 - 65) * G_PI) / 180;
        const float end_angle = ((360 + 65) * G_PI) / 180;
 
@@ -97,13 +97,13 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
 
        const float value_angle = start_angle + (_val * (end_angle - start_angle));
        const float zero_angle = start_angle + (zero * (end_angle - start_angle));
-       
+
        float value_x = cos (value_angle);
        float value_y = sin (value_angle);
 
        float xc =  0.5 + width/ 2.0;
        float yc = 0.5 + height/ 2.0;
-       
+
        cairo_translate (cr, xc, yc);  //after this, everything is based on the center of the knob
 
        //get the knob color from the theme
@@ -111,11 +111,11 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
 
        float center_radius = 0.48*scale;
        float border_width = 0.8;
-       
+
        bool arc = (_elements & Arc)==Arc;
        bool bevel = (_elements & Bevel)==Bevel;
        bool flat = _flat_buttons;
-       
+
        if ( arc ) {
                center_radius = scale*0.33;
 
@@ -123,7 +123,7 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
                float outer_progress_radius = scale*0.48;
                float progress_width = (outer_progress_radius-inner_progress_radius);
                float progress_radius = inner_progress_radius + progress_width/2.0;
-               
+
                //dark arc background
                cairo_set_source_rgb (cr, 0.3, 0.3, 0.3 );
                cairo_set_line_width (cr, progress_width);
@@ -185,7 +185,7 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
                cairo_stroke (cr);
 #endif
        }
-       
+
        if (!flat) {
                //knob shadow
                cairo_save(cr);
@@ -199,8 +199,8 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
                ArdourCanvas::set_source_rgba(cr, knob_color);
                cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
                cairo_fill (cr);
-               
-               //gradient      
+
+               //gradient
                if (bevel) {
                        //knob gradient
                        shade_pattern = cairo_pattern_create_linear (0.0, -yc, 0.0,  yc);  //note we have to offset the gradient from our centerpoint
@@ -217,7 +217,7 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
                        ArdourCanvas::set_source_rgb_a (cr, knob_color, 0.5 );
                        cairo_arc (cr, 0, 0, center_radius-pointer_thickness, 0, 2.0*G_PI);
                        cairo_fill (cr);
-               } else {        
+               } else {
                        //radial gradient
                        shade_pattern = cairo_pattern_create_radial ( -center_radius, -center_radius, 1, -center_radius, -center_radius, center_radius*2.5  );  //note we have to offset the gradient from our centerpoint
                        cairo_pattern_add_color_stop_rgba (shade_pattern, 0.0, 1,1,1, 0.2);
@@ -227,21 +227,21 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
                        cairo_fill (cr);
                        cairo_pattern_destroy (shade_pattern);
                }
-               
+
        } else {
                //inner circle
                ArdourCanvas::set_source_rgba(cr, knob_color);
                cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
                cairo_fill (cr);
        }
-       
+
 
        //black knob border
        cairo_set_line_width (cr, border_width);
        cairo_set_source_rgba (cr, 0,0,0, 1 );
        cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
        cairo_stroke (cr);
-                       
+
        //line shadow
        if (!flat) {
                cairo_save(cr);
@@ -254,7 +254,7 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
                cairo_stroke (cr);
                cairo_restore(cr);
        }
-       
+
        //line
        cairo_set_source_rgba (cr, 1,1,1, 1 );
        cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
@@ -269,8 +269,8 @@ ArdourKnob::render (cairo_t* cr, cairo_rectangle_t *)
                cairo_arc (cr, 0, 0, center_radius, 0, 2.0*G_PI);
                cairo_fill (cr);
        }
-       
-       cairo_identity_matrix(cr);      
+
+       cairo_identity_matrix(cr);
 }
 
 void
@@ -305,11 +305,11 @@ ArdourKnob::on_scroll_event (GdkEventScroll* ev)
        boost::shared_ptr<PBD::Controllable> c = binding_proxy.get_controllable();
        if (c) {
                float val = c->get_interface();
-       
+
                if ( ev->direction == GDK_SCROLL_UP )
                        val += scale;
                else
-                       val -= scale;                   
+                       val -= scale;
 
                c->set_interface(val);
        }
@@ -408,7 +408,7 @@ ArdourKnob::on_button_press_event (GdkEventButton *ev)
        if (ev->button != 1 && ev->button != 2) {
                return false;
        }
-       
+
        set_active_state (Gtkmm2ext::ExplicitActive);
        _tooltip.start_drag();
        add_modal_grab();
@@ -506,14 +506,14 @@ ArdourKnob::set_active_state (Gtkmm2ext::ActiveState s)
        if (_active_state != s)
                CairoWidget::set_active_state (s);
 }
-       
+
 void
 ArdourKnob::set_visual_state (Gtkmm2ext::VisualState s)
 {
        if (_visual_state != s)
                CairoWidget::set_visual_state (s);
 }
-       
+
 
 bool
 ArdourKnob::on_focus_in_event (GdkEventFocus* ev)
index 29cfb5e4f4cd2c5e8049ef73d0ae65e88494e83f..d9a9c9420926a2fc1e7f181bce233ed5142a7d67 100644 (file)
@@ -113,7 +113,7 @@ public:
        float _val; // current value [0..1]
        float _normal; // default value, arc
        float _dead_zone_delta;
-       
+
        Flags _flags;
 
        void action_sensitivity_changed ();
index bc1587b7cc63bdf23b7982eb13fa9065615a483e..500acd6332696b13c73bae5d508aab7ebdbf375e 100644 (file)
@@ -305,7 +305,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
 
        xmlSetGenericErrorFunc (this, libxml_generic_error_func);
        xmlSetStructuredErrorFunc (this, libxml_structured_error_func);
-       
+
        UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed));
        boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
        UIConfiguration::instance().map_parameters (pc);
@@ -441,7 +441,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
        /* Trigger setting up the color scheme and loading the GTK RC file */
 
        UIConfiguration::instance().load_rc_file (false);
-       
+
        _process_thread = new ProcessThread ();
        _process_thread->init ();
 
index 7ad154f0d45756675dc6dd14affe35acc2d19a54..ce6c74c8c1eff2f9fa3b6430f67f4b3b42923d93 100644 (file)
@@ -180,7 +180,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        ARDOUR::Session* the_session() { return _session; }
 
        bool get_smart_mode () const;
-       
+
        int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
         int  build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
        bool ask_about_loading_existing_session (const std::string& session_path);
@@ -193,7 +193,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void save_state (const std::string & state_name = "", bool switch_to_it = false);
 
        static ARDOUR_UI *instance () { return theArdourUI; }
-       
+
        PublicEditor&     the_editor() { return *editor;}
        Mixer_UI* the_mixer() { return mixer; }
 
@@ -227,7 +227,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void create_xrun_marker (framepos_t);
 
        GUIObjectState* gui_object_state;
-       
+
        MainClock* primary_clock;
        MainClock* secondary_clock;
        void focus_on_clock ();
@@ -486,13 +486,13 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void audition_blink (bool);
        void feedback_blink (bool);
        void error_blink (bool);
-       
+
        void set_flat_buttons();
 
        void soloing_changed (bool);
        void auditioning_changed (bool);
        void _auditioning_changed (bool);
-       
+
        bool solo_alert_press (GdkEventButton* ev);
        bool audition_alert_press (GdkEventButton* ev);
        bool feedback_alert_press (GdkEventButton *);
@@ -543,7 +543,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        Gtk::Label    format_label;
        void update_format ();
-       
+
        void every_second ();
        void every_point_one_seconds ();
        void every_point_zero_something_seconds ();
index 4322c7e0ff1ef028efb19475168c2220ef29cb34..d8a1f218ec31ebc30a9f6d21a68e72c2a06c0300 100644 (file)
@@ -412,7 +412,7 @@ ARDOUR_UI::setup_transport ()
 
        shuttle_box = manage (new ShuttleControl);
        shuttle_box->show ();
-       
+
        VBox* transport_vbox = manage (new VBox);
        transport_vbox->set_name ("TransportBase");
        transport_vbox->set_border_width (0);
@@ -734,4 +734,4 @@ ARDOUR_UI::toggle_follow_edits ()
        UIConfiguration::instance().set_follow_edits (tact->get_active ());
 }
 
-       
+
index 00a16684e1a728182e259bd8b3a0dd5e47548268..f41c06a9a130bbfec3da107ae975b2cb563ac7c7 100644 (file)
@@ -348,7 +348,7 @@ ARDOUR_UI::goto_mixer_window ()
 {
        Glib::RefPtr<Gdk::Window> win;
        Glib::RefPtr<Gdk::Screen> screen;
-       
+
        if (editor) {
                win = editor->get_window ();
        }
@@ -358,7 +358,7 @@ ARDOUR_UI::goto_mixer_window ()
        } else {
                screen = Gdk::Screen::get_default();
        }
-       
+
        if (g_getenv ("ARDOUR_LOVES_STUPID_TINY_SCREENS") == 0 && screen && screen->get_height() < 700) {
                Gtk::MessageDialog msg (_("This screen is not tall enough to display the mixer window"));
                msg.run ();
index fb077e49af4f4e36243db2eeffac0b60ae422577..e4379fe4321c47e6f8f1ab84871c33260b6316a7 100644 (file)
@@ -137,7 +137,7 @@ ARDOUR_UI::install_actions ()
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
 
-       
+
        act = ActionManager::register_action (main_actions, X_("OpenVideo"), _("Open Video"),
                                              sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_video), (Gtk::Window*) 0));
        ActionManager::session_sensitive_actions.push_back (act);
index 22e32731c03c1872c915bd5fdcd568689194886e..1cb42020801531c9953c8ef2be3c1d9bb56e112e 100644 (file)
@@ -126,7 +126,7 @@ ArdourWindow::init ()
        if (parent) {
                set_transient_for (*parent);
        }
-       
+
        ARDOUR_UI::CloseAllDialogs.connect (sigc::mem_fun (*this, &ArdourWindow::hide));
 
        proxy = new WM::ProxyTemporary (get_title(), this);
index 54f17725eb0a46be46f4c46fdeefadc688d4e54d..cf55f63c6e54969fceed68753c0bed3d67def9b1 100644 (file)
@@ -151,7 +151,7 @@ AudioClock::on_realize ()
        Gtk::Requisition req;
 
        CairoWidget::on_realize ();
-       
+
        set_clock_dimensions (req);
 
        first_width = req.width;
@@ -318,7 +318,7 @@ AudioClock::render (cairo_t* cr, cairo_rectangle_t*)
                cairo_save (cr);
                cairo_scale (cr, xscale, yscale);
        }
-       
+
        pango_cairo_show_layout (cr, _layout->gobj());
 
        if (xscale != 1.0 || yscale != 1.0) {
@@ -507,15 +507,15 @@ AudioClock::on_size_request (Gtk::Requisition* req)
                Glib::RefPtr<Gtk::Style> style = get_style ();
                Pango::FontDescription font;
                int w;
-               
+
                tmp = Pango::Layout::create (get_pango_context());
-               
+
                if (!is_realized()) {
                        font = get_font_for_style (get_name());
                } else {
                        font = style->get_font();
                }
-               
+
                tmp->set_font_description (font);
 
                font.set_size (INFO_FONT_SIZE);
@@ -561,17 +561,17 @@ AudioClock::start_edit (Field f)
                        edit_string.clear ();
                        _layout->set_text ("");
                }
-               
+
                input_string.clear ();
                editing = true;
                edit_is_negative = false;
-               
+
                if (f) {
                        input_string = get_field (f);
                        show_edit_status (merge_input_and_edit_string ());
                        _layout->set_text (edit_string);
                }
-               
+
                queue_draw ();
 
                Keyboard::magic_widget_grab_focus ();
index 40e9644d923d025999ebbcc4edc1884884a31f61..3790fa88ef590bf0519eea618bc8f5d1a6814fe3 100644 (file)
@@ -87,7 +87,7 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr
         * to font distortion.
         */
        void set_scale (double x, double y);
-       
+
        static void print_minsec (framepos_t, char* buf, size_t bufsize, float frame_rate);
 
        sigc::signal<void> ValueChanged;
@@ -242,7 +242,7 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr
        ARDOUR::framecnt_t parse_as_minsec_distance (const std::string&);
        ARDOUR::framecnt_t parse_as_bbt_distance (const std::string&);
        ARDOUR::framecnt_t parse_as_frames_distance (const std::string&);
-       
+
        void set_font (Pango::FontDescription);
        void set_colors ();
        void show_edit_status (int length);
index 73122a269dc1572374afab45905bfd3cfbd8e394..706611a81d23e8a36b59f4c709184ede7a7ca391 100644 (file)
@@ -235,7 +235,7 @@ AudioRegionView::init (bool wfd)
        if (!Profile->get_sae()) {
                gain_line.reset (new AudioRegionGainLine (line_name, *this, *group, audio_region()->envelope()));
        }
-       
+
        update_envelope_visibility ();
        gain_line->reset ();
 
@@ -375,7 +375,7 @@ AudioRegionView::fade_out_active_changed ()
        if (end_xfade_rect) {
                if (audio_region()->fade_out_active()) {
                        end_xfade_rect->set_fill (false);
-               } else {        
+               } else {
                        end_xfade_rect->set_fill_color (UIConfiguration::instance().color_mod ("inactive crossfade", "inactive crossfade"));
                        end_xfade_rect->set_fill (true);
                }
@@ -420,7 +420,7 @@ AudioRegionView::region_resized (const PropertyChange& what_changed)
        interesting_stuff.add (ARDOUR::Properties::length);
 
        if (what_changed.contains (interesting_stuff)) {
-               
+
                for (uint32_t n = 0; n < waves.size(); ++n) {
                        waves[n]->region_resized ();
                }
@@ -531,17 +531,17 @@ AudioRegionView::set_height (gdouble height)
        if (wcnt > 0) {
 
                gdouble ht;
-               
+
                if (!UIConfiguration::instance().get_show_name_highlight() || (height < NAME_HIGHLIGHT_THRESH)) {
                        ht = height / (double) wcnt;
                } else {
                        ht = (height - NAME_HIGHLIGHT_SIZE) / (double) wcnt;
                }
-               
+
                for (uint32_t n = 0; n < wcnt; ++n) {
-                       
+
                        gdouble yoff = floor (ht * n);
-                       
+
                        waves[n]->set_height (ht);
                        waves[n]->set_y_position (yoff);
                }
@@ -635,7 +635,7 @@ AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, f
                hide_start_xfade ();
                return;
        }
-       
+
        double effective_height;
 
        if (_height >= NAME_HIGHLIGHT_THRESH) {
@@ -689,7 +689,7 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
 
 
        double const pwidth = floor(trackview.editor().sample_to_pixel (width));
-       
+
        /* the right edge should be right on the region frame is the pixel
         * width is zero. Hence the additional + 1.0 at the end.
         */
@@ -731,7 +731,7 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
        }
 
        /* points *MUST* be in anti-clockwise order */
-       
+
        Points points;
        Points::size_type pi;
        boost::shared_ptr<const Evoral::ControlList> list (audio_region()->fade_out());
@@ -739,7 +739,7 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
        double length = list->length();
 
        points.assign (list->size(), Duple());
-       
+
        for (x = list->begin(), pi = 0; x != list->end(); ++x, ++pi) {
                points[pi].x = _pixel_width - pwidth + (pwidth * ((*x)->when/length));
                points[pi].y = effective_height - ((*x)->value * (effective_height - 1.));
@@ -839,7 +839,7 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr<AudioRegion> ar, frame
 
                npoints = inverse->size();
                ipoints.assign (npoints, Duple());
-               
+
                Evoral::ControlList::const_iterator x;
                Points::size_type pi;
                double length = inverse->length();
@@ -866,7 +866,7 @@ AudioRegionView::redraw_end_xfade ()
        }
 
        show_end_xfade();
-       
+
        reset_fade_out_shape_width (ar, ar->fade_out()->back()->when);
 }
 
@@ -930,9 +930,9 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecn
 
                npoints = inverse->size();
                ipoints.assign (npoints, Duple());
-               
+
                const double rend = trackview.editor().sample_to_pixel (_region->length() - width);
-               
+
                Evoral::ControlList::const_iterator x;
                Points::size_type pi;
                double length = inverse->length();
@@ -1218,12 +1218,12 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
        /* first waveview starts at 1.0, not 0.0 since that will overlap the
         * frame
         */
-       
+
        gdouble yoff = which * ht;
 
        WaveView *wave = new WaveView (group, audio_region ());
        CANVAS_DEBUG_NAME (wave, string_compose ("wave view for chn %1 of %2", which, get_item_name()));
-       
+
        wave->set_channel (which);
        wave->set_y_position (yoff);
        wave->set_height (ht);
@@ -1231,9 +1231,9 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
        wave->set_show_zero_line (true);
        wave->set_clip_level (UIConfiguration::instance().get_waveform_clip_level ());
        wave->set_start_shift (1.0);
-       
+
        wave->Event.connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_wave_view_event), wave, this));
-       
+
        switch (UIConfiguration::instance().get_waveform_shape()) {
        case Rectified:
                wave->set_shape (WaveView::Rectified);
@@ -1241,7 +1241,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
        default:
                wave->set_shape (WaveView::Normal);
        }
-               
+
        wave->set_logscaled (UIConfiguration::instance().get_waveform_scale() == Logarithmic);
 
        vector<ArdourCanvas::WaveView*> v;
@@ -1523,7 +1523,7 @@ AudioRegionView::set_some_waveform_colors (vector<ArdourCanvas::WaveView*>& wave
                } else {
                        if (_region->muted()) {
                                /* hide outline with zero alpha */
-                               outline = UINT_RGBA_CHANGE_A(UIConfiguration::instance().color ("waveform outline"), 0);        
+                               outline = UINT_RGBA_CHANGE_A(UIConfiguration::instance().color ("waveform outline"), 0);
                                fill = UINT_RGBA_CHANGE_A(UIConfiguration::instance().color ("waveform fill"), MUTED_ALPHA);
                        } else {
                                outline = UIConfiguration::instance().color ("waveform outline");
index e82b5fc5ed20b4cfec7adf2e6494fad95c231c6c..646d044c07be2cbd28ff741f690716cf658d864c 100644 (file)
@@ -122,7 +122,7 @@ class AudioRegionView : public RegionView
         void redraw_end_xfade_to (boost::shared_ptr<ARDOUR::AudioRegion>, framecnt_t, ArdourCanvas::Points&, double, double, double);
        void redraw_start_xfade ();
        void redraw_end_xfade ();
-       
+
        void hide_xfades ();
        void hide_start_xfade ();
        void hide_end_xfade ();
index 91a9ee4cf686e362356fd8555f2b050d69a8b8b5..d078de7a2783f3391b3893a2cef05c4574d6ae8b 100644 (file)
@@ -432,7 +432,7 @@ AudioStreamView::hide_xfades_with (boost::shared_ptr<AudioRegion> ar)
 {
        list<AudioRegionView*> start_hidden;
        list<AudioRegionView*> end_hidden;
-       
+
        for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
                AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
                if (arv) {
index 6110673985fd60c642d9ceb849ac593e8cac5bd6..f59c4bc809a613fa0ed167d0aaf7bf97830c7470 100644 (file)
@@ -183,14 +183,14 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
        AutomationTracks::iterator existing = _automation_tracks.find (param);
 
        if (existing != _automation_tracks.end()) {
-               
+
                /* automation track created because we had existing data for
                 * the processor, but visibility may need to be controlled
                 * since it will have been set visible by default.
                 */
 
                existing->second->set_marked_for_display (show);
-               
+
                if (!no_redraw) {
                        request_redraw ();
                }
@@ -219,7 +219,7 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
        } else if (param.type() == MuteAutomation) {
 
                create_mute_automation_child (param, show);
-               
+
 
        } else {
                error << "AudioTimeAxisView: unknown automation child " << EventTypeMap::instance().to_symbol(param) << endmsg;
index 8137fc4b19a02f0b83084a5476d51f99a9b74e69..d2a66a10276868235ae514c616e6e5e87db0efa9 100644 (file)
@@ -94,7 +94,7 @@ AutomationLine::AutomationLine (const string&                              name,
        } else {
                _our_time_converter = true;
        }
-       
+
        _visible = Line;
 
        update_pending = false;
@@ -203,7 +203,7 @@ AutomationLine::hide ()
        /* leave control points setting unchanged, we are just hiding the
           overall line
        */
-       
+
        set_visibility (AutomationLine::VisibleAspects (_visible & ~Line));
 }
 
@@ -582,10 +582,10 @@ AutomationLine::ContiguousControlPoints::clamp_dx (double dx)
 
        /* get the maximum distance we can move any of these points along the x-axis
         */
-       
+
        double tx; /* possible position a point would move to, given dx */
        ControlPoint* cp;
-       
+
        if (dx > 0) {
                /* check the last point, since we're moving later in time */
                cp = back();
@@ -649,15 +649,15 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
                   no motion ever took place, but need to do before we handle
                   motion.
                */
-       
+
                /* partition the points we are dragging into (potentially several)
                 * set(s) of contiguous points. this will not happen with a normal
                 * drag, but if the user does a discontiguous selection, it can.
                 */
-               
+
                uint32_t expected_view_index = 0;
                CCP contig;
-               
+
                for (list<ControlPoint*>::iterator i = _drag_points.begin(); i != _drag_points.end(); ++i) {
                        if (i == _drag_points.begin() || (*i)->view_index() != expected_view_index) {
                                contig.reset (new ContiguousControlPoints (*this));
@@ -675,7 +675,7 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
                        (*ccp)->compute_x_bounds (trackview.editor());
                }
                _drag_had_movement = true;
-       }       
+       }
 
        /* OK, now on to the stuff related to *this* motion event. First, for
         * each contiguous range, figure out the maximum x-axis motion we are
@@ -695,7 +695,7 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
        }
 
        /* clamp y */
-       
+
        for (list<ControlPoint*>::iterator i = _drag_points.begin(); i != _drag_points.end(); ++i) {
                double const y = ((_height - (*i)->get_y()) / _height) + dy;
                if (y < 0) {
@@ -709,7 +709,7 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
        if (dx || dy) {
 
                /* and now move each section */
-               
+
                for (vector<CCP>::iterator ccp = contiguous_points.begin(); ccp != contiguous_points.end(); ++ccp) {
                        (*ccp)->move (dx, dy);
                }
@@ -731,7 +731,7 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
                        line->set_steps (line_points, is_stepped());
                }
        }
-       
+
        _drag_distance += dx;
        _drag_x += dx;
        _last_drag_fraction = fraction;
@@ -884,7 +884,7 @@ AutomationLine::remove_point (ControlPoint& cp)
        XMLNode &before = alist->get_state();
 
        alist->erase (cp.model());
-       
+
        trackview.editor().session()->add_command(
                new MementoCommand<AutomationList> (memento_command_binder (), &before, &alist->get_state()));
 
@@ -912,7 +912,7 @@ AutomationLine::get_selectables (framepos_t start, framepos_t end, double botfra
                /* model_when is relative to the start of the source, so we just need to add on the origin_b here
                   (as it is the session frame position of the start of the source)
                */
-               
+
                framepos_t const session_frames_when = _time_converter->to (model_when) + _time_converter->origin_b ();
 
                if (session_frames_when >= start && session_frames_when <= end && (*i)->get_y() >= bot_track && (*i)->get_y() <= top_track) {
@@ -993,7 +993,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
        np = events.size();
 
        Evoral::ControlList& e = const_cast<Evoral::ControlList&> (events);
-       
+
        for (AutomationList::iterator ai = e.begin(); ai != e.end(); ++ai, ++pi) {
 
                double tx = (*ai)->when;
@@ -1008,17 +1008,17 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
                                                   _name) << endmsg;
                        continue;
                }
-               
+
                if (tx >= max_framepos || tx < 0 || tx >= _maximum_time) {
                        continue;
                }
-               
+
                /* convert x-coordinate to a canvas unit coordinate (this takes
                 * zoom and scroll into account).
                 */
-                       
+
                tx = trackview.editor().sample_to_pixel_unrounded (tx);
-               
+
                /* convert from canonical view height (0..1.0) to actual
                 * height coordinates (using X11's top-left rooted system)
                 */
index 19399ec4355ca64bc9b8a78068da5a72a07beb5e..816cefedef9a6260b2e226179178c3fb0b90b878 100644 (file)
@@ -60,7 +60,7 @@ public:
                ControlPoints = 0x2,
                SelectedControlPoints = 0x4
        };
-       
+
        AutomationLine (const std::string&                                 name,
                        TimeAxisView&                                      tv,
                        ArdourCanvas::Item&                                parent,
index 41ef49e9be751b66009bb6fe0d12c9a6f9ebeae0..1c79593b3444b27441cf80fc21e5a6c6170c2c4c 100644 (file)
@@ -110,7 +110,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
        }
        tipname += nom;
        _name = tipname;
-       
+
        CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, r->name()));
        CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for auto %2/%1", _name, r->name()));
        CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for auto %2/%1", _name, r->name()));
@@ -178,7 +178,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
        if (name_label.get_parent()) {
                name_label.get_parent()->remove (name_label);
        }
-       
+
        name_label.set_text (_name);
        name_label.set_alignment (Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
        name_label.set_name (X_("TrackParameterName"));
@@ -618,7 +618,7 @@ AutomationTimeAxisView::add_automation_event (GdkEvent* event, framepos_t when,
        }
 
        boost::shared_ptr<AutomationList> list = _line->the_list ();
-       
+
        if (list->in_write_pass()) {
                /* do not allow the GUI to add automation events during an
                   automation write pass.
@@ -781,11 +781,11 @@ AutomationTimeAxisView::add_line (boost::shared_ptr<AutomationLine> line)
 {
        if (_control && 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()
                        );
-               
+
                _control->alist()->InterpolationChanged.connect (
                        _list_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::interpolation_changed, this, _1), gui_context()
                        );
@@ -860,15 +860,15 @@ AutomationTimeAxisView::what_has_visible_automation (const boost::shared_ptr<Aut
        assert (automatable);
 
        Automatable::Controls& controls (automatable->controls());
-       
+
        for (Automatable::Controls::iterator i = controls.begin(); i != controls.end(); ++i) {
-               
+
                boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl> (i->second);
 
                if (ac && ac->alist()) {
-                       
+
                        const XMLNode* gui_node = ac->extra_xml ("GUI");
-                       
+
                        if (gui_node) {
                                const XMLProperty* prop = gui_node->property ("shown");
                                if (prop) {
index 5ff8f622921bfa44e2f6a6362ba83e17b4ce168b..b47ca9816311df91c660caea938a2d4b5b99fda4 100644 (file)
@@ -54,7 +54,7 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
        virtual std::string name() const = 0;
 
        sigc::signal<void> Hiding;
-       
+
        void set_old_order_key (uint32_t ok) { _old_order_key = ok; }
        uint32_t old_order_key() const { return _old_order_key; }
 
@@ -62,7 +62,7 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
        /* for now, we always return properties in string form.
         */
        std::string gui_property (const std::string& property_name) const;
-       
+
        template<typename T> void set_gui_property (const std::string& property_name, const T& value) {
                std::stringstream s;
                s << value;
@@ -82,7 +82,7 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
 
        static GUIObjectState& gui_object_state();
        void clear_property_cache() { property_hashtable.clear(); }
-       
+
   protected:
 
        AxisView (ARDOUR::Session* sess);
index 1f723d1b59cb75c45afe7d785130ff81eafbb568..a073bcc09952d0237e4825cebbea9e3b333455ca 100644 (file)
@@ -28,11 +28,11 @@ class BigClockWindow : public ArdourWindow
 {
     public:
        BigClockWindow (AudioClock&);
-       
+
     private:
        AudioClock& clock;
        Gtk::Requisition default_size;
-       
+
        void clock_size_reallocated (Gtk::Allocation&);
        void on_realize ();
        void on_unmap ();
index 17d8075d38e6d01d5acd3edc1ec40d463cd3f39f..418ca3636d2c6d15ea2ea1bc04b3838562637484 100644 (file)
@@ -79,7 +79,7 @@ fixup_bundle_environment (int, char* [], string & localedir)
                localedir = "/this/cannot/exist";
        } else {
                /* force localedir into the bundle */
-               
+
                vector<string> lpath;
                lpath.push_back (bundle_dir);
                lpath.push_back ("Resources");
@@ -87,7 +87,7 @@ fixup_bundle_environment (int, char* [], string & localedir)
                localedir = Glib::build_filename (lpath).c_str();
        }
 #endif
-               
+
        export_search_path (bundle_dir, "ARDOUR_DLL_PATH", "/lib");
 
        /* inside an OS X .app bundle, there is no difference
index c119eb29bff6345e66117c3711534f3e68aef409..981553c179b4ce8b51072fb461549bb92887ea79 100644 (file)
@@ -86,7 +86,7 @@ std::string ret;
        if (0 == pExeRoot) {
                pExeRoot = g_build_filename("C:\\", "Program Files", PROGRAM_NAME, 0);
        }
-       
+
        if (pExeRoot) {
                gchar  tmp[PATH_MAX+1];
                gchar* p;
@@ -232,7 +232,7 @@ string fonts_conf_file;
 
 #ifdef DEBUG
        fonts_conf_file = get_module_folder();
-       
+
        if (!fonts_conf_file.empty()) {
                fonts_conf_file += "\\";
                fonts_conf_file += PROGRAM_NAME;
@@ -257,7 +257,7 @@ string pango_modules_file;
 #if defined(DEBUG) || defined(RDC_BUILD)
        // Make sure we pick up the debuggable DLLs !!!
        pango_modules_file = get_module_folder();
-       
+
        if (!pango_modules_file.empty()) {
                pango_modules_file += "\\";
                pango_modules_file += PROGRAM_NAME;
@@ -295,7 +295,7 @@ string gdk_pixbuf_loaders_file;
 #if defined(DEBUG) || defined(RDC_BUILD)
        // Make sure we pick up the debuggable DLLs !!!
        gdk_pixbuf_loaders_file = get_module_folder();
-       
+
        if (!gdk_pixbuf_loaders_file.empty()) {
                gdk_pixbuf_loaders_file += "\\";
                gdk_pixbuf_loaders_file += PROGRAM_NAME;
@@ -321,7 +321,7 @@ string clearlooks_la_file;
 #if defined(DEBUG) || defined(RDC_BUILD)
        // Make sure we pick up the debuggable DLLs !!!
        clearlooks_la_file = get_module_folder();
-       
+
        if (!clearlooks_la_file.empty()) {
                clearlooks_la_file += "\\";
                clearlooks_la_file += PROGRAM_NAME;
index bc2a0ae2f2d20d1f66176fab9d94228c0e381d2d..a3ef36ac80327bd17bdc6a9ce612ef98cc1a6ca8 100644 (file)
@@ -78,7 +78,7 @@ ButtonJoiner::ButtonJoiner (const std::string& str, Gtk::Widget& lw, Gtk::Widget
 
        border_color = UIConfiguration::instance().color (string_compose ("%1: border end", name));
        UINT_TO_RGBA (border_color, &r, &g, &b, &a);
-       
+
        border_r = r/255.0;
        border_g = g/255.0;
        border_b = b/255.0;
@@ -104,7 +104,7 @@ void
 ButtonJoiner::render (cairo_t* cr, cairo_rectangle_t*)
 {
        double h = get_height();
-       
+
        if (!get_active()) {
                cairo_set_source (cr, inactive_fill_pattern);
        } else {
@@ -113,25 +113,25 @@ ButtonJoiner::render (cairo_t* cr, cairo_rectangle_t*)
 
        if (!central_link) {
                /* outer rect */
-               
+
                Gtkmm2ext::rounded_top_rectangle (cr, 0, 0, get_width(), h, 8);
                cairo_fill_preserve (cr);
-               
+
                /* outer edge */
-               
+
                cairo_set_line_width (cr, 1.5);
                cairo_set_source_rgb (cr, border_r, border_g, border_b);
                cairo_stroke (cr);
-               
+
                /* inner "edge" */
-               
+
                Gtkmm2ext::rounded_top_rectangle (cr, 8, 8, get_width() - 16, h - 8, 6);
                cairo_stroke (cr);
        } else {
                if (get_active()) {
                        Gtkmm2ext::rounded_top_rectangle (cr, 0, 0, (get_width() - 20.0)/2.0 , h, 8);
                        cairo_fill_preserve (cr);
-                       
+
                        Gtkmm2ext::rounded_top_rectangle (cr, (get_width() - 20.)/2.0 + 20.0, 0.0,
                                                          (get_width() - 20.0)/2.0 , h, 8);
                        cairo_fill_preserve (cr);
@@ -146,7 +146,7 @@ ButtonJoiner::render (cairo_t* cr, cairo_rectangle_t*)
                        cairo_set_line_width (cr, 1.5);
                        cairo_fill_preserve (cr);
                        cairo_set_source_rgb (cr, border_r, border_g, border_b);
-                       cairo_stroke (cr);              
+                       cairo_stroke (cr);
                }
        }
 }
@@ -203,7 +203,7 @@ ButtonJoiner::action_sensitivity_changed ()
        } else {
                set_visual_state (Gtkmm2ext::VisualState (visual_state() | Gtkmm2ext::Insensitive));
        }
-       
+
 }
 
 void
@@ -231,7 +231,7 @@ ButtonJoiner::action_toggled ()
        if (tact) {
                set_active (tact->get_active());
        }
-}      
+}
 
 void
 ButtonJoiner::set_active_state (Gtkmm2ext::ActiveState s)
index 4716f7fda1a7f907918c4c625517fce419b43971..41e5f745c0ef26e0dce68e36e0b3a3d7e55742ab 100644 (file)
@@ -32,7 +32,7 @@ class ButtonJoiner : public CairoWidget, public Gtkmm2ext::Activatable {
        ButtonJoiner (const std::string&, Gtk::Widget&, Gtk::Widget&, bool central_link = false);
        ~ButtonJoiner ();
 
-       void set_related_action (Glib::RefPtr<Gtk::Action>);    
+       void set_related_action (Glib::RefPtr<Gtk::Action>);
        void set_active_state (Gtkmm2ext::ActiveState);
 
   protected:
index e9bdb4f1eb33a4b55de70796c43b67ca94c440b6..bf7dad04297eb8e788b39e5a30912b881be95132 100644 (file)
@@ -1361,7 +1361,7 @@ gnome_canvas_waveview_gradient_render (GnomeCanvasItem *item,
                                        } else {
                                                PAINT_VERTA_GR(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax, fill_max, wave_middle, wave_top);
                                        }
-                                       
+
                                }
 
                                if((prev_pymin > pymin && next_pymin > pymin) ||
@@ -1559,7 +1559,7 @@ gnome_canvas_waveview_gradient_render (GnomeCanvasItem *item,
                                PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a >> 1, x - 1, pymax, pymax + (clip_length - 1));
                        }
 
-                       if (clip_min) { 
+                       if (clip_min) {
                                PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a , x, pymin - clip_length, pymin);
                                PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a >> 1, x + 1, pymin - (clip_length - 1), pymin);
                                PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a >> 1, x - 1, pymin - (clip_length - 1), pymin);
index a044ccfb8ff3252de9700e16eb3b9a07ee1699fe..b906e639d53b286305105addf4bada41f003a498 100644 (file)
@@ -80,7 +80,7 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool /*dummy_arg_to_force
 ControlPoint::~ControlPoint ()
 {
        CatchDeletion (this); /* EMIT SIGNAL */
-       
+
        delete _item;
 }
 
index 045f1241edc2b415b94764f5eb108d925641f0f1..c9aab3af64a76875f495dca06654953895fb2b46 100644 (file)
@@ -81,7 +81,7 @@ class ControlPoint : public Selectable
        AutomationLine&                  line()  const { return _line; }
 
        static PBD::Signal1<void, ControlPoint *> CatchDeletion;
-       
+
   private:
        ArdourCanvas::Rectangle*        _item;
        AutomationLine&                  _line;
index 0568468d6338513a657040276db17c4eb5da2596..ae154807a25e01aff4abc6254c5ef34215305ed8 100644 (file)
@@ -112,13 +112,13 @@ EditNoteDialog::EditNoteDialog (MidiRegionView* rv, set<NoteBase*> n)
        _velocity_all.set_sensitive (false);
        _time_all.set_sensitive (false);
        _length_all.set_sensitive (false);
-       
+
        int test_channel = (*_events.begin())->note()->channel ();
        int test_pitch = (*_events.begin())->note()->note ();
        int test_velocity = (*_events.begin())->note()->velocity ();
        Evoral::Beats test_time = (*_events.begin())->note()->time ();
        Evoral::Beats test_length = (*_events.begin())->note()->length ();
-       
+
        for (set<NoteBase*>::iterator i = _events.begin(); i != _events.end(); ++i) {
                if ((*i)->note()->channel() != test_channel) {
                        _channel_all.set_sensitive (true);
@@ -140,7 +140,7 @@ EditNoteDialog::EditNoteDialog (MidiRegionView* rv, set<NoteBase*> n)
                        _length_all.set_sensitive (true);
                }
        }
-       
+
        get_vbox()->pack_start (*table);
 
        add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
index 102b986e394f325066cbd36e75c8f6ae119d2044..b5d6a55dd839d98e262d0a07139e01f67b7143e9 100644 (file)
@@ -235,7 +235,7 @@ pane_size_watcher (Paned* pane)
 
              X: hard to access
              Quartz: impossible to access
-       
+
           so stop that by preventing it from ever getting too narrow. 35
           pixels is basically a rough guess at the tab width.
 
@@ -313,7 +313,7 @@ Editor::Editor ()
        PublicEditor::_instance = this;
 
        _have_idled = false;
-       
+
        selection = new Selection (this);
        cut_buffer = new Selection (this);
        _selection_memento = new SelectionMemento ();
@@ -742,7 +742,7 @@ Editor::Editor ()
        signal_delete_event().connect (sigc::mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::exit_on_main_window_close));
 
        Gtkmm2ext::Keyboard::the_keyboard().ZoomVerticalModifierReleased.connect (sigc::mem_fun (*this, &Editor::zoom_vertical_modifier_released));
-       
+
        /* allow external control surfaces/protocols to do various things */
 
        ControlProtocol::ZoomToSession.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_session, this), gui_context());
@@ -1019,7 +1019,7 @@ Editor::control_select (uint32_t rid, Selection::Operation op)
        /* handles the (static) signal from the ControlProtocol class that
         * requests setting the selected track to a given RID
         */
-       
+
        if (!_session) {
                return;
        }
@@ -1464,18 +1464,18 @@ Editor::fill_xfade_menu (Menu_Helpers::MenuList& items, bool start)
                        sigc::bind (sigc::mem_fun (*this, emf), FadeLinear)
                        )
                );
-       
+
        dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
-       
+
        items.push_back (
                ImageMenuElem (
                        _("Constant power"),
                        *(*images)[FadeConstantPower],
                        sigc::bind (sigc::mem_fun (*this, emf), FadeConstantPower)
                        ));
-       
+
        dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
-       
+
        items.push_back (
                ImageMenuElem (
                        _("Symmetric"),
@@ -1483,25 +1483,25 @@ Editor::fill_xfade_menu (Menu_Helpers::MenuList& items, bool start)
                        sigc::bind (sigc::mem_fun (*this, emf), FadeSymmetric)
                        )
                );
-       
+
        dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
-       
+
        items.push_back (
                ImageMenuElem (
                        _("Slow"),
                        *(*images)[FadeSlow],
                        sigc::bind (sigc::mem_fun (*this, emf), FadeSlow)
                        ));
-       
+
        dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
-       
+
        items.push_back (
                ImageMenuElem (
                        _("Fast"),
                        *(*images)[FadeFast],
                        sigc::bind (sigc::mem_fun (*this, emf), FadeFast)
                        ));
-       
+
        dynamic_cast<ImageMenuItem*>(&items.back())->set_always_show_image ();
 }
 
@@ -2101,7 +2101,7 @@ Editor::set_snap_to (SnapType st)
        case SnapToBeatDiv2: {
                ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin;
                ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end;
-               
+
                compute_current_bbt_points (leftmost_frame, leftmost_frame + current_page_samples(),
                                            current_bbt_points_begin, current_bbt_points_end);
                compute_bbt_ruler_scale (leftmost_frame, leftmost_frame + current_page_samples(),
@@ -2587,9 +2587,9 @@ Editor::trackview_by_y_position (double y, bool trackview_relative_offset) const
        }
 
        for (TrackViewList::const_iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
-                       
+
                std::pair<TimeAxisView*, double> const r = (*iter)->covers_y_position (y);
-                       
+
                if (r.first) {
                        return r;
                }
@@ -2948,7 +2948,7 @@ Editor::setup_toolbar ()
        if (!ARDOUR::Profile->get_mixbus()) {
                mouse_mode_hbox->pack_start (mouse_cut_button, false, false);
        }
-       
+
        if (!ARDOUR::Profile->get_trx()) {
                mouse_mode_hbox->pack_start (mouse_timefx_button, false, false);
                mouse_mode_hbox->pack_start (mouse_audition_button, false, false);
@@ -3059,7 +3059,7 @@ Editor::setup_toolbar ()
 
        if (!ARDOUR::Profile->get_trx()) {
                _zoom_tearoff = manage (new TearOff (_zoom_box));
-               
+
                _zoom_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
                                                           &_zoom_tearoff->tearoff_window()));
                _zoom_tearoff->Attach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
@@ -3169,7 +3169,7 @@ void
 Editor::build_edit_mode_menu ()
 {
        using namespace Menu_Helpers;
-       
+
        edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Slide], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Slide)));
 //     edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Splice], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Splice)));
        edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Ripple], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Ripple)));
@@ -3400,11 +3400,11 @@ Editor::commit_reversible_selection_op ()
                                    The user has undone some selection ops and then made a new one,
                                    making anything earlier in the list invalid.
                                */
-                               
+
                                list<XMLNode *>::iterator it = selection_op_history.begin();
                                list<XMLNode *>::iterator e_it = it;
                                advance (e_it, selection_op_history_it);
-                               
+
                                for ( ; it != e_it; ++it) {
                                        delete *it;
                                }
@@ -3764,7 +3764,7 @@ Editor::set_zoom_preset (int64_t ms)
                temporal_zoom_session();
                return;
        }
-       
+
        ARDOUR::framecnt_t const sample_rate = ARDOUR::AudioEngine::instance()->sample_rate();
        temporal_zoom( (sample_rate * ms / 1000) / _visible_canvas_width );
 }
@@ -3779,7 +3779,7 @@ Editor::set_visible_track_count (int32_t n)
           allocation happens, we will get called again and then we can do the
           real work.
        */
-       
+
        if (_visible_canvas_height <= 1) {
                return;
        }
@@ -3787,7 +3787,7 @@ Editor::set_visible_track_count (int32_t n)
        int h;
        string str;
        DisplaySuspender ds;
-       
+
        if (_visible_track_count > 0) {
                h = trackviews_height() / _visible_track_count;
                std::ostringstream s;
@@ -3813,7 +3813,7 @@ Editor::set_visible_track_count (int32_t n)
        for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
                (*i)->set_height (h, TimeAxisView::HeightPerLane);
        }
-       
+
        if (str != visible_tracks_selector.get_text()) {
                visible_tracks_selector.set_text (str);
        }
@@ -3995,7 +3995,7 @@ Editor::set_show_measures (bool yn)
 
                        ARDOUR::TempoMap::BBTPointList::const_iterator begin;
                        ARDOUR::TempoMap::BBTPointList::const_iterator end;
-                       
+
                        compute_current_bbt_points (leftmost_frame, leftmost_frame + current_page_samples(), begin, end);
                        draw_measures (begin, end);
                }
@@ -4329,7 +4329,7 @@ Editor::copy_playlists (TimeAxisView* v)
 void
 Editor::clear_playlists (TimeAxisView* v)
 {
-       begin_reversible_command (_("clear playlists"));        
+       begin_reversible_command (_("clear playlists"));
        vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
        _session->playlists->get (playlists);
        mapover_tracks (sigc::mem_fun (*this, &Editor::mapped_clear_playlist), v, ARDOUR::Properties::select.property_id);
@@ -4434,7 +4434,7 @@ Editor::current_visual_state (bool with_tracks)
        vs->leftmost_frame = leftmost_frame;
        vs->zoom_focus = zoom_focus;
 
-       if (with_tracks) {      
+       if (with_tracks) {
                *vs->gui_state = *ARDOUR_UI::instance()->gui_object_state;
        }
 
@@ -4498,11 +4498,11 @@ Editor::use_visual_state (VisualState& vs)
 
        set_zoom_focus (vs.zoom_focus);
        reposition_and_zoom (vs.leftmost_frame, vs.samples_per_pixel);
-       
+
        if (vs.gui_state) {
                *ARDOUR_UI::instance()->gui_object_state = *vs.gui_state;
-               
-               for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {    
+
+               for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
                        (*i)->clear_property_cache();
                        (*i)->reset_visual_state ();
                }
@@ -4612,7 +4612,7 @@ Editor::idle_visual_changer ()
 
        pending_visual_change.idle_handler_id = -1;
        pending_visual_change.being_handled = true;
-       
+
        VisualChange vc = pending_visual_change;
 
        pending_visual_change.pending = (VisualChange::Type) 0;
@@ -4636,7 +4636,7 @@ Editor::visual_changer (const VisualChange& vc)
 
                ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin;
                ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end;
-               
+
                compute_current_bbt_points (vc.time_origin, pending_visual_change.time_origin + current_page_samples(),
                                            current_bbt_points_begin, current_bbt_points_end);
                compute_bbt_ruler_scale (vc.time_origin, pending_visual_change.time_origin + current_page_samples(),
@@ -4978,17 +4978,17 @@ Editor::get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) cons
 {
        for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
                RouteTimeAxisView* rtav;
-               
+
                if ((rtav = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
                        boost::shared_ptr<Playlist> pl;
                        std::vector<boost::shared_ptr<Region> > results;
                        boost::shared_ptr<Track> tr;
-                       
+
                        if ((tr = rtav->track()) == 0) {
                                /* bus */
                                continue;
                        }
-                       
+
                        if ((pl = (tr->playlist())) != 0) {
                                boost::shared_ptr<Region> r = pl->region_by_id (id);
                                if (r) {
@@ -5014,7 +5014,7 @@ Editor::get_per_region_note_selection (list<pair<PBD::ID, set<boost::shared_ptr<
                        mtav->get_per_region_note_selection (selection);
                }
        }
-       
+
 }
 
 void
@@ -5070,7 +5070,7 @@ void
 Editor::first_idle ()
 {
        MessageDialog* dialog = 0;
-       
+
        if (track_views.size() > 1) {
                dialog = new MessageDialog (
                        *this,
@@ -5606,7 +5606,7 @@ Editor::reset_x_origin_to_follow_playhead ()
                } else {
 
                        framepos_t l = 0;
-                       
+
                        if (frame < leftmost_frame) {
                                /* moving left */
                                if (_session->transport_rolling()) {
@@ -5630,7 +5630,7 @@ Editor::reset_x_origin_to_follow_playhead ()
                        if (l < 0) {
                                l = 0;
                        }
-                       
+
                        center_screen_internal (l + (current_page_samples() / 2), current_page_samples ());
                }
        }
@@ -5775,7 +5775,7 @@ Editor::session_going_away ()
        clear_marker_display ();
 
        stop_step_editing ();
-       
+
        /* get rid of any existing editor mixer strip */
 
        WindowTitle title(Glib::get_application_name());
@@ -5851,7 +5851,7 @@ Editor::setup_fade_images ()
        _fade_out_images[FadeFast] = new Gtk::Image (get_icon_path (X_("fadeout-fast-cut")));
        _fade_out_images[FadeSlow] = new Gtk::Image (get_icon_path (X_("fadeout-slow-cut")));
        _fade_out_images[FadeConstantPower] = new Gtk::Image (get_icon_path (X_("fadeout-constant-power")));
-       
+
        _xfade_in_images[FadeLinear] = new Gtk::Image (get_icon_path (X_("fadein-linear")));
        _xfade_in_images[FadeSymmetric] = new Gtk::Image (get_icon_path (X_("fadein-symmetric")));
        _xfade_in_images[FadeFast] = new Gtk::Image (get_icon_path (X_("fadein-fast-cut")));
@@ -5922,10 +5922,10 @@ void
 Editor::popup_control_point_context_menu (ArdourCanvas::Item* item, GdkEvent* event)
 {
        using namespace Menu_Helpers;
-       
+
        MenuList& items = _control_point_context_menu.items ();
        items.clear ();
-       
+
        items.push_back (MenuElem (_("Edit..."), sigc::bind (sigc::mem_fun (*this, &Editor::edit_control_point), item)));
        items.push_back (MenuElem (_("Delete"), sigc::bind (sigc::mem_fun (*this, &Editor::remove_control_point), item)));
        if (!can_remove_control_point (item)) {
index c1e9fc32182a447a830a696e4e6df14d22693799..013f82d8b2a65450d839b74e255bb4aba2f5e445 100644 (file)
@@ -263,7 +263,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
 
        void remove_tracks ();
-       
+
        /* tempo */
 
        void set_show_measures (bool yn);
@@ -366,7 +366,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        void scroll_tracks_down_line ();
        void scroll_tracks_up_line ();
-       
+
        bool scroll_up_one_track (bool skip_child_views = false);
        bool scroll_down_one_track (bool skip_child_views = false);
 
@@ -503,7 +503,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        TimeAxisView* stepping_axis_view () {
                return _stepping_axis_view;
        }
-       
+
        void set_stepping_axis_view (TimeAxisView* v) {
                _stepping_axis_view = v;
        }
@@ -530,7 +530,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void split_regions_at (framepos_t, RegionSelection&);
        void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
        RegionSelection get_regions_from_selection_and_mouse (framepos_t);
-       
+
        void mouse_add_new_tempo_event (framepos_t where);
        void mouse_add_new_meter_event (framepos_t where);
        void edit_tempo_section (ARDOUR::TempoSection*);
@@ -719,7 +719,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
        void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
        void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
-       
+
        void button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type);
        bool button_release_can_deselect;
        bool _mouse_changed_selection;
@@ -2258,7 +2258,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        QuantizeDialog* quantize_dialog;
        MainMenuDisabler* _main_menu_disabler;
-       
+
        friend class Drag;
        friend class RegionDrag;
        friend class RegionMoveDrag;
index 5ac93a3339a369bd0744e62519ad419b91ac99f8..388d4fd34d54fae9df9bf95b8eb1fbcced0d627b 100644 (file)
@@ -460,7 +460,7 @@ Editor::register_actions ()
        Glib::RefPtr<ActionGroup> mouse_mode_actions = ActionGroup::create (X_("MouseMode"));
        RadioAction::Group mouse_mode_group;
 
-       act = ActionManager::register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled));       
+       act = ActionManager::register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled));
        smart_mode_action = Glib::RefPtr<ToggleAction>::cast_static (act);
        smart_mode_button.set_related_action (smart_mode_action);
        smart_mode_button.set_text (_("Smart"));
@@ -471,27 +471,27 @@ Editor::register_actions ()
        mouse_move_button.set_icon (Gtkmm2ext::ArdourIcon::ToolGrab);
        mouse_move_button.set_name ("mouse mode button");
 
-       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));        
+       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));
        mouse_select_button.set_related_action (act);
        mouse_select_button.set_icon (Gtkmm2ext::ArdourIcon::ToolRange);
        mouse_select_button.set_name ("mouse mode button");
 
-       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw));   
+       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw));
        mouse_draw_button.set_related_action (act);
        mouse_draw_button.set_icon (Gtkmm2ext::ArdourIcon::ToolDraw);
        mouse_draw_button.set_name ("mouse mode button");
 
-       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition));       
+       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition));
        mouse_audition_button.set_related_action (act);
        mouse_audition_button.set_icon (Gtkmm2ext::ArdourIcon::ToolAudition);
        mouse_audition_button.set_name ("mouse mode button");
 
-       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX));    
+       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX));
        mouse_timefx_button.set_related_action (act);
        mouse_timefx_button.set_icon (Gtkmm2ext::ArdourIcon::ToolStretch);
        mouse_timefx_button.set_name ("mouse mode button");
 
-       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent));  
+       act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent));
        mouse_content_button.set_related_action (act);
        mouse_content_button.set_icon (Gtkmm2ext::ArdourIcon::ToolContent);
        mouse_content_button.set_name ("mouse mode button");
@@ -502,7 +502,7 @@ Editor::register_actions ()
                mouse_cut_button.set_icon (Gtkmm2ext::ArdourIcon::ToolCut);
                mouse_cut_button.set_name ("mouse mode button");
        }
-       
+
        ActionManager::register_action (editor_actions, "step-mouse-mode", _("Step Mouse Mode"), sigc::bind (sigc::mem_fun(*this, &Editor::step_mouse_mode), true));
 
        RadioAction::Group edit_point_group;
@@ -601,7 +601,7 @@ Editor::register_actions ()
        /* set defaults here */
 
        no_ruler_shown_update = true;
-       
+
        if (Profile->get_trx()) {
                ruler_marker_action->set_active (true);
                ruler_meter_action->set_active (false);
@@ -613,7 +613,7 @@ Editor::register_actions ()
                ruler_cd_marker_action->set_active (false);
                ruler_timecode_action->set_active (false);
                ruler_minsec_action->set_active (true);
-       } else {        
+       } else {
                ruler_marker_action->set_active (true);
                ruler_meter_action->set_active (true);
                ruler_tempo_action->set_active (true);
@@ -741,7 +741,7 @@ void
 Editor::load_bindings ()
 {
         /* XXX move this to a better place */
-       
+
         key_bindings.set_action_map (editor_action_map);
 
        std::string binding_file;
@@ -1632,7 +1632,7 @@ void
 Editor::toggle_sound_midi_notes ()
 {
        Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("sound-midi-notes"));
-       
+
        if (act) {
                bool s = UIConfiguration::instance().get_sound_midi_notes();
                Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
index 13fd6fe8b94b3ec92dc19bfba21c4207016dd157..36c9e341027a02c6b241db823afe49629b74ed04 100644 (file)
@@ -128,7 +128,7 @@ Editor::initialize_canvas ()
 
        _trackview_group = new ArdourCanvas::Container (hv_scroll_group);
        CANVAS_DEBUG_NAME (_trackview_group, "Canvas TrackViews");
-       
+
        // used as rubberband rect
        rubberband_rect = new ArdourCanvas::Rectangle (hv_scroll_group, ArdourCanvas::Rect (0.0, 0.0, 0.0, 0.0));
        rubberband_rect->hide();
@@ -140,7 +140,7 @@ Editor::initialize_canvas ()
         CANVAS_DEBUG_NAME (_drag_motion_group, "Canvas Drag Motion");
 
        /* TIME BAR CANVAS */
-       
+
        _time_markers_group = new ArdourCanvas::Container (h_scroll_group);
        CANVAS_DEBUG_NAME (_time_markers_group, "time bars");
 
@@ -187,7 +187,7 @@ Editor::initialize_canvas ()
        cd_marker_bar->set_outline_what (ArdourCanvas::Rectangle::BOTTOM);
 
        ARDOUR_UI::instance()->video_timeline = new VideoTimeLine(this, videotl_group, (timebar_height * videotl_bar_height));
-       
+
        cd_marker_bar_drag_rect = new ArdourCanvas::Rectangle (cd_marker_group, ArdourCanvas::Rect (0.0, 0.0, 100, timebar_height));
        CANVAS_DEBUG_NAME (cd_marker_bar_drag_rect, "cd marker drag");
        cd_marker_bar_drag_rect->set_outline (false);
@@ -401,7 +401,7 @@ void
 Editor::drop_paths_part_two (const vector<string>& paths, framepos_t frame, double ypos, bool copy)
 {
        RouteTimeAxisView* tv;
-       
+
        /* MIDI files must always be imported, because we consider them
         * writable. So split paths into two vectors, and follow the import
         * path on the MIDI part.
@@ -427,7 +427,7 @@ Editor::drop_paths_part_two (const vector<string>& paths, framepos_t frame, doub
                frame = 0;
                InstrumentSelector is; // instantiation builds instrument-list and sets default.
                do_import (midi_paths, Editing::ImportDistinctFiles, ImportAsTrack, SrcBest, frame, is.selected_instrument());
-               
+
                if (Profile->get_sae() || UIConfiguration::instance().get_only_copy_imported_files() || copy) {
                        do_import (audio_paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, SrcBest, frame);
                } else {
@@ -520,13 +520,13 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
 
        if (from_headers) {
                alloc = controls_layout.get_allocation ();
-       } else {        
+       } else {
                alloc = _track_canvas_viewport->get_allocation ();
 
                /* reduce height by the height of the timebars, which happens
                   to correspond to the position of the hv_scroll_group.
                */
-               
+
                alloc.set_height (alloc.get_height() - hv_scroll_group->position().y);
                alloc.set_y (alloc.get_y() + hv_scroll_group->position().y);
 
@@ -539,21 +539,21 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
 
                /* the effective width of the autoscroll boundary so
                   that we start scrolling before we hit the edge.
-               
+
                   this helps when the window is slammed up against the
                   right edge of the screen, making it hard to scroll
                   effectively.
                */
-               
+
                if (alloc.get_width() > 20) {
                        alloc.set_width (alloc.get_width() - 20);
                        alloc.set_x (alloc.get_x() + 10);
                }
 
        }
-       
+
        scrolling_boundary = ArdourCanvas::Rect (alloc.get_x(), alloc.get_y(), alloc.get_x() + alloc.get_width(), alloc.get_y() + alloc.get_height());
-       
+
        int x, y;
        Gdk::ModifierType mask;
 
@@ -607,7 +607,7 @@ Editor::autoscroll_canvas ()
                        no_stop = true;
 
                } else if (x < autoscroll_boundary.x0) {
-                       
+
                        dx = autoscroll_boundary.x0 - x;
                        dx += 10 + (2 * (autoscroll_cnt/2));
 
@@ -621,7 +621,7 @@ Editor::autoscroll_canvas ()
 
                        no_stop = true;
                }
-               
+
                if (new_frame != leftmost_frame) {
                        vc.time_origin = new_frame;
                        vc.add (VisualChange::TimeOrigin);
@@ -629,12 +629,12 @@ Editor::autoscroll_canvas ()
        }
 
        if (autoscroll_vertical_allowed) {
-               
+
                // const double vertical_pos = vertical_adjustment.get_value();
                const int speed_factor = 10;
 
                /* vertical */
-               
+
                if (y < autoscroll_boundary.y0) {
 
                        /* scroll to make higher tracks visible */
@@ -671,7 +671,7 @@ Editor::autoscroll_canvas ()
 
                ev.type = GDK_MOTION_NOTIFY;
                ev.state = Gdk::BUTTON1_MASK;
-               
+
                /* the motion handler expects events in canvas coordinate space */
 
                /* we asked for the mouse position above (::get_pointer()) via
@@ -700,7 +700,7 @@ Editor::autoscroll_canvas ()
                ev.y = d.y;
 
                motion_handler (0, (GdkEvent*) &ev, true);
-               
+
        } else if (no_stop) {
 
                /* not changing visual state but pointer is outside the scrolling boundary
@@ -711,7 +711,7 @@ Editor::autoscroll_canvas ()
 
                ev.type = GDK_MOTION_NOTIFY;
                ev.state = Gdk::BUTTON1_MASK;
-               
+
                /* the motion handler expects events in canvas coordinate space */
 
                /* first convert from Editor window coordinates to canvas
@@ -740,7 +740,7 @@ Editor::autoscroll_canvas ()
                ev.y = d.y;
 
                motion_handler (0, (GdkEvent*) &ev, true);
-               
+
        } else {
                stop_canvas_autoscroll ();
                return false;
@@ -749,7 +749,7 @@ Editor::autoscroll_canvas ()
        autoscroll_cnt++;
 
        return true; /* call me again */
-}      
+}
 
 void
 Editor::start_canvas_autoscroll (bool allow_horiz, bool allow_vert, const ArdourCanvas::Rect& boundary)
@@ -895,7 +895,7 @@ Editor::color_handler()
        samples_ruler->set_outline_color (text);
        bbt_ruler->set_fill_color (base);
        bbt_ruler->set_outline_color (text);
-       
+
        playhead_cursor->set_color (UIConfiguration::instance().color ("play head"));
 
        meter_bar->set_fill_color (UIConfiguration::instance().color_mod ("meter bar", "marker bar"));
@@ -1082,9 +1082,9 @@ Editor::which_trim_cursor (bool left) const
        }
 
        Trimmable::CanTrim ct = entered_regionview->region()->can_trim ();
-               
+
        if (left) {
-               
+
                if (ct & Trimmable::FrontTrimEarlier) {
                        return _cursors->left_side_trim;
                } else {
@@ -1112,7 +1112,7 @@ Editor::which_mode_cursor () const
        case MouseCut:
                mode_cursor = _cursors->scissors;
                break;
-                       
+
        case MouseObject:
        case MouseContent:
                /* don't use mode cursor, pick a grabber cursor based on the item */
@@ -1138,20 +1138,20 @@ Editor::which_mode_cursor () const
                get_pointer_position (x, y);
 
                if (x >= 0 && y >= 0) {
-                       
+
                        vector<ArdourCanvas::Item const *> items;
 
                        /* Note how we choose a specific scroll group to get
                         * items from. This could be problematic.
                         */
-                       
+
                        hv_scroll_group->add_items_at_point (ArdourCanvas::Duple (x,y), items);
-                       
+
                        // first item will be the upper most
-                       
+
                        if (!items.empty()) {
                                const ArdourCanvas::Item* i = items.front();
-                               
+
                                if (i && i->parent() && i->parent()->get_data (X_("timeselection"))) {
                                        pair<TimeAxisView*, int> tvp = trackview_by_y_position (_last_motion_y);
                                        if (dynamic_cast<AutomationTimeAxisView*> (tvp.first)) {
@@ -1200,7 +1200,7 @@ Editor::which_canvas_cursor(ItemType type) const
                        break;
                }
        }
-       
+
        if ((mouse_mode == MouseObject || get_smart_mode ()) ||
            mouse_mode == MouseContent) {
 
@@ -1296,7 +1296,7 @@ Editor::which_canvas_cursor(ItemType type) const
                }
 
        } else if (mouse_mode == MouseDraw) {
-               
+
                /* ControlPointItem is not really specific to region gain mode
                   but it is the same cursor so don't worry about this for now.
                   The result is that we'll see the fader cursor if we enter
index 2527a1597cbf3bd1bafb6b647135c7038a2dcf5d..5a8abad6f1542a360acd3f6955630b9db4fabe6e 100644 (file)
@@ -67,7 +67,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
        if (Keyboard::some_magic_widget_has_focus()) {
                return false;
        }
-       
+
        framepos_t xdelta;
        int direction = ev->direction;
 
@@ -329,7 +329,7 @@ Editor::canvas_wave_view_event (GdkEvent *event, ArdourCanvas::Item* item, Regio
        }
 
        return ret;
-}      
+}
 
 
 bool
@@ -1036,7 +1036,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
        bool handled = false;
 
        if (event->type == GDK_SCROLL) {
-               
+
                /* scroll events in the rulers are handled a little differently from
                   scrolling elsewhere in the canvas.
                */
@@ -1055,7 +1055,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
                        }
                        handled = true;
                        break;
-                       
+
                case GDK_SCROLL_DOWN:
                        if (Profile->get_mixbus()) {
                                //for mouse-wheel zoom, force zoom-focus to mouse
@@ -1068,7 +1068,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
                        }
                        handled = true;
                        break;
-                       
+
                case GDK_SCROLL_LEFT:
                        xdelta = (current_page_samples() / 2);
                        if (leftmost_frame > xdelta) {
@@ -1078,7 +1078,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
                        }
                        handled = true;
                        break;
-                       
+
                case GDK_SCROLL_RIGHT:
                        xdelta = (current_page_samples() / 2);
                        if (max_framepos - xdelta > leftmost_frame) {
@@ -1088,7 +1088,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
                        }
                        handled = true;
                        break;
-                       
+
                default:
                        /* what? */
                        break;
@@ -1130,9 +1130,9 @@ Editor::canvas_note_event (GdkEvent *event, ArdourCanvas::Item* item)
 bool
 Editor::canvas_drop_zone_event (GdkEvent* event)
 {
-       GdkEventScroll scroll;  
+       GdkEventScroll scroll;
        ArdourCanvas::Duple winpos;
-       
+
        switch (event->type) {
        case GDK_BUTTON_RELEASE:
                if (event->button.button == 1) {
@@ -1193,18 +1193,18 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
 
        std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (py, false);
        bool can_drop = false;
-       
+
        if (tv.first != 0) {
 
                /* over a time axis view of some kind */
 
                rtav = dynamic_cast<RouteTimeAxisView*> (tv.first);
-               
+
                if (rtav != 0 && rtav->is_track ()) {
                        /* over a track, not a bus */
                        can_drop = true;
                }
-                       
+
 
        } else {
                /* not over a time axis view, so drop is possible */
@@ -1213,7 +1213,7 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
 
        if (can_drop) {
                region = _regions->get_dragged_region ();
-               
+
                if (region) {
 
                        if (tv.first == 0
@@ -1227,17 +1227,17 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
                                context->drag_status (context->get_suggested_action(), time);
                                return true;
                        }
-                       
+
                        if ((boost::dynamic_pointer_cast<AudioRegion> (region) != 0 &&
                             dynamic_cast<AudioTimeAxisView*> (tv.first) != 0) ||
                            (boost::dynamic_pointer_cast<MidiRegion> (region) != 0 &&
                             dynamic_cast<MidiTimeAxisView*> (tv.first) != 0)) {
-                               
+
                                /* audio to audio
                                   OR
                                   midi to midi
                                */
-                               
+
                                context->drag_status (context->get_suggested_action(), time);
                                return true;
                        }
index 9cabbce56bab0248f8f0164cc39e6a9ce0dffb32..40245778d5b950dfc270f540c7484c79ddf8de06 100644 (file)
@@ -49,7 +49,7 @@ EditorCursor::EditorCursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,Ardour
        _track_canvas_item->set_y1 (ArdourCanvas::COORD_MAX);
 
        _track_canvas_item->set_x (0);
-       
+
        _current_frame = 1; /* force redraw at 0 */
 }
 
@@ -63,7 +63,7 @@ EditorCursor::EditorCursor (Editor& ed)
        _track_canvas_item->set_show_head (1, false);
        _track_canvas_item->set_y1 (ArdourCanvas::COORD_MAX);
        _track_canvas_item->set_ignore_events (true);
-       
+
        _track_canvas_item->set_x (0);
 
        _current_frame = 1; /* force redraw at 0 */
index d7e856c9e57507381fb7288b2b87334328f439a0..f841f0c778eb5188fc704d7e34f79af24512d097 100644 (file)
@@ -50,7 +50,7 @@ class EditorCursor {
 
        PBD::Signal1<void, framepos_t> PositionChanged;
 
-  private:     
+  private:
        Editor&               _editor;
        ArdourCanvas::Arrow*  _track_canvas_item;
        framepos_t            _current_frame;
index 376cebfd49084bb43fa65b735b0d15d38113e908..d5466a1ed5d7cb7c8d10185ca688c8ab292fa778 100644 (file)
@@ -4969,7 +4969,7 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
                                s->clear_range_selection ();
                        }
                }
-               
+
        } else {
                /* just a click, no pointer movement.
                 */
index b4d5994a63402da89b7de2f923de6aac87785827..2d4ad30668ac8cd18d3346823eadc4917dec7a77 100644 (file)
@@ -202,7 +202,7 @@ public:
        bool initially_vertical() const {
                return _initially_vertical;
        }
-       
+
        /** Set up the _pointer_frame_offset */
        virtual void setup_pointer_frame_offset () {
                _pointer_frame_offset = 0;
@@ -582,7 +582,7 @@ public:
 private:
        double y_to_region (double) const;
        ARDOUR::framecnt_t grid_frames (framepos_t) const;
-       
+
        MidiRegionView* _region_view;
        ArdourCanvas::Rectangle* _drag_rect;
        framepos_t _note[2];
@@ -675,7 +675,7 @@ public:
 private:
 
        Operation _operation;
-       
+
        bool _preserve_fade_anchor;
        bool _jump_position_when_done;
 };
@@ -932,7 +932,7 @@ public:
         *  @param drag_in_progress true if the drag is currently happening.
         */
        virtual void select_things (int button_state, framepos_t x1, framepos_t x2, double y1, double y2, bool drag_in_progress) = 0;
-       
+
        virtual void deselect_things () = 0;
 
   protected:
@@ -1042,7 +1042,7 @@ public:
 
        RangeMarkerBarDrag (Editor *, ArdourCanvas::Item *, Operation);
        ~RangeMarkerBarDrag ();
-       
+
        void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
        void motion (GdkEvent *, bool);
        void finished (GdkEvent *, bool);
@@ -1134,7 +1134,7 @@ class CrossfadeEdgeDrag : public Drag
        void motion (GdkEvent*, bool);
        void finished (GdkEvent*, bool);
        void aborted (bool);
-       
+
        bool y_movement_matters () const {
                return false;
        }
index 0d1f055c80d8003a665e43264a660c32242e9571..15592035e55633f0c8fdcbd845ef54aa12ef207e 100644 (file)
@@ -114,16 +114,16 @@ Editor::export_region ()
        boost::shared_ptr<Region> r = selection->regions.front()->region();
        boost::shared_ptr<AudioRegion> audio_region = boost::dynamic_pointer_cast<AudioRegion>(r);
        boost::shared_ptr<MidiRegion> midi_region = boost::dynamic_pointer_cast<MidiRegion>(r);
-       
+
        if (audio_region) {
-               
+
                RouteTimeAxisView & rtv (dynamic_cast<RouteTimeAxisView &> (selection->regions.front()->get_time_axis_view()));
                AudioTrack & track (dynamic_cast<AudioTrack &> (*rtv.route()));
-               
+
                ExportRegionDialog dialog (*this, *(audio_region.get()), track);
                dialog.set_session (_session);
                dialog.run ();
-               
+
        } else if (midi_region) {
 
                MidiExportDialog dialog (*this, midi_region);
@@ -146,13 +146,13 @@ Editor::export_region ()
                                               true,
                                               Gtk::MESSAGE_WARNING,
                                               Gtk::BUTTONS_NONE);
-                       
+
                        checker.set_title (_("File Exists!"));
 
                        checker.add_button (Stock::CANCEL, RESPONSE_CANCEL);
                        checker.add_button (_("Overwrite Existing File"), RESPONSE_ACCEPT);
                        checker.set_default_response (RESPONSE_CANCEL);
-                       
+
                        checker.set_wmclass (X_("midi_export_file_exists"), PROGRAM_NAME);
                        checker.set_position (Gtk::WIN_POS_MOUSE);
 
@@ -169,7 +169,7 @@ Editor::export_region ()
                        default:
                                return;
                        }
-                       
+
                }
 
                (void) midi_region->clone (path);
index a4043b7a1910d0290e3e3346bc69982987f8a9b6..48fe9e231dae1eec498e2b9990da9d23c7445a80 100644 (file)
@@ -91,7 +91,7 @@ EditorGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
 {
        double const arc_radius = get_width();
        double r, g, b, a;
-       
+
        if (tab.group && tab.group->is_active()) {
                ArdourCanvas::color_to_rgba (tab.color, r, g, b, a);
        } else {
index 2548a68ab41c6309ce47ec259d484160b49a8544..a2ee3574363d46ce1750170f98606b9a7751d4bb 100644 (file)
@@ -45,7 +45,7 @@ Editor::keyboard_selection_finish (bool /*add*/)
 
                framepos_t start = selection->time.start();
                framepos_t end;
-               
+
                if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
                        end = _session->audible_frame();
                } else {
@@ -54,7 +54,7 @@ Editor::keyboard_selection_finish (bool /*add*/)
 
                //snap the selection start/end
                snap_to(start);
-               
+
                //if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
                if ( (_edit_point == EditAtPlayhead) && selection->tracks.empty() )
                        select_all_tracks();
@@ -81,19 +81,19 @@ Editor::keyboard_selection_begin ()
                } else {
                        start = get_preferred_edit_position();
                }
-               
+
                //snap the selection start/end
                snap_to(start);
-               
+
                //if there's not already a sensible selection endpoint, go "forever"
                if ( start > end ) {
                        end = max_framepos;
                }
-               
+
                //if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
                if ( selection->tracks.empty() )
                        select_all_tracks();
-                                       
+
                selection->set (start, end);
 
                //if session is playing a range, cancel that
index a8663edf6f71b07ba67814150057be2f6bab4f8b..201631e8c51e4d146e12cf7c24d445eb2756339a 100644 (file)
@@ -68,7 +68,7 @@ Editor::add_new_location (Location *location)
 
        /* Do a full update of the markers in this group */
        update_marker_labels (group);
-       
+
        if (location->is_auto_punch()) {
                update_punch_range_view ();
        }
@@ -965,7 +965,7 @@ Editor::build_range_marker_menu (bool loop_or_punch, bool session)
        if (!loop_or_punch_or_session || !session) {
                items.push_back (SeparatorElem());
        }
-       
+
        items.push_back (MenuElem (_("Separate Regions in Range"), sigc::mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
        items.push_back (MenuElem (_("Select All in Range"), sigc::mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
        if (!Profile->get_sae()) {
@@ -1216,7 +1216,7 @@ Editor::marker_menu_set_from_selection (bool /*force_regions*/)
                        // nothing for now
 
                } else {
-                       
+
                        if (!selection->time.empty()) {
                                l->set (selection->time.start(), selection->time.end_frame());
                        } else if (!selection->regions.empty()) {
@@ -1295,7 +1295,7 @@ Editor::marker_menu_zoom_to_range ()
        if (a >= extra) {
                a -= extra;
        }
-       
+
        framepos_t b = l->end ();
        if (b < (max_framepos - extra)) {
                b += extra;
@@ -1480,7 +1480,7 @@ Editor::update_loop_range_view ()
                transport_loop_range_rect->set_x1 (x2);
 
                transport_loop_range_rect->show();
-               
+
        } else {
                transport_loop_range_rect->hide();
        }
@@ -1499,7 +1499,7 @@ Editor::update_punch_range_view ()
 
                double pixel_start;
                double pixel_end;
-               
+
                if (_session->config.get_punch_in()) {
                        pixel_start = sample_to_pixel (tpl->start());
                } else {
@@ -1510,9 +1510,9 @@ Editor::update_punch_range_view ()
                } else {
                        pixel_end = sample_to_pixel (max_framepos);
                }
-               
+
                transport_punch_range_rect->set_x0 (pixel_start);
-               transport_punch_range_rect->set_x1 (pixel_end);                 
+               transport_punch_range_rect->set_x1 (pixel_end);
                transport_punch_range_rect->show();
 
        } else {
index 5871b5709a54ba64389ac6f2e0c632cb497a38e4..9769d616fe7e6692563c99f46975e735347b202f 100644 (file)
@@ -80,7 +80,7 @@ Editor::show_editor_mixer (bool yn)
        if (yn) {
                Glib::RefPtr<Gdk::Window> win = get_window ();
                Glib::RefPtr<Gdk::Screen> screen;
-               
+
                if (win) {
                         screen = win->get_screen();
                } else {
@@ -184,7 +184,7 @@ Editor::create_editor_mixer ()
        current_mixer_strip->WidthChanged.connect (sigc::mem_fun(*this, &Editor::ensure_all_elements_drawn));
 #endif
        current_mixer_strip->set_embedded (true);
-       
+
 }
 
 void
index 18478cdaacf2935d76cb096c14778b569eba07c4..094afc2692e1d8c30256f78641f170cc9730eb4b 100644 (file)
@@ -207,7 +207,7 @@ void
 Editor::mouse_mode_object_range_toggled()
 {
        MouseMode m = mouse_mode;
-       
+
        Glib::RefPtr<Action> act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-range"));
        assert (act);
        Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
@@ -313,7 +313,7 @@ Editor::mouse_mode_toggled (MouseMode m)
        }
 
        set_gain_envelope_visibility ();
-       
+
        update_time_selection_display ();
 
        update_all_enter_cursors ();
@@ -1229,17 +1229,17 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
                case TempoMarkerItem: {
                        ArdourMarker* marker;
                        TempoMarker* tempo_marker;
-                       
+
                        if ((marker = reinterpret_cast<ArdourMarker *> (item->get_data ("marker"))) == 0) {
                                fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
                                abort(); /*NOTREACHED*/
                        }
-                       
+
                        if ((tempo_marker = dynamic_cast<TempoMarker*> (marker)) == 0) {
                                fatal << _("programming error: marker for tempo is not a tempo marker!") << endmsg;
                                abort(); /*NOTREACHED*/
                        }
-                       
+
                        edit_tempo_marker (*tempo_marker);
                        break;
                }
@@ -1247,12 +1247,12 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
                case MeterMarkerItem: {
                        ArdourMarker* marker;
                        MeterMarker* meter_marker;
-                       
+
                        if ((marker = reinterpret_cast<ArdourMarker *> (item->get_data ("marker"))) == 0) {
                                fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
                                abort(); /*NOTREACHED*/
                        }
-                       
+
                        if ((meter_marker = dynamic_cast<MeterMarker*> (marker)) == 0) {
                                fatal << _("programming error: marker for meter is not a meter marker!") << endmsg;
                                abort(); /*NOTREACHED*/
@@ -1320,7 +1320,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
                        case SelectionItem:
                                popup_track_context_menu (1, event->button.time, item_type, true);
                                break;
-                               
+
                        case AutomationTrackItem:
                                popup_track_context_menu (1, event->button.time, item_type, false);
                                break;
@@ -1549,7 +1549,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
 
                case MouseDraw:
                        return true;
-                       
+
                case MouseRange:
                        // x_style_paste (where, 1.0);
                        return true;
@@ -1880,14 +1880,14 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
                current_stepping_trackview = 0;
                step_timeout.disconnect ();
        }
-       
+
        if (_session && _session->actively_recording()) {
                /* Sorry. no dragging stuff around while we record */
                return true;
        }
-       
+
        update_join_object_range_location (event->motion.y);
-       
+
        if (_drags->active ()) {
                return _drags->motion_handler (event, from_autoscroll);
        }
@@ -2064,7 +2064,7 @@ Editor::cancel_time_selection ()
        }
        selection->time.clear ();
        clicked_selection = 0;
-}      
+}
 
 void
 Editor::point_trim (GdkEvent* event, framepos_t new_bound)
@@ -2386,7 +2386,7 @@ Editor::update_join_object_range_location (double y)
        } else if (entered_track) {
 
                RouteTimeAxisView* entered_route_view = dynamic_cast<RouteTimeAxisView*> (entered_track);
-               
+
                if (entered_route_view) {
 
                        double cx = 0;
index 1ce39151310f234447cab7737a6e25afd8a928f2..e8174ce9e6b64ffbe6772fb93721cf4ec7e19959 100644 (file)
@@ -119,7 +119,7 @@ Editor::undo (uint32_t n)
        if (_drags->active ()) {
                _drags->abort ();
        }
-       
+
        if (_session) {
                _session->undo (n);
                if (_session->undo_depth() == 0) {
@@ -136,7 +136,7 @@ Editor::redo (uint32_t n)
        if (_drags->active ()) {
                _drags->abort ();
        }
-       
+
        if (_session) {
                _session->redo (n);
                if (_session->redo_depth() == 0) {
@@ -237,7 +237,7 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions)
        for (list<RouteTimeAxisView*>::iterator i = used_trackviews.begin(); i != used_trackviews.end(); ++i) {
                region_added_connections.push_back ((*i)->view()->RegionViewAdded.connect (sigc::mem_fun(*this, &Editor::collect_new_region_view)));
        }
-       
+
        while (used_playlists.size() > 0) {
                list <boost::shared_ptr<Playlist > >::iterator i = used_playlists.begin();
                (*i)->thaw();
@@ -713,7 +713,7 @@ Editor::build_region_boundary_cache ()
 
        TimeAxisView *ontrack = 0;
        TrackViewList tlist;
-       
+
        if (!selection->tracks.empty()) {
                tlist = selection->tracks.filter_to_unique_playlists ();
        } else {
@@ -1487,21 +1487,21 @@ Editor::scroll_down_one_track (bool skip_child_views)
        }
 
        /* move to the track below the first one that covers the */
-       
+
        if (next != track_views.rend()) {
                ensure_time_axis_view_is_visible (**next, true);
                return true;
        }
 
        return false;
-}      
+}
 
 bool
 Editor::scroll_up_one_track (bool skip_child_views)
 {
        TrackViewList::iterator prev = track_views.end();
        double top_of_trackviews = vertical_adjustment.get_value ();
-       
+
        for (TrackViewList::iterator t = track_views.begin(); t != track_views.end(); ++t) {
 
                if ((*t)->hidden()) {
@@ -1513,7 +1513,7 @@ Editor::scroll_up_one_track (bool skip_child_views)
                 * Note that covers_y_position() is recursive and includes child views
                 */
                std::pair<TimeAxisView*,double> res = (*t)->covers_y_position (top_of_trackviews);
-               
+
                if (res.first) {
                        if (skip_child_views) {
                                break;
@@ -1562,7 +1562,7 @@ Editor::scroll_up_one_track (bool skip_child_views)
 
                prev = t;
        }
-       
+
        if (prev != track_views.end()) {
                // move to bottom-most automation-lane of the previous track
                TimeAxisView::Children kids = (*prev)->get_child_list();
@@ -1601,7 +1601,7 @@ Editor::tav_zoom_step (bool coarser)
        } else {
                ts = &selection->tracks;
        }
-       
+
        for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) {
                TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
                        tv->step_height (coarser);
@@ -1620,7 +1620,7 @@ Editor::tav_zoom_smooth (bool coarser, bool force_all)
        } else {
                ts = &selection->tracks;
        }
-       
+
        for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) {
                TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
                uint32_t h = tv->current_height ();
@@ -1825,7 +1825,7 @@ Editor::temporal_zoom_region (bool both_axes)
 
        if ( !get_selection_extents(start, end) )
                return;
-       
+
        calc_extra_zoom_edges (start, end);
 
        /* if we're zooming on both axes we need to save track heights etc.
@@ -1836,7 +1836,7 @@ Editor::temporal_zoom_region (bool both_axes)
        PBD::Unwinder<bool> nsv (no_save_visual, true);
 
        temporal_zoom_by_frame (start, end);
-       
+
        if (both_axes) {
                uint32_t per_track_height = (uint32_t) floor ((_visible_canvas_height - 10.0) / tracks.size());
 
@@ -1869,7 +1869,7 @@ Editor::get_selection_extents ( framepos_t &start, framepos_t &end )
        start = max_framepos;
        end = 0;
        bool ret = true;
-       
+
        //ToDo:  if notes are selected, set extents to that selection
 
        //ToDo:  if control points are selected, set extents to that selection
@@ -1898,8 +1898,8 @@ Editor::get_selection_extents ( framepos_t &start, framepos_t &end )
        if ((start == 0 && end == 0) || end < start) {
                ret = false;
        }
-       
-       return ret;     
+
+       return ret;
 }
 
 
@@ -1924,7 +1924,7 @@ Editor::temporal_zoom_selection (bool both_axes)
                        calc_extra_zoom_edges(start, end);
                        temporal_zoom_by_frame (start, end);
                }
-               
+
                if (both_axes)
                        fit_selection();
        }
@@ -1974,7 +1974,7 @@ Editor::temporal_zoom_by_frame (framepos_t start, framepos_t end)
        framepos_t range = end - start;
 
        const framecnt_t new_fpp = (framecnt_t) ceil ((double) range / (double) _visible_canvas_width);
-       
+
        framepos_t new_page = range;
        framepos_t middle = (framepos_t) floor ((double) start + ((double) range / 2.0f));
        framepos_t new_leftmost = (framepos_t) floor ((double) middle - ((double) new_page / 2.0f));
@@ -2027,7 +2027,7 @@ Editor::temporal_zoom_to_frame (bool coarser, framepos_t frame)
        /* zoom focus is automatically taken as @param frame when this
           method is used.
        */
-       
+
        framepos_t new_leftmost = frame - (framepos_t)range_before;
 
        if (new_leftmost > frame) {
@@ -2098,12 +2098,12 @@ Editor::add_location_from_selection ()
        Location *location = new Location (*_session, start, end, rangename, Location::IsRangeMarker);
 
        begin_reversible_command (_("add marker"));
-       
+
        XMLNode &before = _session->locations()->get_state();
        _session->locations()->add (location, true);
        XMLNode &after = _session->locations()->get_state();
        _session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-       
+
        commit_reversible_command ();
 }
 
@@ -2120,12 +2120,12 @@ Editor::add_location_mark (framepos_t where)
        }
        Location *location = new Location (*_session, where, where, markername, Location::IsMark);
        begin_reversible_command (_("add marker"));
-       
+
        XMLNode &before = _session->locations()->get_state();
        _session->locations()->add (location, true);
        XMLNode &after = _session->locations()->get_state();
        _session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-       
+
        commit_reversible_command ();
 }
 
@@ -2134,7 +2134,7 @@ Editor::set_session_start_from_playhead ()
 {
        if (!_session)
                return;
-       
+
        Location* loc;
        if ((loc = _session->locations()->session_range_location()) == 0) {  //should never happen
                _session->set_session_extents ( _session->audible_frame(), _session->audible_frame() );
@@ -2146,7 +2146,7 @@ Editor::set_session_start_from_playhead ()
                XMLNode &after = loc->get_state();
 
                begin_reversible_command (_("Set session start"));
-               
+
                _session->add_command (new MementoCommand<Location>(*loc, &before, &after));
 
                commit_reversible_command ();
@@ -2158,7 +2158,7 @@ Editor::set_session_end_from_playhead ()
 {
        if (!_session)
                return;
-       
+
        Location* loc;
        if ((loc = _session->locations()->session_range_location()) == 0) {  //should never happen
                _session->set_session_extents ( _session->audible_frame(), _session->audible_frame() );
@@ -2200,7 +2200,7 @@ Editor::remove_location_at_playhead_cursor ()
                                removed = true;
                        }
                }
-               
+
                //store undo
                if (removed) {
                        begin_reversible_command (_("remove marker"));
@@ -2221,7 +2221,7 @@ Editor::add_locations_from_region ()
                return;
        }
        bool commit = false;
-       
+
        XMLNode &before = _session->locations()->get_state();
 
        for (RegionSelection::iterator i = rs.begin (); i != rs.end (); ++i) {
@@ -2292,7 +2292,7 @@ Editor::jump_forward_to_mark ()
        if (pos < 0) {
                return;
        }
-       
+
        _session->request_locate (pos, _session->transport_rolling());
 }
 
@@ -2332,12 +2332,12 @@ Editor::clear_markers ()
 {
        if (_session) {
                begin_reversible_command (_("clear markers"));
-               
+
                XMLNode &before = _session->locations()->get_state();
                _session->locations()->clear_markers ();
                XMLNode &after = _session->locations()->get_state();
                _session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-               
+
                commit_reversible_command ();
        }
 }
@@ -2347,14 +2347,14 @@ Editor::clear_ranges ()
 {
        if (_session) {
                begin_reversible_command (_("clear ranges"));
-               
+
                XMLNode &before = _session->locations()->get_state();
 
                _session->locations()->clear_ranges ();
 
                XMLNode &after = _session->locations()->get_state();
                _session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-               
+
                commit_reversible_command ();
        }
 }
@@ -2363,12 +2363,12 @@ void
 Editor::clear_locations ()
 {
        begin_reversible_command (_("clear locations"));
-       
+
        XMLNode &before = _session->locations()->get_state();
        _session->locations()->clear ();
        XMLNode &after = _session->locations()->get_state();
        _session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-       
+
        commit_reversible_command ();
 }
 
@@ -2541,11 +2541,11 @@ Editor::maybe_locate_with_edit_preroll ( framepos_t location )
                return;
 
        location -= get_preroll();
-       
+
        //don't try to locate before the beginning of time
        if ( location < 0 )
                location = 0;
-               
+
        //if follow_playhead is on, keep the playhead on the screen
        if ( _follow_playhead )
                if ( location < leftmost_frame )
@@ -2559,16 +2559,16 @@ Editor::play_with_preroll ()
 {
        {
                framepos_t preroll = get_preroll();
-               
+
                framepos_t start, end;
                if (!get_selection_extents ( start, end))
                        return;
 
                if (start > preroll)
                        start = start - preroll;
-               
+
                end = end + preroll;  //"post-roll"
-               
+
                AudioRange ar (start, end, 0);
                list<AudioRange> lar;
                lar.push_back (ar);
@@ -2629,7 +2629,7 @@ Editor::do_layer_operation (LayerOperation op)
                        begin_reversible_command (_("raise region to top"));
                }
                break;
-               
+
        case Lower:
                if (multiple) {
                        begin_reversible_command (_("lower regions"));
@@ -2637,7 +2637,7 @@ Editor::do_layer_operation (LayerOperation op)
                        begin_reversible_command (_("lower region"));
                }
                break;
-               
+
        case LowerToBottom:
                if (multiple) {
                        begin_reversible_command (_("lower regions to bottom"));
@@ -2651,7 +2651,7 @@ Editor::do_layer_operation (LayerOperation op)
        for (set<boost::shared_ptr<Playlist> >::iterator i = playlists.begin(); i != playlists.end(); ++i) {
                (*i)->clear_owned_changes ();
        }
-       
+
        for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
                boost::shared_ptr<Region> r = (*i)->region ();
                switch (op) {
@@ -2674,7 +2674,7 @@ Editor::do_layer_operation (LayerOperation op)
                (*i)->rdiff (cmds);
                _session->add_commands (cmds);
        }
-       
+
        commit_reversible_command ();
 }
 
@@ -3870,7 +3870,7 @@ Editor::freeze_route ()
        /* stop transport before we start. this is important */
 
        _session->request_transport_speed (0.0);
-       
+
        /* wait for just a little while, because the above call is asynchronous */
 
        Glib::usleep (250000);
@@ -4125,15 +4125,15 @@ Editor::cut_copy (CutCopyOp op)
 
                if (!selection->regions.empty()) {
                        cut_copy_regions (op, selection->regions);
-                       
+
                        if (op == Cut || op == Delete) {
                                selection->clear_regions ();
                        }
                }
-               
+
                if (!selection->points.empty()) {
                        cut_copy_points (op);
-                       
+
                        if (op == Cut || op == Delete) {
                                selection->clear_points ();
                        }
@@ -4151,19 +4151,19 @@ Editor::cut_copy (CutCopyOp op)
 
                did_edit = true;
                cut_copy_ranges (op);
-               
+
                if (op == Cut || op == Delete) {
                        selection->clear_time ();
                }
        }
-       
+
        if (did_edit) {
                /* reset repeated paste state */
                paste_count    = 0;
                last_paste_pos = 0;
-               commit_reversible_command ();   
+               commit_reversible_command ();
        }
-       
+
        if (op == Delete || op == Cut || op == Clear) {
                _drags->abort ();
        }
@@ -4172,7 +4172,7 @@ Editor::cut_copy (CutCopyOp op)
 struct AutomationRecord {
        AutomationRecord () : state (0) , line(NULL) {}
        AutomationRecord (XMLNode* s, const AutomationLine* l) : state (s) , line (l) {}
-       
+
        XMLNode* state; ///< state before any operation
        const AutomationLine* line; ///< line this came from
        boost::shared_ptr<Evoral::ControlList> copy; ///< copied events for the cut buffer
@@ -4258,10 +4258,10 @@ Editor::cut_copy_points (Editing::CutCopyOp op, Evoral::Beats earliest, bool mid
                        cut_buffer->add (i->second.copy);
                }
        }
-               
+
        if (op == Delete || op == Cut) {
                /* This operation needs to remove things from the main AutomationList, so do that now */
-               
+
                for (Lists::iterator i = lists.begin(); i != lists.end(); ++i) {
                        i->first->freeze ();
                }
@@ -4346,7 +4346,7 @@ Editor::remove_clicked_region ()
        vector<Command*> cmds;
        playlist->rdiff (cmds);
        _session->add_commands (cmds);
-       
+
        _session->add_command(new StatefulDiffCommand (playlist));
        commit_reversible_command ();
 }
@@ -4421,7 +4421,7 @@ Editor::remove_selected_regions ()
                vector<Command*> cmds;
                (*pl)->rdiff (cmds);
                _session->add_commands (cmds);
-               
+
                _session->add_command(new StatefulDiffCommand (*pl));
        }
 
@@ -4513,15 +4513,15 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
                if (op != Delete) {
 
                        vector<PlaylistMapping>::iterator z;
-                       
+
                        for (z = pmap.begin(); z != pmap.end(); ++z) {
                                if ((*z).tv == &tv) {
                                        break;
                                }
                        }
-                       
+
                        assert (z != pmap.end());
-                       
+
                        if (!(*z).pl) {
                                npl = PlaylistFactory::create (pl->data_type(), *_session, "cutlist", true);
                                npl->freeze();
@@ -4542,7 +4542,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
                        if (Config->get_edit_mode() == Ripple)
                                pl->ripple (r->position(), -r->length(), boost::shared_ptr<Region>());
                        break;
-                       
+
                case Cut:
                        _xx = RegionFactory::create (r);
                        npl->add_region (_xx, r->position() - first_position);
@@ -4569,20 +4569,20 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
        if (op != Delete) {
 
                list<boost::shared_ptr<Playlist> > foo;
-               
+
                /* the pmap is in the same order as the tracks in which selected regions occured */
-               
+
                for (vector<PlaylistMapping>::iterator i = pmap.begin(); i != pmap.end(); ++i) {
                        if ((*i).pl) {
                                (*i).pl->thaw();
                                foo.push_back ((*i).pl);
                        }
                }
-               
+
                if (!foo.empty()) {
                        cut_buffer->set (foo);
                }
-               
+
                if (pmap.empty()) {
                        _last_cut_copy_source_track = 0;
                } else {
@@ -4599,7 +4599,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
                vector<Command*> cmds;
                (*pl)->rdiff (cmds);
                _session->add_commands (cmds);
-               
+
                _session->add_command (new StatefulDiffCommand (*pl));
        }
 }
@@ -5452,7 +5452,7 @@ Editor::apply_filter (Filter& filter, string command, ProgressReporter* progress
                                vector<Command*> cmds;
                                playlist->rdiff (cmds);
                                _session->add_commands (cmds);
-                               
+
                                _session->add_command(new StatefulDiffCommand (playlist));
                        }
 
@@ -5486,7 +5486,7 @@ Editor::reset_region_gain_envelopes ()
        }
 
        bool in_command = false;
-       
+
        for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
                AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
                if (arv) {
@@ -5580,13 +5580,13 @@ Editor::toggle_region_lock ()
        }
 
        begin_reversible_command (_("toggle region lock"));
-       
+
        for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
                (*i)->region()->clear_changes ();
                (*i)->region()->set_locked (!(*i)->region()->locked());
                _session->add_command (new StatefulDiffCommand ((*i)->region()));
        }
-       
+
        commit_reversible_command ();
 }
 
@@ -5604,13 +5604,13 @@ Editor::toggle_region_video_lock ()
        }
 
        begin_reversible_command (_("Toggle Video Lock"));
-       
+
        for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
                (*i)->region()->clear_changes ();
                (*i)->region()->set_video_locked (!(*i)->region()->video_locked());
                _session->add_command (new StatefulDiffCommand ((*i)->region()));
        }
-       
+
        commit_reversible_command ();
 }
 
@@ -5628,14 +5628,14 @@ Editor::toggle_region_lock_style ()
        }
 
        begin_reversible_command (_("region lock style"));
-       
+
        for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
                (*i)->region()->clear_changes ();
                PositionLockStyle const ns = (*i)->region()->position_lock_style() == AudioTime ? MusicTime : AudioTime;
                (*i)->region()->set_position_lock_style (ns);
                _session->add_command (new StatefulDiffCommand ((*i)->region()));
        }
-       
+
        commit_reversible_command ();
 }
 
@@ -5653,13 +5653,13 @@ Editor::toggle_opaque_region ()
        }
 
        begin_reversible_command (_("change region opacity"));
-       
+
        for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
                (*i)->region()->clear_changes ();
                (*i)->region()->set_opaque (!(*i)->region()->opaque());
                _session->add_command (new StatefulDiffCommand ((*i)->region()));
        }
-       
+
        commit_reversible_command ();
 }
 
@@ -5977,7 +5977,7 @@ Editor::toggle_region_fades (int dir)
        if (_ignore_region_action) {
                return;
        }
-       
+
        boost::shared_ptr<AudioRegion> ar;
        bool yn = false;
 
@@ -6117,7 +6117,7 @@ Editor::split_region ()
 
        //if no range was selected, try to find some regions to split
        if (current_mouse_mode() == MouseObject) {  //don't try this for Internal Edit, Stretch, Draw, etc.
-       
+
                RegionSelection rs = get_regions_from_selection_and_edit_point ();
 
                framepos_t where = get_preferred_edit_position ();
@@ -6252,7 +6252,7 @@ Editor::set_session_extents_from_selection ()
        if (_session == 0) {
                return;
        }
-       
+
        framepos_t start, end;
        if (!get_selection_extents ( start, end))
                return;
@@ -6282,27 +6282,27 @@ Editor::set_punch_start_from_edit_point ()
 
                framepos_t start = 0;
                framepos_t end = max_framepos;
-               
+
                //use the existing punch end, if any
                Location* tpl = transport_punch_location();
                if (tpl) {
                        end = tpl->end();
                }
-               
+
                if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
                        start = _session->audible_frame();
                } else {
                        start = get_preferred_edit_position();
                }
-               
+
                //snap the selection start/end
                snap_to(start);
-               
+
                //if there's not already a sensible selection endpoint, go "forever"
                if ( start > end ) {
                        end = max_framepos;
                }
-                               
+
                set_punch_range (start, end, _("set punch start from EP"));
        }
 
@@ -6315,13 +6315,13 @@ Editor::set_punch_end_from_edit_point ()
 
                framepos_t start = 0;
                framepos_t end = max_framepos;
-               
+
                //use the existing punch start, if any
                Location* tpl = transport_punch_location();
                if (tpl) {
                        start = tpl->start();
                }
-               
+
                if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
                        end = _session->audible_frame();
                } else {
@@ -6330,7 +6330,7 @@ Editor::set_punch_end_from_edit_point ()
 
                //snap the selection start/end
                snap_to(end);
-               
+
                set_punch_range (start, end, _("set punch end from EP"));
 
        }
@@ -6343,22 +6343,22 @@ Editor::set_loop_start_from_edit_point ()
 
                framepos_t start = 0;
                framepos_t end = max_framepos;
-               
+
                //use the existing loop end, if any
                Location* tpl = transport_loop_location();
                if (tpl) {
                        end = tpl->end();
                }
-               
+
                if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
                        start = _session->audible_frame();
                } else {
                        start = get_preferred_edit_position();
                }
-               
+
                //snap the selection start/end
                snap_to(start);
-               
+
                //if there's not already a sensible selection endpoint, go "forever"
                if ( start > end ) {
                        end = max_framepos;
@@ -6376,13 +6376,13 @@ Editor::set_loop_end_from_edit_point ()
 
                framepos_t start = 0;
                framepos_t end = max_framepos;
-               
+
                //use the existing loop start, if any
                Location* tpl = transport_loop_location();
                if (tpl) {
                        start = tpl->start();
                }
-               
+
                if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
                        end = _session->audible_frame();
                } else {
@@ -6391,7 +6391,7 @@ Editor::set_loop_end_from_edit_point ()
 
                //snap the selection start/end
                snap_to(end);
-               
+
                set_loop_range (start, end, _("set loop end from EP"));
        }
 }
@@ -6574,7 +6574,7 @@ Editor::split_region_at_transients ()
        }
 
        begin_reversible_command (_("split regions"));
-       
+
        for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ) {
 
                RegionSelection::iterator tmp;
@@ -6591,7 +6591,7 @@ Editor::split_region_at_transients ()
 
                i = tmp;
        }
-       
+
        commit_reversible_command ();
 
 }
@@ -6754,7 +6754,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
        vector<Command*> cmds;
        pl->rdiff (cmds);
        _session->add_commands (cmds);
-       
+
        _session->add_command (new StatefulDiffCommand (pl));
 
        if (select_new) {
@@ -6781,12 +6781,12 @@ Editor::place_transient()
        framepos_t where = get_preferred_edit_position();
 
        begin_reversible_command (_("place transient"));
-       
+
        for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
                framepos_t position = (*r)->region()->position();
                (*r)->region()->add_transient(where - position);
        }
-       
+
        commit_reversible_command ();
 }
 
@@ -6816,7 +6816,7 @@ Editor::snap_regions_to_grid ()
        }
 
        begin_reversible_command (_("snap regions to grid"));
-       
+
        for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
 
                boost::shared_ptr<Playlist> pl = (*r)->region()->playlist();
@@ -6839,7 +6839,7 @@ Editor::snap_regions_to_grid ()
                (*i)->thaw();
                used_playlists.pop_front();
        }
-       
+
        commit_reversible_command ();
 }
 
@@ -6899,7 +6899,7 @@ Editor::close_region_gaps ()
        /* Iterate over the region list and make adjacent regions overlap by crossfade_len_ms */
 
        begin_reversible_command (_("close region gaps"));
-       
+
        int idx = 0;
        boost::shared_ptr<Region> last_region;
 
@@ -6938,7 +6938,7 @@ Editor::close_region_gaps ()
                (*i)->thaw();
                used_playlists.pop_front();
        }
-       
+
        commit_reversible_command ();
 }
 
@@ -7028,7 +7028,7 @@ Editor::playhead_forward_to_grid ()
        if (!_session) {
                return;
        }
-       
+
        framepos_t pos = playhead_cursor->current_frame ();
        if (pos < max_framepos - 1) {
                pos += 2;
@@ -7044,7 +7044,7 @@ Editor::playhead_backward_to_grid ()
        if (!_session) {
                return;
        }
-       
+
        framepos_t pos = playhead_cursor->current_frame ();
        if (pos > 2) {
                pos -= 2;
@@ -7163,7 +7163,7 @@ edit your ardour.rc file to set the\n\
 
        trackstr = P_("track", "tracks", ntracks);
        busstr = P_("bus", "busses", nbusses);
-       
+
        if (ntracks) {
                if (nbusses) {
                        prompt  = string_compose (_("Do you really want to remove %1 %2 and %3 %4?\n"
@@ -7282,7 +7282,7 @@ Editor::insert_time (
                                pl.insert ((*x)->playlist ());
                        }
                }
-               
+
                for (set<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
 
                        (*i)->clear_changes ();
@@ -7388,7 +7388,7 @@ Editor::do_remove_time ()
        if (response != RESPONSE_OK) {
                return;
        }
-       
+
        framecnt_t distance = d.distance();
 
        if (distance == 0) {
@@ -7420,26 +7420,26 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
        for (TrackSelection::iterator x = selection->tracks.begin(); x != selection->tracks.end(); ++x) {
                /* regions */
                boost::shared_ptr<Playlist> pl = (*x)->playlist();
-               
+
                if (pl) {
 
                        XMLNode &before = pl->get_state();
-                       
+
                        std::list<AudioRange> rl;
                        AudioRange ar(pos, pos+frames, 0);
                        rl.push_back(ar);
                        pl->cut (rl);
                        pl->shift (pos, -frames, true, ignore_music_glue);
-                       
+
                        if (!in_command) {
                                begin_reversible_command (_("cut time"));
                                in_command = true;
                        }
                        XMLNode &after = pl->get_state();
-                       
+
                        _session->add_command (new MementoCommand<Playlist> (*pl, &before, &after));
                }
-                       
+
                /* automation */
                RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
                if (rtav) {
@@ -7452,7 +7452,7 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
        }
 
        std::list<Location*> loc_kill_list;
-       
+
        /* markers */
        if (markers_too) {
                bool moved = false;
@@ -7514,7 +7514,7 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
                for (list<Location*>::iterator i = loc_kill_list.begin(); i != loc_kill_list.end(); ++i) {
                        _session->locations()->remove( *i );
                }
-       
+
                if (moved) {
                        if (!in_command) {
                                begin_reversible_command (_("cut time"));
@@ -7524,7 +7524,7 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
                        _session->add_command (new MementoCommand<Locations>(*_session->locations(), &before, &after));
                }
        }
-       
+
        if (tempo_too) {
                XMLNode& before (_session->tempo_map().get_state());
 
@@ -7537,7 +7537,7 @@ Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
                        _session->add_command (new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after));
                }
        }
-       
+
        if (in_command) {
                commit_reversible_command ();
        }
@@ -7701,7 +7701,7 @@ void
 Editor::start_visual_state_op (uint32_t n)
 {
        save_visual_state (n);
-       
+
        PopUp* pup = new PopUp (WIN_POS_MOUSE, 1000, true);
        char buf[32];
        snprintf (buf, sizeof (buf), _("Saved view %u"), n+1);
@@ -7835,7 +7835,7 @@ Editor::toggle_midi_input_active (bool flip_others)
                        onoff = !mt->input_active();
                }
        }
-       
+
        _session->set_exclusive_input_active (rl, onoff, flip_others);
 }
 
@@ -7853,14 +7853,14 @@ Editor::lock ()
                b->set_text (_("Click to unlock"));
                b->signal_clicked.connect (sigc::mem_fun (*this, &Editor::unlock));
                lock_dialog->get_vbox()->pack_start (*b);
-               
+
                lock_dialog->get_vbox()->show_all ();
                lock_dialog->set_size_request (200, 200);
        }
 
        delete _main_menu_disabler;
        _main_menu_disabler = new MainMenuDisabler;
-       
+
        lock_dialog->present ();
 }
 
@@ -7868,7 +7868,7 @@ void
 Editor::unlock ()
 {
        lock_dialog->hide ();
-       
+
        delete _main_menu_disabler;
 
        if (UIConfiguration::instance().get_lock_gui_after_seconds()) {
@@ -7900,11 +7900,11 @@ Editor::bring_all_sources_into_session ()
        ArdourDialog w (_("Moving embedded files into session folder"));
        w.get_vbox()->pack_start (msg);
        w.present ();
-       
+
        /* flush all pending GUI events because we're about to start copying
         * files
         */
-       
+
        Gtkmm2ext::UI::instance()->flush_pending ();
 
        cerr << " Do it\n";
index 5b143acc75a93c5c923d7ec294c2670d909d7fd4..31e7bf13098a73b8d7c13520aa106e7004edd3e5 100644 (file)
@@ -124,7 +124,7 @@ EditorRegions::EditorRegions (Editor* e)
                { 10, S_("Opaque|O"),  _("Region opaque (blocks regions below it from being heard)?") },
                { -1, 0, 0 }
        };
-       
+
        for (int i = 0; ci[i].index >= 0; ++i) {
                col = _display.get_column (ci[i].index);
                l = manage (new Label (ci[i].label));
@@ -433,7 +433,7 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
                        */
 
                        row = *(_model->insert (subrows.end()));
-                       
+
                } else {
                        row = *(_model->append());
                }
@@ -569,7 +569,7 @@ EditorRegions::selection_changed ()
                                        _change_connection.block (false);
                                }
                        }
-                       
+
                }
        } else {
                _editor->get_selection().clear_regions ();
index d66c6b679471826de78334f6842e66acc6fa8d31..041cef889253130a003189ebb3b041a507fd42e8 100644 (file)
@@ -75,7 +75,7 @@ EditorRouteGroups::EditorRouteGroups (Editor* e)
        TreeViewColumn* color_column = manage (new TreeViewColumn ("", *color_renderer));
 
        color_column->add_attribute (color_renderer->property_color(), _columns.gdkcolor);
-       
+
        _display.append_column (*color_column);
 
        _display.append_column ("", _columns.text);
@@ -138,7 +138,7 @@ EditorRouteGroups::EditorRouteGroups (Editor* e)
        CellRendererText* name_cell = dynamic_cast<CellRendererText*>(_display.get_column_cell_renderer (1));
        name_cell->property_editable() = true;
        name_cell->signal_edited().connect (sigc::mem_fun (*this, &EditorRouteGroups::name_edit));
-       
+
        for (int i = 1; ci[i].index >= 0; ++i) {
                CellRendererToggle* active_cell = dynamic_cast <CellRendererToggle*> (_display.get_column_cell_renderer (i));
 
@@ -274,10 +274,10 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev)
                        c = color_dialog.get_colorsel()->get_current_color();
                        GroupTabs::set_group_color (group, gdk_color_to_rgba (c));
                        break;
-                       
+
                default:
                        break;
-                       
+
                }
 
                color_dialog.hide ();
@@ -301,7 +301,7 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev)
                ret = true;
                break;
 
-               
+
        case 3:
                val = (*iter)[_columns.active_state];
                group->set_active (!val, this);
@@ -423,11 +423,11 @@ EditorRouteGroups::add (RouteGroup* group)
        row[_columns.active_shared] = group->is_route_active ();
        row[_columns.active_state] = group->is_active ();
        row[_columns.is_visible] = !group->is_hidden();
-       
+
        Gdk::Color c;
        set_color_from_rgba (c, GroupTabs::group_color (group));
        row[_columns.gdkcolor] = c;
-       
+
        _in_row_change = true;
 
        row[_columns.routegroup] = group;
@@ -505,7 +505,7 @@ EditorRouteGroups::property_changed (RouteGroup* group, const PropertyChange&)
                        break;
                }
        }
-       
+
        _in_row_change = false;
 
        for (TrackViewList::const_iterator i = _editor->get_track_views().begin(); i != _editor->get_track_views().end(); ++i) {
index d79039db090e2b6ad96796266f647dff3da692c2..a10f523800a0390f70543dc9ada12207ca83891e 100644 (file)
@@ -525,7 +525,7 @@ EditorRoutes::redisplay_real ()
                }
 
                bool visible = tv->marked_for_display ();
-               
+
                /* show or hide the TimeAxisView */
                if (visible) {
                        position += tv->show_at (position, n, &_editor->edit_controls_vbox);
@@ -886,11 +886,11 @@ EditorRoutes::reset_remote_control_ids ()
        for (ri = rows.begin(); ri != rows.end(); ++ri) {
 
                /* skip two special values */
-               
+
                if (rid == Route::MasterBusRemoteControlID) {
                        rid++;
                }
-               
+
                if (rid == Route::MonitorBusRemoteControlID) {
                        rid++;
                }
@@ -1414,7 +1414,7 @@ EditorRoutes::initial_display ()
        }
 
        RouteList r (*_session->get_routes());
-               
+
        r.sort (EditorOrderRouteSorter ());
        _editor->add_routes (r);
 }
@@ -1602,7 +1602,7 @@ EditorRoutes::idle_update_mute_rec_solo_etc()
                (*i)[_columns.active] = route->active ();
                if (boost::dynamic_pointer_cast<Track> (route)) {
                        boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (route);
-                       
+
                        if (route->record_enabled()) {
                                if (_session->record_status() == Session::Recording) {
                                        (*i)[_columns.rec_state] = 1;
@@ -1614,7 +1614,7 @@ EditorRoutes::idle_update_mute_rec_solo_etc()
                        } else {
                                (*i)[_columns.rec_state] = 0;
                        }
-                       
+
                        (*i)[_columns.name_editable] = !route->record_enabled ();
                }
        }
index f4ce487654f6017521440939bfa68d396368e520..ccd03995ff547d3d4308be394cc0066381a3a058 100644 (file)
@@ -130,7 +130,7 @@ Editor::initialize_rulers ()
        _bbt_metric = new BBTMetric (this);
        _minsec_metric = new MinsecMetric (this);
        _samples_metric = new SamplesMetric (this);
-       
+
        timecode_ruler = new ArdourCanvas::Ruler (_time_markers_group, *_timecode_metric,
                                                  ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, timebar_height));
        timecode_ruler->set_font_description (font);
@@ -175,7 +175,7 @@ Editor::initialize_rulers ()
        minsec_ruler->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_event), minsec_ruler, MinsecRulerItem));
        bbt_ruler->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_event), bbt_ruler, BBTRulerItem));
        samples_ruler->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_event), samples_ruler, SamplesRulerItem));
-       
+
        visible_timebars = 0; /*this will be changed below */
 }
 
@@ -1141,7 +1141,7 @@ Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper,
        } else {
                bbt_ruler_scale =  bbt_show_ticks_detail;
        }
-       
+
        if ((bbt_ruler_scale == bbt_show_ticks_detail) && (lower_beat.beats == upper_beat.beats) && (upper_beat.ticks - lower_beat.ticks <= Timecode::BBT_Time::ticks_per_beat / 4)) {
                bbt_ruler_scale =  bbt_show_ticks_super_detail;
        }
@@ -1154,7 +1154,7 @@ edit_last_mark_label (std::vector<ArdourCanvas::Ruler::Mark>& marks, const std::
        copy.label = newlabel;
        marks.pop_back ();
        marks.push_back (copy);
-}              
+}
 
 void
 Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble lower, gdouble upper, gint /*maxchars*/)
@@ -1234,7 +1234,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdouble l
                bbt_nmarks = (beats + 2) * bbt_beat_subdivision;
 
                bbt_position_of_helper = lower + (30 * Editor::get_current_zoom ());
-               
+
                // could do marks.assign() here to preallocate
 
                mark.label = "";
index 41de4f38f2b5623b925e628e974d8e230292a261..5a59b48a90fa3a72c1d0a99042b5e21069d408b8 100644 (file)
@@ -461,7 +461,7 @@ Editor::mapover_tracks_with_unique_playlists (sigc::slot<void, RouteTimeAxisView
                        RouteTimeAxisView* v = dynamic_cast<RouteTimeAxisView*> (*i);
 
                        if (v && v->route()->route_group() == group) {
-                               
+
                                boost::shared_ptr<Track> t = v->track();
                                if (t) {
                                        if (playlists.insert (t->playlist()).second) {
@@ -1005,7 +1005,7 @@ Editor::track_selection_changed ()
        ActionManager::set_sensitive (ActionManager::track_selection_sensitive_actions, !selection->tracks.empty());
 
        /* notify control protocols */
-       
+
        ControlProtocol::TrackSelectionChanged (routes);
 
        if (sfbrowser && _session && !_session->deletion_in_progress()) {
@@ -1341,7 +1341,7 @@ Editor::sensitize_the_right_region_actions ()
        if (have_active_fade_out && have_inactive_fade_out) {
                // a->set_inconsistent ();
        }
-       
+
        bool const have_active_fade = have_active_fade_in || have_active_fade_out;
        bool const have_inactive_fade = have_inactive_fade_in || have_inactive_fade_out;
 
@@ -1351,7 +1351,7 @@ Editor::sensitize_the_right_region_actions ()
        if (have_active_fade && have_inactive_fade) {
                // a->set_inconsistent ();
        }
-       
+
        _ignore_region_action = false;
 
        _all_region_actions_sensitized = false;
@@ -1610,7 +1610,7 @@ Editor::set_selection_from_region ()
        /* find all the tracks that have selected regions */
 
        set<TimeAxisView*> tracks;
-       
+
        for (RegionSelection::const_iterator r = selection->regions.begin(); r != selection->regions.end(); ++r) {
                tracks.insert (&(*r)->get_time_axis_view());
        }
@@ -1623,9 +1623,9 @@ Editor::set_selection_from_region ()
        selection->set (selection->regions.start(), selection->regions.end_frame());
 
        /* and select the tracks */
-       
+
        selection->set (tvl);
-       
+
        if (!Profile->get_sae()) {
                set_mouse_mode (Editing::MouseRange, false);
        }
@@ -1946,7 +1946,7 @@ Editor::get_edit_op_range (framepos_t& start, framepos_t& end) const
                end = 0;
                return false;
        }
-       
+
 //     if (!mouse_frame (m, ignored)) {
 //             /* mouse is not in a canvas, try playhead+selected marker.
 //                this is probably most true when using menus.
index a516c80c9f5040c5a2290f560fad1d0c7f969dae..baf1e4970a1fe0592bf0ea1015b466326eecba14 100644 (file)
@@ -223,7 +223,7 @@ EditorSummary::render (cairo_t* cr, cairo_rectangle_t*)
        }
 
        cairo_push_group (cr);
-       
+
        /* Fill with the background image */
 
        cairo_rectangle (cr, 0, 0, get_width(), get_height());
@@ -408,7 +408,7 @@ bool
 EditorSummary::on_button_press_event (GdkEventButton* ev)
 {
        _old_follow_playhead = _editor->follow_playhead ();
-       
+
        if (ev->button == 1) {
 
                pair<double, double> xr;
@@ -436,7 +436,7 @@ EditorSummary::on_button_press_event (GdkEventButton* ev)
                                get_editor (&_pending_editor_x, &_pending_editor_y);
                                _pending_editor_changed = false;
                        }
-                       
+
                } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
 
                        /* secondary-modifier-click: locate playhead */
@@ -489,7 +489,7 @@ EditorSummary::get_editor (pair<double, double>* x, pair<double, double>* y) con
                /* We are dragging, and configured not to update the editor window during drags,
                   so just return where the editor will be when the drag finishes.
                */
-               
+
                *x = _pending_editor_x;
                *y = _pending_editor_y;
 
@@ -499,7 +499,7 @@ EditorSummary::get_editor (pair<double, double>* x, pair<double, double>* y) con
 
                x->first = (_editor->leftmost_sample () - _start) * _x_scale;
                x->second = x->first + _editor->current_page_samples() * _x_scale;
-               
+
                y->first = editor_y_to_summary (_editor->vertical_adjustment.get_value ());
                y->second = editor_y_to_summary (_editor->vertical_adjustment.get_value () + _editor->visible_canvas_height() - _editor->get_trackview_group()->canvas_origin().y);
        }
@@ -668,7 +668,7 @@ bool
 EditorSummary::on_button_release_event (GdkEventButton*)
 {
        bool const was_suspended = suspending_editor_updates ();
-       
+
        _move_dragging = false;
        _zoom_dragging = false;
        _editor->_dragging_playhead = false;
@@ -677,7 +677,7 @@ EditorSummary::on_button_release_event (GdkEventButton*)
        if (was_suspended && _pending_editor_changed) {
                set_editor (_pending_editor_x, _pending_editor_y);
        }
-               
+
        return true;
 }
 
@@ -767,7 +767,7 @@ EditorSummary::set_editor (double const x, double const y)
                   as it also means that we won't change these variables if an idle handler
                   is merely pending but not executing.  But c'est la vie.
                */
-               
+
                return;
        }
 
@@ -854,12 +854,12 @@ EditorSummary::set_editor_x (pair<double, double> x)
                set_dirty ();
        } else {
                _editor->reset_x_origin (x.first / _x_scale + _start);
-               
+
                double const nx = (
                        ((x.second - x.first) / _x_scale) /
                        _editor->sample_to_pixel (_editor->current_page_samples())
                        );
-               
+
                if (nx != _editor->get_current_zoom ()) {
                        _editor->reset_zoom (nx);
                }
index 90c64d2b1bec92695a31b10fb654309265efa2c4..38685e5dd6983bc9bb3d6e59341ed0ddebd1a43e 100644 (file)
@@ -133,12 +133,12 @@ Editor::redisplay_tempo (bool immediate_redraw)
        if (immediate_redraw) {
                ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin;
                ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end;
-               
+
                compute_current_bbt_points (leftmost_frame, leftmost_frame + current_page_samples(),
                                            current_bbt_points_begin, current_bbt_points_end);
                draw_measures (current_bbt_points_begin, current_bbt_points_end);
                update_tempo_based_rulers (current_bbt_points_begin, current_bbt_points_end); // redraw rulers and measures
-       
+
        } else {
                Glib::signal_idle().connect (sigc::bind_return (sigc::bind (sigc::mem_fun (*this, &Editor::redisplay_tempo), true), false));
        }
index 5908e502493323005ae668d447eab5e2e4fa6ca9..d78340df65e0ea5295e79503d65f661c68e19de5 100644 (file)
@@ -161,7 +161,7 @@ Editor::time_fx (RegionList& regions, float val, bool pitching)
                do_timefx ();
                return 0;
        }
-       
+
        switch (current_timefx->run ()) {
        case RESPONSE_ACCEPT:
                break;
index 654f63a8cd428883836b4ac89ca0382327cbc472..61dbe22a7821e9a3e80e7cb8cb624175852e7fa1 100644 (file)
@@ -566,7 +566,7 @@ EngineControl::build_full_control_notebook ()
                basic_packer.attach (input_channels, 1, 2, row, row+1, xopt, (AttachOptions) 0);
                ++row;
        }
-       
+
        output_channels.set_name ("OutputChannels");
        output_channels.set_flags (Gtk::CAN_FOCUS);
        output_channels.set_digits (0);
@@ -579,7 +579,7 @@ EngineControl::build_full_control_notebook ()
                basic_packer.attach (output_channels, 1, 2, row, row+1, xopt, (AttachOptions) 0);
                ++row;
        }
-       
+
        input_latency.set_name ("InputLatency");
        input_latency.set_flags (Gtk::CAN_FOCUS);
        input_latency.set_digits (0);
@@ -1023,7 +1023,7 @@ EngineControl::print_channel_count (Gtk::SpinButton* sb)
        if (ARDOUR::Profile->get_mixbus()) {
                return true;
        }
-       
+
        uint32_t cnt = (uint32_t) sb->get_value();
        if (cnt == 0) {
                sb->set_text (_("all available channels"));
@@ -1433,7 +1433,7 @@ EngineControl::device_changed ()
                        queue_device_changed = true;
                }
        }
-       
+
        //the device name must be set FIRST so ASIO can populate buffersizes and the control panel button
        if (backend->use_separate_input_and_output_devices()) {
                backend->set_input_device_name (device_name_in);
index 10b0ea8851ee27e8470f4759b6121c8800ed02b1..8d9c6ff24b5a8b5717a53408762c071c524ca31e 100644 (file)
@@ -158,7 +158,7 @@ ExportDialog::init_gui ()
        export_notebook.append_page (*file_format_selector, _("File format"));
        export_notebook.append_page (*timespan_selector, _("Time Span"));
        export_notebook.append_page (*channel_selector, _("Channels"));
-       
+
        get_vbox()->pack_start (export_notebook, true, true, 0);
        get_vbox()->pack_end   (warning_widget, false, false, 0);
        get_vbox()->pack_end   (progress_widget, false, false, 0);
@@ -325,7 +325,7 @@ ExportDialog::show_progress ()
        if (!status->aborted()) {
 
                NagScreen* ns = NagScreen::maybe_nag (_("export"));
-               
+
                if (ns) {
                        ns->nag ();
                        delete ns;
index ae924c10e3d9ae754f9afc25c7582c30d2fe6161..2469e4f6ccc530e36e960da31a1904d899fa300d 100644 (file)
@@ -301,7 +301,7 @@ ExportFileNotebook::FilePage::update_example_filename()
                        example = profile_manager->get_sample_filename_for_format (
                                filename_state->filename, format_state->format);
                }
-               
+
                if (example != "") {
                        filename_selector.set_example_filename(Glib::path_get_basename (example));
                } else {
index 93f7daf832ec775dc0bb49bec5e4bd4190d65ef4..831b75ef02650baeadc895e619131629157816c3 100644 (file)
@@ -328,10 +328,10 @@ ExportFilenameSelector::open_browse_dialog ()
 
        while (true) {
                int result = dialog.run();
-               
+
                if (result == Gtk::RESPONSE_OK) {
                        std::string filename = dialog.get_filename();
-                       
+
                        if (!Glib::file_test (filename, Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
                                Gtk::MessageDialog msg (string_compose (_("%1: this is only the directory/folder name, not the filename.\n\
 The filename will be chosen from the information just above the folder selector."), filename));
index 6a25d707bf02e99a83202bf798d82a4e3e00de16..6197d0d7beb3c0fc832374033470dd3dcb3bf1b9 100644 (file)
@@ -180,7 +180,7 @@ class ExportFormatDialog : public ArdourDialog, public PBD::ScopedConnectionList
        AudioClock       silence_end_clock;
 
        /* Post-export hook */
-       
+
        Gtk::Label       command_label;
        Gtk::Entry       command_entry;
 
index 0c6ff08cf91758bf391f4d5c513e7070c3bafaff..83f8a8f4aaa780ad98fd140965b8dbc5c70a54ab 100644 (file)
@@ -55,7 +55,7 @@ ExportTimespanSelector::ExportTimespanSelector (ARDOUR::Session * session, Profi
                        )
                );
        option_hbox.pack_start (*b, false, false, 6);
-       
+
        b = Gtk::manage (new Gtk::Button (_("Deselect All")));
        b->signal_clicked().connect (
                sigc::bind (
index 9907360c014d2b9c3af777639cf731fbe77ac085..d264ee930b2789872483dd6e167cc34d9a622312 100644 (file)
@@ -34,7 +34,7 @@ FloatingTextEntry::FloatingTextEntry (const std::string& initial_contents)
        set_name (X_("FloatingTextEntry"));
        set_position (Gtk::WIN_POS_MOUSE);
        set_border_width (0);
-       
+
        if (!initial_contents.empty()) {
                entry.set_text (initial_contents);
        }
index 9e1edbb520a2f1a611f544e7325aa11aac896e6c..4a7e75fcf730f27ce1021837c7949a1d89c37033 100644 (file)
@@ -133,7 +133,7 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
        max_peak = minus_infinity();
        peak_display.set_text (_("-inf"));
        peak_display.set_alignment(0.5);
-       
+
        /* stuff related to the fact that the peak display is not, in
           fact, supposed to be a text entry.
        */
@@ -282,7 +282,7 @@ GainMeterBase::setup_gain_adjustment ()
        ignore_toggle = false;
 
        effective_gain_display ();
-       
+
        _previous_amp_output_streams = _amp->output_streams ();
 }
 
@@ -529,7 +529,7 @@ GainMeterBase::gain_adjusted ()
        } else {
                value = gain_adjustment.get_value();
        }
-       
+
        if (!ignore_toggle) {
                if (_route && _route->amp() == _amp) {
                        _route->set_gain (value, this);
index d081f622253ab96237bf39256d1823bf7290b252..47b5f93a9829b296c0fdb5829d04b938444e68a4 100644 (file)
@@ -96,7 +96,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
        smaller_hbox->pack_start (delete_button, false, false);
        smaller_hbox->pack_start (reset_button, false, false, 4);
        smaller_hbox->pack_start (bypass_button, false, true, 4);
-       
+
        automation_manual_all_button.set_text(_("Manual"));
        automation_manual_all_button.set_name (X_("generic button"));
        automation_play_all_button.set_text(_("Play"));
@@ -105,7 +105,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
        automation_write_all_button.set_name (X_("generic button"));
        automation_touch_all_button.set_text(_("Touch"));
        automation_touch_all_button.set_name (X_("generic button"));
-       
+
        Label* l = manage (new Label (_("All Automation")));
        l->set_alignment (1.0, 0.5);
        automation_hbox->pack_start (*l, true, true);
@@ -183,7 +183,7 @@ int value = -1;
 
 static int match_or_digit(char c1, char c2) {
        return c1 == c2 || (isdigit(c1) && isdigit(c2));
-}      
+}
 
 static std::size_t matching_chars_at_head(const string s1, const string s2) {
 std::size_t length, n = 0;
@@ -374,13 +374,13 @@ GenericPluginUI::build ()
 
        // Iterate over the list of controls to find which adjacent controls
        // are similar enough to be grouped together.
-       
+
        string label, previous_label = "";
        std::vector<int> numbers_in_labels(cui_controls_list.size());
-       
+
        std::vector<float> similarity_scores(cui_controls_list.size());
        float most_similar = 0.0, least_similar = 1.0;
-       
+
        i = 0;
        for (vector<ControlUI*>::iterator cuip = cui_controls_list.begin(); cuip != cui_controls_list.end(); ++cuip, ++i) {
                label = (*cuip)->label.get_text();
@@ -406,32 +406,32 @@ GenericPluginUI::build ()
                }
 
                // cerr << "label: " << label << " sim: " << fixed << setprecision(3) << similarity_scores[i] << " num: " << numbers_in_labels[i] << endl;
-               previous_label = label;         
+               previous_label = label;
        }
 
-       
+
        // cerr << "most similar: " << most_similar << ", least similar: " << least_similar << endl;
        float similarity_threshold;
-       
+
        if (most_similar > 1.0) {
                similarity_threshold = default_similarity_threshold;
        } else {
                similarity_threshold = most_similar - (1 - default_similarity_threshold);
        }
-       
+
        // Now iterate over the list of controls to display them, placing an
        // HSeparator between controls of less than a certain similarity, and
        // starting a new column when necessary.
-       
+
        i = 0;
        for (vector<ControlUI*>::iterator cuip = cui_controls_list.begin(); cuip != cui_controls_list.end(); ++cuip, ++i) {
 
                ControlUI* cui = *cuip;
-               
+
                if (!is_scrollable) {
                        x++;
                }
-               
+
                if (x > max_controls_per_column || similarity_scores[i] <= similarity_threshold) {
                        if (x > min_controls_per_column) {
                                frame = manage (new Frame);
@@ -477,7 +477,7 @@ GenericPluginUI::build ()
 
        output_table.show_all ();
        button_table.show_all ();
-       
+
        automation_manual_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Off));
        automation_play_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Play));
        automation_write_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Write));
@@ -601,7 +601,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter&             param,
                int const steps = desc.integer_step ? (desc.upper - desc.lower + 1) / desc.step : 0;
 
                if (control_ui->scale_points && ((steps && int (control_ui->scale_points->size()) == steps) || desc.enumeration)) {
-                       
+
                        /* Either:
                         *   a) There is a label for each possible value of this input, or
                         *   b) This port is marked as being an enumeration.
@@ -612,7 +612,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter&             param,
                                ARDOUR::ScalePoints::const_iterator i = control_ui->scale_points->begin();
                                i != control_ui->scale_points->end();
                                ++i) {
-                               
+
                                labels.push_back(i->first);
                        }
 
index 4d7e0c95ff58253948c4e41d7b0cccc79e4c72e2..a62d8d5b25c7c65771ca4c640b4803763dba7af5 100644 (file)
@@ -75,7 +75,7 @@ public:
          public:
            GhostEvent(::NoteBase *, ArdourCanvas::Container *);
            virtual ~GhostEvent ();
-       
+
            NoteBase* event;
            ArdourCanvas::Item* item;
        };
index 7fb62ae973c2523d2c971273ee22393a228b557e..be505b8c0d59f7f54db80758d2f1b1da3f18e36f 100644 (file)
@@ -69,7 +69,7 @@ GroupTabs::set_session (Session* s)
                _session->RouteRemovedFromRouteGroup.connect (
                        _session_connections, invalidator (*this), boost::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), gui_context());
        }
 }
@@ -138,7 +138,7 @@ GroupTabs::on_button_press_event (GdkEventButton* ev)
        } else if (ev->button == 3) {
 
                RouteGroup* g = t ? t->group : 0;
-               
+
                if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier) && g) {
                        /* edit */
                        RouteGroupDialog d (g, false);
@@ -191,18 +191,18 @@ GroupTabs::on_button_release_event (GdkEventButton*)
        if (_dragging == 0) {
                return false;
        }
-       
+
        if (!_drag_moved) {
-               
+
                if (_dragging->group) {
                        /* toggle active state */
                        _dragging->group->set_active (!_dragging->group->is_active (), this);
                }
-               
+
        } else {
                /* finish drag */
                RouteList routes = routes_for_tab (_dragging);
-               
+
                if (!routes.empty()) {
                        if (_dragging_new_tab) {
                                RouteGroup* g = create_and_add_group ();
@@ -214,13 +214,13 @@ GroupTabs::on_button_release_event (GdkEventButton*)
                        } else {
                                boost::shared_ptr<RouteList> r = _session->get_routes ();
                                for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
-                                       
+
                                        bool const was_in_tab = find (
                                                _initial_dragging_routes.begin(), _initial_dragging_routes.end(), *i
                                                ) != _initial_dragging_routes.end ();
-                                       
+
                                        bool const now_in_tab = find (routes.begin(), routes.end(), *i) != routes.end();
-                                       
+
                                        if (was_in_tab && !now_in_tab) {
                                                _dragging->group->remove (*i);
                                        } else if (!was_in_tab && now_in_tab) {
@@ -229,11 +229,11 @@ GroupTabs::on_button_release_event (GdkEventButton*)
                                }
                        }
                }
-               
+
                set_dirty ();
                queue_draw ();
        }
-       
+
        _dragging = 0;
        _initial_dragging_routes.clear ();
 
@@ -254,7 +254,7 @@ GroupTabs::render (cairo_t* cr, cairo_rectangle_t*)
        cairo_set_source_rgb (cr, c.get_red_p(), c.get_green_p(), c.get_blue_p());
        cairo_rectangle (cr, 0, 0, get_width(), get_height());
        cairo_fill (cr);
-       
+
        /* tabs */
 
        for (list<Tab>::const_iterator i = _tabs.begin(); i != _tabs.end(); ++i) {
@@ -551,20 +551,20 @@ GroupTabs::set_group_color (RouteGroup* group, uint32_t color)
                g = 25;
                b = 25;
        }
-       
+
        GUIObjectState& gui_state = *ARDOUR_UI::instance()->gui_object_state;
 
        char buf[64];
-       
+
        /* for historical reasons the colors must be stored as 16 bit color
         * values. Ugh.
         */
 
        snprintf (buf, sizeof (buf), "%d:%d:%d", (r<<8), (g<<8), (b<<8));
        gui_state.set_property (group_gui_id (group), "color", buf);
-       
+
        /* the group color change notification */
-       
+
        PBD::PropertyChange change;
        change.add (Properties::color);
        group->PropertyChanged (change);
@@ -594,7 +594,7 @@ uint32_t
 GroupTabs::group_color (RouteGroup* group)
 {
        assert (group);
-       
+
        GUIObjectState& gui_state = *ARDOUR_UI::instance()->gui_object_state;
        string const gui_id = group_gui_id (group);
        bool empty;
@@ -630,7 +630,7 @@ GroupTabs::route_group_property_changed (RouteGroup* rg)
        */
 
        emit_gui_changed_for_members (rg);
-       
+
        set_dirty ();
 }
 
index 16d6a85b31e878c725e8dd7088e3de9fc9b118d2..e31ad9643e519d7d880f7d13ca419c9b6ec7da4d 100644 (file)
@@ -67,7 +67,7 @@ protected:
 
 private:
        static void emit_gui_changed_for_members (ARDOUR::RouteGroup *);
-       
+
        /** Compute all the tabs for this widget.
         *  @return Tabs.
         */
index ca196613f02cd613c502cfe9fdef866fa836c3f1..3128e61f3ab44c2ab0a8e7c4c80435bf7d91c0f3 100644 (file)
@@ -157,4 +157,4 @@ GUIObjectState::all_ids () const
        return ids;
 }
 
-       
+
index b452e0cc4417eeed836a3b841237854d66fb7203..39cf579fb5def7108a17a9bdaade0a2d1ac7df4a 100644 (file)
@@ -55,7 +55,7 @@ public:
        static XMLNode* get_or_add_node (XMLNode *, const std::string &);
 
        void remove_node (const std::string& id);
-       
+
   private:
        XMLNode _state;
 };
index 270ed8ce32bfd75368c60b2250ee3ee92d85c62b..574b3cd0ca23897dd02bc09c6ece99c846e2a9ba 100644 (file)
@@ -259,7 +259,7 @@ void
 IOSelectorWindow::io_name_changed (void*)
 {
        ENSURE_GUI_THREAD (*this, &IOSelectorWindow::io_name_changed, src)
-               
+
        std::string title;
 
        if (!_selector.find_inputs_for_io_outputs()) {
index 28cd8b8508f0edc2bbae6d82abdf6c5943927db4..cbbbfafc730ee0775253884b3a0786472f452123 100644 (file)
@@ -93,10 +93,10 @@ KeyEditor::KeyEditor ()
                unbind_button.show ();
 
        }
-       
+
        reset_button.add (reset_label);
        reset_label.set_markup (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", _("Reset Bindings to Defaults")));
-                               
+
        reset_box.pack_start (reset_button, true, false);
        reset_box.show ();
        reset_button.show ();
index 4bae45c71e08f5fca2eabd677ca49872e5314e56..e5722b2be0b84888d3bd281f5e84816ced76cacc 100644 (file)
@@ -74,7 +74,7 @@ bool LXVST_xerror;
 int TempErrorHandler(Display *display, XErrorEvent *e)
 {
        LXVST_xerror = true;
-       
+
        return 0;
 }
 
@@ -89,14 +89,14 @@ int getXWindowProperty(Window window, Atom atom)
        unsigned char *data;
        Atom userType;
        LXVST_xerror = false;
-       
+
        /*Use our own Xerror handler while we're in here - in an
        attempt to stop the brain dead default Xerror behaviour of
        qutting the entire application because of e.g. an invalid
        window ID*/
-       
+
        XErrorHandler olderrorhandler = XSetErrorHandler(TempErrorHandler);
-       
+
        XGetWindowProperty(     LXVST_XDisplay,                 //The display
                                                window,                                 //The Window
                                                atom,                                   //The property
@@ -109,14 +109,14 @@ int getXWindowProperty(Window window, Atom atom)
                                                &userCount,                             //Actual number of items stored in the returned data
                                                &bytes,                                 //Number of bytes remaining if a partial read
                                                &data);                                 //The actual data read
-                                               
+
        if(LXVST_xerror == false && userCount == 1)
                result = *(int*)data;
-               
+
        XSetErrorHandler(olderrorhandler);
-       
+
        /*Hopefully this will return zero if the property is not set*/
-       
+
        return result;
 }
 
@@ -138,14 +138,14 @@ long getXWindowProperty(Window window, Atom atom)
        unsigned char *data;
        Atom userType;
        LXVST_xerror = false;
-       
+
        /*Use our own Xerror handler while we're in here - in an
        attempt to stop the brain dead default Xerror behaviour of
        qutting the entire application because of e.g. an invalid
        window ID*/
-       
+
        XErrorHandler olderrorhandler = XSetErrorHandler(TempErrorHandler);
-       
+
        XGetWindowProperty(     LXVST_XDisplay,
                                                window,
                                                atom,
@@ -158,14 +158,14 @@ long getXWindowProperty(Window window, Atom atom)
                                                &userCount,
                                                &bytes,
                                                &data);
-                                               
+
        if(LXVST_xerror == false && userCount == 1)
                result = *(long*)data;
-               
+
        XSetErrorHandler(olderrorhandler);
-       
+
        /*Hopefully this will return zero if the property is not set*/
-       
+
        return result;
 }
 
@@ -178,70 +178,70 @@ static void
 dispatch_x_events (XEvent* event, VSTState* vstfx)
 {
        /*Handle some of the Events we might be interested in*/
-       
+
        switch(event->type)
        {
                /*Configure event - when the window is resized or first drawn*/
-                       
+
                case ConfigureNotify:
                {
                        Window window = event->xconfigure.event;
-                       
+
                        int width = event->xconfigure.width;
                        int height = event->xconfigure.height;
-                       
+
                        /*If we get a config notify on the parent window XID then we need to see
                        if the size has been changed - some plugins re-size their UI window e.g.
                        when opening a preset manager (you might think that should be spawned as a new window...) */
-                       
+
                        /*if the size has changed, we flag this so that in lxvst_pluginui.cc we can make the
                        change to the GTK parent window in ardour, from its UI thread*/
-                       
+
                        if (window == (Window) (vstfx->linux_window)) {
                                if (width != vstfx->width || height!=vstfx->height) {
                                        vstfx->width = width;
                                        vstfx->height = height;
                                        vstfx->want_resize = 1;
-                                       
+
                                        /*QUIRK : Loomer plugins not only resize the UI but throw it into some random
                                        position at the same time. We need to re-position the window at the origin of
                                        the parent window*/
-                                       
+
                                        if (vstfx->linux_plugin_ui_window) {
                                                XMoveWindow (LXVST_XDisplay, vstfx->linux_plugin_ui_window, 0, 0);
                                        }
                                }
                        }
-                       
+
                        break;
-                       
+
                }
-               
+
                /*Reparent Notify - when the plugin UI is reparented into
                our Host Window we will get an event here... probably... */
-               
+
                case ReparentNotify:
                {
                        Window ParentWindow = event->xreparent.parent;
-                       
+
                        /*If the ParentWindow matches the window for the vstfx instance then
                        the Child window must be the XID of the pluginUI window created by the
                        plugin, so we need to see if it has a callback stuck to it, and if so
                        set that up in the vstfx */
-                       
+
                        /***********************************************************/
                        /* 64Bit --- This mechanism is not 64Bit compatible at the */
                        /* present time                                            */
                        /***********************************************************/
-                       
+
                        if (ParentWindow == (Window) (vstfx->linux_window)) {
 
                                Window PluginUIWindowID = event->xreparent.window;
-                               
+
                                vstfx->linux_plugin_ui_window = PluginUIWindowID;
 #ifdef LXVST_32BIT
                                int result = getXWindowProperty(PluginUIWindowID, XInternAtom(LXVST_XDisplay, "_XEventProc", false));
-       
+
                                if (result == 0) {
                                        vstfx->eventProc = NULL;
                                } else {
@@ -250,7 +250,7 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
 #endif
 #ifdef LXVST_64BIT
                                long result = getXWindowProperty(PluginUIWindowID, XInternAtom(LXVST_XDisplay, "_XEventProc", false));
-       
+
                                if(result == 0)
                                        vstfx->eventProc = NULL;
                                else
@@ -259,47 +259,47 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
                        }
                        break;
                }
-               
+
                case ClientMessage:
                {
                        Window window = event->xany.window;
                        Atom message_type = event->xclient.message_type;
-                       
+
                        /*The only client message we are interested in is to signal
                        that the plugin parent window is now valid and can be passed
                        to effEditOpen when the editor is launched*/
-                       
+
                        if (window == (Window) (vstfx->linux_window)) {
                                char* message = XGetAtomName(LXVST_XDisplay, message_type);
-                               
+
                                if (strcmp(message,"LaunchEditor") == 0) {
                                        if (event->xclient.data.l[0] == 0x0FEEDBAC) {
                                                vstfx_launch_editor (vstfx);
                                        }
                                }
-                               
+
                                XFree(message);
                        }
                        break;
                }
-               
+
                default:
                        break;
        }
-       
+
        /* Some VSTs built with toolkits e.g. JUCE will manager their own UI
        autonomously in the plugin, running the UI in its own thread, so once
        we have created a parent window for the plugin, its UI takes care of
        itself.*/
-       
+
        /*Other types register a callback as an Xwindow property on the plugin
        UI window after they create it.  If that is the case, we need to call it
        here, passing the XEvent into it*/
-       
+
        if (vstfx->eventProc == NULL) {
                return;
        }
-                               
+
        vstfx->eventProc((void*)event);
 }
 
@@ -312,11 +312,11 @@ maybe_set_program (VSTState* vstfx)
                }
 
                vstfx->plugin->dispatcher (vstfx->plugin, effSetProgram, 0, vstfx->want_program, NULL, 0);
-               
+
                if (vstfx->vst_version >= 2) {
                        vstfx->plugin->dispatcher (vstfx->plugin, 68 /* effEndSetProgram */, 0, 0, NULL, 0);
                }
-               
+
                vstfx->want_program = -1;
        }
 
@@ -336,10 +336,10 @@ void* gui_event_loop (void* ptr)
        int LXVST_sched_timer_interval = 40; //ms, 25fps
        XEvent event;
        uint64_t clock1, clock2;
-       
+
        clock1 = g_get_monotonic_time();
        /*The 'Forever' loop - runs the plugin UIs etc - based on the FST gui event loop*/
-       
+
        while (!gui_quit)
        {
                /* handle window creation requests, destroy requests,
@@ -347,37 +347,37 @@ void* gui_event_loop (void* ptr)
 
                /*Look at the XEvent queue - if there are any XEvents we need to handle them,
                including passing them to all the plugin (eventProcs) we are currently managing*/
-               
+
                bool may_sleep = true;
 
                if(LXVST_XDisplay)
                {
                        /*See if there are any events in the queue*/
-               
+
                        int num_events = XPending(LXVST_XDisplay);
 
                        if (num_events > 0) {
                                // keep dispatching events as fast as possible
                                may_sleep = false;
                        }
-                       
+
                        /*process them if there are any*/
-               
+
                        while(num_events)
                        {
                                XNextEvent(LXVST_XDisplay, &event);
-                               
+
                                /*Call dispatch events, with the event, for each plugin in the linked list*/
-                               
+
                                for (vstfx = vstfx_first; vstfx; vstfx = vstfx->next)
-                               {       
+                               {
                                        pthread_mutex_lock(&vstfx->lock);
-                                       
+
                                        dispatch_x_events(&event, vstfx);
-                                       
+
                                        pthread_mutex_unlock(&vstfx->lock);
                                }
-                               
+
                                num_events--;
                        }
                }
@@ -385,7 +385,7 @@ void* gui_event_loop (void* ptr)
                /*We don't want to use all the CPU.. */
 
                Glib::usleep(1000);
-               
+
                /*See if its time for us to do a scheduled event pass on all the plugins*/
 
                clock2 = g_get_monotonic_time();
@@ -395,34 +395,34 @@ void* gui_event_loop (void* ptr)
                {
                        //printf("elapsed %d ms ^= %.2f Hz\n", elapsed_time_ms, 1000.0/(double)elapsed_time_ms); // DEBUG
                        pthread_mutex_lock (&plugin_mutex);
-               
+
 again:
                        /*Parse through the linked list of plugins*/
-                       
+
                        for (vstfx = vstfx_first; vstfx; vstfx = vstfx->next)
-                       {       
+                       {
                                pthread_mutex_lock (&vstfx->lock);
 
                                /*Window scheduled for destruction*/
-                               
+
                                if (vstfx->destroy) {
                                        if (vstfx->linux_window) {
                                                vstfx->plugin->dispatcher (vstfx->plugin, effEditClose, 0, 0, NULL, 0.0);
-                                                       
+
                                                XDestroyWindow (LXVST_XDisplay, vstfx->linux_window);
                                                /* FIXME - probably safe to assume we never have an XID of 0 but not explicitly true */
                                                vstfx->linux_window = 0;
                                                vstfx->destroy = FALSE;
                                        }
-                                       
+
                                        vstfx_event_loop_remove_plugin (vstfx);
                                        vstfx->been_activated = FALSE;
                                        pthread_cond_signal (&vstfx->window_status_change);
                                        pthread_mutex_unlock (&vstfx->lock);
-                                       
+
                                        goto again;
                                }
-                               
+
                                /*Window does not yet exist - scheduled for creation*/
 
                                /* FIXME - probably safe to assume 0 is not a valid XID but not explicitly true */
@@ -441,9 +441,9 @@ again:
                                maybe_set_program (vstfx);
                                vstfx->want_program = -1;
                                vstfx->want_chunk = 0;
-                               
+
                                /*scheduled call to dispatcher*/
-                               
+
                                if (vstfx->dispatcher_wantcall) {
                                        vstfx->dispatcher_retval = vstfx->plugin->dispatcher (
                                                vstfx->plugin,
@@ -453,18 +453,18 @@ again:
                                                vstfx->dispatcher_ptr,
                                                vstfx->dispatcher_opt
                                                );
-                                       
+
                                        vstfx->dispatcher_wantcall = 0;
                                        pthread_cond_signal (&vstfx->plugin_dispatcher_called);
                                }
-                               
+
                                /*Call the editor Idle function in the plugin*/
-                               
+
                                vstfx->plugin->dispatcher (vstfx->plugin, effEditIdle, 0, 0, NULL, 0);
 
                                if(vstfx->wantIdle)
                                        vstfx->plugin->dispatcher (vstfx->plugin, 53, 0, 0, NULL, 0);
-                                       
+
                                pthread_mutex_unlock (&vstfx->lock);
                        }
                        pthread_mutex_unlock (&plugin_mutex);
@@ -490,54 +490,54 @@ int vstfx_init (void* ptr)
 {
 
        int thread_create_result;
-       
+
        pthread_attr_t thread_attributes;
-       
+
        /*Init the attribs to defaults*/
-       
+
        pthread_attr_init(&thread_attributes);
-       
+
        /*Make sure the thread is joinable - this should be the default anyway -
        so we can join to it on vstfx_exit*/
-       
+
        pthread_attr_setdetachstate(&thread_attributes, PTHREAD_CREATE_JOINABLE);
-       
+
 
        /*This is where we need to open a connection to X, and start the GUI thread*/
-       
+
        /*Open our connection to X - all linuxVST plugin UIs handled by the LXVST engine
        will talk to X down this connection - X cannot handle multi-threaded access via
        the same Display* */
-       
+
        if(LXVST_XDisplay==NULL)
                LXVST_XDisplay = XOpenDisplay(NULL);    //We might be able to make this open a specific screen etc
 
        /*Drop out and report the error if we fail to connect to X */
-       
+
        if(LXVST_XDisplay==NULL)
        {
                vstfx_error ("** ERROR ** VSTFX: Failed opening connection to X");
-               
+
                return -1;
        }
-       
+
        /*We have a connection to X - so start the gui event loop*/
-       
+
        /*Create the thread - use default attrs for now, don't think we need anything special*/
-       
+
        thread_create_result = pthread_create(&LXVST_gui_event_thread, NULL, gui_event_loop, NULL);
-       
+
        if(thread_create_result!=0)
        {
                /*There was a problem starting the GUI event thread*/
-               
+
                vstfx_error ("** ERROR ** VSTFX: Failed starting GUI event thread");
-               
+
                XCloseDisplay(LXVST_XDisplay);
-               
+
                return -1;
        }
-       
+
        return 0;
 }
 
@@ -546,10 +546,10 @@ int vstfx_init (void* ptr)
 void vstfx_exit()
 {
        gui_quit = 1;
-       
+
        /*We need to pthread_join the gui_thread here so
        we know when it has stopped*/
-       
+
        pthread_join(LXVST_gui_event_thread, NULL);
 }
 
@@ -565,14 +565,14 @@ int vstfx_run_editor (VSTState* vstfx)
                vstfx_first = vstfx;
        } else {
                VSTState* p = vstfx_first;
-               
+
                while (p->next) {
                        p = p->next;
                }
                p->next = vstfx;
-               
+
                /* Mark the new end of the list */
-               
+
                vstfx->next = NULL;
        }
 
@@ -581,11 +581,11 @@ int vstfx_run_editor (VSTState* vstfx)
        /* wait for the plugin editor window to be created (or not) */
 
        pthread_mutex_lock (&vstfx->lock);
-       
+
        if (!vstfx->linux_window) {
                pthread_cond_wait (&vstfx->window_status_change, &vstfx->lock);
        }
-       
+
        pthread_mutex_unlock (&vstfx->lock);
 
        if (!vstfx->linux_window) {
@@ -602,7 +602,7 @@ after run_editor has added the plugin (editor) to the linked list*/
 int vstfx_create_editor (VSTState* vstfx)
 {
        Window parent_window;
-       
+
        int x_size = 1;
        int y_size = 1;
 
@@ -613,10 +613,10 @@ int vstfx_create_editor (VSTState* vstfx)
                vstfx_error ("** ERROR ** VSTFX: Plugin \"%s\" has no editor", vstfx->handle->name);
                return -1;
        }
-       
-       
+
+
        /*Create an XWindow for the plugin to inhabit*/
-       
+
        parent_window = XCreateSimpleWindow (
                LXVST_XDisplay,
                DefaultRootWindow(LXVST_XDisplay),
@@ -628,35 +628,35 @@ int vstfx_create_editor (VSTState* vstfx)
                0,
                0
                );
-                                                                               
+
        /*Select the events we are interested in receiving - we need Substructure notify so that
        if the plugin resizes its window - e.g. Loomer Manifold then we get a message*/
-       
+
        XSelectInput(LXVST_XDisplay,
                                parent_window,
                                SubstructureNotifyMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | ExposureMask);
-                                                                               
+
        vstfx->linux_window = parent_window;
-                                                                               
+
        vstfx->xid = parent_window;  //vstfx->xid will be referenced to connect to GTK UI in ardour later
-       
+
        /*Because the plugin may be operating on a different Display* to us, and therefore
        the two event queues can be asynchronous, although we have created the window on
        our display, we can't guarantee it exists in the server yet, which will
        cause BadWindow crashes if the plugin tries to use it.
-       
+
        It would be nice to use CreateNotify events here, but they don't get
        through on all window managers, so instead we pass a client message
        into out queue, after the XCreateWindow.  When this message pops out
        in our event handler, it will trigger the second stage of plugin
        Editor instantiation, and by then the Window should be valid...*/
-       
+
        XClientMessageEvent event;
-       
+
        /*Create an atom to identify our message (only if it doesn't already exist)*/
-       
+
        Atom WindowActiveAtom = XInternAtom(LXVST_XDisplay, "LaunchEditor", false);
-       
+
        event.type = ClientMessage;
        event.send_event = true;
        event.window = parent_window;
@@ -664,9 +664,9 @@ int vstfx_create_editor (VSTState* vstfx)
 
        event.format = 32;                                              //Data format
        event.data.l[0] = 0x0FEEDBAC;                   //Something we can recognize later
-       
+
        /*Push the event into the queue on our Display*/
-       
+
        XSendEvent(LXVST_XDisplay, parent_window, FALSE, NoEventMask, (XEvent*)&event);
 
        return 0;
@@ -681,22 +681,22 @@ vstfx_launch_editor (VSTState* vstfx)
        is now valid in the XServer and can be passed to the plugin in effEditOpen
        without generating BadWindow errors when the plugin reparents itself into our
        parent window*/
-       
+
        if(vstfx->been_activated)
                return 0;
-       
+
        Window parent_window;
        struct ERect* er;
-       
+
        int x_size = 1;
        int y_size = 1;
-       
+
        parent_window = vstfx->linux_window;
-       
+
        /*Open the editor - Bah! we have to pass the int windowID as a void pointer - yuck
        it gets cast back to an int as the parent window XID in the plugin - and we have to pass the
        Display* as a long */
-       
+
        /**************************************************************/
        /* 64Bit --- parent window is an int passed as a void* so     */
        /* that should be ok for 64Bit machines                       */
@@ -709,36 +709,36 @@ vstfx_launch_editor (VSTState* vstfx)
        /*                                                            */
        /* linuxDSP VSTs don't use the host Display* at all           */
        /**************************************************************/
-       
+
        vstfx->plugin->dispatcher (vstfx->plugin, effEditOpen, 0, (long)LXVST_XDisplay, (void*)(parent_window), 0 );
-       
+
        /*QUIRK - some plugins need a slight delay after opening the editor before you can
        ask the window size or they might return zero - specifically discoDSP */
-       
+
        Glib::usleep(100000);
-       
+
        /*Now we can find out how big the parent window should be (and try) to resize it*/
-       
+
        vstfx->plugin->dispatcher (vstfx->plugin, effEditGetRect, 0, 0, &er, 0 );
 
        x_size = er->right - er->left;
        y_size = er->bottom - er->top;
-       
+
        vstfx->width =  x_size;
        vstfx->height =  y_size;
-       
+
        XResizeWindow(LXVST_XDisplay, parent_window, x_size, y_size);
-       
+
        XFlush (LXVST_XDisplay);
-       
+
        /*Not sure if we need to map the window or if the plugin will do it for us
        it should be ok because XReparentWindow generates a Map event*/
-       
+
        /*mark the editor as activated - mainly so that vstfx_get_XID
        will know it is valid*/
 
        vstfx->been_activated = TRUE;
-       
+
        pthread_cond_signal (&vstfx->window_status_change);
        return 0;
 }
@@ -765,10 +765,10 @@ vstfx_event_loop_remove_plugin (VSTState* vstfx)
           so we don't need to lock here - if we did there would be
           a deadlock anyway
        */
-       
+
        VSTState* p;
        VSTState* prev;
-       
+
        for (p = vstfx_first, prev = NULL; p; prev = p, p = p->next) {
                if (p == vstfx) {
                        if (prev) {
index 1e5334298b07aa56f7b1de3c0f89703ca4554cc1..4a2fc45a4770c354b54b439b21febcfa50bfc3b1 100644 (file)
@@ -323,7 +323,7 @@ LocationEditRow::set_location (Location *loc)
 
                set_tooltip (start_to_playhead_button, _("Set range start from playhead location"));
                set_tooltip (end_to_playhead_button, _("Set range end from playhead location"));
-               
+
        } else {
 
                set_tooltip (remove_button, _("Remove this marker"));
@@ -903,7 +903,7 @@ LocationUI::location_added (Location* location)
                loc.sort (LocationSortByStart ());
 
                LocationEditRow* erow = manage (new LocationEditRow (_session, location));
-               
+
                 erow->set_clock_group (*_clock_group);
                erow->remove_requested.connect (sigc::mem_fun (*this, &LocationUI::location_remove_requested));
 
@@ -1132,7 +1132,7 @@ LocationUI::clock_mode_from_session_instant_xml () const
        if (!p) {
                return ARDOUR_UI::instance()->secondary_clock->mode();
        }
-       
+
        return (AudioClock::Mode) string_2_enum (p->value (), AudioClock::Mode);
 }
 
index d2f6e757ed87d3be0882bc34a175cb8ea5fe38b3..ad8bc0175affec002b1a0ab5452846a3284cd591 100644 (file)
@@ -38,8 +38,8 @@ LXVSTPluginUI::LXVSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_
 
 LXVSTPluginUI::~LXVSTPluginUI ()
 {
-       _screen_update_connection.disconnect(); 
-       
+       _screen_update_connection.disconnect();
+
        // plugin destructor destroys the custom GUI, via the vstfx engine,
        // and then our PluginUIWindow does the rest
 }
@@ -67,35 +67,35 @@ LXVSTPluginUI::resize_callback ()
        /* We could maybe use this to resize the plugin GTK parent window
           if required
        */
-       
+
        if (!_vst->state()->want_resize) {
                return;
        }
 
        int new_height = _vst->state()->height;
        int new_width = _vst->state()->width;
-       
+
        void* gtk_parent_window = _vst->state()->extra_data;
-       
+
        if (gtk_parent_window) {
                ((Gtk::Window*) gtk_parent_window)->resize (new_width, new_height + LXVST_H_FIDDLE);
        }
-       
+
        _vst->state()->want_resize = 0;
 }
 
 int
 LXVSTPluginUI::get_preferred_height ()
-{      
+{
        /* XXX: FIXME */
-       
+
        /* We have to return the required height of the plugin UI window +  a fiddle factor
           because we can't know how big the preset menu bar is until the window is realised
           and we can't realise it until we have told it how big we would like it to be
           which we can't do until it is realised etc
        */
 
-       // May not be 40 for all screen res etc 
+       // May not be 40 for all screen res etc
        return VSTPluginUI::get_preferred_height () + LXVST_H_FIDDLE;
 }
 
@@ -103,9 +103,9 @@ int
 LXVSTPluginUI::package (Gtk::Window& win)
 {
        VSTPluginUI::package (win);
-       
+
        /* Map the UI start and stop updating events to 'Map' events on the Window */
-       
+
        win.signal_map_event().connect (mem_fun (*this, &LXVSTPluginUI::start_updating));
        win.signal_unmap_event().connect (mem_fun (*this, &LXVSTPluginUI::stop_updating));
 
@@ -129,9 +129,9 @@ LXVSTPluginUI::get_XID ()
           created and we get bad Window errors when trying
           to embed it in the GTK UI
        */
-       
+
        pthread_mutex_lock (&(_vst->state()->lock));
-       
+
        /* The Window may be scheduled for creation
           but not actually created by the gui_event_loop yet -
           spin here until it has been activated.  Possible
@@ -139,21 +139,21 @@ LXVSTPluginUI::get_XID ()
           should not be called here if the window doesn't
           exist or will never exist
        */
-       
+
        while (!(_vst->state()->been_activated)) {
                Glib::usleep (1000);
        }
-       
+
        int const id = _vst->state()->xid;
-       
+
        pthread_mutex_unlock (&(_vst->state()->lock));
-       
+
        /* Finally it might be safe to return the ID -
           problems will arise if we return either a zero ID
           and GTK tries to socket it or if we return an ID
           which hasn't yet become real to the server
        */
-       
+
        return id;
 }
 
@@ -166,7 +166,7 @@ static int
 gtk_xerror_handler (Display*, XErrorEvent*)
 {
        std::cerr << "** ERROR ** LXVSTPluginUI : Trapped an X Window System Error" << std::endl;
-       
+
        return 0;
 }
 
index 7342102bd7ce8a62d9f2a8f885ded9a98fdf28bd..14440c3b38c59e29b8f0a9751e07482ff973d6d5 100644 (file)
@@ -37,7 +37,7 @@ class LXVSTPluginUI : public VSTPluginUI
        ~LXVSTPluginUI ();
 
        int get_preferred_height ();
-       
+
        bool start_updating (GdkEventAny *);
        bool stop_updating (GdkEventAny *);
 
index e8aee1cdbe686a954b7757bd573778a25426d867..b40490daa1a9b40d746aa46ce3506700d982ff29 100644 (file)
@@ -372,7 +372,7 @@ int main (int argc, char *argv[])
                error << _("Could not complete pre-GUI initialization") << endmsg;
                exit (1);
        }
-       
+
        try {
                ui = new ARDOUR_UI (&argc, &argv, localedir.c_str());
        } catch (failed_constructor& err) {
index 696b7e21e6acc99d9e685d17c33b743bb6ef9275..bf0712686adff4c9c5e5e59d41dcb9510a9092a1 100644 (file)
@@ -28,7 +28,7 @@ public:
        MainClock (const std::string& clock_name, const std::string& widget_name, bool primary);
 
 private:
-       
+
        // Editor *_editor;
 
        void build_ops_menu ();
index 30be8fd7868988bdcd0501144538468ca8f6b41a..2d9da96b0fc3afd9a97d703bae64b37d87245c49 100644 (file)
@@ -261,12 +261,12 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Container& parent, g
        group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple (unit_position, 0));
 #ifdef CANVAS_DEBUG
        group->name = string_compose ("Marker::group for %1", annotation);
-#endif 
+#endif
 
        _name_background = new ArdourCanvas::Rectangle (group);
 #ifdef CANVAS_DEBUG
        _name_background->name = string_compose ("Marker::_name_background for %1", annotation);
-#endif 
+#endif
 
        /* adjust to properly locate the tip */
 
@@ -286,7 +286,7 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Container& parent, g
 
        layout->set_font_description (name_font);
        Gtkmm2ext::get_ink_pixel_size (layout, width, name_height);
-       
+
        _name_item = new ArdourCanvas::Text (group);
        CANVAS_DEBUG_NAME (_name_item, string_compose ("ArdourMarker::_name_item for %1", annotation));
        _name_item->set_font_description (name_font);
@@ -303,7 +303,7 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Container& parent, g
 
        group->set_data ("marker", this);
        mark->set_data ("marker", this);
-       
+
        if (handle_events) {
                group->Event.connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_marker_event), group, this));
        }
@@ -420,10 +420,10 @@ ArdourMarker::setup_name_display ()
                if (label_on_left ()) {
                        _name_item->set_x_position (-name_width);
                }
-                       
+
                _name_item->clamp_width (name_width);
                _name_item->set (_name);
-               
+
                if (label_on_left ()) {
                        /* adjust right edge of background to fit text */
                        _name_background->set_x0 (_name_item->position().x - padding);
index 825bd6923d38ab3959947514e5e4e9fbc14de08c..dfeb406976232548f1aa1fe988a3d20f04cf2cf3 100644 (file)
@@ -142,7 +142,7 @@ class MeterStrip : public Gtk::VBox, public RouteUI
        void update_button_box ();
        void update_name_box ();
        void name_changed ();
-       
+
        void route_color_changed ();
 
        bool _suspend_menu_callbacks;
index 9502a6879b56d629060214201f1134ea433136c4..40ab9683587626b05d889a69d2e0c24a6286aa34 100644 (file)
@@ -380,15 +380,15 @@ MidiChannelSelectorWindow::build ()
 
        vpacker->pack_start (capture_all_button);
        capture_all_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::capture_mode_toggled), AllChannels));
-       
+
        vpacker->pack_start (capture_filter_button);
        capture_filter_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::capture_mode_toggled), FilterChannels));
-       
+
        vpacker->pack_start (capture_force_button);
        capture_force_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::capture_mode_toggled), ForceChannel));
 
         vpacker->pack_start (capture_mask_box);
-       
+
        capture_controls = manage (new HBox);
        capture_controls->set_spacing (6);
 
@@ -416,10 +416,10 @@ MidiChannelSelectorWindow::build ()
 
        vpacker->pack_start (playback_all_button);
        playback_all_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::playback_mode_toggled), AllChannels));
-       
+
        vpacker->pack_start (playback_filter_button);
        playback_filter_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::playback_mode_toggled), FilterChannels));
-       
+
        vpacker->pack_start (playback_force_button);
        playback_force_button.signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiChannelSelectorWindow::playback_mode_toggled), ForceChannel));
 
@@ -496,7 +496,7 @@ MidiChannelSelectorWindow::invert_capture_mask ()
                track->set_capture_channel_mask (~track->get_capture_channel_mask());
        }
 }
-               
+
 void
 MidiChannelSelectorWindow::set_playback_selected_channels (uint16_t mask)
 {
@@ -510,7 +510,7 @@ MidiChannelSelectorWindow::set_playback_selected_channels (uint16_t mask)
                        playback_buttons[i]->set_active ((1<<i) & mask);
                }
                break;
-               
+
        case ForceChannel:
                /* only set the lowest set channel in the mask as active */
                for (uint16_t i = 0; i < 16; i++) {
@@ -533,7 +533,7 @@ MidiChannelSelectorWindow::set_capture_selected_channels (uint16_t mask)
                        capture_buttons[i]->set_active ((1<<i) & mask);
                }
                break;
-               
+
        case ForceChannel:
                /* only set the lowest set channel in the mask as active */
                for (uint16_t i = 0; i < 16; i++) {
@@ -605,10 +605,10 @@ MidiChannelSelectorWindow::playback_mode_changed ()
        if (playback_buttons.empty()) {
 
                Gtkmm2ext::container_clear (playback_mask_box);
-               
+
                ToggleButton* tb;
                RadioButtonGroup group;
-               
+
                for (uint32_t n = 0; n < 16; ++n) {
                        char buf[3];
                        snprintf (buf, sizeof (buf), "%d", n+1);
@@ -638,7 +638,7 @@ MidiChannelSelectorWindow::playback_mode_changed ()
                                tb->set_sensitive (false);
                        }
                }
-               
+
                if (mode != ForceChannel) {
                        set_playback_selected_channels (track->get_playback_channel_mask());
                }
@@ -703,10 +703,10 @@ MidiChannelSelectorWindow::capture_mode_changed ()
        if (capture_buttons.empty()) {
 
                Gtkmm2ext::container_clear (capture_mask_box);
-               
+
                ToggleButton* tb;
                RadioButtonGroup group;
-               
+
                for (uint32_t n = 0; n < 16; ++n) {
                        char buf[3];
                        snprintf (buf, sizeof (buf), "%d", n+1);
@@ -736,7 +736,7 @@ MidiChannelSelectorWindow::capture_mode_changed ()
                                tb->set_sensitive (false);
                        }
                }
-               
+
                if (mode != ForceChannel) {
                        set_capture_selected_channels (track->get_capture_channel_mask());
                }
@@ -803,7 +803,7 @@ MidiChannelSelectorWindow::capture_mode_toggled (ChannelMode mode)
           so we take action only if the button is active (i.e it is the one
           just clicked on)
        */
-       
+
        switch (mode) {
        case AllChannels:
                if (capture_all_button.get_active()) {
@@ -833,7 +833,7 @@ MidiChannelSelectorWindow::playback_mode_toggled (ChannelMode mode)
           so we take action only if the button is active (i.e it is the one
           just clicked on)
        */
-       
+
        switch (mode) {
        case AllChannels:
                if (playback_all_button.get_active()) {
@@ -860,7 +860,7 @@ MidiChannelSelectorWindow::set_channel_colors (const uint32_t new_channel_colors
 
                char color_normal[8];
                char color_active[8];
-               
+
                snprintf(color_normal, 8, "#%x", UINT_INTERPOLATE(new_channel_colors[n], 0x000000ff, 0.6));
                snprintf(color_active, 8, "#%x", new_channel_colors[n]);
 
index dc15668dbdb550eb8f4d667cc87874daf273a7de..34469adc3917e2b2d680d6351d94248068ae5a31 100644 (file)
@@ -67,5 +67,5 @@ std::string
 MidiExportDialog::get_path () const
 {
        return file_chooser.get_filename ();
-       
+
 }
index 29f81bdf5bd252558d594c9019d50ee68cd5e3d6..6334c38dcc304aac759b3d75be562ca8b16888c5 100644 (file)
@@ -72,7 +72,7 @@ MidiListEditor::MidiListEditor (Session* s, boost::shared_ptr<MidiRegion> r, boo
        if (note_length_map.empty()) {
                fill_note_length_map ();
        }
-       
+
        /* We do not handle nested sources/regions. Caller should have tackled this */
 
        if (r->max_source_level() > 0) {
@@ -90,7 +90,7 @@ MidiListEditor::MidiListEditor (Session* s, boost::shared_ptr<MidiRegion> r, boo
 
        note_length_model = ListStore::create (note_length_columns);
        TreeModel::Row row;
-       
+
        for (std::map<int,string>::iterator i = note_length_map.begin(); i != note_length_map.end(); ++i) {
                row = *(note_length_model->append());
                row[note_length_columns.ticks] = i->first;
@@ -152,7 +152,7 @@ MidiListEditor::MidiListEditor (Session* s, boost::shared_ptr<MidiRegion> r, boo
        buttons.attach (sound_notes_button, 0, 1, 0, 1);
        Glib::RefPtr<Gtk::Action> act = ActionManager::get_action ("Editor", "sound-midi-notes");
        if (act) {
-               gtk_activatable_set_related_action (GTK_ACTIVATABLE (sound_notes_button.gobj()), act->gobj());  
+               gtk_activatable_set_related_action (GTK_ACTIVATABLE (sound_notes_button.gobj()), act->gobj());
        }
 
        view.show ();
@@ -191,7 +191,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
        if (!view.get_path_at_pos (ev->x, ev->y, path, col, cellx, celly)) {
                return false;
        }
-       
+
        if (view.get_selection()->count_selected_rows() == 0) {
                was_selected = false;
        } else if (view.get_selection()->is_selected (path)) {
@@ -199,7 +199,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
        } else {
                was_selected = false;
        }
-       
+
        int colnum = GPOINTER_TO_UINT (col->get_data (X_("colnum")));
 
        switch (colnum) {
@@ -274,19 +274,19 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
                if (was_selected) {
 
                        /* use selection */
-                       
+
                        TreeView::Selection::ListHandle_Path rows = view.get_selection()->get_selected_rows ();
                        TreeModel::iterator iter;
                        boost::shared_ptr<NoteType> note;
-                       
+
                        for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
 
                                previous_selection.push_back (*i);
 
                                if ((iter = model->get_iter (*i))) {
-                                       
-                                       note = (*iter)[columns._note];          
-                                       
+
+                                       note = (*iter)[columns._note];
+
                                        switch (prop) {
                                        case MidiModel::NoteDiffCommand::StartTime:
                                                if (note->time() + fdelta >= 0) {
@@ -321,7 +321,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
                } else {
 
                        /* just this row */
-                       
+
                        TreeModel::iterator iter;
                        iter = model->get_iter (path);
 
@@ -329,7 +329,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
 
                        if (iter) {
                                boost::shared_ptr<NoteType> note = (*iter)[columns._note];
-                               
+
                                switch (prop) {
                                case MidiModel::NoteDiffCommand::StartTime:
                                        if (note->time() + fdelta >= 0) {
@@ -364,7 +364,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
                m->apply_command (*_session, cmd);
 
                /* reset selection to be as it was before we rebuilt */
-               
+
                for (vector<TreeModel::Path>::iterator i = previous_selection.begin(); i != previous_selection.end(); ++i) {
                        view.get_selection()->select (*i);
                }
@@ -401,7 +401,7 @@ MidiListEditor::key_press (GdkEventKey* ev)
                        ret = true;
                }
                break;
-               
+
        case GDK_Up:
        case GDK_uparrow:
                if (edit_column > 0) {
@@ -435,7 +435,7 @@ MidiListEditor::key_press (GdkEventKey* ev)
        case GDK_Escape:
                stop_editing (true);
                break;
-               
+
        }
 
        return ret;
@@ -486,7 +486,7 @@ MidiListEditor::key_release (GdkEventKey* ev)
                        ret = true;
                }
                break;
-               
+
        case GDK_r:
                if (_session && Gtkmm2ext::Keyboard::modifier_state_contains (ev->state, Gtkmm2ext::Keyboard::PrimaryModifier)) {
                        _session->redo (1);
@@ -626,7 +626,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
                if (sscanf (text.c_str(), "%lf", &fval) == 1) {
 
                        /* numeric value entered */
-                       
+
                        if (text.find ('.') == string::npos && text.find (',') == string::npos) {
                                /* integral => units are ticks */
                                fval = fval / BBT_Time::ticks_per_beat;
@@ -649,13 +649,13 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
                                 * displaying numeric value ... use new value
                                 * from note length map, and convert to beats.
                                 */
-                               
+
                                for (x = note_length_map.begin(); x != note_length_map.end(); ++x) {
                                        if (x->second == text) {
                                                break;
                                        }
                                }
-                               
+
                                if (x != note_length_map.end()) {
                                        fval = x->first / BBT_Time::ticks_per_beat;
                                }
@@ -665,7 +665,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
                                fval = -1.0;
 
                                if (text != x->second) {
-                                       
+
                                        /* get ticks for the newly selected
                                         * note length
                                         */
@@ -675,7 +675,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
                                                        break;
                                                }
                                        }
-                                       
+
                                        if (x != note_length_map.end()) {
                                                /* convert to beats */
                                                fval = (double) x->first / BBT_Time::ticks_per_beat;
@@ -702,12 +702,12 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
                MidiModel::NoteDiffCommand* cmd = m->new_note_diff_command (opname);
 
                TreeView::Selection::ListHandle_Path rows = view.get_selection()->get_selected_rows ();
-               
+
                for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
                        if ((iter = model->get_iter (*i))) {
 
-                               note = (*iter)[columns._note];          
-                               
+                               note = (*iter)[columns._note];
+
                                switch (prop) {
                                case MidiModel::NoteDiffCommand::Velocity:
                                        cmd->change (note, prop, (uint8_t) (note->velocity() + idelta));
@@ -731,7 +731,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
 
                /* model has been redisplayed by now */
                /* keep selected row(s), move cursor there, don't continue editing */
-               
+
                TreeViewColumn* col = view.get_column (edit_column);
                view.set_cursor (edit_path, *col, 0);
 
@@ -776,7 +776,7 @@ MidiListEditor::redisplay_model ()
                        const Evoral::Beats dur = (*i)->end_time() - (*i)->time();
                        bbt.beats = dur.get_beats ();
                        bbt.ticks = dur.get_ticks ();
-                       
+
                        uint64_t len_ticks = (*i)->length().to_ticks();
                        std::map<int,string>::iterator x = note_length_map.find (len_ticks);
 
@@ -811,7 +811,7 @@ MidiListEditor::selection_changed ()
 
        for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
                if ((iter = model->get_iter (*i))) {
-                       note = (*iter)[columns._note];          
+                       note = (*iter)[columns._note];
                        player->add (note);
                }
        }
index 09b20f048dc63e3fb4ea05f178371369d8eca4b0..5300a825743e46b8467d17d690f1a0ca87a105e6 100644 (file)
@@ -271,7 +271,7 @@ MidiRegionView::init (bool wfd)
        NoteBase::NoteBaseDeleted.connect (note_delete_connection, MISSING_INVALIDATOR,
                                           boost::bind (&MidiRegionView::maybe_remove_deleted_note_from_selection, this, _1),
                                           gui_context());
-       
+
        if (wfd) {
                Glib::Threads::Mutex::Lock lm(midi_region()->midi_source(0)->mutex());
                midi_region()->midi_source(0)->load_model(lm);
@@ -502,10 +502,10 @@ MidiRegionView::button_press (GdkEventButton* ev)
        }
 
        if (_mouse_state != SelectTouchDragging) {
-               
+
                _pressed_button = ev->button;
                _mouse_state = Pressed;
-               
+
                return true;
        }
 
@@ -578,7 +578,7 @@ MidiRegionView::button_release (GdkEventButton* ev)
                                   grid snap without it overlapping this one.
                                */
                                beats -= Evoral::Beats::tick();
-                               
+
                                create_note_at (editor.pixel_to_sample (event_x), event_y, beats, true);
 
                                break;
@@ -646,9 +646,9 @@ MidiRegionView::motion (GdkEventMotion* ev)
        case Pressed:
 
                if (_pressed_button == 1) {
-                       
+
                        MouseMode m = editor.current_mouse_mode();
-                       
+
                        if (m == MouseDraw || (m == MouseContent && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier()))) {
                                editor.drags()->set (new NoteCreateDrag (dynamic_cast<Editor *> (&editor), group, this), (GdkEvent *) ev);
                                _mouse_state = AddDragging;
@@ -677,7 +677,7 @@ MidiRegionView::motion (GdkEventMotion* ev)
        case AddDragging:
                editor.drags()->motion_handler ((GdkEvent *) ev, false);
                break;
-               
+
        case SelectTouchDragging:
                return false;
 
@@ -733,7 +733,7 @@ MidiRegionView::key_press (GdkEventKey* ev)
        */
 
        bool unmodified = Keyboard::no_modifier_keys_pressed (ev);
-       
+
        if (unmodified && (ev->keyval == GDK_Alt_L || ev->keyval == GDK_Alt_R)) {
                _mouse_state = SelectTouchDragging;
                return true;
@@ -878,7 +878,7 @@ MidiRegionView::velocity_edit ()
        if (_selection.empty()) {
                return;
        }
-       
+
        /* pick a note somewhat at random (since Selection is a set<>) to
         * provide the "current" velocity for the dialog.
         */
@@ -1191,7 +1191,7 @@ MidiRegionView::redisplay_model()
                bool visible;
 
                if (note_in_region_range (note, visible)) {
-                       
+
                        if (!empty_when_starting && (cne = find_canvas_note (note)) != 0) {
 
                                cne->validate ();
@@ -1216,7 +1216,7 @@ MidiRegionView::redisplay_model()
                        }
 
                } else {
-                       
+
                        if (!empty_when_starting && (cne = find_canvas_note (note)) != 0) {
                                cne->validate ();
                                cne->hide ();
@@ -1229,17 +1229,17 @@ MidiRegionView::redisplay_model()
        if (!empty_when_starting) {
                for (Events::iterator i = _events.begin(); i != _events.end(); ) {
                        if (!(*i)->valid ()) {
-                               
+
                                for (vector<GhostRegion*>::iterator j = ghosts.begin(); j != ghosts.end(); ++j) {
                                        MidiGhostRegion* gr = dynamic_cast<MidiGhostRegion*> (*j);
                                        if (gr) {
                                                gr->remove_note (*i);
                                        }
                                }
-                               
+
                                delete *i;
                                i = _events.erase (i);
-                               
+
                        } else {
                                ++i;
                        }
@@ -1303,7 +1303,7 @@ MidiRegionView::display_sysexes()
                for (MidiModel::SysExes::const_iterator i = _model->sysexes().begin(); i != _model->sysexes().end(); ++i) {
                        const boost::shared_ptr<const Evoral::MIDIEvent<Evoral::Beats> > mev =
                                boost::static_pointer_cast<const Evoral::MIDIEvent<Evoral::Beats> > (*i);
-                       
+
                        if (mev) {
                                if (mev->is_spp() || mev->is_mtc_quarter() || mev->is_mtc_full()) {
                                        have_periodic_system_messages = true;
@@ -1311,19 +1311,19 @@ MidiRegionView::display_sysexes()
                                }
                        }
                }
-               
+
                if (have_periodic_system_messages) {
                        double zoom = trackview.editor().get_current_zoom (); // frames per pixel
-                       
+
                        /* get an approximate value for the number of samples per video frame */
-                       
+
                        double video_frame = trackview.session()->frame_rate() * (1.0/30);
-                       
+
                        /* if we are zoomed out beyond than the cutoff (i.e. more
                         * frames per pixel than frames per 4 video frames), don't
                         * show periodic sysex messages.
                         */
-                       
+
                        if (zoom > (video_frame*4)) {
                                display_periodic_messages = false;
                        }
@@ -1955,7 +1955,7 @@ patch_applies (const ARDOUR::MidiModel::constPatchChangePtr pc, Evoral::Beats ti
 {
        return pc->time() <= time && pc->channel() == channel;
 }
-       
+
 void
 MidiRegionView::get_patch_key_at (Evoral::Beats time, uint8_t channel, MIDI::Name::PatchPrimaryKey& key) const
 {
@@ -2255,13 +2255,13 @@ MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, b
        uint8_t high_note = 0;
        MidiModel::Notes& notes (_model->notes());
        _optimization_iterator = _events.begin();
-       
+
        if (extend && !have_selection) {
                extend = false;
        }
 
        /* scan existing selection to get note range */
-       
+
        for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
                if ((*i)->note()->note() < low_note) {
                        low_note = (*i)->note()->note();
@@ -2270,7 +2270,7 @@ MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, b
                        high_note = (*i)->note()->note();
                }
        }
-       
+
        if (!add) {
                clear_selection ();
 
@@ -2593,7 +2593,7 @@ MidiRegionView::note_dropped(NoteBase *, frameoffset_t dt, int8_t dnote)
        start_note_diff_command (_("move notes"));
 
        for (Selection::iterator i = _selection.begin(); i != _selection.end() ; ++i) {
-               
+
                framepos_t new_frames = source_beats_to_absolute_frames ((*i)->note()->time()) + dt;
                Evoral::Beats new_time = absolute_frames_to_source_beats (new_frames);
 
@@ -2857,7 +2857,7 @@ MidiRegionView::commit_resizing (NoteBase* primary, bool at_front, double delta_
                /* Get the new x position for this resize, which is in pixels relative
                 * to the region position.
                 */
-               
+
                double current_x;
 
                if (at_front) {
@@ -3711,7 +3711,7 @@ MidiRegionView::update_ghost_note (double x, double y)
        _note_group->canvas_to_item (x, y);
 
        PublicEditor& editor = trackview.editor ();
-       
+
        framepos_t const unsnapped_frame = editor.pixel_to_sample (x);
        framecnt_t grid_frames;
        framepos_t const f = snap_frame_to_grid_underneath (unsnapped_frame, grid_frames);
@@ -4084,7 +4084,7 @@ framepos_t
 MidiRegionView::snap_frame_to_grid_underneath (framepos_t p, framecnt_t& grid_frames) const
 {
        PublicEditor& editor = trackview.editor ();
-       
+
        const Evoral::Beats grid_beats = get_grid_beats(p);
 
        grid_frames = region_beats_to_region_frames (grid_beats);
index bcc4e7aca2b70cc5698f4a9c8b33398e4bd35e96..786a7ec7c45cefdc5bb7b85e574e038f74548a22 100644 (file)
@@ -309,7 +309,7 @@ public:
        Selection selection () const {
                return _selection;
        }
-       
+
        void selection_as_notelist (Notes& selected, bool allow_all_if_none_selected = false);
 
        void enable_display (bool);
@@ -331,7 +331,7 @@ public:
        void clear_selection (bool signal = true) { clear_selection_except (0, signal); }
 
         ARDOUR::InstrumentInfo& instrument_info() const;
-       
+
 protected:
        void region_resized (const PBD::PropertyChange&);
 
@@ -401,7 +401,7 @@ private:
 
        uint8_t  _current_range_min;
        uint8_t  _current_range_max;
-       
+
        typedef std::list<NoteBase*>                          Events;
        typedef std::vector< boost::shared_ptr<PatchChange> > PatchChanges;
        typedef std::vector< boost::shared_ptr<SysEx> >       SysExes;
@@ -514,7 +514,7 @@ private:
        bool _mouse_changed_selection;
 
        framepos_t snap_frame_to_grid_underneath (framepos_t p, framecnt_t &) const;
-       
+
        PBD::ScopedConnection _mouse_mode_connection;
 
        boost::shared_ptr<CursorContext> _press_cursor_ctx;
index d1a479d28c9700875d86ae4e3a69e16a83e3989d..ce34fb9b888d1fcc92251b8827acdef4fb0b06c5 100644 (file)
@@ -75,7 +75,7 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv)
           can be put below ghost regions from MIDI underlays
        */
        _note_lines = new ArdourCanvas::LineSet (_canvas_group, ArdourCanvas::LineSet::Horizontal);
-       
+
        _note_lines->Event.connect(
                sigc::bind(sigc::mem_fun(_trackview.editor(),
                                         &PublicEditor::canvas_stream_view_event),
@@ -345,7 +345,7 @@ MidiStreamView::draw_note_lines()
 
                double h = y - prev_y;
                double mid = y + (h/2.0);
-                               
+
                if (height > 1.0) { // XXX ? should that not be h >= 1 ?
                        _note_lines->add (mid, h, color);
                }
@@ -647,7 +647,7 @@ void
 MidiStreamView::resume_updates ()
 {
        _updates_suspended = false;
-       
+
        draw_note_lines ();
        apply_note_range_to_regions ();
 
index 934cc6a21dace1b3a934d11de6be4714f64f8a7f..9564ed239cc0b32a429e9d64e818d631593e7548 100644 (file)
@@ -132,7 +132,7 @@ void
 MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
 {
        _route = rt;
-       
+
        _view = new MidiStreamView (*this);
 
        if (is_track ()) {
@@ -319,11 +319,11 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
 
        _channel_status_box.set_homogeneous (false);
        _channel_status_box.set_spacing (4);
-       
+
        ArdourButton *channel_selector_button = manage (new ArdourButton(_("Chns")));
        channel_selector_button->set_name ("route button");
        set_tooltip (channel_selector_button, _("Click to edit channel settings"));
-       
+
        // Insert expanding space labels to get full width justification
        _channel_status_box.pack_start (_playback_channel_status, false, false, 2);
        _channel_status_box.pack_start (*Gtk::manage(new Gtk::Label(" ")), true, true);
@@ -333,7 +333,7 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
        _channel_status_box.show_all ();
 
        channel_selector_button->signal_clicked.connect (sigc::mem_fun (*this, &MidiTimeAxisView::toggle_channel_selector));
-       
+
        _midi_controls_box.pack_start (_channel_status_box, false, false, 10);
 
        if (!patch_manager.all_models().empty()) {
@@ -483,7 +483,7 @@ MidiTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
        } else {
                _midi_controls_box.hide();
        }
-       
+
        if (h >= KEYBOARD_MIN_HEIGHT) {
                if (is_track() && _range_scroomer) {
                        _range_scroomer->show();
@@ -539,7 +539,7 @@ MidiTimeAxisView::append_extra_display_menu_items ()
        if (color_mode_menu) {
                items.push_back (MenuElem (_("Color Mode"), *color_mode_menu));
        }
-       
+
        items.push_back (SeparatorElem ());
 }
 
@@ -921,7 +921,7 @@ MidiTimeAxisView::build_controller_menu ()
                     l != device_names->controls().end(); ++l) {
                        boost::shared_ptr<ControlNameList> name_list = l->second;
                        Menu*                              ctl_menu  = NULL;
-                       
+
                        for (ControlNameList::Controls::const_iterator c = name_list->controls().begin();
                             c != name_list->controls().end();) {
                                const uint16_t ctl = c->second->number();
@@ -931,7 +931,7 @@ MidiTimeAxisView::build_controller_menu ()
                                                /* Create a new submenu */
                                                ctl_menu = manage (new Menu);
                                        }
-                               
+
                                        MenuList& ctl_items (ctl_menu->items());
                                        if (chn_cnt > 1) {
                                                add_multi_channel_controller_item(ctl_items, ctl, c->second->name());
@@ -1069,7 +1069,7 @@ MidiTimeAxisView::set_color_mode (ColorMode mode, bool force, bool redisplay, bo
                if (_color_mode == mode && !force) {
                        return;
                }
-               
+
                if (_channel_selector) {
                        if (mode == ChannelColors) {
                                _channel_selector->set_channel_colors(NoteBase::midi_channel_colors);
@@ -1077,7 +1077,7 @@ MidiTimeAxisView::set_color_mode (ColorMode mode, bool force, bool redisplay, bo
                                _channel_selector->set_default_channel_color();
                        }
                }
-               
+
                _color_mode = mode;
                set_gui_property ("color-mode", enum_2_string(_color_mode));
                if (redisplay) {
index fbee3552c3a96a8a33f75a6f363c6eafa381fc13..3d5e6ac796c81d95133fc940a6ecf0d8529548f1 100644 (file)
@@ -131,7 +131,7 @@ MidiTracer::ports_changed ()
 {
        string const c = _port_combo.get_active_text ();
        _port_combo.clear ();
-       
+
        ARDOUR::PortManager::PortList pl;
        ARDOUR::AudioEngine::instance()->get_ports (ARDOUR::DataType::MIDI, pl);
 
@@ -182,7 +182,7 @@ MidiTracer::port_changed ()
                        mp->set_trace_on (true);
                        traced_port = mp;
                }
-               
+
        } else {
                async->parser()->any.connect_same_thread (_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3));
        }
index 63a17d4bc9cd07db510800a9f0bcbae18345ba9d..e0e3f01dc904afb3bf88d2674f97d2d2c8e16dea 100644 (file)
@@ -57,7 +57,7 @@ class MidiTracer : public ArdourWindow
        Gtk::Label line_count_label;
        Gtk::HBox line_count_box;
        struct timeval _last_receipt;
-       
+
        bool autoscroll;
        bool show_hex;
        bool show_delta_time;
index 13a960c0db77cac4781542b9bbb91095479df9d3..5b21e566e4a3033650543f3f6fc15981684792e2 100644 (file)
@@ -41,7 +41,7 @@ MidiVelocityDialog::MidiVelocityDialog (uint8_t current_velocity)
 
        add_button (Stock::CANCEL, RESPONSE_CANCEL);
        add_button (Stock::OK, RESPONSE_OK);
-       
+
        spinner.signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &MidiVelocityDialog::response), Gtk::RESPONSE_OK));
 }
 
index dfbdf1a12cb6d55deb9dab79022873b0932fb61e..ffd68ff6c4e8bdddaf5120534e4bd37d0c8f5e32 100644 (file)
@@ -80,7 +80,7 @@ void
 MixerActor::load_bindings ()
 {
         /* XXX move this to a better place */
-       
+
         bindings.set_action_map (myactions);
 
        std::string binding_file;
index e7d82ae708fc323bd9f537361ab0c18ce8d9527c..f84c53b8e149f6fd778893f6cecdbf8b801bc5c8 100644 (file)
@@ -101,13 +101,13 @@ MixerGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
 {
        double const arc_radius = get_height();
        double r, g, b, a;
-       
+
        if (tab.group && tab.group->is_active()) {
                ArdourCanvas::color_to_rgba (tab.color, r, g, b, a);
        } else {
                ArdourCanvas::color_to_rgba (UIConfiguration::instance().color ("inactive group tab"), r, g, b, a);
        }
-       
+
        a = 1.0;
 
        cairo_set_source_rgba (cr, r, g, b, a);
@@ -122,7 +122,7 @@ MixerGroupTabs::draw_tab (cairo_t* cr, Tab const & tab) const
 
                cairo_text_extents_t ext;
                cairo_text_extents (cr, tab.group->name().c_str(), &ext);
-               
+
                ArdourCanvas::Color c = ArdourCanvas::contrasting_text_color (ArdourCanvas::rgba_to_color (r, g, b, a));
                ArdourCanvas::color_to_rgba (c, r, g, b, a);
 
index 57501062a4c3e3934fdd1525c1c7dc349b071194..2ff54512c69e4d2caa471ff401b7c450bf6427b6 100644 (file)
@@ -154,7 +154,7 @@ MixerStrip::init ()
        if (_mixer_owned) {
                t += string_compose (_("\n%1-%2-click to toggle the width of all strips."), Keyboard::primary_modifier_name(), Keyboard::tertiary_modifier_name ());
        }
-       
+
        width_button.set_icon (ArdourIcon::StripWidth);
        set_tooltip (width_button, t);
 
@@ -162,7 +162,7 @@ MixerStrip::init ()
        set_tooltip (&hide_button, _("Hide this mixer strip"));
 
        input_button_box.set_spacing(2);
-       
+
        input_button.set_text (_("Input"));
        input_button.set_name ("mixer strip button");
        input_button_box.pack_start (input_button, true, true);
@@ -177,7 +177,7 @@ MixerStrip::init ()
 
        meter_point_button.signal_button_press_event().connect (sigc::mem_fun (gpm, &GainMeter::meter_press), false);
        meter_point_button.signal_button_release_event().connect (sigc::mem_fun (gpm, &GainMeter::meter_release), false);
-       
+
        hide_button.set_events (hide_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
 
        solo_isolated_led = manage (new ArdourButton (ArdourButton::led_default_elements));
@@ -238,7 +238,7 @@ MixerStrip::init ()
                        button_size_group->add_widget (*monitor_input_button);
                }
        }
-       
+
        mute_solo_table.set_homogeneous (true);
        mute_solo_table.set_spacings (2);
 
@@ -408,7 +408,7 @@ bool
 MixerStrip::mixer_strip_enter_event (GdkEventCrossing* /*ev*/)
 {
        _entered_mixer_strip = this;
-       
+
        //although we are triggering on the "enter", to the user it will appear that it is happenin on the "leave"
        //because the mixerstrip control is a parent that encompasses the strip
        deselect_all_processors();
@@ -431,7 +431,7 @@ MixerStrip::mixer_strip_leave_event (GdkEventCrossing *ev)
                //if we leave this mixer strip we need to clear out any selections
                //processor_box.processor_display.select_none();  //but this doesn't work, because it gets triggered when (for example) you open the menu or start a drag
        }
-       
+
        return false;
 }
 
@@ -456,7 +456,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
        if (group_button.get_parent()) {
                bottom_button_table.remove (group_button);
        }
-       
+
        RouteUI::set_route (rt);
 
        /* ProcessorBox needs access to _route so that it can read
@@ -469,7 +469,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
        /* unpack these from the parent and stuff them into our own
           table
        */
-       
+
        if (gpm.peak_display.get_parent()) {
                gpm.peak_display.get_parent()->remove (gpm.peak_display);
        }
@@ -478,7 +478,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
        }
 
        gpm.set_type (rt->meter_type());
-       
+
        mute_solo_table.attach (gpm.gain_display,0,1,1,2, EXPAND|FILL, EXPAND);
        mute_solo_table.attach (gpm.peak_display,1,2,1,2, EXPAND|FILL, EXPAND);
 
@@ -798,7 +798,7 @@ MixerStrip::output_release (GdkEventButton *ev)
                edit_output_configuration ();
                break;
        }
-       
+
        return false;
 }
 
@@ -869,7 +869,7 @@ MixerStrip::output_press (GdkEventButton *ev)
                                        )
                                );
                }
-               
+
                citems.push_back (SeparatorElem());
                citems.push_back (MenuElem (_("Routing Grid"), sigc::mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::edit_output_configuration)));
 
@@ -929,7 +929,7 @@ MixerStrip::input_press (GdkEventButton *ev)
 
                citems.push_back (SeparatorElem());
                uint32_t const n_with_separator = citems.size ();
-               
+
                input_menu_bundles.clear ();
 
                ARDOUR::BundleList current = _route->input()->bundles_connected ();
@@ -1195,7 +1195,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
 
        ostringstream tooltip;
        char * tooltip_cstr;
-       
+
        //to avoid confusion, the button caption should only show connections that match the datatype of the track
        DataType dt = DataType::AUDIO;
        if ( boost::dynamic_pointer_cast<MidiTrack>(route) != 0 ) {
@@ -1220,7 +1220,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
                } else {
                        port = route->output()->nth (io_index);
                }
-               
+
                port_connections.clear ();
                port->get_connections(port_connections);
 
@@ -1598,7 +1598,7 @@ MixerStrip::build_route_ops_menu ()
                        if (!selection.selected (rtav)) {
                                selection.set (rtav);
                        }
-                       
+
                        items.push_front (SeparatorElem());
                        items.push_front (MenuElem (_("Remove"), sigc::mem_fun(PublicEditor::instance(), &PublicEditor::remove_tracks)));
                }
@@ -1644,7 +1644,7 @@ MixerStrip::number_button_button_press (GdkEventButton* ev)
                /* do not allow rename if the track is record-enabled */
                rename_menu_item->set_sensitive (!_route->record_enabled());
                route_ops_menu->popup (1, ev->time);
-               
+
                return true;
        }
 
@@ -1670,7 +1670,7 @@ MixerStrip::set_selected (bool yn)
                global_frame.set_name ("MixerStripFrame");
        }
        global_frame.queue_draw ();
-       
+
 //     if (!yn)
 //             processor_box.deselect_all_processors();
 }
@@ -1735,7 +1735,7 @@ MixerStrip::width_button_pressed (GdkEventButton* ev)
        if (ev->button != 1) {
                return false;
        }
-       
+
        if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier | Keyboard::TertiaryModifier)) && _mixer_owned) {
                switch (_width) {
                case Wide:
@@ -1880,19 +1880,19 @@ MixerStrip::meter_point_string (MeterPoint mp)
                case MeterInput:
                        return _("In");
                        break;
-                       
+
                case MeterPreFader:
                        return _("Pre");
                        break;
-                       
+
                case MeterPostFader:
                        return _("Post");
                        break;
-                       
+
                case MeterOutput:
                        return _("Out");
                        break;
-                       
+
                case MeterCustom:
                default:
                        return _("Custom");
@@ -1904,19 +1904,19 @@ MixerStrip::meter_point_string (MeterPoint mp)
                case MeterInput:
                        return S_("Meter|In");
                        break;
-                       
+
                case MeterPreFader:
                        return S_("Meter|Pr");
                        break;
-                       
+
                case MeterPostFader:
                        return S_("Meter|Po");
                        break;
-                       
+
                case MeterOutput:
                        return S_("Meter|O");
                        break;
-                       
+
                case MeterCustom:
                default:
                        return S_("Meter|C");
@@ -2204,7 +2204,7 @@ MixerStrip::override_solo_visibility () const
        if (_route && _route->is_master ()) {
                return boost::optional<bool> (false);
        }
-       
+
        return boost::optional<bool> ();
 }
 
@@ -2362,7 +2362,7 @@ MixerStrip::add_level_meter_item_point (Menu_Helpers::MenuList& items,
                RadioMenuItem::Group& group, string const & name, MeterPoint point)
 {
        using namespace Menu_Helpers;
-       
+
        items.push_back (RadioMenuElem (group, name, sigc::bind (sigc::mem_fun (*this, &MixerStrip::set_meter_point), point)));
        RadioMenuItem* i = dynamic_cast<RadioMenuItem *> (&items.back ());
        i->set_active (_route->meter_point() == point);
@@ -2380,7 +2380,7 @@ MixerStrip::add_level_meter_item_type (Menu_Helpers::MenuList& items,
                RadioMenuItem::Group& group, string const & name, MeterType type)
 {
        using namespace Menu_Helpers;
-       
+
        items.push_back (RadioMenuElem (group, name, sigc::bind (sigc::mem_fun (*this, &MixerStrip::set_meter_type), type)));
        RadioMenuItem* i = dynamic_cast<RadioMenuItem *> (&items.back ());
        i->set_active (_route->meter_type() == type);
index cf2a90e4b43e8c9ed3f6a25e1324bd894297c0c7..b742382d730c86a699591df285df0f9df731d7a7 100644 (file)
@@ -299,7 +299,7 @@ Mixer_UI::show_window ()
                        ms->parameter_changed (X_("mixer-element-visibility"));
                }
        }
-       
+
        /* force focus into main area */
        scroller_base.grab_focus ();
 
@@ -343,44 +343,44 @@ Mixer_UI::add_strips (RouteList& routes)
 
                for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
                        boost::shared_ptr<Route> route = (*x);
-                       
+
                        if (route->is_auditioner()) {
                                continue;
                        }
-                       
+
                        if (route->is_monitor()) {
-                               
+
                                if (!_monitor_section) {
                                        _monitor_section = new MonitorSection (_session);
-                                       
+
                                        XMLNode* mnode = ARDOUR_UI::instance()->tearoff_settings (X_("monitor-section"));
                                        if (mnode) {
                                                _monitor_section->tearoff().set_state (*mnode);
                                        }
                                }
-                               
+
                                out_packer.pack_end (_monitor_section->tearoff(), false, false);
                                _monitor_section->set_session (_session);
                                _monitor_section->tearoff().show_all ();
-                               
+
                                route->DropReferences.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::monitor_section_going_away, this), gui_context());
-                               
+
                                /* no regular strip shown for control out */
-                               
+
                                continue;
                        }
-                       
+
                        strip = new MixerStrip (*this, _session, route);
                        strips.push_back (strip);
 
                        UIConfiguration::instance().get_default_narrow_ms() ? _strip_width = Narrow : _strip_width = Wide;
-                       
+
                        if (strip->width_owner() != strip) {
                                strip->set_width_enum (_strip_width, this);
                        }
-                       
+
                        show_strip (strip);
-                       
+
                        TreeModel::Row row = *(track_model->insert(insert_iter));
                        row[track_columns.text] = route->name();
                        row[track_columns.visible] = strip->route()->is_master() ? true : strip->marked_for_display();
@@ -390,9 +390,9 @@ Mixer_UI::add_strips (RouteList& routes)
                        if (!from_scratch) {
                                _selection.add (strip);
                        }
-                       
+
                        route->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::strip_property_changed, this, _1, strip), gui_context());
-                       
+
                        strip->WidthChanged.connect (sigc::mem_fun(*this, &Mixer_UI::strip_width_changed));
                        strip->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_button_release_event), strip));
                }
@@ -402,7 +402,7 @@ Mixer_UI::add_strips (RouteList& routes)
 
        no_track_list_redisplay = false;
        track_display.set_model (track_model);
-       
+
        sync_order_keys_from_treeview ();
        redisplay_track_list ();
 }
@@ -442,11 +442,11 @@ Mixer_UI::remove_strip (MixerStrip* strip)
        TreeModel::Children rows = track_model->children();
        TreeModel::Children::iterator ri;
        list<MixerStrip *>::iterator i;
-       
+
        if ((i = find (strips.begin(), strips.end(), strip)) != strips.end()) {
                strips.erase (i);
        }
-       
+
        for (ri = rows.begin(); ri != rows.end(); ++ri) {
                if ((*ri)[track_columns.strip] == strip) {
                         PBD::Unwinder<bool> uw (_route_deletion_in_progress, true);
@@ -464,7 +464,7 @@ Mixer_UI::reset_remote_control_ids ()
        }
 
        TreeModel::Children rows = track_model->children();
-       
+
        if (rows.empty()) {
                return;
        }
@@ -479,11 +479,11 @@ Mixer_UI::reset_remote_control_ids ()
        for (ri = rows.begin(); ri != rows.end(); ++ri) {
 
                /* skip two special values */
-               
+
                if (rid == Route::MasterBusRemoteControlID) {
                        rid++;
                }
-               
+
                if (rid == Route::MonitorBusRemoteControlID) {
                        rid++;
                }
@@ -492,14 +492,14 @@ Mixer_UI::reset_remote_control_ids ()
                bool visible = (*ri)[track_columns.visible];
 
                if (!route->is_master() && !route->is_monitor()) {
-                       
+
                        uint32_t new_rid = (visible ? rid : invisible_key--);
-                       
+
                        if (new_rid != route->remote_control_id()) {
-                               route->set_remote_control_id_explicit (new_rid);        
+                               route->set_remote_control_id_explicit (new_rid);
                                rid_change = true;
                        }
-                       
+
                        if (visible) {
                                rid++;
                        }
@@ -520,7 +520,7 @@ Mixer_UI::sync_order_keys_from_treeview ()
        }
 
        TreeModel::Children rows = track_model->children();
-       
+
        if (rows.empty()) {
                return;
        }
@@ -550,10 +550,10 @@ Mixer_UI::sync_order_keys_from_treeview ()
                        uint32_t new_rid = (visible ? rid : invisible_key--);
 
                        if (new_rid != route->remote_control_id()) {
-                               route->set_remote_control_id_explicit (new_rid);        
+                               route->set_remote_control_id_explicit (new_rid);
                                rid_change = true;
                        }
-                       
+
                        if (visible) {
                                rid++;
                        }
@@ -610,7 +610,7 @@ Mixer_UI::sync_treeview_from_order_keys ()
        neworder.assign (sorted_routes.size(), 0);
 
        uint32_t n = 0;
-       
+
        for (OrderKeySortedRoutes::iterator sr = sorted_routes.begin(); sr != sorted_routes.end(); ++sr, ++n) {
 
                neworder[n] = sr->old_display_order;
@@ -640,7 +640,7 @@ Mixer_UI::follow_editor_selection ()
 
        _following_editor_selection = true;
        _selection.block_routes_changed (true);
-       
+
        TrackSelection& s (PublicEditor::instance().get_selection().tracks);
 
        _selection.clear_routes ();
@@ -690,13 +690,13 @@ Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip)
                        } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::RangeSelectModifier)) {
 
                                if (!_selection.selected(strip)) {
-                               
+
                                        /* extend selection */
-                                       
+
                                        vector<MixerStrip*> tmp;
                                        bool accumulate = false;
                                        bool found_another = false;
-                                       
+
                                        tmp.push_back (strip);
 
                                        for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
@@ -845,15 +845,15 @@ Mixer_UI::update_track_visibility ()
 
        {
                Unwinder<bool> uw (no_track_list_redisplay, true);
-               
+
                for (i = rows.begin(); i != rows.end(); ++i) {
                        MixerStrip *strip = (*i)[track_columns.strip];
                        (*i)[track_columns.visible] = strip->marked_for_display ();
                }
-               
+
                /* force route order keys catch up with visibility changes
                 */
-               
+
                sync_order_keys_from_treeview ();
        }
 
@@ -926,20 +926,20 @@ Mixer_UI::set_all_strips_visibility (bool yn)
 
        {
                Unwinder<bool> uw (no_track_list_redisplay, true);
-               
+
                for (i = rows.begin(); i != rows.end(); ++i) {
-                       
+
                        TreeModel::Row row = (*i);
                        MixerStrip* strip = row[track_columns.strip];
-                       
+
                        if (strip == 0) {
                                continue;
                        }
-                       
+
                        if (strip->route()->is_master() || strip->route()->is_monitor()) {
                                continue;
                        }
-                       
+
                        (*i)[track_columns.visible] = yn;
                }
        }
@@ -956,33 +956,33 @@ Mixer_UI::set_all_audio_midi_visibility (int tracks, bool yn)
 
        {
                Unwinder<bool> uw (no_track_list_redisplay, true);
-               
+
                for (i = rows.begin(); i != rows.end(); ++i) {
                        TreeModel::Row row = (*i);
                        MixerStrip* strip = row[track_columns.strip];
-                       
+
                        if (strip == 0) {
                                continue;
                        }
-                       
+
                        if (strip->route()->is_master() || strip->route()->is_monitor()) {
                                continue;
                        }
-                       
+
                        boost::shared_ptr<AudioTrack> at = strip->audio_track();
                        boost::shared_ptr<MidiTrack> mt = strip->midi_track();
-                       
+
                        switch (tracks) {
                        case 0:
                                (*i)[track_columns.visible] = yn;
                                break;
-                               
+
                        case 1:
                                if (at) { /* track */
                                        (*i)[track_columns.visible] = yn;
                                }
                                break;
-                               
+
                        case 2:
                                if (!at && !mt) { /* bus */
                                        (*i)[track_columns.visible] = yn;
@@ -1077,7 +1077,7 @@ Mixer_UI::redisplay_track_list ()
 {
        TreeModel::Children rows = track_model->children();
        TreeModel::Children::iterator i;
-       
+
        if (no_track_list_redisplay) {
                return;
        }
@@ -1176,7 +1176,7 @@ Mixer_UI::initial_track_display ()
                track_model->clear ();
                add_strips (copy);
        }
-       
+
        _session->sync_order_keys ();
 
        redisplay_track_list ();
@@ -1792,7 +1792,7 @@ Mixer_UI::on_key_release_event (GdkEventKey* ev)
        }
 
        KeyboardKey k (ev->state, ev->keyval);
-       
+
        if (bindings.activate (k, Bindings::Release)) {
                return true;
        }
@@ -1935,7 +1935,7 @@ Mixer_UI::update_title ()
 {
        if (_session) {
                string n;
-               
+
                if (_session->snap_name() != _session->name()) {
                        n = _session->snap_name ();
                } else {
@@ -1945,14 +1945,14 @@ Mixer_UI::update_title ()
                if (_session->dirty ()) {
                        n = "*" + n;
                }
-               
+
                WindowTitle title (n);
                title += S_("Window|Mixer");
                title += Glib::get_application_name ();
                set_title (title.get_string());
 
        } else {
-               
+
                WindowTitle title (S_("Window|Mixer"));
                title += Glib::get_application_name ();
                set_title (title.get_string());
@@ -2015,7 +2015,7 @@ Mixer_UI::toggle_midi_input_active (bool flip_others)
                        onoff = !mt->input_active();
                }
        }
-       
+
        _session->set_exclusive_input_active (rl, onoff, flip_others);
 }
 
index ad5b799627b554ca28153ebf39ee12259da27b81..5f71a79b6f4fea7bdfc0aea2963258c6d81984d7 100644 (file)
@@ -237,7 +237,7 @@ void
 MonitorSelectorWindow::io_name_changed (void*)
 {
        ENSURE_GUI_THREAD (*this, &MonitorSelectorWindow::io_name_changed, src)
-               
+
        std::string title;
 
        if (!_selector.find_inputs_for_io_outputs()) {
index f5bba63446df9961dd46867cf1c56a6569545000..23b64eee28a18f9c178973384977d40b4de86104 100644 (file)
@@ -93,7 +93,7 @@ MonoPanner::MonoPanner (boost::shared_ptr<ARDOUR::PannerShell> p)
 
 MonoPanner::~MonoPanner ()
 {
-       
+
 }
 
 void
index 4d5f1ffec0a64b7f547aca9cd6313ae0fc987812..c5843f756c5aadb541552181324db485c52b1a00 100644 (file)
@@ -58,7 +58,7 @@ class MonoPanner : public PannerInterface
   private:
        PannerEditor* editor ();
        boost::shared_ptr<ARDOUR::PannerShell> _panner_shell;
-       
+
         boost::shared_ptr<PBD::Controllable> position_control;
         PBD::ScopedConnectionList panvalue_connections;
         PBD::ScopedConnectionList panshell_connections;
index cf8c57a8e1be6db2e4e0721617758b24bbef1534..134c812822159664f97a6080e75b4e7de2a71931 100644 (file)
@@ -38,12 +38,12 @@ MonoPannerEditor::MonoPannerEditor (MonoPanner* p)
        t->set_spacings (6);
 
        int n = 0;
-       
+
        t->attach (*manage (left_aligned_label (_("Left"))), 0, 1, n, n + 1);
        t->attach (_left, 1, 2, n, n + 1);
        t->attach (*manage (left_aligned_label (_("%"))), 2, 3, n, n + 1);
        ++n;
-       
+
        t->attach (*manage (left_aligned_label (_("Right"))), 0, 1, n, n + 1);
        t->attach (_right, 1, 2, n, n + 1);
        t->attach (*manage (left_aligned_label (_("%"))), 2, 3, n, n + 1);
@@ -78,7 +78,7 @@ MonoPannerEditor::update_editor ()
        if (!_panner) {
                return;
        }
-       
+
        float const v = _panner->get_controllable()->get_value();
 
        _ignore_changes = true;
@@ -110,7 +110,7 @@ MonoPannerEditor::right_changed ()
        }
 
        float const v = _right.get_value () / 100;
-       
+
        _ignore_changes = true;
        _left.set_value (100 * (1 - v));
        _panner->get_controllable()->set_value (v);
index eb4e857e9645a33d07f5a1b70affbd1d1496ea29..f8b12cf25c3bc2118e34158dfeb2f7c43b2cb00c 100644 (file)
@@ -33,7 +33,7 @@ private:
        void update_editor ();
        void left_changed ();
        void right_changed ();
-       
+
        MonoPanner* _panner;
        Gtk::SpinButton _left;
        Gtk::SpinButton _right;
index dc14d60086b516be04747520b86f19635ee6bfa5..68ad19ebb7243f5f72a203bb20f502e7a79db13f 100644 (file)
@@ -147,7 +147,7 @@ MouseCursors::set_cursor_set (const std::string& name)
        }
 
        /* these will throw exceptions if their images cannot be found.
-       
+
           the default hotspot coordinates will be overridden by any
           data found by Gtkmm2ext::Cursors::load_cursor_info(). the values
           here from the set of cursors used by Ardour; new cursor/icon
index 5e40a84c4cfd7edad845d920721be173aca0be00..8cd98ac32c9befb51d978c503bfc8d4bfcbab340 100644 (file)
@@ -79,7 +79,7 @@ public:
           is actually a valid value for a Gdk::Cursor - it indicates
           "use the parent window's cursor"
        */
-       
+
        static bool is_invalid (Gdk::Cursor* c) { if (!_invalid) { create_invalid(); } return c == _invalid; }
        static Gdk::Cursor* invalid_cursor() { if (!_invalid) { create_invalid(); } return _invalid; }
 
index a9fe3d42245ad7e867073fe7c2fc540ffd38168d..85b847ea999da7d58dde3f0fb083c1c39a6b8629 100644 (file)
@@ -40,7 +40,7 @@ char* argv[256];
        // Essential!!  Make sure that any files used by Ardour
        //              will be created or opened in BINARY mode!
        _fmode = O_BINARY;
-       
+
        GetModuleFileName (NULL, (LPSTR)szPathToProgram, (DWORD)sizeof(szPathToProgram));
        argv[0] = new char[(strlen(szPathToProgram) + 1)];
 
index c536bd29bb0a1508d38d194d50834cc4571099d7..a8c35f250fb018808874ba7446086566b77baed0 100644 (file)
@@ -64,11 +64,11 @@ OptionEditorComponent::add_widgets_to_page (OptionEditorPage* p, Gtk::Widget* wa
        if (!_note.empty ()) {
                ++m;
        }
-       
+
        p->table.resize (m, 3);
        p->table.attach (*wa, 1, 2, n, n + 1, FILL);
        p->table.attach (*wb, 2, 3, n, n + 1, FILL | EXPAND);
-       
+
        maybe_add_note (p, n + 1);
 }
 
@@ -236,7 +236,7 @@ BoolComboOption::BoolComboOption (
        _combo->append_text (f);
        /* and option 1 is the true */
        _combo->append_text (t);
-       
+
        _combo->signal_changed().connect (sigc::mem_fun (*this, &BoolComboOption::changed));
 }
 
@@ -263,9 +263,9 @@ BoolComboOption::set_sensitive (bool yn)
 {
        _combo->set_sensitive (yn);
 }
-       
 
-       
+
+
 FaderOption::FaderOption (string const & i, string const & n, sigc::slot<gain_t> g, sigc::slot<bool, gain_t> s)
        : Option (i, n)
        , _db_adjustment (gain_to_slider_position_with_max (1.0, Config->get_max_gain()), 0, 1, 0.01, 0.1)
index 13b0285c32a0c08c3aff73c67a36bb0341714615..67835b291a7460cfe269fe382e512f03f3fc15ce 100644 (file)
@@ -78,7 +78,7 @@ public:
 
 private:
        void maybe_add_note (OptionEditorPage *, int);
-       
+
        std::string _note;
 };
 
@@ -625,7 +625,7 @@ public:
 
 private:
        void selection_changed ();
-       
+
        sigc::slot<std::string> _get; ///< slot to get the configuration variable's value
        sigc::slot<bool, std::string> _set;  ///< slot to set the configuration variable's value
        Gtk::FileChooserButton _file_chooser;
@@ -654,13 +654,13 @@ public:
 
        void add_option (std::string const &, OptionEditorComponent *);
        void add_page (std::string const &, Gtk::Widget& page_widget);
-       
+
        void set_current_page (std::string const &);
 
 protected:
 
        virtual void parameter_changed (std::string const &);
-       
+
        PBD::Configuration* _config;
 
 private:
index a18c08352873b1474cd13ff82fe68cea4b1fe4d1..3e79c355365dd9dbedd56279f0fa8f1f019f8e1c 100644 (file)
@@ -45,7 +45,7 @@ public:
 private:
        bool _dragging;
 };
-       
+
 
 /** Parent class for some panner UI classes that contains some common code */
 class PannerInterface : public Gtk::DrawingArea, public PBD::Destructible
@@ -65,7 +65,7 @@ protected:
        virtual void set_tooltip () = 0;
 
        void value_change ();
-       
+
         bool on_enter_notify_event (GdkEventCrossing *);
         bool on_leave_notify_event (GdkEventCrossing *);
        bool on_key_release_event  (GdkEventKey *);
index 96cd2f5ebc8eb808318cc7d9c983efa02faea6fd..c8d003f845dc91bc09a51c17cf115e8ea3fc7156 100644 (file)
@@ -62,7 +62,7 @@ PatchChange::PatchChange(MidiRegionView&                   region,
                UIConfiguration::instance().color_mod ("midi patch change fill", "midi patch change fill"),
                ArdourCanvas::Duple (x, y),
                true);
-       
+
        CANVAS_DEBUG_NAME (_flag, text);
 
        _flag->Event.connect (sigc::mem_fun (*this, &PatchChange::event_handler));
@@ -98,12 +98,12 @@ PatchChange::initialize_popup_menus()
                     ++bank) {
                        Glib::RefPtr<Glib::Regex> underscores = Glib::Regex::create("_");
                        std::string replacement(" ");
-                       
+
                        Gtk::Menu& patch_bank_menu = *manage(new Gtk::Menu());
-                       
+
                        const PatchNameList& patches = (*bank)->patch_name_list();
                        Gtk::Menu::MenuList& patch_menus = patch_bank_menu.items();
-               
+
                        for (PatchNameList::const_iterator patch = patches.begin();
                             patch != patches.end();
                             ++patch) {
@@ -131,13 +131,13 @@ PatchChange::initialize_popup_menus()
 
                const PatchNameList& patches = patch_banks.front()->patch_name_list();
                Gtk::Menu::MenuList& patch_menus = _popup.items();
-               
+
                for (PatchNameList::const_iterator patch = patches.begin();
                     patch != patches.end();
                     ++patch) {
                        std::string name = (*patch)->name();
                        boost::replace_all (name, "_", " ");
-                       
+
                        patch_menus.push_back (
                                Gtk::Menu_Helpers::MenuElem (
                                        name,
@@ -158,7 +158,7 @@ PatchChange::event_handler (GdkEvent* ev)
 {
        /* XXX: icky dcast */
        Editor* e = dynamic_cast<Editor*> (&_region.get_time_axis_view().editor());
-       
+
        if (!e->internal_editing()) {
                return false;
        }
@@ -176,7 +176,7 @@ PatchChange::event_handler (GdkEvent* ev)
 
                                _region.edit_patch_change (this);
                                return true;
-                               
+
                        } else if (ev->button.button == 1) {
                                e->drags()->set (new PatchChangeDrag (e, this, &_region), ev);
                                return true;
index 519e0df240aca175422e25697b234760e170acb3..1c0d824321b5c86af0c879f39f043834e2c90694 100644 (file)
@@ -62,7 +62,7 @@ PatchChangeDialog::PatchChangeDialog (
        int r = 0;
 
        if (_time_converter) {
-               
+
                l = manage (left_aligned_label (_("Time")));
                t->attach (*l, 0, 1, r, r + 1);
                t->attach (_time, 1, 2, r, r + 1);
@@ -84,7 +84,7 @@ PatchChangeDialog::PatchChangeDialog (
        t->attach (*l, 0, 1, r, r + 1);
        t->attach (_patch_combo, 1, 2, r, r + 1);
        ++r;
-       
+
        _patch_combo.signal_changed().connect (sigc::mem_fun (*this, &PatchChangeDialog::patch_combo_changed));
 
        l = manage (left_aligned_label (_("Channel")));
@@ -180,7 +180,7 @@ void
 PatchChangeDialog::set_active_bank_combo ()
 {
        _current_patch_bank.reset ();
-       
+
        boost::shared_ptr<MIDI::Name::ChannelNameSet> cns = _info.get_patches (_channel.get_value_as_int() - 1);
 
        if (!cns) {
@@ -215,7 +215,7 @@ PatchChangeDialog::bank_combo_changed ()
        if (_ignore_signals) {
                return;
        }
-       
+
        _current_patch_bank.reset ();
 
        boost::shared_ptr<MIDI::Name::ChannelNameSet> cns = _info.get_patches (_channel.get_value_as_int() - 1);
@@ -278,7 +278,7 @@ PatchChangeDialog::set_active_patch_combo ()
                _ignore_signals = false;
                return;
        }
-       
+
        const MIDI::Name::PatchNameList& patches = _current_patch_bank->patch_name_list ();
        for (MIDI::Name::PatchNameList::const_iterator j = patches.begin(); j != patches.end(); ++j) {
                string n = (*j)->name ();
@@ -296,7 +296,7 @@ PatchChangeDialog::set_active_patch_combo ()
        _ignore_signals = true;
        _patch_combo.set_active (-1);
        _ignore_signals = false;
-}      
+}
 
 /** Set _program from the current state of _patch_combo */
 void
index 8b2e49770db27346df015800eb1450f06032ad74..043f6c546e95a61d0ddf161b4faab79cf5671665 100644 (file)
@@ -467,7 +467,7 @@ PianoRollHeader::on_motion_notify_event (GdkEventMotion* ev)
        if (_dragging) {
 
                if ( false /*editor().current_mouse_mode() == Editing::MouseRange*/ ) {   //ToDo:  fix this.  this mode is buggy, and of questionable utility anyway
-                       
+
                        /* select note range */
 
                        if (Keyboard::no_modifiers_active (ev->state)) {
@@ -480,9 +480,9 @@ PianoRollHeader::on_motion_notify_event (GdkEventMotion* ev)
                        if (_clicked_note != NO_MIDI_NOTE && _clicked_note != note) {
                                _active_notes[_clicked_note] = false;
                                send_note_off(_clicked_note);
-                               
+
                                _clicked_note = note;
-                               
+
                                if (!_active_notes[note]) {
                                        _active_notes[note] = true;
                                        send_note_on(note);
@@ -511,12 +511,12 @@ PianoRollHeader::on_button_press_event (GdkEventButton* ev)
        } else if (ev->button == 1 && note >= 0 && note < 128) {
                add_modal_grab();
                _dragging = true;
-               
+
                if (!_active_notes[note]) {
                        _active_notes[note] = true;
                        _clicked_note = note;
                        send_note_on(note);
-                       
+
                        invalidate_note_range(note, note);
                } else {
                        reset_clicked_note(note);
@@ -540,7 +540,7 @@ PianoRollHeader::on_button_release_event (GdkEventButton* ev)
                } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::RangeSelectModifier)) {
                        ExtendNoteSelection (note); // EMIT SIGNAL
                }
-               
+
        } else {
 
                if (_dragging) {
index 35c90f4160857cdcabe28d80f96ef7af26d13ef3..ecea85f657f67e91abf18eac91648da32646db6f 100644 (file)
@@ -112,7 +112,7 @@ _pingback (void *arg)
 
        curl_global_init (CURL_GLOBAL_NOTHING);
        c = curl_easy_init ();
-       
+
        curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, curl_write_data);
        curl_easy_setopt (c, CURLOPT_WRITEDATA, &return_str);
        char errbuf[CURL_ERROR_SIZE];
@@ -219,7 +219,7 @@ _pingback (void *arg)
                        std::cerr << "Announcement string is too long (probably behind a proxy)." << std::endl;
                } else {
                        std::cerr << "Announcement is: " << return_str << std::endl;
-                       
+
                        //write announcements to local file, even if the
                        //announcement is empty
 
index cdc144d1b7c7cde680a5acef4ad778da5d4c77ca..35a64f38dd79b4fb485ead5e4d082246e152cf67 100644 (file)
@@ -118,7 +118,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
        for (TrackPlaylistMap::iterator x = trpl_map.begin(); x != trpl_map.end(); ++x) {
 
                boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (_session->route_by_id (x->first));
-               
+
                /* legacy sessions stored the diskstream ID as the original
                 * playlist owner. so try there instead.
                 */
index 35ba31eeb269a1224a65877593306a0cc7f7bb95..3115f54c414e9f336ef6642252f19850008168ff 100644 (file)
@@ -330,7 +330,7 @@ PluginEqGui::run_impulse_analysis()
 {
        /* Allocate some thread-local buffers so that Plugin::connect_and_run can use them */
        ARDOUR_UI::instance()->get_process_buffers ();
-       
+
        uint32_t inputs  = _plugin->get_info()->n_inputs.n_audio();
        uint32_t outputs = _plugin->get_info()->n_outputs.n_audio();
 
index f2a6ae2a2dc614deb177fe4a3b33688194011caf..8aff9c4252aa4212d8473e30ac4fa98f47a8ec08 100644 (file)
@@ -65,7 +65,7 @@ PluginSelector::PluginSelector (PluginManager& mgr)
        : ArdourDialog (_("Plugin Manager"), true, false)
        , filter_button (Stock::CLEAR)
        , manager (mgr)
-       
+
 {
        set_name ("PluginSelectorWindow");
        add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
@@ -340,7 +340,7 @@ PluginSelector::refiller (const PluginInfoList& plugs, const::std::string& filte
                                newrow[plugin_columns.audio_ins] = buf;
                                snprintf (buf, sizeof(buf), "%d", (*i)->n_inputs.n_midi());
                                newrow[plugin_columns.midi_ins] = buf;
-                               
+
                                snprintf (buf, sizeof(buf), "%d", (*i)->n_outputs.n_audio());
                                newrow[plugin_columns.audio_outs] = buf;
                                snprintf (buf, sizeof(buf), "%d", (*i)->n_outputs.n_midi());
index ed73e50b7c67f14a13e819f5e10284582cec7ccb..37c01462b28348e631edeca709bb8394cbe82744 100644 (file)
@@ -100,7 +100,7 @@ PluginUIWindow::PluginUIWindow (
                case ARDOUR::Windows_VST:
                        have_gui = create_windows_vst_editor (insert);
                        break;
-                       
+
                case ARDOUR::LXVST:
                        have_gui = create_lxvst_editor (insert);
                        break;
@@ -662,7 +662,7 @@ bool
 PlugUIBase::bypass_button_release (GdkEventButton*)
 {
        bool view_says_bypassed = (bypass_button.active_state() != 0);
-       
+
        if (view_says_bypassed != insert->active()) {
                if (view_says_bypassed) {
                        insert->activate ();
@@ -712,7 +712,7 @@ PlugUIBase::toggle_description()
                description_expander.add(*label);
                description_expander.show_all();
        }
-       
+
        if (!description_expander.get_expanded()) {
                description_expander.remove();
        }
index 4aed3648c7a4953413420fb343d7985568f158e5..41f4ef39f1d01bbf1721e8b7a5423e4ca3f8f8dd 100644 (file)
@@ -145,7 +145,7 @@ class PlugUIBase : public virtual sigc::trackable, public PBD::ScopedConnectionL
        ArdourButton automation_write_all_button;
        /** a button which sets all controls' automation setting to Touch */
        ArdourButton automation_touch_all_button;
-       
+
        void set_latency_label ();
 
        LatencyGUI* latency_gui;
index d41b5f1a06990cd40452867da4534941bc8d096e..b29e117f1fa3afe774572b90c605de86ef34a2fd 100644 (file)
@@ -450,7 +450,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
                                                sub.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::add_channel_proxy), w, *i)));
                                        }
                                }
-                               
+
                                /* Now add other ones */
                                for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) {
                                        if (!should_show (*i)) {
@@ -497,12 +497,12 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
                                /* we're looking just at bundles, or our bundle has only one channel, so just offer
                                   to disassociate all on the bundle.
                                */
-                               
+
                                snprintf (buf, sizeof (buf), _("%s all"), disassociation_verb().c_str());
                                sub.push_back (
                                        MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::disassociate_all_on_bundle), w, dim))
                                        );
-                                       
+
                        } else if (c != 0) {
 
                                if (bc[dim].channel != -1) {
@@ -543,7 +543,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
 
        items.push_back (MenuElem (_("Flip"), sigc::mem_fun (*this, &PortMatrix::flip)));
        items.back().set_sensitive (can_flip ());
-       
+
        _menu->popup (1, t);
 }
 
@@ -634,7 +634,7 @@ PortMatrix::setup_global_ports_proxy ()
        /* Avoid a deadlock by calling this in an idle handler: see IOSelector::io_changed_proxy
           for a discussion.
        */
-               
+
        Glib::signal_idle().connect_once (sigc::mem_fun (*this, &PortMatrix::setup_global_ports));
 }
 
@@ -935,7 +935,7 @@ PortMatrix::visible_ports (int d) const
           the TOP_TO_RIGHT arrangement we reverse the order of the vertical
           tabs in setup_notebooks ().
        */
-       
+
        int n = 0;
        if (d == _row_index) {
                if (_arrangement == LEFT_TO_BOTTOM) {
@@ -1007,11 +1007,11 @@ PortMatrix::update_tab_highlighting ()
        if (!_session) {
                return;
        }
-       
+
        for (int i = 0; i < 2; ++i) {
 
                Gtk::Notebook* notebook = row_index() == i ? &_vnotebook : &_hnotebook;
-               
+
                PortGroupList const * gl = ports (i);
                int p = 0;
                for (PortGroupList::List::const_iterator j = gl->begin(); j != gl->end(); ++j) {
@@ -1166,7 +1166,7 @@ pair<int, int>
 PortMatrix::check_flip () const
 {
        /* Look for the row's port group name in the columns */
-       
+
        int new_column = 0;
        boost::shared_ptr<const PortGroup> r = visible_ports (_row_index);
        PortGroupList::List::const_iterator i = _ports[_column_index].begin();
@@ -1180,7 +1180,7 @@ PortMatrix::check_flip () const
        }
 
        /* Look for the column's port group name in the rows */
-       
+
        int new_row = 0;
        boost::shared_ptr<const PortGroup> c = visible_ports (_column_index);
        i = _ports[_row_index].begin();
index f2c4ce146c55775a4a0b7a0b840f54c281ad9ebb..cf591f8ff8494058f4d93ea5256db5269889e31a 100644 (file)
@@ -162,7 +162,7 @@ PortMatrixColumnLabels::render (cairo_t* cr)
                                        (*i)->bundle,
                                        (*i)->bundle->type_channel_to_overall (_matrix->type (), j)
                                        );
-                               
+
                                render_channel_name (cr, background_colour (), c, x, 0, bc);
                                x += grid_spacing();
                        }
@@ -504,7 +504,7 @@ PortMatrixColumnLabels::motion (double x, double y)
                        if (!_matrix->should_show (w.bundle->channel_type (i))) {
                                continue;
                        }
-                       
+
                        ARDOUR::BundleChannel const bc (w.bundle, i);
                        n.push_back (PortMatrixNode (ARDOUR::BundleChannel (), bc));
                }
index 23fda6e4842f6e4b70ba8c6d194fff8187109f87..77995489a313a407aea439a1112337d551877705 100644 (file)
@@ -137,7 +137,7 @@ PortMatrixGrid::render (cairo_t* cr)
                cairo_line_to (cr, _width, y);
                cairo_stroke (cr);
        }
-       
+
        /* ASSOCIATION INDICATORS and NON-CONNECTABLE INDICATORS */
 
        /* we draw a grey square in a matrix box if the two ports that intersect at that box
@@ -230,7 +230,7 @@ PortMatrixGrid::render (cairo_t* cr)
                                                */
                                                draw_non_connectable_indicator (cr, x, y);
                                        }
-                                       
+
                                        x += grid_spacing();
                                }
 
index 8ed464954f874454dffc7fe511fcfcbb7303a51f..507e9fc254c24d43e79b7e9b4ce07f14bd2c711b 100644 (file)
@@ -123,7 +123,7 @@ PortMatrixRowLabels::render (cairo_t* cr)
                                        (*i)->bundle,
                                        (*i)->bundle->type_channel_to_overall (_matrix->type (), j)
                                        );
-                               
+
                                render_channel_name (cr, background_colour (), c, 0, y, bc);
                                y += grid_spacing();
                                ++M;
@@ -132,7 +132,7 @@ PortMatrixRowLabels::render (cairo_t* cr)
                        if (N == 0) {
                                y += grid_spacing ();
                        }
-                       
+
                } else {
                        y += grid_spacing();
                }
index 63aa5aa76502e7da4d336379212c166fe387bb3e..b72fcbe276f605967e149ad648ebc1ea9814f37e 100644 (file)
@@ -118,7 +118,7 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
        , _output_icon(false)
 {
        _vbox.show ();
-       
+
        _button.set_distinct_led_click (true);
        _button.set_fallthrough_to_parent(true);
        _button.set_led_left (true);
@@ -155,7 +155,7 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
 
                set<Evoral::Parameter> p = _processor->what_can_be_automated ();
                for (set<Evoral::Parameter>::iterator i = p.begin(); i != p.end(); ++i) {
-                       
+
                        std::string label = _processor->describe_parameter (*i);
 
                        if (boost::dynamic_pointer_cast<Send> (_processor)) {
@@ -165,7 +165,7 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
                        }
 
                        Control* c = new Control (_processor->automation_control (*i), label);
-                       
+
                        _controls.push_back (c);
 
                        if (boost::dynamic_pointer_cast<Amp> (_processor) == 0) {
@@ -458,7 +458,7 @@ ProcessorEntry::build_controls_menu ()
        items.push_back (
                MenuElem (_("Show All Controls"), sigc::mem_fun (*this, &ProcessorEntry::show_all_controls))
                );
-               
+
        items.push_back (
                MenuElem (_("Hide All Controls"), sigc::mem_fun (*this, &ProcessorEntry::hide_all_controls))
                );
@@ -466,7 +466,7 @@ ProcessorEntry::build_controls_menu ()
        if (!_controls.empty ()) {
                items.push_back (SeparatorElem ());
        }
-       
+
        for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
                items.push_back (CheckMenuElem ((*i)->name ()));
                Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
@@ -538,7 +538,7 @@ ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string
                //c->Changed.connect (_connection, MISSING_INVALIDATOR, boost::bind (&Control::control_changed, this), gui_context ());
 
        } else {
-               
+
                _slider.set_name ("ProcessorControlSlider");
                _slider.set_text (_name);
 
@@ -569,7 +569,7 @@ ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string
                _adjustment.set_step_increment (smallstep);
                _adjustment.set_page_increment (largestep);
                _slider.set_default_value (normal);
-               
+
                _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 ());
@@ -578,7 +578,7 @@ ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string
        // yuck, do we really need to do this?
        // according to c404374 this is only needed for send automation
        timer_connection = Timers::rapid_connect (sigc::mem_fun (*this, &Control::control_changed));
-       
+
        control_changed ();
        set_tooltip ();
 
@@ -617,7 +617,7 @@ ProcessorEntry::Control::slider_adjusted ()
        if (_ignore_ui_adjustment) {
                return;
        }
-       
+
        boost::shared_ptr<AutomationControl> c = _control.lock ();
 
        if (!c) {
@@ -657,7 +657,7 @@ ProcessorEntry::Control::control_changed ()
        if (c->toggled ()) {
 
                _button.set_active (c->get_value() > 0.5);
-               
+
        } else {
                // as long as rapid timers are used, only update the tooltip
                // if the value has changed.
@@ -667,7 +667,7 @@ ProcessorEntry::Control::control_changed ()
                        set_tooltip ();
                }
        }
-       
+
        _ignore_ui_adjustment = false;
 }
 
@@ -700,7 +700,7 @@ ProcessorEntry::Control::set_visible (bool v)
        } else {
                box.hide ();
        }
-       
+
        _visible = v;
 }
 
@@ -1343,7 +1343,7 @@ ProcessorBox::processor_operation (ProcessorOperation op)
 
        if ( (op == ProcessorsDelete) && targets.empty() )
                return false;  //nothing to delete.  return false so the editor-mixer, because the user was probably intending to delete something in the editor
-       
+
        switch (op) {
        case ProcessorsSelectAll:
                processor_display.select_all ();
@@ -1398,7 +1398,7 @@ ProcessorBox::processor_operation (ProcessorOperation op)
        default:
                break;
        }
-       
+
        return true;
 }
 
@@ -1441,7 +1441,7 @@ ProcessorBox::processor_button_press_event (GdkEventButton *ev, ProcessorEntry*
        } else if (Keyboard::is_context_menu_event (ev)) {
 
                show_processor_menu (ev->time);
-               
+
                ret = true;
 
        } else if (processor && ev->button == 1 && selected) {
@@ -1782,7 +1782,7 @@ ProcessorBox::maybe_add_processor_to_ui_list (boost::weak_ptr<Processor> w)
        if (ui_xml) {
                wp->set_state (*ui_xml);
        }
-       
+
         void* existing_ui = p->get_ui ();
 
         if (existing_ui) {
@@ -1830,7 +1830,7 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p)
        }
 
        boost::shared_ptr<PluginInsert> plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (processor);
-       
+
        ProcessorEntry* e = 0;
        if (plugin_insert) {
                e = new PluginInsertProcessorEntry (this, plugin_insert, _width);
@@ -1841,7 +1841,7 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p)
        boost::shared_ptr<Send> send = boost::dynamic_pointer_cast<Send> (processor);
        boost::shared_ptr<PortInsert> ext = boost::dynamic_pointer_cast<PortInsert> (processor);
        boost::shared_ptr<UnknownProcessor> stub = boost::dynamic_pointer_cast<UnknownProcessor> (processor);
-       
+
        //faders and meters are not deletable, copy/paste-able, so they shouldn't be selectable
        if (!send && !plugin_insert && !ext && !stub)
                e->set_selectable(false);
@@ -2220,11 +2220,11 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
                                continue;
 
                        } else if (type->value() == "intsend") {
-                               
+
                                /* aux sends are OK, but those used for
                                 * other purposes, are not.
                                 */
-                               
+
                                assert (role);
 
                                if (role->value() != "Aux") {
@@ -2253,7 +2253,7 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
                                Send* s = new Send (*_session, _route->pannable(), _route->mute_master());
 
                                IOProcessor::prepare_for_reset (n, s->name());
-                               
+
                                 if (s->set_state (n, Stateful::loading_state_version)) {
                                         delete s;
                                         return;
@@ -2279,13 +2279,13 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
 
                                XMLNode n (**niter);
                                PortInsert* pi = new PortInsert (*_session, _route->pannable (), _route->mute_master ());
-                               
+
                                IOProcessor::prepare_for_reset (n, pi->name());
-                               
+
                                if (pi->set_state (n, Stateful::loading_state_version)) {
                                        return;
                                }
-                               
+
                                p.reset (pi);
 
                        } else {
@@ -3004,7 +3004,7 @@ ProcessorBox::entry_gui_object_state (ProcessorEntry* entry)
        }
 
        GUIObjectState& st = _parent_strip->gui_object_state ();
-       
+
        XMLNode* strip = st.get_or_add_node (_parent_strip->state_id ());
        assert (strip);
        return st.get_or_add_node (strip, entry->state_id());
@@ -3120,7 +3120,7 @@ ProcessorWindowProxy::get (bool create)
                if (!create) {
                        return 0;
                }
-               
+
                is_custom = want_custom;
                _window = _processor_box->get_editor_window (p, is_custom);
 
index ce4a0e88514c44086bcd80f3fcbb021eab6af2a1..18ec38a0569576d84f3071ab1151216783308b10 100644 (file)
@@ -118,7 +118,7 @@ public:
 
        bool is_selectable() const {return _selectable;}
        void set_selectable(bool s) { _selectable = s; }
-       
+
        enum Position {
                PreFader,
                Fader,
@@ -183,7 +183,7 @@ private:
                std::string name () const {
                        return _name;
                }
-               
+
                Gtk::Alignment box;
 
        private:
@@ -305,7 +305,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
         void generic_edit_processor (boost::shared_ptr<ARDOUR::Processor>);
 
        void update_gui_object_state (ProcessorEntry *);
-       
+
        sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorSelected;
        sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorUnselected;
 
index 9b4566e1e43519d724b04705bcf661cb0fa8fcea..bcf98dbac48fe95955b0b0070d2b5f776e68d83f 100644 (file)
@@ -211,7 +211,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi
        virtual void set_show_measures (bool yn) = 0;
        virtual bool show_measures () const = 0;
        virtual void remove_tracks () = 0;
-       
+
        virtual Editing::MouseMode effective_mouse_mode () const = 0;
 
        /** Import existing media */
@@ -471,7 +471,7 @@ public:
                */
                ActionManager::disable_active_actions ();
        }
-       
+
        ~MainMenuDisabler () {
                ActionManager::enable_active_actions ();
        }
index 9520c6eb8877ad3777af66c8f8ad4f0465715996..f7ba1643450f0aa380027cbd111e045cb084db79 100644 (file)
@@ -101,10 +101,10 @@ public:
                _click_emphasis_browse_button.signal_clicked ().connect (
                    sigc::mem_fun (*this, &ClickOptions::click_emphasis_browse_clicked));
                t->attach (_click_emphasis_browse_button, 2, 3, 2, 3, FILL);
-               
+
                _box->pack_start (*t, false, false);
 
-               _click_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_changed));      
+               _click_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_changed));
                _click_emphasis_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_emphasis_changed));
 
                if (_rc_config->get_click_sound ().empty() &&
@@ -155,7 +155,7 @@ private:
        {
                click_chosen (_click_path_entry.get_text ());
        }
-       
+
        void click_emphasis_browse_clicked ()
        {
                SoundFileChooser sfdb (_("Choose Click Emphasis"));
@@ -1077,7 +1077,7 @@ public:
                vector<string> presets;
 
                /* these must match the order of the enums for BufferingPreset */
-               
+
                presets.push_back (_("Small sessions (4-16 tracks)"));
                presets.push_back (_("Medium sessions (16-64 tracks)"));
                presets.push_back (_("Large sessions (64+ tracks)"));
@@ -1094,7 +1094,7 @@ public:
                _box->pack_start (*h, false, false);
 
                _buffering_presets_combo.signal_changed().connect (sigc::mem_fun (*this, &BufferingOptions::preset_changed));
-               
+
                _playback_adjustment.set_value (_rc_config->get_audio_playback_buffer_seconds());
 
                l = manage (new Label (_("Playback (seconds of buffering):")));
@@ -1192,7 +1192,7 @@ private:
                        break;
                }
        }
-       
+
        void playback_changed ()
        {
                _rc_config->set_audio_playback_buffer_seconds ((long) _playback_adjustment.get_value());
@@ -1269,7 +1269,7 @@ private:
         void protocol_status_changed (ControlProtocolInfo* cpi) {
                /* find the row */
                TreeModel::Children rows = _store->children();
-               
+
                for (TreeModel::Children::iterator x = rows.begin(); x != rows.end(); ++x) {
                        string n = ((*x)[_model.name]);
 
@@ -1785,7 +1785,7 @@ private:
                */
                _set (_visibility_group->get_state_value ());
        }
-       
+
        OptionEditorHeading _heading;
        VisibilityGroup* _visibility_group;
        sigc::slot<std::string> _get;
@@ -1931,7 +1931,7 @@ RCOptionEditor::RCOptionEditor ()
                                            (_("<b>When enabled</b> the loop button does not start playback but forces playback to always play the loop\n\n"
                                               "<b>When disabled</b> the loop button starts playing the loop, but stop then cancels loop playback")));
        add_option (_("Transport"), tsf);
-       
+
        tsf = new BoolOption (
                     "stop-recording-on-xrun",
                     _("Stop recording when an xrun occurs"),
@@ -2274,7 +2274,7 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_name_new_markers),
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_name_new_markers)
                );
-       
+
        add_option (_("Editor"), bo);
        Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), _("If enabled, popup a dialog when a new marker is created to allow its name to be set as it is created."
                                                                "\n\nYou can always rename markers by right-clicking on them"));
@@ -2851,7 +2851,7 @@ RCOptionEditor::RCOptionEditor ()
                (sics->tip_widget(),
                 _("Increasing the cache size uses more memory to store waveform images, which can improve graphical performance."));
        add_option (S_("Preferences|GUI"), sics);
-       
+
        /* Lock GUI timeout */
 
        Gtk::Adjustment *lts = manage (new Gtk::Adjustment(0, 0, 1000, 1, 10));
@@ -2876,7 +2876,7 @@ RCOptionEditor::RCOptionEditor ()
        _mixer_strip_visibility.add (0, X_("SoloIsoLock"), _("Solo Iso / Lock"));
        _mixer_strip_visibility.add (0, X_("Output"), _("Output"));
        _mixer_strip_visibility.add (0, X_("Comments"), _("Comments"));
-       
+
        add_option (
                S_("Preferences|GUI"),
                new VisibilityOption (
index 95adee2115cefa3397a89fab838f681fb865bc29..879a9c44646cdd9ac3363cb0be643261064a4c48 100644 (file)
@@ -30,7 +30,7 @@
  *  are expressed using subclasses of Option.  More complex UI elements are represented
  *  using individual classes subclassed from OptionEditorBox.
  */
-       
+
 /** Editor for options which are obtained from and written back to one of the .rc files. */
 class RCOptionEditor : public OptionEditor
 {
index 7a1a2c21405c964e417d657e09da7566abe3b107..759b69fae1d6763835a58f1cc815941aef5cf444 100644 (file)
@@ -107,7 +107,7 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
 
 RegionLayeringOrderEditor::~RegionLayeringOrderEditor ()
 {
-       
+
 }
 
 void
@@ -123,15 +123,15 @@ RegionLayeringOrderEditor::row_selected ()
        if (!iter) {
                return;
        }
-       
+
        TreeModel::Row row = *iter;
        RegionView* rv = row[layering_order_columns.region_view];
-       
+
        vector<RegionView*> eq;
        editor.get_equivalent_regions (rv, eq, Properties::select.property_id);
 
        /* XXX this should be reversible, really */
-       
+
        for (vector<RegionView*>::iterator i = eq.begin(); i != eq.end(); ++i) {
                boost::shared_ptr<Playlist> pl = (*i)->region()->playlist();
                if (pl) {
@@ -150,7 +150,7 @@ void
 RegionLayeringOrderEditor::refill ()
 {
        assert (_time_axis_view);
-       
+
        regions_at_position = 0;
        in_row_change = true;
        layering_order_model->clear ();
index aeede86bb6e7132e3bf5fb87a3ab9e37f5486352..7ddca8b574824b101faa548dc5a9e859a47a4dca 100644 (file)
@@ -159,14 +159,14 @@ RegionView::init (bool wfd)
                name_highlight->set_data ("regionview", this);
                name_highlight->Event.connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_name_highlight_event), name_highlight, this));
        }
-       
+
        if (frame_handle_start) {
                frame_handle_start->set_data ("regionview", this);
                frame_handle_start->set_data ("isleft", (void*) 1);
                frame_handle_start->Event.connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_frame_handle_event), frame_handle_start, this));
                frame_handle_start->raise_to_top();
        }
-       
+
        if (frame_handle_end) {
                frame_handle_end->set_data ("regionview", this);
                frame_handle_end->set_data ("isleft", (void*) 0);
@@ -531,7 +531,7 @@ RegionView::get_fill_color () const
 {
        ArdourCanvas::Color f = TimeAxisViewItem::get_fill_color();
        char const *modname;
-       
+
        if (_region->opaque()) {
                modname = "opaque region base";
        } else {
@@ -684,7 +684,7 @@ RegionView::move (double x_delta, double y_delta)
         */
 
        ArdourCanvas::Item *item = get_canvas_group ();
-       
+
        if (item->position().x + x_delta < 0) {
                x_delta = -item->position().x; /* move it to zero */
        }
index e7e48f777ecaedc4431c09d0efa22b154b3caa9e..aa381d3c47c0ebc49129e95d14f6f1765dfd2f45 100644 (file)
@@ -85,7 +85,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
        hbox->pack_start (*l, false, false);
        hbox->pack_start (_color, false, false);
        top_vbox->pack_start (*hbox, false, false);
-       
+
        main_vbox->pack_start (*top_vbox, false, false);
 
        _active.set_active (_group->is_active ());
@@ -96,7 +96,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
 
        VBox* options_box = manage (new VBox);
        options_box->set_spacing (6);
-       
+
        l = manage (new Label (_("<b>Sharing</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false ));
        l->set_use_markup ();
        options_box->pack_start (*l, false, true);
@@ -135,7 +135,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
        _route_active.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
        _share_color.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
        _share_monitoring.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
-       
+
        gain_toggled ();
 
        Table* table = manage (new Table (11, 4, false));
@@ -229,7 +229,7 @@ RouteGroupDialog::update ()
        plist.add (Properties::monitoring, _share_monitoring.get_active());
 
        _group->apply_changes (plist);
-       
+
        GroupTabs::set_group_color (_group, gdk_color_to_rgba (_color.get_color ()));
 }
 
index 8975bf90bcd13fdb953570d0051ca61f83dbd94c..30943e22d04475765a1d4b1b07d7b815e9797b82 100644 (file)
@@ -105,11 +105,11 @@ RouteProcessorSelection::add (RouteUI* r)
                        r->set_selected (true);
 
                        MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
-                       
+
                        if (ms) {
                                ms->CatchDeletion.connect (*this, invalidator (*this), boost::bind (&RouteProcessorSelection::remove, this, _1), gui_context());
                        }
-                       
+
                        if (!_no_route_change_signal) {
                                RoutesChanged();
                        }
index 768eac66f3c30df813fef678c569e90ee9249f21..c203afa188b301217154549ea8b0dc746b4a3304 100644 (file)
@@ -38,7 +38,7 @@ struct RoutePlusOrderKey {
            , old_display_order (ok)
            , new_display_order (nk) {}
 };
-       
+
 typedef std::vector<RoutePlusOrderKey> OrderKeySortedRoutes;
 
 struct SortByNewDisplayOrder {
index 57c2cd791fbbefcfc615b10cae8d58a8fddbdaad..5a1585289c672f6b6af03290ff471c491193e8a8 100644 (file)
@@ -189,7 +189,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
                 }
 
                rec_enable_button->set_sensitive (_session->writable());
-               
+
                /* set playlist button tip to the current playlist, and make it update when it changes */
                update_playlist_tip ();
                track()->PlaylistChanged.connect (*this, invalidator (*this), ui_bind(&RouteTimeAxisView::update_playlist_tip, this), gui_context());
@@ -251,7 +251,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
                controls_table.attach (route_group_button, 4, 5, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
                controls_table.attach (gm.get_gain_slider(), 0, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 1, 0);
        }
-       
+
        set_tooltip(*solo_button,_("Solo"));
        set_tooltip(*mute_button,_("Mute"));
        set_tooltip(route_group_button, _("Route Group"));
@@ -324,7 +324,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
 RouteTimeAxisView::~RouteTimeAxisView ()
 {
        cleanup_gui_properties ();
-       
+
        for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
                delete *i;
        }
@@ -507,7 +507,7 @@ RouteTimeAxisView::build_automation_action_menu (bool for_selection)
        /* Attach the plugin submenu. It may have previously been used elsewhere,
           so it was detached above
        */
-       
+
        if (!subplugin_menu.items().empty()) {
                items.push_back (SeparatorElem ());
                items.push_back (MenuElem (_("Processor automation"), subplugin_menu));
@@ -634,7 +634,7 @@ RouteTimeAxisView::build_display_menu ()
                */
 
                _ignore_set_layer_display = true;
-               
+
                layers_items.push_back (RadioMenuElem (layers_group, _("Overlaid")));
                RadioMenuItem* i = dynamic_cast<RadioMenuItem*> (&layers_items.back ());
                i->set_active (overlaid != 0 && stacked == 0);
@@ -646,7 +646,7 @@ RouteTimeAxisView::build_display_menu ()
                i->set_active (overlaid == 0 && stacked != 0);
                i->set_inconsistent (overlaid != 0 && stacked != 0);
                i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Stacked, true));
-               
+
                _ignore_set_layer_display = false;
 
                items.push_back (MenuElem (_("Layers"), *layers_menu));
@@ -813,7 +813,7 @@ RouteTimeAxisView::build_display_menu ()
        }
 
        route_group_menu->detach ();
-       
+
        WeakRouteList r;
        for (TrackSelection::iterator i = _editor.get_selection().tracks.begin(); i != _editor.get_selection().tracks.end(); ++i) {
                RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
@@ -821,19 +821,19 @@ RouteTimeAxisView::build_display_menu ()
                        r.push_back (rtv->route ());
                }
        }
-       
+
        if (r.empty ()) {
                r.push_back (route ());
        }
 
        route_group_menu->build (r);
        items.push_back (MenuElem (_("Group"), *route_group_menu->menu ()));
-       
+
        build_automation_action_menu (true);
        items.push_back (MenuElem (_("Automation"), *automation_action_menu));
-       
+
        items.push_back (SeparatorElem());
-       
+
        int active = 0;
        int inactive = 0;
        TrackSelection const & s = _editor.get_selection().tracks;
@@ -1550,11 +1550,11 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
                         vector<Command*> cmds;
                         playlist->rdiff (cmds);
                         _session->add_commands (cmds);
-                       
+
                         _session->add_command (new StatefulDiffCommand (playlist));
                }
                break;
-               
+
        case Cut:
                if ((what_we_got = playlist->cut (time)) != 0) {
                        _editor.get_cut_buffer().add (what_we_got);
@@ -1727,29 +1727,29 @@ RouteTimeAxisView::use_playlist (RadioMenuItem *item, boost::weak_ptr<Playlist>
        }
 
        track()->use_playlist (pl);
-       
+
        RouteGroup* rg = route_group();
-       
+
        if (rg && rg->is_active() && rg->enabled_property (ARDOUR::Properties::select.property_id)) {
                std::string group_string = "." + rg->name() + ".";
-               
+
                std::string take_name = pl->name();
                std::string::size_type idx = take_name.find(group_string);
-               
+
                if (idx == std::string::npos)
                        return;
-               
+
                take_name = take_name.substr(idx + group_string.length()); // find the bit containing the take number / name
-               
+
                boost::shared_ptr<RouteList> rl (rg->route_list());
-               
+
                for (RouteList::const_iterator i = rl->begin(); i != rl->end(); ++i) {
                        if ((*i) == this->route()) {
                                continue;
                        }
 
                        std::string playlist_name = (*i)->name()+group_string+take_name;
-                       
+
                        boost::shared_ptr<Track> track = boost::dynamic_pointer_cast<Track>(*i);
                        if (!track) {
                                continue;
@@ -1759,7 +1759,7 @@ RouteTimeAxisView::use_playlist (RadioMenuItem *item, boost::weak_ptr<Playlist>
                                /* Don't change playlists of frozen tracks */
                                continue;
                        }
-                       
+
                        boost::shared_ptr<Playlist> ipl = session()->playlists->by_name(playlist_name);
                        if (!ipl) {
                                // No playlist for this track for this take yet, make it
@@ -1778,10 +1778,10 @@ RouteTimeAxisView::update_playlist_tip ()
        RouteGroup* rg = route_group ();
        if (rg && rg->is_active() && rg->enabled_property (ARDOUR::Properties::select.property_id)) {
                string group_string = "." + rg->name() + ".";
-               
+
                string take_name = track()->playlist()->name();
                string::size_type idx = take_name.find(group_string);
-               
+
                if (idx != string::npos) {
                        /* find the bit containing the take number / name */
                        take_name = take_name.substr (idx + group_string.length());
@@ -1793,7 +1793,7 @@ RouteTimeAxisView::update_playlist_tip ()
                                        Glib::Markup::escape_text(rg->name()),
                                        Glib::Markup::escape_text(take_name))
                                );
-                       
+
                        return;
                }
        }
@@ -2209,7 +2209,7 @@ RouteTimeAxisView::add_processor_automation_curve (boost::shared_ptr<Processor>
 
        boost::shared_ptr<AutomationControl> control
                = boost::dynamic_pointer_cast<AutomationControl>(processor->control(what, true));
-       
+
        pan->view = boost::shared_ptr<AutomationTimeAxisView>(
                new AutomationTimeAxisView (_session, _route, processor, control, control->parameter (),
                                            _editor, *this, false, parent_canvas,
@@ -2251,7 +2251,7 @@ RouteTimeAxisView::add_existing_processor_automation_curves (boost::weak_ptr<Pro
        processor->what_has_data (existing);
 
        for (set<Evoral::Parameter>::iterator i = existing.begin(); i != existing.end(); ++i) {
-               
+
                Evoral::Parameter param (*i);
                boost::shared_ptr<AutomationLine> al;
 
@@ -2365,7 +2365,7 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p
 
                items.push_back (CheckMenuElem (name));
                mitem = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
-               
+
                _subplugin_menu_map[*i] = mitem;
 
                if (has_visible_automation.find((*i)) != has_visible_automation.end()) {
@@ -2414,7 +2414,7 @@ RouteTimeAxisView::processor_menu_item_toggled (RouteTimeAxisView::ProcessorAuto
        if (pan->view && pan->view->set_marked_for_display (showit)) {
                redraw = true;
        }
-       
+
        if (redraw && !no_redraw) {
                request_redraw ();
        }
@@ -2503,7 +2503,7 @@ RouteTimeAxisView::set_layer_display (LayerDisplay d, bool apply_to_selection)
        if (_ignore_set_layer_display) {
                return;
        }
-       
+
        if (apply_to_selection) {
                _editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, d, false));
        } else {
@@ -2909,7 +2909,7 @@ void
 RouteTimeAxisView::remove_child (boost::shared_ptr<TimeAxisView> c)
 {
        TimeAxisView::remove_child (c);
-       
+
        boost::shared_ptr<AutomationTimeAxisView> a = boost::dynamic_pointer_cast<AutomationTimeAxisView> (c);
        if (a) {
                for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
index 0d9ed1a958f3175e901dae68e6591754ef04d2ee..b05877346f14b7b80961c88ab482b46a7f030391 100644 (file)
@@ -103,7 +103,7 @@ RouteUI::~RouteUI()
        delete input_selector;
        delete output_selector;
        delete _invert_menu;
-       
+
        send_blink_connection.disconnect ();
        rec_blink_connection.disconnect ();
 }
@@ -165,7 +165,7 @@ RouteUI::init ()
        monitor_input_button->set_text (_("In"));
        UI::instance()->set_tip (monitor_input_button, _("Monitor input"), "");
        monitor_input_button->set_no_show_all (true);
-       
+
        monitor_disk_button = manage (new ArdourButton (ArdourButton::default_elements));
        monitor_disk_button->set_name ("monitor button");
        monitor_disk_button->set_text (_("Disk"));
@@ -189,7 +189,7 @@ RouteUI::init ()
        solo_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::solo_release), false);
        mute_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::mute_press), false);
        mute_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::mute_release), false);
-       
+
        monitor_input_button->set_distinct_led_click (false);
        monitor_disk_button->set_distinct_led_click (false);
 
@@ -270,7 +270,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
                boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(_route);
 
                t->RecordEnableChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_rec_enable_changed, this), gui_context());
-               
+
                rec_enable_button->show();
                rec_enable_button->set_controllable (t->rec_enable_control());
 
@@ -341,7 +341,7 @@ RouteUI::mute_press (GdkEventButton* ev)
        //if this is a binding action, let the ArdourButton handle it
        if ( BindingProxy::is_bind_action(ev) )
                return false;
-                       
+
        multiple_mute_change = false;
 
        if (Keyboard::is_context_menu_event (ev)) {
@@ -351,7 +351,7 @@ RouteUI::mute_press (GdkEventButton* ev)
                }
 
                mute_menu->popup(0,ev->time);
-               
+
                return true;
 
        } else {
@@ -373,7 +373,7 @@ RouteUI::mute_press (GdkEventButton* ev)
                                 * elements of the list we need to work
                                 * on a copy.
                                 */
-                                       
+
                                boost::shared_ptr<RouteList> copy (new RouteList);
 
                                *copy = *_session->get_routes ();
@@ -404,9 +404,9 @@ RouteUI::mute_press (GdkEventButton* ev)
                                if (ev->button == 1) {
 
                                        if (_route->route_group()) {
-                                                       
+
                                                rl = _route->route_group()->route_list();
-                                                       
+
                                                if (_mute_release) {
                                                        _mute_release->routes = rl;
                                                }
@@ -425,7 +425,7 @@ RouteUI::mute_press (GdkEventButton* ev)
 
                                boost::shared_ptr<RouteList> rl (new RouteList);
                                rl->push_back (_route);
-                                       
+
                                if (_mute_release) {
                                        _mute_release->routes = rl;
                                }
@@ -510,7 +510,7 @@ RouteUI::solo_press(GdkEventButton* ev)
        //if this is a binding action, let the ArdourButton handle it
        if ( BindingProxy::is_bind_action(ev) )
                return false;
-                       
+
        multiple_solo_change = false;
 
        if (Keyboard::is_context_menu_event (ev)) {
@@ -598,9 +598,9 @@ RouteUI::solo_press(GdkEventButton* ev)
                                if (ev->button == 1) {
 
                                        if (_route->route_group()) {
-                                                       
+
                                                rl = _route->route_group()->route_list();
-                                                       
+
                                                if (_solo_release) {
                                                        _solo_release->routes = rl;
                                                }
@@ -674,7 +674,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
        //if this is a binding action, let the ArdourButton handle it
        if ( BindingProxy::is_bind_action(ev) )
                return false;
-                       
+
        if (!_session->engine().connected()) {
                MessageDialog msg (_("Not connected to AudioEngine - cannot engage record"));
                msg.run ();
@@ -694,7 +694,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
        if (is_track() && rec_enable_button) {
 
                if (Keyboard::is_button2_event (ev)) {
-                       
+
                        //rec arm does not have a momentary mode
                        return false;
 
@@ -712,11 +712,11 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
                        if (ev->button == 1) {
 
                                boost::shared_ptr<RouteList> rl;
-                               
+
                                if (_route->route_group()) {
-                                       
+
                                        rl = _route->route_group()->route_list();
-                                       
+
                                } else {
                                        rl.reset (new RouteList);
                                        rl->push_back (_route);
@@ -810,7 +810,7 @@ RouteUI::monitor_disk_release (GdkEventButton* ev)
 
 bool
 RouteUI::monitor_release (GdkEventButton* ev, MonitorChoice monitor_choice)
-{      
+{
        if (ev->button != 1) {
                return false;
        }
@@ -823,7 +823,7 @@ RouteUI::monitor_release (GdkEventButton* ev, MonitorChoice monitor_choice)
 
        MonitorChoice mc;
        boost::shared_ptr<RouteList> rl;
-       
+
        /* XXX for now, monitoring choices are orthogonal. cue monitoring
           will follow in 3.X but requires mixing the input and playback (disk)
           signal together, which requires yet more buffers.
@@ -837,7 +837,7 @@ RouteUI::monitor_release (GdkEventButton* ev, MonitorChoice monitor_choice)
                mc = monitor_choice;
        }
 
-       if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {       
+       if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
                rl = _session->get_routes ();
 
        } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
@@ -853,7 +853,7 @@ RouteUI::monitor_release (GdkEventButton* ev, MonitorChoice monitor_choice)
        }
 
        DisplaySuspender ds;
-       _session->set_monitoring (rl, mc, Session::rt_cleanup, true);           
+       _session->set_monitoring (rl, mc, Session::rt_cleanup, true);
 
        return false;
 }
@@ -1532,11 +1532,11 @@ RouteUI::set_color (const Gdk::Color & c)
        char buf[64];
        _color = c;
        snprintf (buf, sizeof (buf), "%d:%d:%d", c.get_red(), c.get_green(), c.get_blue());
-       
+
        /* note: we use the route state ID here so that color is the same for both
           the time axis view and the mixer strip
        */
-       
+
        gui_object_state().set_property<string> (route_state_id(), X_("color"), buf);
        _route->gui_changed ("color", (void *) 0); /* EMIT_SIGNAL */
 }
@@ -1575,12 +1575,12 @@ RouteUI::verify_new_route_name (const std::string& name)
        if (name.find (':') == string::npos) {
                return true;
        }
-       
+
        MessageDialog colon_msg (
                _("The use of colons (':') is discouraged in track and bus names.\nDo you want to use this new name?"),
                false, MESSAGE_QUESTION, BUTTONS_NONE
                );
-       
+
        colon_msg.add_button (_("Use the new name"), Gtk::RESPONSE_ACCEPT);
        colon_msg.add_button (_("Re-edit the name"), Gtk::RESPONSE_CANCEL);
 
@@ -1939,7 +1939,7 @@ RouteUI::open_remote_control_id_dialog ()
 
        if (Config->get_remote_model() == UserOrdered) {
                uint32_t const limit = _session->ntracks() + _session->nbusses () + 4;
-               
+
                HBox* hbox = manage (new HBox);
                hbox->set_spacing (6);
                hbox->pack_start (*manage (new Label (_("Remote control ID:"))));
@@ -1950,7 +1950,7 @@ RouteUI::open_remote_control_id_dialog ()
                spin->set_value (_route->remote_control_id());
                hbox->pack_start (*spin);
                dialog.get_vbox()->pack_start (*hbox);
-               
+
                dialog.add_button (Stock::CANCEL, RESPONSE_CANCEL);
                dialog.add_button (Stock::APPLY, RESPONSE_ACCEPT);
        } else {
@@ -2043,7 +2043,7 @@ RouteUI::set_invert_button_state ()
                */
 
                ArdourButton* b = _invert_buttons.front ();
-               
+
                if (_route->phase_invert().count() == _route->phase_invert().size()) {
                        b->set_active_state (Gtkmm2ext::ExplicitActive);
                } else if (_route->phase_invert().any()) {
@@ -2060,7 +2060,7 @@ RouteUI::set_invert_button_state ()
                for (vector<ArdourButton*>::iterator i = _invert_buttons.begin(); i != _invert_buttons.end(); ++i, ++j) {
                        (*i)->set_active (_route->phase_invert (j));
                }
-               
+
        }
 }
 
@@ -2092,7 +2092,7 @@ RouteUI::invert_press (GdkEventButton* ev)
                */
                return false;
        }
-       
+
        delete _invert_menu;
        _invert_menu = new Menu;
        _invert_menu->set_name ("ArdourContextMenu");
@@ -2171,7 +2171,7 @@ Gdk::Color
 RouteUI::color () const
 {
        RouteGroup* g = _route->route_group ();
-       
+
        if (g && g->is_color()) {
                Gdk::Color c;
                set_color_from_rgba (c, GroupTabs::group_color (g));
index 98d66fef84304019ca090df389bafd51685db3ab..7bc434f37ff3206caab936c218e8ee162abfa2d5 100644 (file)
@@ -304,7 +304,7 @@ class RouteUI : public virtual AxisView
 
        static void set_showing_sends_to (boost::shared_ptr<ARDOUR::Route>);
        static boost::weak_ptr<ARDOUR::Route> _showing_sends_to;
-       
+
        static uint32_t _max_invert_buttons;
 };
 
index bb4f3de2c8623e2b9bd70a1b7ea575e7ada90016..9c8d3cb73482e76a2900cbcc247b8762725db642 100644 (file)
@@ -39,7 +39,7 @@ SaveAsDialog::SaveAsDialog ()
        VBox* vbox = get_vbox();
 
        vbox->set_spacing (6);
-       
+
        HBox* hbox;
        Label* label;
 
@@ -62,7 +62,7 @@ SaveAsDialog::SaveAsDialog ()
        VBox* sub_vbox = manage (new VBox);
        HBox* sub_hbox = manage (new HBox);
        HBox* empty = manage (new HBox);
-       
+
        sub_vbox->pack_start (copy_media_button, false, false);
        sub_vbox->pack_start (copy_external_button, false, false);
 
@@ -73,17 +73,17 @@ SaveAsDialog::SaveAsDialog ()
 
        vbox->pack_start (no_include_media_button, false, false);
        vbox->pack_start (*sub_hbox, false, false);
-       
+
        switch_to_button.set_active (true);
        copy_media_button.set_active (true);
-       
+
        vbox->show_all ();
 
        add_button (Stock::CANCEL, RESPONSE_CANCEL);
        add_button (Stock::OK, RESPONSE_OK);
 
        no_include_media_button.signal_toggled ().connect (sigc::mem_fun (*this, &SaveAsDialog::no_include_toggled));
-       
+
        new_parent_folder_selector.set_action (FILE_CHOOSER_ACTION_SELECT_FOLDER);
        new_parent_folder_selector.set_current_folder (Glib::get_home_dir()); // Why $HOME and not poor_mans_glob (Config->get_default_session_parent_dir ()) ??
        new_name_entry.signal_changed().connect (sigc::mem_fun (*this, &SaveAsDialog::name_entry_changed));
index f016aaf2cd77caa54a161069e69fc78b389ffa67..5284bea74dcac7252c33957cbcdf6feb572ab8f0 100644 (file)
@@ -33,7 +33,7 @@ public:
 
        std::string new_parent_folder () const;
        std::string new_name () const;
-       
+
        bool switch_to () const;
        bool include_media () const;
        bool copy_media () const;
@@ -41,7 +41,7 @@ public:
 
        void clear_name ();
        void set_name (std::string);
-       
+
 private:
        Gtk::CheckButton switch_to_button;
        Gtk::CheckButton copy_media_button;
index f5f37aaa0caf74de880dbe494200205374d29432..1eb846b9ff369c7f59fa4327cd357262a988329c 100644 (file)
@@ -99,19 +99,19 @@ SessionDialog::SessionDialog (bool require_new, const std::string& session_name,
        get_vbox()->pack_start (info_frame, false, false);
 
        setup_new_session_page ();
-       
+
        if (!new_only) {
                setup_initial_choice_box ();
                get_vbox()->pack_start (ic_vbox, true, true);
        } else {
                get_vbox()->pack_start (session_new_vbox, true, true);
        }
-       
+
        if (!template_name.empty()) {
                use_template_button.set_active (false);
                load_template_override = template_name;
        }
-       
+
        get_vbox()->show_all ();
 
        /* fill data models and show/hide accordingly */
@@ -131,7 +131,7 @@ SessionDialog::SessionDialog (bool require_new, const std::string& session_name,
                if (cnt > 0) {
                        recent_scroller.show();
                        recent_label.show ();
-                       
+
                        if (cnt > 4) {
                                recent_scroller.set_size_request (-1, 300);
                        }
@@ -240,7 +240,7 @@ SessionDialog::session_name (bool& should_be_new)
        /* Try recent session selection */
 
        TreeIter iter = recent_session_display.get_selection()->get_selected();
-       
+
        if (iter) {
                should_be_new = false;
                return (*iter)[recent_session_columns.visible_name];
@@ -266,9 +266,9 @@ SessionDialog::session_folder ()
        }
 
        /* Try recent session selection */
-       
+
        TreeIter iter = recent_session_display.get_selection()->get_selected();
-       
+
        if (iter) {
                string s = (*iter)[recent_session_columns.fullpath];
                if (Glib::file_test (s, Glib::FILE_TEST_IS_REGULAR)) {
@@ -342,10 +342,10 @@ SessionDialog::setup_initial_choice_box ()
                        hbox->pack_start (*image, false, false);
                }
        }
-       
+
        vbox->pack_start (ic_new_session_button, true, true, 20);
        hbox->pack_start (*vbox, true, true, 20);
-       
+
        centering_vbox->pack_start (*hbox, false, false);
 
        /* Possible update message */
@@ -380,29 +380,29 @@ SessionDialog::setup_initial_choice_box ()
        recent_scroller.set_no_show_all (true);
 
        recent_label.set_markup (string_compose ("<span weight=\"bold\" size=\"large\">%1</span>", _("Recent Sessions")));
-       
+
        centering_vbox->pack_start (recent_label, false, false, 12);
        centering_vbox->pack_start (recent_scroller, true, true);
 
        /* Browse button */
-       
+
        existing_session_chooser.set_title (_("Select session file"));
        existing_session_chooser.signal_file_set().connect (sigc::mem_fun (*this, &SessionDialog::existing_session_selected));
        existing_session_chooser.set_current_folder(poor_mans_glob (Config->get_default_session_parent_dir()));
-       
+
        FileFilter session_filter;
        session_filter.add_pattern (string_compose(X_("*%1"), ARDOUR::statefile_suffix));
        session_filter.set_name (string_compose (_("%1 sessions"), PROGRAM_NAME));
        existing_session_chooser.add_filter (session_filter);
        existing_session_chooser.set_filter (session_filter);
-       
+
 #ifdef GTKOSX
        existing_session_chooser.add_shortcut_folder ("/Volumes");
 #endif
-       
+
        Label* browse_label = manage (new Label);
        browse_label->set_markup (string_compose ("<span weight=\"bold\" size=\"large\">%1</span>", _("Other Sessions")));
-       
+
        centering_vbox->pack_start (*browse_label, false, false, 12);
        centering_vbox->pack_start (existing_session_chooser, false, false);
 
@@ -544,7 +544,7 @@ SessionDialog::setup_new_session_page ()
 #endif
 
        vbox1->pack_start (*hbox2, false, false);
-               
+
        session_new_vbox.pack_start (*vbox1, false, false);
 
        /* --- */
@@ -567,20 +567,20 @@ SessionDialog::setup_new_session_page ()
 
        HBox* hbox4a = manage (new HBox);
        use_template_button.set_label (_("Use this template"));
-               
+
        TreeModel::Row row = *template_model->prepend ();
        row[session_template_columns.name] = (_("no template"));
        row[session_template_columns.path] = string();
-               
+
        hbox4a->set_spacing (6);
        hbox4a->pack_start (use_template_button, false, false);
        hbox4a->pack_start (template_chooser, true, true);
-               
+
        template_chooser.set_model (template_model);
-               
+
        Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText);
        text_renderer->property_editable() = false;
-               
+
        template_chooser.pack_start (*text_renderer);
        template_chooser.add_attribute (text_renderer->property_text(), session_template_columns.name);
        template_chooser.set_active (0);
@@ -588,21 +588,21 @@ SessionDialog::setup_new_session_page ()
        vbox3->pack_start (*hbox4a, false, false);
 
        /* --- */
-       
+
        HBox* hbox5 = manage (new HBox);
-       
+
        hbox5->set_spacing (6);
        hbox5->pack_start (more_new_session_options_button, false, false);
-       
+
        setup_more_options_box ();
        more_new_session_options_button.add (more_options_vbox);
-       
+
        vbox3->pack_start (*hbox5, false, false);
        hbox3->pack_start (*vbox3, true, true, 8);
        vbox2->pack_start (*hbox3, false, false);
-       
+
        /* --- */
-       
+
        session_new_vbox.pack_start (*vbox2, false, false);
        session_new_vbox.show_all ();
 }
@@ -647,7 +647,7 @@ SessionDialog::redisplay_recent_sessions ()
        for (ARDOUR::RecentSessions::iterator i = rs.begin(); i != rs.end(); ++i) {
                session_directories.push_back ((*i).second);
        }
-       
+
        int session_snapshot_count = 0;
 
        for (vector<std::string>::const_iterator i = session_directories.begin(); i != session_directories.end(); ++i)
@@ -737,7 +737,7 @@ SessionDialog::redisplay_recent_sessions ()
 
                                s = Glib::build_filename (dirname, *i2 + statefile_suffix);
                                Gtk::TreeModel::Row child_row = *(recent_session_model->append (row.children()));
-                               
+
                                child_row[recent_session_columns.visible_name] = *i2;
                                child_row[recent_session_columns.fullpath] = s;
                                child_row[recent_session_columns.tip] = Glib::Markup::escape_text (dirname);
@@ -750,7 +750,7 @@ SessionDialog::redisplay_recent_sessions ()
                                if (gsb.st_mtime > most_recent) {
                                        most_recent = gsb.st_mtime;
                                }
-                               
+
                                if (Session::get_info_from_path (s, sr, sf) == 0) {
                                        child_row[recent_session_columns.sample_rate] = rate_as_string (sr);
                                        switch (sf) {
index 769a94b6d7e3e7c2f11c212ad7f73805c4c97e74..fa02278752e70542a612e9303ae0cb8bec755aee 100644 (file)
@@ -196,7 +196,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
        hf->add (BWF, _("Broadcast WAVE (4GB size limit)"));
 #ifdef HAVE_RF64_RIFF
        hf->add (MBWF, _("Broadcast RF64"));
-#endif 
+#endif
        hf->add (WAVE, _("WAVE (4GB size limit)"));
        hf->add (WAVE64, _("WAVE-64"));
        hf->add (CAF, _("CAF"));
index ebd165186dda68579ff2532631dcbd38cbedcd37..586ad09ddd2e8650117a888012fc01b3daa7546e 100644 (file)
@@ -100,7 +100,7 @@ void Mootcher::ensureWorkingDir ()
        }
 #endif
 }
-       
+
 
 //------------------------------------------------------------------------
 size_t Mootcher::WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
@@ -127,7 +127,7 @@ std::string Mootcher::sortMethodString(enum sortMethod sort)
 // sort the results in the requested way.
 
        switch (sort) {
-               case sort_duration_desc:        return "duration_desc"; 
+               case sort_duration_desc:        return "duration_desc";
                case sort_duration_asc:         return "duration_asc";
                case sort_created_desc:         return "created_desc";
                case sort_created_asc:          return "created_asc";
@@ -135,7 +135,7 @@ std::string Mootcher::sortMethodString(enum sortMethod sort)
                case sort_downloads_asc:        return "downloads_asc";
                case sort_rating_desc:          return "rating_desc";
                case sort_rating_asc:           return "rating_asc";
-               default:                        return "";      
+               default:                        return "";
        }
 }
 
@@ -150,7 +150,7 @@ void Mootcher::setcUrlOptions()
        curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
        // Allow redirection
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
-       
+
        // Allow connections to time out (without using signals)
        curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
        curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 30);
@@ -180,9 +180,9 @@ std::string Mootcher::doRequest(std::string uri, std::string params)
        } else {
                url += "api_key=" + api_key + "&format=xml";
        }
-               
+
        curl_easy_setopt(curl, CURLOPT_URL, url.c_str() );
-       
+
        // perform online request
        CURLcode res = curl_easy_perform(curl);
        if( res != 0 ) {
@@ -194,7 +194,7 @@ std::string Mootcher::doRequest(std::string uri, std::string params)
        if (xml_page.memory) {
                result = xml_page.memory;
        }
-       
+
        free (xml_page.memory);
        xml_page.memory = NULL;
        xml_page.size = 0;
@@ -234,7 +234,7 @@ std::string Mootcher::searchText(std::string query, int page, std::string filter
                params += "&f=" + std::string(ef);
                free(ef);
        }
-       
+
        if (sort)
                params += "&s=" + sortMethodString(sort);
 
@@ -317,7 +317,7 @@ CURLcode res;
        res = curl_easy_perform (curl);
        fclose (theFile);
        curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 1); // turn off the progress bar
-       
+
        if (res != CURLE_OK) {
                /* it's not an error if the user pressed the stop button */
                if (res != CURLE_ABORTED_BY_CALLBACK) {
@@ -373,7 +373,7 @@ bool Mootcher::checkAudioFile(std::string originalFileName, std::string theID)
                        fclose (testFile);
                        return true;
                }
-               
+
                // else file was small, probably an error, delete it
                fclose(testFile);
                remove( audioFileName.c_str() );
@@ -397,7 +397,7 @@ bool Mootcher::fetchAudioFile(std::string originalFileName, std::string theID, s
        if (!theFile) {
                return false;
        }
-       
+
        // create the download url
        audioURL += "?api_key=" + api_key;
 
@@ -453,7 +453,7 @@ Mootcher::progress_callback(void *caller, double dltotal, double dlnow, double /
        // and we want access to some private members of Mootcher.
 
        Mootcher *thisMootcher = (Mootcher *) caller;
-       
+
        if (thisMootcher->cancel_download) {
                return -1;
        }
index 3bfb74884e9006c263f51cf4cd2d36334ecb36bb..6f6912abc9e28bb38af48e8b501838abaa4812a8 100644 (file)
@@ -576,19 +576,19 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        //add the file chooser
 
        chooser.set_border_width (12);
-       
+
        audio_and_midi_filter.add_custom (FILE_FILTER_FILENAME, sigc::mem_fun (*this, &SoundFileBrowser::on_audio_and_midi_filter));
        audio_and_midi_filter.set_name (_("Audio and MIDI files"));
-       
+
        audio_filter.add_custom (FILE_FILTER_FILENAME, sigc::mem_fun(*this, &SoundFileBrowser::on_audio_filter));
        audio_filter.set_name (_("Audio files"));
-       
+
        midi_filter.add_custom (FILE_FILTER_FILENAME, sigc::mem_fun(*this, &SoundFileBrowser::on_midi_filter));
        midi_filter.set_name (_("MIDI files"));
-       
+
        matchall_filter.add_pattern ("*.*");
        matchall_filter.set_name (_("All files"));
-       
+
        chooser.add_filter (audio_and_midi_filter);
        chooser.add_filter (audio_filter);
        chooser.add_filter (midi_filter);
@@ -601,13 +601,13 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        /* some broken redraw behaviour - this is a bandaid */
        chooser.signal_selection_changed().connect (mem_fun (chooser, &Widget::queue_draw));
 #endif
-       
+
        if (!persistent_folder.empty()) {
                chooser.set_current_folder (persistent_folder);
        }
 
        notebook.append_page (chooser, _("Browse Files"));
-       
+
        hpacker.set_spacing (6);
        hpacker.pack_start (notebook, true, true);
        hpacker.pack_start (preview, false, false);
@@ -621,52 +621,52 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
 
        VBox* vbox;
        HBox* hbox;
-       
-       
+
+
        hbox = manage(new HBox);
        hbox->pack_start (found_entry);
        hbox->pack_start (found_search_btn);
-       
+
        Gtk::ScrolledWindow *scroll = manage(new ScrolledWindow);
        scroll->add(found_list_view);
        scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
-       
+
        vbox = manage(new VBox);
        vbox->pack_start (*hbox, PACK_SHRINK);
        vbox->pack_start (*scroll);
-       
+
        found_list_view.append_column(_("Paths"), found_list_columns.pathname);
-       
+
        found_list_view.get_selection()->signal_changed().connect(sigc::mem_fun(*this, &SoundFileBrowser::found_list_view_selected));
-       
+
        found_list_view.signal_row_activated().connect (sigc::mem_fun (*this, &SoundFileBrowser::found_list_view_activated));
-       
+
        found_search_btn.signal_clicked().connect(sigc::mem_fun(*this, &SoundFileBrowser::found_search_clicked));
        found_entry.signal_activate().connect(sigc::mem_fun(*this, &SoundFileBrowser::found_search_clicked));
-       
+
        notebook.append_page (*vbox, _("Search Tags"));
 
        //add freesound search
 
        HBox* passbox;
        Label* label;
-       
+
        passbox = manage(new HBox);
        passbox->set_spacing (6);
-       
+
        label = manage (new Label);
        label->set_text (_("Tags:"));
        passbox->pack_start (*label, false, false);
        passbox->pack_start (freesound_entry, true, true);
-       
+
        label = manage (new Label);
        label->set_text (_("Sort:"));
        passbox->pack_start (*label, false, false);
        passbox->pack_start (freesound_sort, false, false);
        freesound_sort.clear_items();
-       
+
        // Order of the following must correspond with enum sortMethod
-       // in sfdb_freesound_mootcher.h 
+       // in sfdb_freesound_mootcher.h
        freesound_sort.append_text(_("None"));
        freesound_sort.append_text(_("Longest"));
        freesound_sort.append_text(_("Shortest"));
@@ -677,7 +677,7 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        freesound_sort.append_text(_("Highest rated"));
        freesound_sort.append_text(_("Lowest rated"));
        freesound_sort.set_active(0);
-       
+
        passbox->pack_start (freesound_search_btn, false, false);
        passbox->pack_start (freesound_more_btn, false, false);
        freesound_more_btn.set_label(_("More"));
@@ -686,11 +686,11 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        passbox->pack_start (freesound_similar_btn, false, false);
        freesound_similar_btn.set_label(_("Similar"));
        freesound_similar_btn.set_sensitive(false);
-       
+
        scroll = manage(new ScrolledWindow);
        scroll->add(freesound_list_view);
        scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
-       
+
        vbox = manage(new VBox);
        vbox->set_spacing (3);
        vbox->pack_start (*passbox, PACK_SHRINK);
@@ -710,7 +710,7 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        freesound_list_view.get_column(3)->set_alignment(0.5);
        freesound_list_view.get_column(4)->set_alignment(0.5);
        freesound_list_view.get_column(5)->set_alignment(0.5);
-       
+
        freesound_list_view.get_selection()->signal_changed().connect(sigc::mem_fun(*this, &SoundFileBrowser::freesound_list_view_selected));
        freesound_list_view.set_tooltip_column(1);
 
@@ -1067,9 +1067,9 @@ SoundFileBrowser::freesound_similar_clicked ()
                prev_cursor = gdk_window_get_cursor (get_window()->gobj());
                gdk_window_set_cursor (get_window()->gobj(), gdk_cursor_new(GDK_WATCH));
                gdk_flush();
-               
+
                std::string theString = mootcher.searchSimilar(id);
-               
+
                gdk_window_set_cursor (get_window()->gobj(), prev_cursor);
                handle_freesound_results(theString);
        }
@@ -1353,28 +1353,28 @@ SoundFileOmega::reset_options ()
                if (selected_audio_track_cnt > 0) {
                        if (channel_combo.get_active_text().length()) {
                                ImportDisposition id = get_channel_disposition();
-                               
+
                                switch (id) {
                                case Editing::ImportDistinctFiles:
                                        if (selected_audio_track_cnt == paths.size()) {
                                                action_strings.push_back (importmode2string (ImportToTrack));
                                        }
                                        break;
-                                       
+
                                case Editing::ImportDistinctChannels:
                                        /* XXX it would be nice to allow channel-per-selected track
                                           but its too hard we don't want to deal with all the
                                           different per-file + per-track channel configurations.
                                        */
                                        break;
-                                       
+
                                default:
                                        action_strings.push_back (importmode2string (ImportToTrack));
                                        break;
                                }
                        }
                }
-               
+
        }  else {
 
                /* MIDI ONLY */
@@ -1489,7 +1489,7 @@ SoundFileOmega::reset_options ()
        /* We must copy MIDI files or those from Freesound
         * or any file if we are under nsm control */
        bool const must_copy = _session->get_nsm_state() || have_a_midi_file || notebook.get_current_page() == 2;
-       
+
        if (UIConfiguration::instance().get_only_copy_imported_files()) {
 
                if (selection_can_be_embedded_with_links && !must_copy) {
@@ -1505,7 +1505,7 @@ SoundFileOmega::reset_options ()
 
                if (must_copy) {
                        copy_files_btn.set_active (true);
-               }                       
+               }
                copy_files_btn.set_sensitive (!must_copy);
        }
 
@@ -1952,14 +1952,14 @@ SoundFileOmega::do_something (int action)
        }
 
        /* lets do it */
-       
+
        vector<string> paths = get_paths ();
        ImportPosition pos = get_position ();
        ImportMode mode = get_mode ();
        ImportDisposition chns = get_channel_disposition ();
        PluginInfoPtr instrument = instrument_combo.selected_instrument();
        framepos_t where;
-       
+
        switch (pos) {
        case ImportAtEditPoint:
                where = PublicEditor::instance().get_preferred_edit_position ();
@@ -1974,13 +1974,13 @@ SoundFileOmega::do_something (int action)
                where = _session->current_start_frame();
                break;
        }
-       
+
        SrcQuality quality = get_src_quality();
-       
+
        if (copy_files_btn.get_active()) {
                PublicEditor::instance().do_import (paths, chns, mode, quality, where, instrument);
        } else {
                PublicEditor::instance().do_embed (paths, chns, mode, where, instrument);
        }
 }
-       
+
index 1eb6f2e122ef0ef6a38604e42e94cedc8469b826..3c4f088258d4f798c181f648c70c19f974783944 100644 (file)
@@ -198,7 +198,7 @@ class SoundFileBrowser : public ArdourWindow
 
        void freesound_search();
        void refresh_display(std::string ID, std::string file);
-       
+
   protected:
        bool resetting_ourselves;
        int matches;
@@ -239,7 +239,7 @@ class SoundFileBrowser : public ArdourWindow
        void freesound_more_clicked ();
        void freesound_similar_clicked ();
        int freesound_page;
-       
+
        void chooser_file_activated ();
        std::string freesound_get_audio_file(Gtk::TreeIter iter);
 
index ba520152c4ebcc29c13da1ba50c3f152da6e48d4..94c27c28075f7493d510149d50b1a913444f8235 100644 (file)
@@ -322,7 +322,7 @@ ShuttleControl::on_button_release_event (GdkEventButton* ev)
                        shuttle_grabbed = false;
                        remove_modal_grab ();
                        gdk_pointer_ungrab (GDK_CURRENT_TIME);
-                       
+
                        if (Config->get_shuttle_behaviour() == Sprung) {
                                if (shuttle_speed_on_grab == 0 ) {
                                        _session->request_stop ();
@@ -397,7 +397,7 @@ ShuttleControl::on_scroll_event (GdkEventScroll* ev)
        default:
                return false;
        }
-       
+
        if (semis) {
 
                float lower_side_of_dead_zone = semitones_as_fract (-24, true);
index fcfbdfe91bbd1dc558e61ede77de973c7241932b..c05214a4897d051c042b4a0b7adffa66363f48f5 100644 (file)
@@ -40,7 +40,7 @@ class SoundcloudExportSelector : public Gtk::VBox, public ARDOUR::SessionHandleP
        Gtk::CheckButton soundcloud_download_checkbox;
        bool soundcloud_cancel;
        Gtk::ProgressBar progress_bar;
-       
+
 };
 
 #endif // __soundcloud_export_selector_h__
index 2b28ff4953d6d262373db4e5566e6aaf55f07ebe..63ca20d0572f61235accc1a025d6d48ba23752bc 100644 (file)
@@ -45,7 +45,7 @@ Splash* Splash::the_splash = 0;
 Splash::Splash ()
 {
        assert (the_splash == 0);
-       
+
        std::string splash_file;
 
        if (!find_file (ardour_data_search_path(), "splash.png", splash_file)) {
@@ -202,7 +202,7 @@ void
 Splash::display ()
 {
        bool was_mapped = is_mapped ();
-       
+
        if (!was_mapped) {
                expose_done = false;
                expose_is_the_one = false;
@@ -210,7 +210,7 @@ Splash::display ()
 
        pop_front ();
        present ();
-       
+
        if (!was_mapped) {
                while (!expose_done) {
                        gtk_main_iteration ();
@@ -230,7 +230,7 @@ Splash::message (const string& msg)
 
        layout->set_markup (str);
        Glib::RefPtr<Gdk::Window> win = darea.get_window();
-       
+
        if (win) {
                 expose_done = false;
 
index c19c14f7aa960877d3702b048f6cffce6894ef4a..e020ee18d7e4eb5170febe5624ed6c3989edbd22 100644 (file)
@@ -79,14 +79,14 @@ ArdourStartup::ArdourStartup ()
 {
        set_position (WIN_POS_CENTER);
        set_border_width (12);
-       
+
        if ((icon_pixbuf = ::get_icon ("ardour_icon_48px")) == 0) {
                throw failed_constructor();
        }
-       
+
        list<Glib::RefPtr<Gdk::Pixbuf> > window_icons;
        Glib::RefPtr<Gdk::Pixbuf> icon;
-       
+
        if ((icon = ::get_icon ("ardour_icon_16px")) != 0) {
                window_icons.push_back (icon);
        }
@@ -102,7 +102,7 @@ ArdourStartup::ArdourStartup ()
        if (!window_icons.empty ()) {
                set_default_icon_list (window_icons);
        }
-       
+
        setup_new_user_page ();
        setup_first_time_config_page ();
        setup_monitoring_choice_page ();
@@ -124,7 +124,7 @@ ArdourStartup::required ()
         */
 
        const int current_version = atoi (PROGRAM_VERSION);
-       
+
        for (int v = current_version; v != 0; --v) {
                if (Glib::file_test (ARDOUR::been_here_before_path (v), Glib::FILE_TEST_EXISTS)) {
                        if (v != current_version) {
@@ -179,7 +179,7 @@ ArdourStartup::default_dir_changed ()
 {
        Config->set_default_session_parent_dir (default_dir_chooser->get_filename());
        // make new session folder chooser point to the new default
-       new_folder_chooser.set_current_folder (Config->get_default_session_parent_dir());       
+       new_folder_chooser.set_current_folder (Config->get_default_session_parent_dir());
        config_changed ();
 }
 
@@ -424,7 +424,7 @@ ArdourStartup::on_apply ()
                PBD::ScopedFileDescriptor fout (g_open (been_here_before_path ().c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666));
 
        }
-               
+
        _response = RESPONSE_OK;
        gtk_main_quit ();
 }
index 0736a426c15d58a6f4df86b3739ee4041c5d34fd..91c8b025ac36c0dee4b1b18fe70edc12f0e18a2c 100644 (file)
@@ -306,7 +306,7 @@ StereoPanner::on_button_press_event (GdkEventButton* ev)
        if (_panner_shell->bypassed()) {
                return true;
        }
-       
+
        drag_start_x = ev->x;
        last_drag_x = ev->x;
 
@@ -447,7 +447,7 @@ StereoPanner::on_button_release_event (GdkEventButton* ev)
        if (PannerInterface::on_button_release_event (ev)) {
                return true;
        }
-       
+
        if (ev->button != 1) {
                return false;
        }
@@ -537,7 +537,7 @@ StereoPanner::on_motion_notify_event (GdkEventMotion* ev)
        if (dragging_left) {
                delta = -delta;
        }
-       
+
        if (dragging_left || dragging_right) {
 
                if (Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier)) {
@@ -547,7 +547,7 @@ StereoPanner::on_motion_notify_event (GdkEventMotion* ev)
                         */
 
                        _panner->freeze ();
-                       
+
                        double pv = position_control->get_value();
 
                        if (dragging_left) {
@@ -573,27 +573,27 @@ StereoPanner::on_motion_notify_event (GdkEventMotion* ev)
                } else {
 
                        /* maintain position as invariant as we change the width */
-                       
+
                        /* create a detent close to the center */
-                       
+
                        if (!detented && fabs (current_width) < 0.02) {
                                detented = true;
                                /* snap to zero */
                                width_control->set_value (0);
                        }
-                       
+
                        if (detented) {
-                               
+
                                accumulated_delta += delta;
-                               
+
                                /* have we pulled far enough to escape ? */
-                               
+
                                if (fabs (accumulated_delta) >= 0.025) {
                                        width_control->set_value (current_width + accumulated_delta);
                                        detented = false;
                                        accumulated_delta = false;
                                }
-                               
+
                        } else {
                                /* width needs to change by 2 * delta because both L & R move */
                                width_control->set_value (current_width + (delta * 2.0));
index 1c278f344d56e5a122818bf470f93f531243b503..ba9823214691c920157ae789d69cf27e0894d0c6 100644 (file)
@@ -61,7 +61,7 @@ class StereoPanner : public PannerInterface
   private:
        PannerEditor* editor ();
        boost::shared_ptr<ARDOUR::PannerShell> _panner_shell;
-               
+
         boost::shared_ptr<PBD::Controllable> position_control;
         boost::shared_ptr<PBD::Controllable> width_control;
         PBD::ScopedConnectionList panvalue_connections;
index 0cc856f5007a34a72ba073331fdb91c88107ff73..e7a4a452fe7602fe29645885eb95152ceecb2945 100644 (file)
@@ -40,12 +40,12 @@ StereoPannerEditor::StereoPannerEditor (StereoPanner* p)
        t->set_spacings (6);
 
        int n = 0;
-       
+
        t->attach (*manage (left_aligned_label (_("Position"))), 0, 1, n, n + 1);
        t->attach (_position, 1, 2, n, n + 1);
        t->attach (*manage (left_aligned_label (_("%"))), 2, 3, n, n + 1);
        ++n;
-       
+
        t->attach (*manage (left_aligned_label (_("Width"))), 0, 1, n, n + 1);
        t->attach (_width, 1, 2, n, n + 1);
        t->attach (*manage (left_aligned_label (_("%"))), 2, 3, n, n + 1);
@@ -66,7 +66,7 @@ StereoPannerEditor::StereoPannerEditor (StereoPanner* p)
        _panner->get_width_controllable()->Changed.connect (
                _connections, invalidator (*this), boost::bind (&StereoPannerEditor::update_editor, this), gui_context ()
                );
-       
+
        _panner->DropReferences.connect (_connections, invalidator (*this), boost::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));
@@ -87,7 +87,7 @@ StereoPannerEditor::update_editor ()
        if (!_panner) {
                return;
        }
-       
+
        _ignore_changes = true;
        _position.set_value (100 * _panner->get_position_controllable()->get_value ());
        _width.set_value (100 * _panner->get_width_controllable()->get_value ());
@@ -135,4 +135,4 @@ StereoPannerEditor::set_width_range ()
        pair<double, double> const wr = _panner->panner()->width_range ();
        _width.set_range (wr.first * 100, wr.second * 100);
 }
-       
+
index 8c561e55456bdbf7c1095fff4c88ad8afb179f5e..1a01564a4c18ae7aae4956eeb6b3b494a6e9a5c4 100644 (file)
@@ -35,7 +35,7 @@ private:
        void width_changed ();
        void set_position_range ();
        void set_width_range ();
-       
+
        StereoPanner* _panner;
        Gtk::SpinButton _position;
        Gtk::SpinButton _width;
index 5f50b7e8cbc8fc0cffe593d8a46b1e351dfcd1b8..c737f7842ce0335a248bf5af970d45a91ee2996c 100644 (file)
@@ -66,7 +66,7 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Container* canvas_g
        , last_rec_data_frame(0)
 {
        CANVAS_DEBUG_NAME (_canvas_group, string_compose ("SV canvas group %1", _trackview.name()));
-       
+
        /* set_position() will position the group */
 
        canvas_rect = new ArdourCanvas::Rectangle (_canvas_group);
@@ -583,7 +583,7 @@ StreamView::get_selectables (framepos_t start, framepos_t end, double top, doubl
                        layer_t const l = (*i)->region()->layer ();
                        layer_ok = (min_layer <= l && l <= max_layer);
                }
-               
+
                if (within) {
                        if ((*i)->region()->coverage (start, end) == Evoral::OverlapExternal && layer_ok) {
                                results.push_back (*i);
@@ -593,7 +593,7 @@ StreamView::get_selectables (framepos_t start, framepos_t end, double top, doubl
                                results.push_back (*i);
                        }
                }
-               
+
        }
 }
 
@@ -619,7 +619,7 @@ StreamView::child_height () const
        case Expanded:
                return height / (_layers * 2 + 1);
        }
-       
+
        abort(); /* NOTREACHED */
        return height;
 }
@@ -670,7 +670,7 @@ StreamView::set_layer_display (LayerDisplay d)
        if (_layer_display == Overlaid) {
                layer_regions ();
        }
-       
+
        update_contents_height ();
        update_coverage_frames ();
 }
index 0c3faf3b21a382710018fc9aacf1460225fcd404..8a56040afb321ad945a70c49b64a1710950b1dc7 100644 (file)
@@ -118,7 +118,7 @@ public:
        void check_record_layers (boost::shared_ptr<ARDOUR::Region>, ARDOUR::framepos_t);
 
        virtual void playlist_layered (boost::weak_ptr<ARDOUR::Track>);
-       
+
        sigc::signal<void, RegionView*> RegionViewAdded;
        sigc::signal<void> RegionViewRemoved;
        /** Emitted when the height of regions has changed */
index 3607aa5e2a53421fce574abd01b0d4bba528fa0f..b6251938a797c5fa1b59346fa36eaf17134a013d 100644 (file)
@@ -39,7 +39,7 @@ SysEx::SysEx (
                UIConfiguration::instance().color_mod ("midi sysex fill", "midi sysex fill"),
                ArdourCanvas::Duple (x, y)
                );
-       
+
        _flag->set_text (text);
 }
 
index cc3559ba1f2bcde71706abae746f6697a447bc3e..709841cabbce9d4dbd157b970498ca9287732a5f 100644 (file)
@@ -44,7 +44,7 @@ public:
 
         ArdourCanvas::Item& item() const { return *_flag; }
 
-private:       
+private:
        bool event_handler (GdkEvent* ev);
 
        ArdourCanvas::Flag* _flag;
index 37771eff76f24f51384fcb16518b65fa6499b943..0b570abdaa2fcc780de2b5dc78beb8ee8411db21 100644 (file)
@@ -105,7 +105,7 @@ TempoDialog::init (const Timecode::BBT_Time& when, double bpm, double note_type,
        if (x == note_types.end()) {
                pulse_selector.set_active_text (strings[3]); // "quarter"
        }
-       
+
        Table* table;
 
        if (UIConfiguration::instance().get_allow_non_quarter_pulse()) {
@@ -249,7 +249,7 @@ double
 TempoDialog::get_note_type ()
 {
        NoteTypes::iterator x = note_types.find (pulse_selector.get_active_text());
-       
+
        if (x == note_types.end()) {
                error << string_compose(_("incomprehensible pulse note type (%1)"), pulse_selector.get_active_text()) << endmsg;
                return 0;
@@ -367,7 +367,7 @@ MeterDialog::init (const Timecode::BBT_Time& when, double bpb, double divisor, b
                        break;
                }
        }
-       
+
        if (x == note_types.end()) {
                note_type.set_active_text (strings[3]); // "quarter"
        }
@@ -498,7 +498,7 @@ double
 MeterDialog::get_note_type ()
 {
        NoteTypes::iterator x = note_types.find (note_type.get_active_text());
-       
+
        if (x == note_types.end()) {
                error << string_compose(_("incomprehensible meter note type (%1)"), note_type.get_active_text()) << endmsg;
                return 0;
index 2abfb79105bfd3c627a98de9ca35a97cc87186ae..3d1a1f8952d0ba359cb34570ccfca665ba839e08 100644 (file)
@@ -78,16 +78,16 @@ ThemeManager::ThemeManager()
        , palette_window (0)
 {
        /* Now the alias list */
-       
+
        alias_list = TreeStore::create (alias_columns);
        alias_display.set_model (alias_list);
        alias_display.append_column (_("Object"), alias_columns.name);
-       
+
        Gtkmm2ext::CellRendererColorSelector* color_renderer = manage (new Gtkmm2ext::CellRendererColorSelector);
        TreeViewColumn* color_column = manage (new TreeViewColumn (_("Color"), *color_renderer));
        color_column->add_attribute (color_renderer->property_color(), alias_columns.color);
        alias_display.append_column (*color_column);
-       
+
        alias_display.get_column (0)->set_data (X_("colnum"), GUINT_TO_POINTER(0));
        alias_display.get_column (0)->set_expand (true);
        alias_display.get_column (1)->set_data (X_("colnum"), GUINT_TO_POINTER(1));
@@ -101,7 +101,7 @@ ThemeManager::ThemeManager()
        alias_scroller.add (alias_display);
 
        /* various buttons */
-       
+
        RadioButton::Group group = dark_button.get_group();
        light_button.set_group(group);
        theme_selection_hbox.set_homogeneous(false);
@@ -137,7 +137,7 @@ ThemeManager::ThemeManager()
                pack_start (*hbox, PACK_SHRINK);
        }
 
-       
+
        hbox = Gtk::manage (new Gtk::HBox());
        hbox->set_spacing (6);
        hbox->pack_start (waveform_gradient_depth, true, true);
@@ -156,21 +156,21 @@ ThemeManager::ThemeManager()
        palette_scroller.add (palette_viewport);
 
        modifier_scroller.add (modifier_vbox);
-       
+
        notebook.append_page (alias_scroller, _("Items"));
        notebook.append_page (palette_scroller, _("Palette"));
        notebook.append_page (modifier_scroller, _("Transparency"));
-       
+
        pack_start (notebook);
 
        show_all ();
 
        waveform_gradient_depth.set_update_policy (Gtk::UPDATE_DELAYED);
        timeline_item_gradient_depth.set_update_policy (Gtk::UPDATE_DELAYED);
-       
+
        color_dialog.get_colorsel()->set_has_opacity_control (true);
        color_dialog.get_colorsel()->set_has_palette (true);
-       
+
        set_ui_to_state();
 
        color_dialog.get_ok_button()->signal_clicked().connect (sigc::bind (sigc::mem_fun (color_dialog, &Gtk::Dialog::response), RESPONSE_ACCEPT));
@@ -200,7 +200,7 @@ ThemeManager::ThemeManager()
        /* no need to call setup_palette() here, it will be done when its size is allocated */
        setup_aliases ();
        setup_modifiers ();
-       
+
        UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &ThemeManager::colors_changed));
 }
 
@@ -216,7 +216,7 @@ ThemeManager::setup_modifiers ()
        Gtk::HBox* mod_hbox;
        Gtk::Label* mod_label;
        Gtk::HScale* mod_scale;
-       
+
        Gtkmm2ext::container_clear (modifier_vbox);
 
        for (UIConfiguration::Modifiers::const_iterator m = modifiers.begin(); m != modifiers.end(); ++m) {
@@ -231,7 +231,7 @@ ThemeManager::setup_modifiers ()
                mod_label = manage (new Label (m->first));
                mod_label->set_alignment (1.0, 0.5);
                mod_label->set_size_request (150, -1); /* 150 pixels should be enough for anyone */
-               
+
                mod_hbox->pack_start (*mod_label, false, true, 12);
                mod_hbox->pack_start (*mod_scale, true, true);
 
@@ -246,7 +246,7 @@ void
 ThemeManager::modifier_edited (Gtk::Range* range, string name)
 {
        using namespace ArdourCanvas;
-       
+
        double alpha = range->get_value();
        SVAModifier svam (SVAModifier::Assign, -1.0, -1.0, alpha);
        UIConfiguration::instance().set_modifier (name, svam);
@@ -256,8 +256,8 @@ void
 ThemeManager::colors_changed ()
 {
        setup_palette ();
-       setup_aliases ();       
-       setup_modifiers ();     
+       setup_aliases ();
+       setup_modifiers ();
 }
 
 int
@@ -338,7 +338,7 @@ ThemeManager::on_dark_theme_button_toggled()
        if (!dark_button.get_active()) return;
 
        UIConfiguration* uic (&UIConfiguration::instance());
-       
+
         uic->set_color_file("dark");
 }
 
@@ -348,7 +348,7 @@ ThemeManager::on_light_theme_button_toggled()
        if (!light_button.get_active()) return;
 
        UIConfiguration* uic (&UIConfiguration::instance());
-       
+
         uic->set_color_file("light");
 }
 
@@ -409,7 +409,7 @@ ThemeManager::initialize_palette_canvas (ArdourCanvas::Canvas& canvas)
        canvas.set_background_color (rgba_to_color (0.0, 0.0, 1.0, 0.0));
 
        /* bi-directional scroll group */
-       
+
        ScrollGroup* scroll_group = new ScrollGroup (canvas.root(), ScrollGroup::ScrollSensitivity (ScrollGroup::ScrollsVertically|ScrollGroup::ScrollsHorizontally));
        canvas.add_scroller (*scroll_group);
 
@@ -459,7 +459,7 @@ ThemeManager::build_palette_canvas (ArdourCanvas::Canvas& canvas, ArdourCanvas::
        }
        SortByHue sorter;
        sort (nc.begin(), nc.end(), sorter);
-       
+
        const uint32_t color_limit = nc.size();
        const double box_size = 20.0;
        const double width = canvas.width();
@@ -468,9 +468,9 @@ ThemeManager::build_palette_canvas (ArdourCanvas::Canvas& canvas, ArdourCanvas::
        uint32_t color_num = 0;
 
        /* clear existing rects and delete them */
-       
+
        group.clear (true);
-       
+
        for (uint32_t y = 0; y < height - box_size && color_num < color_limit; y += box_size) {
                for (uint32_t x = 0; x < width - box_size && color_num < color_limit; x += box_size) {
                        ArdourCanvas::Rectangle* r = new ArdourCanvas::Rectangle (&group, ArdourCanvas::Rect (x, y, x + box_size, y + box_size));
@@ -501,7 +501,7 @@ ThemeManager::palette_size_request (Gtk::Requisition* req)
        req->height = (int) floor (c * box_size);
 
        /* add overflow row if necessary */
-       
+
        if (fmod (ncolors, c) != 0.0) {
                req->height += box_size;
        }
@@ -554,7 +554,7 @@ ThemeManager::palette_color_response (int result, std::string name)
        using namespace ArdourCanvas;
 
        color_dialog_connection.disconnect ();
-       
+
        UIConfiguration* uic (&UIConfiguration::instance());
        Gdk::Color gdkcolor;
        double r,g, b, a;
@@ -567,10 +567,10 @@ ThemeManager::palette_color_response (int result, std::string name)
                r = gdkcolor.get_red_p();
                g = gdkcolor.get_green_p();
                b = gdkcolor.get_blue_p();
-               
+
                uic->set_color (name, rgba_to_color (r, g, b, a));
                break;
-               
+
        default:
                break;
        }
@@ -630,14 +630,14 @@ ThemeManager::choose_color_from_palette (string const & name)
        palette_window = new ArdourDialog (_("Color Palette"));
        palette_window->add_button (Stock::CANCEL, RESPONSE_REJECT); /* using CANCEL causes confusion if dialog is closed via CloseAllDialogs */
        palette_window->add_button (Stock::OK, RESPONSE_OK);
-       
+
        ArdourCanvas::GtkCanvas* canvas = new ArdourCanvas::GtkCanvas ();
        ArdourCanvas::Container* group = initialize_palette_canvas (*canvas);
-       
+
        canvas->signal_size_request().connect (sigc::mem_fun (*this, &ThemeManager::palette_size_request));
        canvas->signal_size_allocate().connect (sigc::bind (sigc::mem_fun (*this, &ThemeManager::palette_canvas_allocated), group, canvas,
                                                            sigc::bind (sigc::mem_fun (*this, &ThemeManager::alias_palette_event), name)));
-       
+
        palette_window->get_vbox()->pack_start (*canvas);
        palette_window->show_all ();
 
@@ -651,7 +651,7 @@ void
 ThemeManager::setup_aliases ()
 {
        using namespace ArdourCanvas;
-       
+
        UIConfiguration* uic (&UIConfiguration::instance());
        UIConfiguration::ColorAliases& aliases (uic->color_aliases);
 
@@ -683,7 +683,7 @@ ThemeManager::setup_aliases ()
                                row = *(alias_list->append());
                                row[alias_columns.name] = parent;
                                row[alias_columns.alias] = "";
-                               
+
                                /* now add the child as a child of this one */
 
                                row = *(alias_list->insert (row->children().end()));
index d4a8653bcf0320a783e5af21def0441844fc2255..6ed58207fa8b0a86a45a58962e3e8c5f49e6b8d7 100644 (file)
@@ -64,20 +64,20 @@ class ThemeManager : public Gtk::VBox
 
   private:
        Gtk::Notebook notebook;
-       
+
        struct BasicColorDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
                BasicColorDisplayModelColumns() {
                        add (name);
                        add (gdkcolor);
                }
-               
+
                Gtk::TreeModelColumn<std::string>  name;
                Gtk::TreeModelColumn<Gdk::Color>   gdkcolor;
        };
-       
+
        Gtk::ColorSelectionDialog color_dialog;
        sigc::connection color_dialog_connection;
-       
+
        Gtk::HBox theme_selection_hbox;
        Gtk::RadioButton dark_button;
        Gtk::RadioButton light_button;
@@ -104,7 +104,7 @@ class ThemeManager : public Gtk::VBox
        Gtk::ScrolledWindow palette_scroller;
        ArdourCanvas::GtkCanvasViewport palette_viewport;
        ArdourCanvas::Container* palette_group;
-       
+
        /* these methods create and manage a canvas for use in either the
           palette tab or in a separate dialog. Different behaviour is
           accomplished by changing the event handler passed into the
@@ -130,7 +130,7 @@ class ThemeManager : public Gtk::VBox
           on it inside the palette tab.
        */
        void edit_palette_color (std::string);
-       
+
        struct ColorAliasModelColumns : public Gtk::TreeModel::ColumnRecord {
                ColorAliasModelColumns() {
                        add (name);
@@ -138,7 +138,7 @@ class ThemeManager : public Gtk::VBox
                        add (color);
                        add (key);
                }
-               
+
                Gtk::TreeModelColumn<std::string>  name;
                Gtk::TreeModelColumn<std::string>  alias;
                Gtk::TreeModelColumn<Gdk::Color>   color;
@@ -154,9 +154,9 @@ class ThemeManager : public Gtk::VBox
 
        ArdourDialog* palette_window;
        sigc::connection palette_response_connection;
-       
+
        void choose_color_from_palette (std::string const &target_name);
-       
+
        bool alias_palette_event (GdkEvent*, std::string, std::string);
        void alias_palette_response (int, std::string, std::string);
 
@@ -165,10 +165,10 @@ class ThemeManager : public Gtk::VBox
 
        Gtk::ScrolledWindow modifier_scroller;
        Gtk::VBox modifier_vbox;
-       
+
        void setup_modifiers ();
        void modifier_edited (Gtk::Range*, std::string);
-       
+
        void colors_changed ();
        void set_ui_to_state ();
 };
index 09799c7d14263745f8445174a74f34e8db6e816e..436e161583f01dad8322ba9c866bd649a0e1b8e2 100644 (file)
@@ -138,7 +138,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
        CANVAS_DEBUG_NAME (selection_group, "selection for TAV");
        selection_group->set_data (X_("timeselection"), (void *) 1);
        selection_group->hide();
-       
+
        _ghost_group = new ArdourCanvas::Container (_canvas_display);
        CANVAS_DEBUG_NAME (_ghost_group, "ghost for TAV");
        _ghost_group->lower_to_bottom();
@@ -319,7 +319,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
 
        _canvas_display->raise_to_top ();
        _canvas_display->show ();
-       
+
        _hidden = false;
 
        _effective_height = current_height ();
@@ -407,7 +407,7 @@ TimeAxisView::controls_ebox_button_press (GdkEventButton* event)
        }
 
        _ebox_release_can_act = true;
-                       
+
        if (maybe_set_cursor (event->y) > 0) {
                _resize_drag_start = event->y_root;
        }
@@ -668,7 +668,7 @@ TimeAxisView::begin_name_edit ()
        if (can_edit_name()) {
 
                name_entry = manage (new Gtkmm2ext::FocusEntry);
-               
+
                name_entry->set_width_chars(8); // min width, entry expands
 
                name_entry->set_name ("EditorTrackNameDisplay");
@@ -681,7 +681,7 @@ TimeAxisView::begin_name_edit ()
                if (name_label.is_ancestor (name_hbox)) {
                        name_hbox.remove (name_label);
                }
-               
+
                name_hbox.pack_end (*name_entry, true, true);
                name_entry->show ();
 
@@ -705,9 +705,9 @@ TimeAxisView::end_name_edit (int response)
                */
                return;
        }
-       
+
        PBD::Unwinder<bool> uw (ending_name_edit, true);
-       
+
        bool edit_next = false;
        bool edit_prev = false;
 
@@ -743,24 +743,24 @@ TimeAxisView::end_name_edit (int response)
 
                TrackViewList const & allviews = _editor.get_track_views ();
                TrackViewList::const_iterator i = find (allviews.begin(), allviews.end(), this);
-               
+
                if (i != allviews.end()) {
-                       
+
                        do {
                                if (++i == allviews.end()) {
                                        return;
                                }
-                               
+
                                RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*>(*i);
-                       
+
                                if (rtav && rtav->route()->record_enabled()) {
                                        continue;
                                }
-                               
+
                                if (!(*i)->hidden()) {
                                        break;
                                }
-                               
+
                        } while (true);
                }
 
@@ -773,28 +773,28 @@ TimeAxisView::end_name_edit (int response)
 
                TrackViewList const & allviews = _editor.get_track_views ();
                TrackViewList::const_iterator i = find (allviews.begin(), allviews.end(), this);
-               
+
                if (i != allviews.begin()) {
                        do {
                                if (i == allviews.begin()) {
                                        return;
                                }
-                               
+
                                --i;
-                               
+
                                RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*>(*i);
-                               
+
                                if (rtav && rtav->route()->record_enabled()) {
                                        continue;
                                }
-                               
+
                                if (!(*i)->hidden()) {
                                        break;
                                }
-                               
+
                        } while (true);
                }
-               
+
                if ((i != allviews.end()) && (*i != this) && !(*i)->hidden()) {
                        _editor.ensure_time_axis_view_is_visible (**i, false);
                        (*i)->begin_name_edit ();
@@ -1226,19 +1226,19 @@ TimeAxisView::color_handler ()
 
                (*i)->start_trim->set_fill_color (UIConfiguration::instance().color ("selection"));
                (*i)->start_trim->set_outline_color (UIConfiguration::instance().color ("selection"));
-               
+
                (*i)->end_trim->set_fill_color (UIConfiguration::instance().color ("selection"));
                (*i)->end_trim->set_outline_color (UIConfiguration::instance().color ("selection"));
        }
-       
+
        for (list<SelectionRect*>::iterator i = free_selection_rects.begin(); i != free_selection_rects.end(); ++i) {
-               
+
                (*i)->rect->set_fill_color (UIConfiguration::instance().color_mod ("selection rect", "selection rect"));
                (*i)->rect->set_outline_color (UIConfiguration::instance().color ("selection"));
-               
+
                (*i)->start_trim->set_fill_color (UIConfiguration::instance().color ("selection"));
                (*i)->start_trim->set_outline_color (UIConfiguration::instance().color ("selection"));
-               
+
                (*i)->end_trim->set_fill_color (UIConfiguration::instance().color ("selection"));
                (*i)->end_trim->set_outline_color (UIConfiguration::instance().color ("selection"));
        }
@@ -1314,7 +1314,7 @@ TimeAxisView::covered_by_y_range (double y0, double y1) const
        /* if either the top or bottom of the axisview is in the vertical
         * range, we cover it.
         */
-       
+
        if ((y0 < _y_position && y1 < _y_position) ||
            (y0 >= _y_position + height && y1 >= _y_position + height)) {
                return false;
@@ -1392,7 +1392,7 @@ TimeAxisView::reset_visual_state ()
        /* this method is not required to trigger a global redraw */
 
        string str = gui_property ("height");
-       
+
        if (!str.empty()) {
                set_height (atoi (str));
        } else {
index c985088c1e4854480dc6c6a6c15cf14a129ccedc..5a85005e3a1dcab8d0d28f2f759f734b7a2fa160 100644 (file)
@@ -146,9 +146,9 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
        /* share the other's parent, but still create a new group */
 
        ArdourCanvas::Item* parent = other.group->parent();
-       
+
        _selected = other._selected;
-       
+
        init (parent, other.samples_per_pixel, other.fill_color, other.frame_position,
              other.item_duration, other.visibility, other.wide_enough_for_name, other.high_enough_for_name);
 }
@@ -189,7 +189,7 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
                                                     ArdourCanvas::Rect (0.0, 0.0,
                                                                         trackview.editor().sample_to_pixel(duration),
                                                                         trackview.current_height()));
-               
+
                frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::LEFT|ArdourCanvas::Rectangle::RIGHT));
 
                CANVAS_DEBUG_NAME (frame, string_compose ("frame for %1", get_item_name()));
@@ -200,7 +200,7 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
                        frame->set_outline_color (UIConfiguration::instance().color ("time axis frame"));
                }
        }
-       
+
        if (UIConfiguration::instance().get_show_name_highlight() && (visibility & ShowNameHighlight)) {
 
                /* rectangle size will be set in ::manage_name_highlight() */
@@ -488,7 +488,7 @@ TimeAxisViewItem::set_selected(bool yn)
        if (_selected == yn) {
                return;
        }
-       
+
        Selectable::set_selected (yn);
        set_frame_color ();
        set_name_text_color ();
@@ -557,7 +557,7 @@ TimeAxisViewItem::set_height (double height)
        }
 
        if (frame) {
-               
+
                frame->set_y0 (0.0);
                frame->set_y1 (height);
 
@@ -603,7 +603,7 @@ TimeAxisViewItem::manage_name_highlight ()
                name_highlight->show();
                // name_highlight->set_x_position (1.0);
                name_highlight->set (ArdourCanvas::Rect (0.0, (double) _height - NAME_HIGHLIGHT_SIZE,  _width - 2.0, _height));
-                       
+
        } else {
                name_highlight->hide();
        }
@@ -658,10 +658,10 @@ TimeAxisViewItem::set_name_text_color ()
        if (!name_text) {
                return;
        }
-       
+
 
        uint32_t f;
-       
+
        if (UIConfiguration::instance().get_show_name_highlight()) {
                /* name text will always be on top of name highlight, which
                   will always use our fill color.
@@ -718,7 +718,7 @@ TimeAxisViewItem::set_frame_gradient ()
                frame->set_gradient (ArdourCanvas::Fill::StopList (), 0);
                return;
        }
-               
+
        ArdourCanvas::Fill::StopList stops;
        double r, g, b, a;
        double h, s, v;
@@ -726,18 +726,18 @@ TimeAxisViewItem::set_frame_gradient ()
 
        /* need to get alpha value */
        ArdourCanvas::color_to_rgba (f, r, g, b, a);
-       
+
        stops.push_back (std::make_pair (0.0, f));
-       
+
        /* now a darker version */
-       
+
        ArdourCanvas::color_to_hsv (f, h, s, v);
 
        v = min (1.0, v * (1.0 - UIConfiguration::instance().get_timeline_item_gradient_depth()));
-       
+
        ArdourCanvas::Color darker = ArdourCanvas::hsva_to_color (h, s, v, a);
        stops.push_back (std::make_pair (1.0, darker));
-       
+
        frame->set_gradient (stops, true);
 }
 
@@ -895,7 +895,7 @@ TimeAxisViewItem::manage_name_text ()
                name_text->hide ();
                return;
        }
-               
+
        if (name_text->text().empty()) {
                name_text->hide ();
        }
index 5d8bf57a3b296448052e071b8694c0f5a65f0163..7efabc93ed7e6a1389dc2930bc9f9e035cb281cb 100644 (file)
@@ -157,7 +157,7 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch)
        }
 
        set_default_response (Gtk::RESPONSE_ACCEPT);
-       
+
        VBox* progress_box = manage (new VBox);
        progress_box->set_spacing (6);
 
index 424bfe98139bdfecac78e52fb6b7ed69e911284d..a7e4a7ab100c798c53d084eea0ba27fd4cb9325c 100644 (file)
@@ -68,7 +68,7 @@ public:
     gint delete_in_progress (GdkEventAny*);
 
 private:
-       
+
     void update_progress_gui (float);
 };
 
index 55e7472f4f0fd2dfdb8cb81949d5ddaff6a6c0be..a26ec50932c2f04e8d2d4e4824e2f243be7c2f7f 100644 (file)
@@ -235,7 +235,7 @@ TimeInfoBox::sync_punch_mode (AudioClock* src)
                syncing_punch = false;
        }
 }
-       
+
 
 void
 TimeInfoBox::set_session (Session* s)
@@ -251,11 +251,11 @@ TimeInfoBox::set_session (Session* s)
 
        if (s) {
                Location* punch = s->locations()->auto_punch_location ();
-               
+
                if (punch) {
                        watch_punch (punch);
                }
-               
+
                punch_changed (punch);
 
                _session->auto_punch_location_changed.connect (_session_connections, MISSING_INVALIDATOR,
@@ -329,7 +329,7 @@ TimeInfoBox::selection_changed ()
                        Glib::RefPtr<Action> act = ActionManager::get_action ("MouseMode", "set-mouse-mode-object-range");
                        Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
 
-                       if (tact && tact->get_active() &&  !selection.regions.empty()) {        
+                       if (tact && tact->get_active() &&  !selection.regions.empty()) {
                                /* show selected regions */
                                s = selection.regions.start();
                                e = selection.regions.end_frame();
@@ -357,7 +357,7 @@ TimeInfoBox::selection_changed ()
        default:
                selection_start->set_off (true);
                selection_end->set_off (true);
-               selection_length->set_off (true);       
+               selection_length->set_off (true);
                break;
        }
 }
@@ -395,5 +395,5 @@ TimeInfoBox::punch_changed (Location* loc)
 
        punch_start->set (loc->start());
        punch_end->set (loc->end());
-}      
+}
 
index 232eb8f1a4bfcc08a8091c77a51e81945147d0e8..d4ec4ca9f8d51584aa5b406b5f4f8eee65625969 100644 (file)
@@ -120,7 +120,7 @@ void
 UIConfiguration::parameter_changed (string param)
 {
        _dirty = true;
-       
+
        if (param == "ui-rc-file") {
                load_rc_file (true);
        } else if (param == "color-file") {
@@ -136,9 +136,9 @@ UIConfiguration::reset_gtk_theme ()
        stringstream ss;
 
        ss << "gtk_color_scheme = \"" << hex;
-       
+
        for (ColorAliases::iterator g = color_aliases.begin(); g != color_aliases.end(); ++g) {
-               
+
                if (g->first.find ("gtk_") == 0) {
                        const string gtk_name = g->first.substr (4);
                        ss << gtk_name << ":#" << std::setw (6) << setfill ('0') << (color (g->second) >> 8) << ';';
@@ -223,7 +223,7 @@ UIConfiguration::load_defaults ()
 {
         std::string rcfile;
        int ret = -1;
-       
+
        if (find_file (ardour_config_search_path(), default_ui_config_file_name, rcfile) ) {
                XMLTree tree;
 
@@ -274,7 +274,7 @@ UIConfiguration::load_color_theme (bool allow_own)
        if (!found) {
                basename = color_file.get();
                basename += ".colors";
-       
+
                if (find_file (ardour_config_search_path(), basename, cfile)) {
                        found = true;
                }
@@ -283,7 +283,7 @@ UIConfiguration::load_color_theme (bool allow_own)
        if (found) {
 
                XMLTree tree;
-               
+
                info << string_compose (_("Loading color file %1"), cfile) << endmsg;
 
                if (!tree.read (cfile.c_str())) {
@@ -322,7 +322,7 @@ UIConfiguration::store_color_theme ()
                parent->add_child_nocopy (*node);
        }
        root->add_child_nocopy (*parent);
-       
+
        parent = new XMLNode (X_("ColorAliases"));
        for (ColorAliases::const_iterator i = color_aliases.begin(); i != color_aliases.end(); ++i) {
                XMLNode* node = new XMLNode (X_("ColorAlias"));
@@ -343,7 +343,7 @@ UIConfiguration::store_color_theme ()
 
        XMLTree tree;
        std::string colorfile = Glib::build_filename (user_config_directory(), (string ("my-") + color_file.get() + ".colors"));
-       
+
        tree.set_root (root);
 
        if (!tree.write (colorfile.c_str())){
@@ -410,7 +410,7 @@ UIConfiguration::save_state()
 
        if (_dirty) {
                std::string rcfile = Glib::build_filename (user_config_directory(), ui_config_file_name);
-               
+
                XMLTree tree;
 
                tree.set_root (&get_state());
@@ -434,7 +434,7 @@ UIConfiguration::save_state()
                colors_modified = false;
                modifiers_modified = false;
        }
-       
+
 
        return 0;
 }
@@ -530,7 +530,7 @@ UIConfiguration::load_color_aliases (XMLNode const & node)
        XMLNodeConstIterator niter;
        XMLProperty const *name;
        XMLProperty const *alias;
-       
+
        color_aliases.clear ();
 
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
@@ -553,7 +553,7 @@ UIConfiguration::load_colors (XMLNode const & node)
        XMLNodeConstIterator niter;
        XMLProperty const *name;
        XMLProperty const *color;
-       
+
        colors.clear ();
 
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
@@ -579,9 +579,9 @@ UIConfiguration::load_modifiers (XMLNode const & node)
        XMLNodeConstIterator niter;
        XMLProperty const *name;
        XMLProperty const *mod;
-       
+
        modifiers.clear ();
-       
+
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                if ((*niter)->name() != X_("Modifier")) {
                        continue;
@@ -639,7 +639,7 @@ UIConfiguration::color (const std::string& name, bool* failed) const
        if (failed) {
                *failed = false;
        }
-       
+
        if (e != color_aliases.end ()) {
                Colors::const_iterator rc = colors.find (e->second);
                if (rc != colors.end()) {
@@ -652,7 +652,7 @@ UIConfiguration::color (const std::string& name, bool* failed) const
                        return rc->second;
                }
        }
-       
+
        if (!failed) {
                /* only show this message if the caller wasn't interested in
                   the fail status.
@@ -663,7 +663,7 @@ UIConfiguration::color (const std::string& name, bool* failed) const
        if (failed) {
                *failed = true;
        }
-       
+
        return rgba_to_color ((g_random_int()%256)/255.0,
                              (g_random_int()%256)/255.0,
                              (g_random_int()%256)/255.0,
index 15a58ffc44e6d24e03cc7a6e125701598f342b79..06338aae39f6ee91f13362c59a18ea3ad2238d3e 100644 (file)
@@ -69,7 +69,7 @@ private:
        void set_alias (std::string const & name, std::string const & alias);
        void set_color (const std::string& name, ArdourCanvas::Color);
        void set_modifier (std::string const &, ArdourCanvas::SVAModifier svam);
-       
+
        std::string color_as_alias (ArdourCanvas::Color c);
        ArdourCanvas::Color quantized (ArdourCanvas::Color) const;
 
@@ -85,7 +85,7 @@ private:
        void set_pango_fontsize ();
 
        float get_ui_scale ();
-               
+
        sigc::signal<void>  DPIReset;
 
        sigc::signal<void,std::string> ParameterChanged;
@@ -102,7 +102,7 @@ private:
        /** called after the GUI toolkit has been initialized.
         */
        UIConfiguration* post_gui_init ();
-       
+
 #undef UI_CONFIG_VARIABLE
 #define UI_CONFIG_VARIABLE(Type,var,name,value) \
        Type get_##var () const { return var.get(); } \
@@ -132,7 +132,7 @@ private:
        bool aliases_modified;
        bool colors_modified;
        bool modifiers_modified;
-       
+
        int store_color_theme ();
        void load_color_aliases (XMLNode const &);
        void load_colors (XMLNode const &);
index e0607675df1d98d19a836fe449e0d5aeb0dda417..68f4c834262c8d7cf92ecae278370fc6dcf42d97 100644 (file)
@@ -507,7 +507,7 @@ ARDOUR_UI_UTILS::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEv
                                                                          ev->keyval, fakekey));
 
                        DEBUG_TRACE (DEBUG::Accelerators, string_compose ("\tmodified modifier was %1\n", show_gdk_event_state (modifier)));
-                       
+
                        if (allow_activating && gtk_accel_groups_activate(G_OBJECT(win), fakekey, modifier)) {
                                DEBUG_TRACE (DEBUG::Accelerators, "\taccel group activated by fakekey\n");
                                return true;
@@ -590,7 +590,7 @@ ARDOUR_UI_UTILS::get_icon_sets ()
        Searchpath spath(ARDOUR::ardour_data_search_path());
        spath.add_subdirectory_to_paths ("icons");
        vector<string> r;
-       
+
        r.push_back (_("default"));
 
        for (vector<string>::iterator s = spath.begin(); s != spath.end(); ++s) {
@@ -626,22 +626,22 @@ ARDOUR_UI_UTILS::get_icon_path (const char* cname, string icon_set, bool is_imag
                /* add "icons/icon_set" but .. not allowed to add both of these at once */
                spath.add_subdirectory_to_paths ("icons");
                spath.add_subdirectory_to_paths (icon_set);
-               
+
                find_file (spath, name, data_file_path);
        } else {
                spath.add_subdirectory_to_paths ("icons");
                find_file (spath, name, data_file_path);
        }
-       
+
        if (is_image && data_file_path.empty()) {
-               
+
                if (!icon_set.empty() && icon_set != _("default")) {
                        warning << string_compose (_("icon \"%1\" not found for icon set \"%2\", fallback to default"), cname, icon_set) << endmsg;
                }
-               
+
                Searchpath def (ARDOUR::ardour_data_search_path());
                def.add_subdirectory_to_paths ("icons");
-       
+
                if (!find_file (def, name, data_file_path)) {
                        fatal << string_compose (_("cannot find icon image for %1 using %2"), name, spath.to_string()) << endmsg;
                        abort(); /*NOTREACHED*/
index 7d12a2a13ea386eec26e43dbbd5733274b8a94ae..6160bb3296b2a6d4d5ec94728bb55c744ba663d3 100644 (file)
@@ -41,7 +41,7 @@ public:
 
        void show ();
        void hide ();
-       
+
 private:
        Editor*                     _editor;
        ArdourCanvas::TrackingText* _canvas_item;
index 82621283b67fdc63e64b7517b896ae45a8be19a9..46a941d0fc2b97f078f0e00b5e14c18e75f69634 100644 (file)
@@ -54,7 +54,7 @@ VisibilityGroup::add (Gtk::Widget* widget, string const & id, string const & nam
        m.name = name;
        m.visible = visible;
        m.override = override;
-       
+
        _members.push_back (m);
 }
 
@@ -161,7 +161,7 @@ VisibilityGroup::set_state (string v)
                }
 
                v = v.substr (comma + 1);
-               
+
        } while (1);
 
        update ();
@@ -195,11 +195,11 @@ VisibilityGroup::update_list_view ()
        if (!_model) {
                return;
        }
-       
+
        _ignore_list_view_change = true;
 
        _model->clear ();
-       
+
        for (vector<Member>::iterator i = _members.begin(); i != _members.end(); ++i) {
                Gtk::TreeModel::iterator j = _model->append ();
                Gtk::TreeModel::Row row = *j;
@@ -235,7 +235,7 @@ VisibilityGroup::list_view_visible_changed (string const & path)
        if (_ignore_list_view_change) {
                return;
        }
-       
+
        Gtk::TreeModel::iterator i = _model->get_iter (path);
        if (!i) {
                return;
index 20be7dcf7248cb7d32c6093021eae645ac5b5504..8ac2c1db5f7aa4bf22e08b544dffc284f3e54a08 100644 (file)
@@ -36,7 +36,7 @@ class VisibilityGroup
 {
 public:
        VisibilityGroup (std::string const &);
-       
+
        void add (
                Gtk::Widget *,
                std::string const &,
@@ -44,7 +44,7 @@ public:
                bool visible = false,
                boost::function<boost::optional<bool> ()> = 0
                );
-       
+
        Gtk::Menu* menu ();
        Gtk::Widget* list_view ();
        bool button_press_event (GdkEventButton *);
@@ -55,7 +55,7 @@ public:
        std::string get_state_value () const;
 
        PBD::Signal0<void> VisibilityChanged;
-       
+
 private:
 
        struct Member {
index 85f615aea83f9860a3423dacd0663ab44893ae0d..346ed6e33b9b3a382dfca13b113e4d78585882ec 100644 (file)
@@ -63,7 +63,7 @@ void
 VolumeController::dB_printer (char buf[32], const boost::shared_ptr<PBD::Controllable>& c)
 {
        if (c) {
-               
+
                if (_linear) {
 
                        double val = accurate_coefficient_to_dB (c->get_value());
@@ -83,7 +83,7 @@ VolumeController::dB_printer (char buf[32], const boost::shared_ptr<PBD::Control
                        }
 
                } else {
-                       
+
                        double dB = accurate_coefficient_to_dB (c->get_value());
 
                        if (step_inc < 1.0) {
index a5e3afe300bfee1f4722d66127c1e8d05d7ae5a1..a964e96b4ee920ecb08f233c6e8cb8f779ade326 100644 (file)
@@ -94,7 +94,7 @@ VSTPluginUI::package (Gtk::Window& win)
                        _vst->state()->width + _vst->state()->hoffset,
                        _vst->state()->height + _vst->state()->voffset);
 #endif
-       
+
        return 0;
 }
 
index 8996fe0a21f5f14be45f27cffb6d84b24fa7fc8a..5c8df726c7ef8f0f9f3a0b54aae261ded5208602 100644 (file)
@@ -41,11 +41,11 @@ public:
        virtual int package (Gtk::Window &);
 
        bool non_gtk_gui () const { return true; }
-       
+
 protected:
 
        virtual int get_XID () = 0;
-       
+
        boost::shared_ptr<ARDOUR::VSTPlugin> _vst;
        Gtk::Socket _socket;
 
index f15e0b36212f9a6f515e1c008d7838f62cbe439e..b4767879266b40fe84a0583866f0fff086b93653 100644 (file)
@@ -163,7 +163,7 @@ Manager::set_transient_for (Gtk::Window* parent)
                        }
                }
        }
-       
+
        current_transient_parent = parent;
 #endif
 }
@@ -300,12 +300,12 @@ XMLNode&
 ProxyBase::get_state () const
 {
        XMLNode* node = new XMLNode (X_("Window"));
-       char buf[32];   
+       char buf[32];
 
        node->add_property (X_("name"), _name);
 
        if (_window && vistracker) {
-               
+
                /* we have a window, so use current state */
 
                _visible = vistracker->partially_visible ();
@@ -316,7 +316,7 @@ ProxyBase::get_state () const
        }
 
        node->add_property (X_("visible"), _visible? X_("yes") : X_("no"));
-       
+
        snprintf (buf, sizeof (buf), "%d", _x_off);
        node->add_property (X_("x-off"), buf);
        snprintf (buf, sizeof (buf), "%d", _y_off);
@@ -371,7 +371,7 @@ ProxyBase::setup ()
        }
        set_session(_session);
 }
-       
+
 void
 ProxyBase::show ()
 {
index 40591f84ba4a5f37d77a034231bc9abc788e5797..6e89be3b267a66482aea6a6c08c5db34fe804cb0 100644 (file)
@@ -74,7 +74,7 @@ class Manager : public ARDOUR::SessionHandlePtr
 
     static Manager* _instance;
 };
-       
+
 class ProxyBase : public ARDOUR::SessionHandlePtr, public sigc::trackable {
   public:
     ProxyBase (const std::string& name, const std::string& menu_name);
@@ -126,7 +126,7 @@ class ProxyBase : public ARDOUR::SessionHandlePtr, public sigc::trackable {
 
     void setup ();
 };
-       
+
 class ProxyTemporary: public ProxyBase {
   public:
     ProxyTemporary (const std::string& name, Gtk::Window* win);
@@ -143,16 +143,16 @@ class ProxyTemporary: public ProxyBase {
 
     ARDOUR::SessionHandlePtr* session_handle ();
 };
-       
+
 template<typename T>
 class ProxyWithConstructor: public ProxyBase {
   public:
     ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function<T*()>& c)
            : ProxyBase (name, menu_name) , creator (c) {}
-       
+
     ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function<T*()>& c, const XMLNode* node)
            : ProxyBase (name, menu_name, *node) , creator (c) {}
-       
+
     Gtk::Window* get (bool create = false) {
            if (!_window) {
                    if (!create) {
@@ -163,7 +163,7 @@ class ProxyWithConstructor: public ProxyBase {
 
                    if (_window) {
                            setup ();
-                   }   
+                   }
            }
 
            return _window;
@@ -199,7 +199,7 @@ class Proxy : public ProxyBase {
 
     Proxy (const std::string& name, const std::string& menu_name, const XMLNode* node)
            : ProxyBase (name, menu_name, *node)  {}
-       
+
     Gtk::Window* get (bool create = false) {
            if (!_window) {
                    if (!create) {
@@ -210,7 +210,7 @@ class Proxy : public ProxyBase {
 
                    if (_window) {
                            setup ();
-                   }   
+                   }
            }
 
            return _window;
index e8bb51cb1c945bd0c4a2961d9d73dff3608b7060..52818909639c42ce1cf273cd65bc75923707bdd0 100644 (file)
@@ -86,10 +86,10 @@ WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
                /* buffer full */
                return;
        }
-       
+
        int special_windows_key = 0;
        int character_windows_key = 0;
-       
+
        switch (ev->keyval) {
        case GDK_Left:
                special_windows_key = 0x25;
@@ -111,11 +111,11 @@ WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
                character_windows_key = ev->keyval;
                break;
        }
-       
+
        fst->pending_keys[fst->n_pending_keys].special = special_windows_key;
        fst->pending_keys[fst->n_pending_keys].character = character_windows_key;
        fst->n_pending_keys++;
-       
+
        pthread_mutex_unlock (&fst->lock);
 }
 
index 2fa0bbc7055b0b4bd5d99a5b99726016e3459142..8b366b7da68cf6057eda79b0c752297e0f4e2676 100644 (file)
@@ -33,7 +33,7 @@ public:
        void forward_key_event (GdkEventKey *);
 
 private:
-       
+
        int get_XID ();
-       
+
 };
index 453522459db3c8a5e08678de7a18b4e95283cbe1..cce6a0ef5a10ec935f03d6b962e44d8d12152352 100644 (file)
@@ -178,7 +178,7 @@ int main (int argc, char* argv[])
        }
 
        Session* s = 0;
-       
+
        try {
                s = load_session (argv[optind], argv[optind+1]);
        } catch (failed_constructor& e) {
@@ -196,7 +196,7 @@ int main (int argc, char* argv[])
        }
 
        s->request_transport_speed (1.0);
-       
+
        sleep (-1);
 
        AudioEngine::instance()->remove_session ();
index a18989bee430ed0bb0a2b0f0d2d6f66ca45b9c6c..fd7f66025d637a0bd2ed6b78ce6dd71d01c8b52b 100644 (file)
@@ -7,7 +7,7 @@ void
 TestReceiver::receive (Transmitter::Channel chn, const char * str)
 {
        const char *prefix = "";
-       
+
        switch (chn) {
        case Transmitter::Error:
                prefix = ": [ERROR]: ";
@@ -25,13 +25,13 @@ TestReceiver::receive (Transmitter::Channel chn, const char * str)
                /* this isn't supposed to happen */
                abort ();
        }
-       
+
        /* note: iostreams are already thread-safe: no external
           lock required.
        */
-       
+
        std::cout << prefix << str << std::endl;
-       
+
        if (chn == Transmitter::Fatal) {
                ::exit (9);
        }
index 026989afc44e6fdc5aeaa35c43ad4a1392106760..3e6444855abb7325bd27aa267fbb5ef0df6c20e6 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        AUOutputBL.h
-       
+
 =============================================================================*/
 #include "AUOutputBL.h"
 
@@ -79,7 +79,7 @@ AUOutputBL::~AUOutputBL()
 void   AUOutputBL::Prepare (UInt32 inNumFrames, bool inWantNullBufferIfAllocated)
 {
        UInt32 channelsPerBuffer = mFormat.IsInterleaved() ? mFormat.NumberChannels() : 1;
-       
+
        if (mBufferMemory == NULL || inWantNullBufferIfAllocated)
        {
                mBufferList->mNumberBuffers = mNumberBuffers;
@@ -95,7 +95,7 @@ void  AUOutputBL::Prepare (UInt32 inNumFrames, bool inWantNullBufferIfAllocated)
                UInt32 nBytes = mFormat.FramesToBytes (inNumFrames);
                if ((nBytes * mNumberBuffers) > AllocatedBytes())
                        throw OSStatus(-10874);//(kAudioUnitErr_TooManyFramesToProcess);
-                       
+
                mBufferList->mNumberBuffers = mNumberBuffers;
                AudioBuffer *buf = &mBufferList->mBuffers[0];
                Byte* p = mBufferMemory;
@@ -114,25 +114,25 @@ void      AUOutputBL::Allocate (UInt32 inNumFrames)
        if (inNumFrames)
        {
                UInt32 nBytes = mFormat.FramesToBytes (inNumFrames);
-               
+
                if (nBytes <= AllocatedBytes())
                        return;
-               
+
                        // align successive buffers for Altivec and to take alternating
                        // cache line hits by spacing them by odd multiples of 16
                if (mNumberBuffers > 1)
                        nBytes = (nBytes + (0x10 - (nBytes & 0xF))) | 0x10;
-               
+
                mBufferSize = nBytes;
-               
+
                UInt32 memorySize = mBufferSize * mNumberBuffers;
                Byte *newMemory = new Byte[memorySize];
                memset(newMemory, 0, memorySize);       // make buffer "hot"
-               
+
                Byte *oldMemory = mBufferMemory;
                mBufferMemory = newMemory;
                delete[] oldMemory;
-               
+
                mFrames = inNumFrames;
        }
        else
index e76d1bfe2849868de2ed07045b99b39845ee295c..39887b6a3f2177d8290ebb767e966d47274b6ec4 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        AUOutputBL.h
-       
+
 =============================================================================*/
 
 #ifndef __AUOutputBL_h__
 
 class AUOutputBL {
 public:
-                                                                                       
+
                                                                                        // you CANNOT use one of these - it will crash!
 //                                                                             AUOutputBL ();
-                                                                               
+
                                                                                        // this is the constructor that you use
                                                                                        // it can't be reset once you've constructed it
                                                                                AUOutputBL (const CAStreamBasicDescription &inDesc, UInt32 inDefaultNumFrames = 512);
@@ -74,29 +74,29 @@ public:
                                                                                {
                                                                                        Prepare (mFrames);
                                                                                }
-                                                                       
+
                                                                // this version can throw if this is an allocted ABL and inNumFrames is > AllocatedFrames()
                                                                // you can set the bool to true if you want a NULL buffer list even if allocated
                                                                // inNumFrames must be a valid number (will throw if inNumFrames is 0)
        void                                                            Prepare (UInt32 inNumFrames, bool inWantNullBufferIfAllocated = false);
-       
+
        AudioBufferList*                                        ABL() { return mBufferList; }
-                                                               
+
                                                                // You only need to call this if you want to allocate a buffer list
                                                                // if you want an empty buffer list, just call Prepare()
                                                                // if you want to dispose previously allocted memory, pass in 0
                                                                // then you either have an empty buffer list, or you can re-allocate
                                                                // Memory is kept around if an Allocation request is less than what is currently allocated
        void                                                            Allocate (UInt32 inNumberFrames);
-       
+
        UInt32                                                          AllocatedFrames() const { return mFrames; }
-       
+
        const CAStreamBasicDescription&         GetFormat() const { return mFormat; }
 
 #if DEBUG
        void                                                            Print();
 #endif
-       
+
 private:
        UInt32                                          AllocatedBytes () const { return (mBufferSize * mNumberBuffers); }
 
index 15cee0fa34548df80cc833f8d1273af9ba61ea36..6379e5642c37fff76ea86a58a2c81d6258746e7c 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        AUParamInfo.cpp
-       
+
 =============================================================================*/
 #include "AUParamInfo.h"
 #include "CAXException.h"
@@ -56,14 +56,14 @@ AUParamInfo::AUParamInfo (AudioUnit                         inAU,
        UInt32 size;
        OSStatus result = AudioUnitGetPropertyInfo(mAU, kAudioUnitProperty_ParameterList, inScope, mElement, &size, NULL);
                if (size == 0 || result) return;
-       
+
        int nparams = size / sizeof(AudioUnitPropertyID);
        mParamListID = new AudioUnitParameterID[nparams];
 
        memset (mParamListID, 0xFF, size);
 
        AudioUnitParameterID *paramList = new AudioUnitParameterID[nparams];
-       
+
        result = AudioUnitGetProperty(mAU, kAudioUnitProperty_ParameterList, mScope, mElement, paramList, &size);
        if (result) {
                delete [] mParamListID;
@@ -71,13 +71,13 @@ AUParamInfo::AUParamInfo (AudioUnit                         inAU,
                mParamListID = NULL;
                return;
        }
-       
+
        ParameterMap params;
        for (int i = 0; i < nparams; ++i)
        {
                CAAUParameter auvp (mAU, paramList[i], mScope, mElement); // took out only using global scope in CAAUParameter creation
                const AudioUnitParameterInfo &paramInfo = auvp.ParamInfo();
-                       
+
                //      don't include if parameter can't be read or written
                if (!(paramInfo.flags & kAudioUnitParameterFlag_IsWritable)
                        && !(paramInfo.flags & kAudioUnitParameterFlag_IsReadable))
@@ -86,18 +86,18 @@ AUParamInfo::AUParamInfo (AudioUnit                         inAU,
                // only include if expert params wanted
                if (!inIncludeExpert && auvp.IsExpert())
                        continue;
-               
+
                // only include if read only params are wanted
                if (!(paramInfo.flags & kAudioUnitParameterFlag_IsWritable)
                        && (paramInfo.flags & kAudioUnitParameterFlag_IsReadable))
-               {       
+               {
                        if (!inIncludeReadOnly)
                                continue;
                }
-               
+
                mParamListID[mNumParams] = paramList[i];
                mNumParams++;
-               
+
                // ok - if we're here, then we have a parameter we are going to display.
                UInt32 clump = 0;
                auvp.GetClumpID (clump);
index b5f7c2634589ab46be7f3d33093e32477d732637..e20e14b2596f3b23ebf11114a9a1dc44c7c82b0b 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        AUParamInfo.h
-       
+
 =============================================================================*/
 #include <map>
 #include <vector>
@@ -48,7 +48,7 @@
        The ParameterMap returned by the Map() method is a map where
                - the key is the clumpID
                - the value is a ParameterList (vector<CAAUParameter>)
-               
+
        If you have parameters on multiple scopes (or elements within a scope), then you should create one of these
        for each scope-element pair
 */
@@ -66,40 +66,40 @@ public:
                                                                        bool                            inIncludeReadOnly,
                                                                        AudioUnitScope          inScope = kAudioUnitScope_Global,
                                                                        AudioUnitElement        inElement = 0);
-                                                                       
+
                                                        ~AUParamInfo();
-                                                       
+
        const ParameterMap&             Map () const { return mParams; }
-       
+
        // some convenience methods
        UInt32                                  NumParams () const { return mNumParams; }
-       
+
        AudioUnitParameterID    ParamID (UInt32 inIndex) const
                                                        {
                                                                if (inIndex < mNumParams) return mParamListID[inIndex];
                                                                return 0xFFFFFFFF;
                                                        }
-                                                       
+
        UInt32                                  NumClumps () const { return mParams.size(); }
 
        UInt32                                  NumParamsForClump (UInt32 inClump) const;
-       
+
                        // returns NULL if there's no info for the parameter
        const CAAUParameter*    GetParamInfo (AudioUnitParameterID inParamID) const;
-       
+
        AudioUnitScope                  GetScope () const { return mScope; }
        AudioUnitElement                GetElement () const { return mElement; }
-       
+
 private:
 
        AudioUnit                               mAU;
        UInt32                                  mNumParams;
        AudioUnitParameterID *  mParamListID;
-       
+
        ParameterMap                    mParams;
        AudioUnitScope                  mScope;
        AudioUnitElement                mElement;
-               
+
                // disallow
        AUParamInfo () {}
        AUParamInfo (const AUParamInfo &) {}
index 1050ecfe1b65d5b97dedc45c3a369b66ba3c4245..4953a3cd2315783f9bcf71b60fd89cb78e0eeed7 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAAUParameter.cpp
-       
+
 =============================================================================*/
 
 #include "CAAUParameter.h"
@@ -70,13 +70,13 @@ CAAUParameter &     CAAUParameter::operator = (const CAAUParameter &a)
        if (mParamName) CFRelease(mParamName);
        if (mParamTag) CFRelease(mParamTag);
        if (mNamedParams) CFRelease(mNamedParams);
-       
+
        memcpy(this, &a, sizeof(CAAUParameter));
 
        if (mParamName) CFRetain(mParamName);
        if (mParamTag) CFRetain(mParamTag);
        if (mNamedParams) CFRetain(mNamedParams);
-       
+
        return *this;
 }
 
@@ -93,7 +93,7 @@ void          CAAUParameter::Init (AudioUnit au, AudioUnitParameterID param, AudioUnitSc
        mParameterID = param;
        mScope = scope;
        mElement = element;
-       
+
        UInt32 propertySize = sizeof(mParamInfo);
        OSStatus err = AudioUnitGetProperty(au, kAudioUnitProperty_ParameterInfo,
                        scope, param, &mParamInfo, &propertySize);
@@ -105,7 +105,7 @@ void                CAAUParameter::Init (AudioUnit au, AudioUnitParameterID param, AudioUnitSc
                        CFRetain (mParamName);
        } else
                mParamName = CFStringCreateWithCString(NULL, mParamInfo.name, kCFStringEncodingUTF8);
-       
+
        char* str = 0;
        switch (mParamInfo.unit)
        {
@@ -204,7 +204,7 @@ void                CAAUParameter::Init (AudioUnit au, AudioUnitParameterID param, AudioUnitSc
                        str = NULL;
                        break;
        }
-       
+
        if (str)
                mParamTag = CFStringCreateWithCString(NULL, str, kCFStringEncodingUTF8);
        else
@@ -239,18 +239,18 @@ CFStringRef CAAUParameter::GetStringFromValueCopy(const Float32 *value) const
                stringValue.inValue = value;
                stringValue.outString = NULL;
                UInt32 propertySize = sizeof(stringValue);
-               
+
                OSStatus err = AudioUnitGetProperty (mAudioUnit,
                                                                                        kAudioUnitProperty_ParameterStringFromValue,
                                                                                        mScope,
                                                                                        mParameterID,
                                                                                        &stringValue,
                                                                                        &propertySize);
-               
+
                if (err == noErr && stringValue.outString != NULL)
                        return stringValue.outString;
        }
-       
+
        Float32 val = (value == NULL ? GetValue() : *value);
        char valstr[32];
        AUParameterFormatValue (val, this, valstr, 4);
@@ -265,19 +265,19 @@ Float32 CAAUParameter::GetValueFromString(CFStringRef str) const
                valueString.inParamID = mParameterID;
                valueString.inString = str;
                UInt32 propertySize = sizeof(valueString);
-               
+
                OSStatus err = AudioUnitGetProperty (mAudioUnit,
                                                                                kAudioUnitProperty_ParameterValueFromString,
                                                                                mScope,
                                                                                mParameterID,
                                                                                &valueString,
                                                                                &propertySize);
-                                                                               
+
                if (err == noErr) {
                        return valueString.outValue;
                }
        }
-       
+
        Float32 paramValue = mParamInfo.defaultValue;
        char valstr[32];
        CFStringGetCString(str, valstr, sizeof(valstr), kCFStringEncodingUTF8);
@@ -304,12 +304,12 @@ void      CAAUParameter::Print() const
 {
        UInt32 clump = 0;
        GetClumpID (clump);
-       
+
        UInt32 len = CFStringGetLength(mParamName);
        char* chars = (char*)malloc (len * 2); // give us plenty of room for unichar chars
        if (!CFStringGetCString (mParamName, chars, len * 2, kCFStringEncodingUTF8))
                chars[0] = 0;
-       
+
        printf ("ID: %ld, Clump: %ld, Name: %s\n", mParameterID, clump, chars);
        free (chars);
 }
index 143a798006acda28f34969262d46612d20d2bbb8..82d75e560bde4e8bc1f7c586b2fe70c1c8b94d4c 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAAUParameter.h
-       
+
 =============================================================================*/
 
 #ifndef __CAAUParameter_h__
@@ -61,7 +61,7 @@ public:
                                                                CAAUParameter(const CAAUParameter &a);
                                                                /*! @dtor ~CAAUParameter */
                                                                ~CAAUParameter();
-               
+
        /*! @method operator <@ */
        bool                                            operator < (const CAAUParameter &a) const
                                                                {
@@ -73,23 +73,23 @@ public:
                                                                {
                                                                        return !memcmp(this, &a, sizeof(AudioUnitParameter));
                                                                }
-       
+
        /*! @method operator =@ */
        CAAUParameter &                         operator = (const CAAUParameter &a);
-       
+
        /*! @method GetValue */
        Float32                                         GetValue() const;
        /*! @method SetValue */
        void                                            SetValue(       AUParameterListenerRef                  inListener,
                                                                                        void *                                                  inObject,
                                                                                        Float32                                                 inValue) const;
-       
+
        /*! @method GetName */
        CFStringRef                                     GetName() const { return mParamName; }
                                                                                // borrowed reference!
 
        /*! @method GetStringFromValueCopy */
-       CFStringRef                                     GetStringFromValueCopy(const Float32 *value = NULL) const;      
+       CFStringRef                                     GetStringFromValueCopy(const Float32 *value = NULL) const;
                                                                                // returns a copy of the name of the current parameter value
                                                                                // or null if there is no name associated
                                                                                // caller must release
@@ -98,13 +98,13 @@ public:
                                                                {
                                                                        return (mParamInfo.flags & kAudioUnitParameterFlag_ValuesHaveStrings) != 0;
                                                                }
-       
+
        /*! @method GetValueFromString */
-       Float32                                         GetValueFromString (CFStringRef str) const;                                     
+       Float32                                         GetValueFromString (CFStringRef str) const;
                                                                        // caller must release
 
        /*! @method ParamInfo */
-       const AudioUnitParameterInfo &          
+       const AudioUnitParameterInfo &
                                                                ParamInfo()     const { return mParamInfo; }
 
        /*! @method GetParamTag */
@@ -120,16 +120,16 @@ public:
                                                                                                ? (CFStringRef) CFArrayGetValueAtIndex(mNamedParams, inIndex)
                                                                                                : 0;
                                                                }
-       
+
        /*! @method GetNumIndexedParams */
        int                                                     GetNumIndexedParams () const { return mNumIndexedParams; }
-       
+
        /*! @method IsIndexedParam */
        bool                                            IsIndexedParam () const { return mNumIndexedParams != 0; }
-       
+
        /*! @method HasNamedParams */
        bool                                            HasNamedParams () const { return IsIndexedParam() && mNamedParams; }
-       
+
        /*! @method GetClumpID */
        bool                                            GetClumpID (UInt32 &outClumpID) const
                                                                {
@@ -139,7 +139,7 @@ public:
                                                                        }
                                                                        return false;
                                                                }
-                                                               
+
        /*! @method HasDisplayTransformation */
        bool                                            HasDisplayTransformation () const
                                                                {
@@ -154,14 +154,14 @@ public:
 #if DEBUG
        void                                            Print () const;
 #endif
-       
+
                // these methods are defined in CAPersistence.cpp
                // they will persist and restore only the scope, element and param ID's of the AudioUnitParameter
                // however, this is sufficient to be able to save/restore a CAAUParameter object
        void                                            Save (CFPropertyListRef &outData) const;
-       
+
        static void                                     Save (const AudioUnitParameter &inParam, CFPropertyListRef &outData);
-       
+
        static OSStatus                         Restore (const CFPropertyListRef inData, AudioUnitParameter &outParam);
 
 protected:
@@ -176,7 +176,7 @@ protected:
        short                                           mNumIndexedParams;
        /*! @var mNamedParams */
        CFArrayRef                                      mNamedParams;
-       
+
 private:
        void                                            Init (AudioUnit au, AudioUnitParameterID param, AudioUnitScope scope, AudioUnitElement element);
 
index 585ff44fb7e7372024ef03679d3c854ae7f7acf7..5ca0b76ca064fb9817951e3f02a30f2fbe00ef83 100644 (file)
@@ -90,10 +90,10 @@ bool        operator== (const AudioChannelLayout &x, const AudioChannelLayout &y)
        // (this may be too strict a comparison if all you care about are matching layout tags)
        UInt32 theSize1 = CAAudioChannelLayout::CalculateByteSize(x.mNumberChannelDescriptions);
        UInt32 theSize2 = CAAudioChannelLayout::CalculateByteSize(y.mNumberChannelDescriptions);
-       
+
        if (theSize1 != theSize2)
                return false;
-               
+
        return !memcmp (&x, &y, theSize1);
 }
 
@@ -115,7 +115,7 @@ UInt32      CAAudioChannelLayout::NumberChannels (const AudioChannelLayout& inLayout)
 {
        if (inLayout.mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions)
                return inLayout.mNumberChannelDescriptions;
-       
+
        if (inLayout.mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap)
                return CountOnes (inLayout.mChannelBitmap);
 
index 7db75ad7e069d16ac969a80c054fadfe26224e5d..388f087ef91d856e62dc7712bbcf5c9077b22e99 100644 (file)
@@ -81,9 +81,9 @@ public:
                                                                }
        static void                                     SetAllToUnknown(AudioChannelLayout& outChannelLayout, UInt32 inNumberChannelDescriptions);
        static UInt32                           NumberChannels(const AudioChannelLayout& inLayout);
-       
+
 #if !HAL_Build
-// object methods      
+// object methods
 public:
                                                                CAAudioChannelLayout ();
 
@@ -96,7 +96,7 @@ public:
                                                                CAAudioChannelLayout (const CAAudioChannelLayout &c);
                                                                CAAudioChannelLayout (const AudioChannelLayout* inChannelLayout);
                                                                ~CAAudioChannelLayout();
-       
+
        CAAudioChannelLayout&           operator= (const AudioChannelLayout* inChannelLayout);
        CAAudioChannelLayout&           operator= (const CAAudioChannelLayout& c);
        bool                                            operator== (const CAAudioChannelLayout &c) const;
@@ -105,19 +105,19 @@ public:
 
        bool                                            IsValid() const { return NumberChannels() > 0; }
        UInt32                                          Size() const { return mLayoutHolder ? mLayoutHolder->Size() : 0; }
-       
+
        UInt32                                          NumberChannels() const { return NumberChannels(Layout()); }
-       
+
        AudioChannelLayoutTag           Tag() const { return Layout().mChannelLayoutTag; }
        const AudioChannelLayout&       Layout() const { return mLayoutHolder->Layout(); }
        operator const AudioChannelLayout *() const { return &Layout(); }
-       
+
        void                                            Print () const { Print (stdout); }
        void                                            Print (FILE* file) const;
 
        OSStatus                                        Save (CFPropertyListRef *outData) const;
        OSStatus                                        Restore (CFPropertyListRef &inData);
-       
+
 private:
        class ACLRefCounter : public CAReferenceCounted {
        public:
@@ -125,35 +125,35 @@ private:
                                {
                                        if (inDataSize < offsetof(AudioChannelLayout, mChannelDescriptions))
                                                inDataSize = offsetof(AudioChannelLayout, mChannelDescriptions);
-                                               
+
                                        mLayout = static_cast<AudioChannelLayout*>(malloc (inDataSize));
                                        memset (mLayout, 0, inDataSize);
                                        mByteSize = inDataSize;
                                }
-       
+
                const AudioChannelLayout &      Layout() const { return *mLayout; }
-               
+
                UInt32                                          Size () const { return mByteSize; }
-               
+
        private:
                AudioChannelLayout      *mLayout;
                UInt32                          mByteSize;
-               
+
                        // only the constructors can change the actual state of the layout
                friend CAAudioChannelLayout::CAAudioChannelLayout (UInt32 inNumberChannels, bool inChooseSurround);
                friend OSStatus CAAudioChannelLayout::Restore (CFPropertyListRef &inData);
                friend CAAudioChannelLayout& CAAudioChannelLayout::operator= (const AudioChannelLayout* inChannelLayout);
                friend void CAAudioChannelLayout::SetWithTag(AudioChannelLayoutTag inTag);
-               
+
                AudioChannelLayout *    GetLayout() { return mLayout; }
                ~ACLRefCounter() { if (mLayout) { free(mLayout); mLayout = NULL; } }
-       
+
        private:
                ACLRefCounter () : mLayout(NULL) { }
                ACLRefCounter(const ACLRefCounter& other) : CAReferenceCounted (other), mLayout(NULL) { }
                ACLRefCounter& operator=(const ACLRefCounter&) { return *this; }
        };
-       
+
        ACLRefCounter                           *mLayoutHolder;
 #endif //      HAL_Build
 
index 64a452d6b6b72609bd7cb72689b8fc8995c1da75..9e3cf586e977680c34a3e78888e906ed655fe464 100644 (file)
@@ -59,16 +59,16 @@ CAAudioChannelLayout::CAAudioChannelLayout ()
 //     CAAudioChannelLayout::CAAudioChannelLayout
 //=============================================================================
 CAAudioChannelLayout::CAAudioChannelLayout (UInt32 inNumberChannels, bool inChooseSurround)
-{              
+{
                // this chooses default layouts based on the number of channels...
        UInt32 theSize = CalculateByteSize (inNumberChannels);
-               
+
        mLayoutHolder = new ACLRefCounter (theSize);
-       
+
        AudioChannelLayout* layout = mLayoutHolder->GetLayout();
 
        layout->mNumberChannelDescriptions = inNumberChannels;
-       
+
        switch (inNumberChannels)
        {
                case 1:
@@ -148,11 +148,11 @@ CAAudioChannelLayout& CAAudioChannelLayout::operator= (const CAAudioChannelLayou
        if (mLayoutHolder != c.mLayoutHolder) {
                if (mLayoutHolder)
                        mLayoutHolder->release();
-       
+
                if ((mLayoutHolder = c.mLayoutHolder) != NULL)
                        mLayoutHolder->retain();
        }
-       
+
        return *this;
 }
 
@@ -162,9 +162,9 @@ CAAudioChannelLayout&       CAAudioChannelLayout::operator= (const AudioChannelLayout*
                mLayoutHolder->release();
 
        UInt32 theSize = CalculateByteSize (inChannelLayout->mNumberChannelDescriptions);
-       
+
        mLayoutHolder = new ACLRefCounter (theSize);
-       
+
        memcpy(mLayoutHolder->mLayout, inChannelLayout, theSize);
        return *this;
 }
@@ -173,7 +173,7 @@ void        CAAudioChannelLayout::SetWithTag(AudioChannelLayoutTag inTag)
 {
        if (mLayoutHolder)
                mLayoutHolder->release();
-       
+
        mLayoutHolder = new ACLRefCounter(offsetof(AudioChannelLayout, mChannelDescriptions[0]));
        AudioChannelLayout* layout = mLayoutHolder->GetLayout();
        layout->mChannelLayoutTag = inTag;
index 1e97de621134555486c22b9d75f229549b7ebb99..148565e7fb83bb9be23fa2f066208bb9a6076e1a 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAAudioFile.cpp
-       
+
 =============================================================================*/
 
 #include "CAAudioFile.h"
                        if (sIndent == 0)
                                printf("\n");
                }
-               
+
                static void     Indent() {
                        for (int i = sIndent; --i >= 0; ) {
                                putchar(' '); putchar(' ');
                        }
                }
-               
+
                const char *mName;
                static int sIndent;
        };
@@ -126,7 +126,7 @@ CAAudioFile::CAAudioFile() :
        mMode(kClosed),
        mFileDataOffset(-1),
        mFramesToSkipFollowingSeek(0),
-       
+
        mClientOwnsIOBuffer(false),
        mPacketDescs(NULL),
        mNumPacketDescs(0),
@@ -229,7 +229,7 @@ void        CAAudioFile::CreateNew(const FSRef &parentDir, CFStringRef filename, AudioF
 {
        LOG_FUNCTION("CAAudioFile::CreateNew", "%p", this);
        XThrowIf(mMode != kClosed, kExtAudioFileError_InvalidOperationOrder, "file already open");
-       
+
        mFileDataFormat = dataFormat;
        if (layout) {
                mFileChannelLayout = layout;
@@ -249,15 +249,15 @@ void      CAAudioFile::FileFormatChanged(const FSRef *parentDir, CFStringRef filename
 {
        LOG_FUNCTION("CAAudioFile::FileFormatChanged", "%p", this);
        XThrowIf(mMode != kPreparingToCreate && mMode != kPreparingToWrite, kExtAudioFileError_InvalidOperationOrder, "new file not prepared");
-       
+
        UInt32 propertySize;
        OSStatus err;
        AudioStreamBasicDescription saveFileDataFormat = mFileDataFormat;
-       
+
 #if VERBOSE_CONVERTER
        mFileDataFormat.PrintFormat(stdout, "", "Specified file data format");
 #endif
-       
+
        // Find out the actual format the converter will produce. This is necessary in
        // case the bitrate has forced a lower sample rate, which needs to be set correctly
        // in the stream description passed to AudioFileCreate.
@@ -286,7 +286,7 @@ void        CAAudioFile::FileFormatChanged(const FSRef *parentDir, CFStringRef filename
                        free(layout);
                }
        }
-       
+
        // create the output file
        if (mMode == kPreparingToCreate) {
                CAStreamBasicDescription newFileDataFormat = mFileDataFormat;
@@ -314,12 +314,12 @@ void      CAAudioFile::FileFormatChanged(const FSRef *parentDir, CFStringRef filename
 
        if (mConverter != NULL) {
                // encoder
-               // get the magic cookie, if any, from the converter             
+               // get the magic cookie, if any, from the converter
                delete[] mMagicCookie;  mMagicCookie = NULL;
                mMagicCookieSize = 0;
 
                err = AudioConverterGetPropertyInfo(mConverter, kAudioConverterCompressionMagicCookie, &propertySize, NULL);
-               
+
                // we can get a noErr result and also a propertySize == 0
                // -- if the file format does support magic cookies, but this file doesn't have one.
                if (err == noErr && propertySize > 0) {
@@ -338,7 +338,7 @@ void        CAAudioFile::FileFormatChanged(const FSRef *parentDir, CFStringRef filename
                                XThrowIfError(AudioFileSetProperty(mAudioFile, kAudioFilePropertyMagicCookieData, mMagicCookieSize, mMagicCookie), "set audio file's magic cookie");
                        }
                }
-               
+
                // get maximum packet size
                propertySize = sizeof(UInt32);
                XThrowIfError(AudioConverterGetProperty(mConverter, kAudioConverterPropertyMaximumOutputPacketSize, &propertySize, &mFileMaxPacketSize), "get audio converter's maximum output packet size");
@@ -347,7 +347,7 @@ void        CAAudioFile::FileFormatChanged(const FSRef *parentDir, CFStringRef filename
        } else {
                InitFileMaxPacketSize();
        }
-       
+
        if (mFileChannelLayout.IsValid() && mFileChannelLayout.NumberChannels() > 2) {
                // don't bother tagging mono/stereo files
                UInt32 isWritable;
@@ -366,7 +366,7 @@ void        CAAudioFile::FileFormatChanged(const FSRef *parentDir, CFStringRef filename
 #endif
                }
        }
-       
+
        UpdateClientMaxPacketSize();    // also sets mFrame0Offset
        mPacketMark = 0;
        mFrameMark = 0;
@@ -429,11 +429,11 @@ void      CAAudioFile::GetExistingFileInfo()
        LOG_FUNCTION("CAAudioFile::GetExistingFileInfo", "%p", this);
        UInt32 propertySize;
        OSStatus err;
-       
+
        // get mFileDataFormat
        propertySize = sizeof(AudioStreamBasicDescription);
        XThrowIfError(AudioFileGetProperty(mAudioFile, kAudioFilePropertyDataFormat, &propertySize, &mFileDataFormat), "get audio file's data format");
-       
+
        // get mFileChannelLayout
        err = AudioFileGetPropertyInfo(mAudioFile, kAudioFilePropertyChannelLayout, &propertySize, NULL);
        if (err == noErr && propertySize > 0) {
@@ -450,7 +450,7 @@ void        CAAudioFile::GetExistingFileInfo()
        }
        if (mMode != kReading)
                return;
-       
+
 #if 0
        // get mNumberPackets
        propertySize = sizeof(mNumberPackets);
@@ -459,7 +459,7 @@ void        CAAudioFile::GetExistingFileInfo()
        printf("CAAudioFile::GetExistingFileInfo: %qd packets\n", mNumberPackets);
 #endif
 #endif
-       
+
        // get mMagicCookie
        err = AudioFileGetPropertyInfo(mAudioFile, kAudioFilePropertyMagicCookieData, &propertySize, NULL);
        if (err == noErr && propertySize > 0) {
@@ -470,7 +470,7 @@ void        CAAudioFile::GetExistingFileInfo()
        InitFileMaxPacketSize();
        mPacketMark = 0;
        mFrameMark = 0;
-       
+
        UpdateClientMaxPacketSize();
 }
 
@@ -495,9 +495,9 @@ void        CAAudioFile::SetClientFormat(const CAStreamBasicDescription &dataFormat, co
 {
        LOG_FUNCTION("CAAudioFile::SetClientFormat", "%p", this);
        XThrowIf(!dataFormat.IsPCM(), kExtAudioFileError_NonPCMClientFormat, "non-PCM client format on audio file");
-       
+
        bool dataFormatChanging = (mClientDataFormat.mFormatID == 0 || mClientDataFormat != dataFormat);
-       
+
        if (dataFormatChanging) {
                CloseConverter();
                if (mWriteBufferList) {
@@ -506,12 +506,12 @@ void      CAAudioFile::SetClientFormat(const CAStreamBasicDescription &dataFormat, co
                }
                mClientDataFormat = dataFormat;
        }
-       
+
        if (layout && layout->IsValid()) {
                XThrowIf(layout->NumberChannels() != mClientDataFormat.NumberChannels(), kExtAudioFileError_InvalidChannelMap, "inappropriate channel map");
                mClientChannelLayout = *layout;
        }
-       
+
        bool differentLayouts;
        if (mClientChannelLayout.IsValid()) {
                if (mFileChannelLayout.IsValid()) {
@@ -534,7 +534,7 @@ void        CAAudioFile::SetClientFormat(const CAStreamBasicDescription &dataFormat, co
                        printf("two invalid layouts\n");
 #endif
        }
-       
+
        if (mClientDataFormat != mFileDataFormat || differentLayouts) {
                // We need an AudioConverter.
                if (mMode == kReading) {
@@ -545,7 +545,7 @@ void        CAAudioFile::SetClientFormat(const CAStreamBasicDescription &dataFormat, co
                        if (mConverter == NULL)
                                XThrowIfError(AudioConverterNew(&mFileDataFormat, &mClientDataFormat, &mConverter),
                                "create audio converter");
-                       
+
 #if VERBOSE_CONVERTER
                        printf("CAAudioFile %p -- created converter\n", this);
                        CAShow(mConverter);
@@ -558,7 +558,7 @@ void        CAAudioFile::SetClientFormat(const CAStreamBasicDescription &dataFormat, co
 
                        SetConverterChannelLayout(false, mFileChannelLayout);
                        SetConverterChannelLayout(true, mClientChannelLayout);
-                       
+
                        // propagate leading/trailing frame counts
                        if (mFileDataFormat.mBitsPerChannel == 0) {
                                UInt32 propertySize;
@@ -592,7 +592,7 @@ void        CAAudioFile::SetClientFormat(const CAStreamBasicDescription &dataFormat, co
 
 // _______________________________________________________________________________________
 //
-OSStatus       CAAudioFile::SetConverterProperty(      
+OSStatus       CAAudioFile::SetConverterProperty(
                                                                                        AudioConverterPropertyID        inPropertyID,
                                                                                        UInt32                                          inPropertyDataSize,
                                                                                        const void*                                     inPropertyData,
@@ -620,7 +620,7 @@ void        CAAudioFile::SetConverterChannelLayout(bool output, const CAAudioChannelLay
 {
        LOG_FUNCTION("CAAudioFile::SetConverterChannelLayout", "%p", this);
        OSStatus err;
-       
+
        if (layout.IsValid()) {
 #if VERBOSE_CHANNELMAP
                printf("Setting converter's %s channel layout: %s\n", output ? "output" : "input",
@@ -660,11 +660,11 @@ void      CAAudioFile::UpdateClientMaxPacketSize()
                AudioConverterPropertyID property = (mMode == kReading) ?
                        kAudioConverterPropertyMaximumOutputPacketSize :
                        kAudioConverterPropertyMaximumInputPacketSize;
-                       
+
                UInt32 propertySize = sizeof(UInt32);
                XThrowIfError(AudioConverterGetProperty(mConverter, property, &propertySize, &mClientMaxPacketSize),
                        "get audio converter's maximum packet size");
-               
+
                if (mFileDataFormat.mBitsPerChannel == 0) {
                        AudioConverterPrimeInfo primeInfo;
                        propertySize = sizeof(primeInfo);
@@ -693,7 +693,7 @@ void        CAAudioFile::AllocateBuffers(bool okToFail)
        }
        UInt32 bufferSizeBytes = mIOBufferSizeBytes = std::max(mIOBufferSizeBytes, mFileMaxPacketSize);
                // must be big enough for at least one maximum size packet
-       
+
        if (mIOBufferList.mBuffers[0].mDataByteSize != bufferSizeBytes) {
                mIOBufferList.mNumberBuffers = 1;
                mIOBufferList.mBuffers[0].mNumberChannels = mFileDataFormat.mChannelsPerFrame;
@@ -705,7 +705,7 @@ void        CAAudioFile::AllocateBuffers(bool okToFail)
                mIOBufferList.mBuffers[0].mDataByteSize = bufferSizeBytes;
                mIOBufferSizePackets = bufferSizeBytes / mFileMaxPacketSize;
        }
-       
+
        UInt32 propertySize = sizeof(UInt32);
        UInt32 externallyFramed;
        XThrowIfError(AudioFormatGetProperty(kAudioFormatProperty_FormatIsExternallyFramed,
@@ -766,7 +766,7 @@ SInt64  CAAudioFile::PacketToFrame(SInt64 packet) const
 {
        AudioFramePacketTranslation trans;
        UInt32 propertySize;
-       
+
        switch (mFileDataFormat.mFramesPerPacket) {
        case 1:
                return packet;
@@ -784,7 +784,7 @@ SInt64      CAAudioFile::FrameToPacket(SInt64 inFrame) const
 {
        AudioFramePacketTranslation trans;
        UInt32 propertySize;
-       
+
        switch (mFileDataFormat.mFramesPerPacket) {
        case 1:
                return inFrame;
@@ -815,7 +815,7 @@ void        CAAudioFile::SeekToPacket(SInt64 packetNumber)
        if (mPacketMark == packetNumber)
                return; // already there! don't reset converter
        mPacketMark = packetNumber;
-       
+
        mFrameMark = PacketToFrame(packetNumber) - mFrame0Offset;
        mFramesToSkipFollowingSeek = 0;
        if (mConverter)
@@ -825,7 +825,7 @@ void        CAAudioFile::SeekToPacket(SInt64 packetNumber)
 
 /*
        Example: AAC, 1024 frames/packet, 2112 frame offset
-       
+
                                            2112
                                              |
     Absolute frames:  0       1024      2048 |    3072
@@ -838,7 +838,7 @@ void        CAAudioFile::SeekToPacket(SInt64 packetNumber)
 
        *   Offset between absolute and client frames is mFrame0Offset.
        *** mFrameMark is in client frames ***
-       
+
        Examples:
                clientFrame                                     0               960             1000    1024
                absoluteFrame                           2112    3072    3112    3136
@@ -857,7 +857,7 @@ void        CAAudioFile::Seek(SInt64 clientFrame)
 #if VERBOSE_IO
        SInt64 prevFrameMark = mFrameMark;
 #endif
-       
+
        SInt64 packet;
        packet = FrameToPacket(clientFrame);
        if (packet < 0)
@@ -866,7 +866,7 @@ void        CAAudioFile::Seek(SInt64 clientFrame)
        // this will have backed up mFrameMark to match the beginning of the packet
        mFramesToSkipFollowingSeek = std::max(UInt32(clientFrame - mFrameMark), UInt32(0));
        mFrameMark = clientFrame;
-       
+
 #if VERBOSE_IO
        printf("CAAudioFile::SeekToFrame: frame %qd (from %qd), packet %qd, skip %ld frames\n", mFrameMark, prevFrameMark, packet, mFramesToSkipFollowingSeek);
 #endif
@@ -889,12 +889,12 @@ void      CAAudioFile::Read(UInt32 &ioNumPackets, AudioBufferList *ioData)
                AllocateBuffers();
        }
        UInt32 bufferSizeBytes = ioData->mBuffers[0].mDataByteSize;
-       UInt32 maxNumPackets = bufferSizeBytes / mClientMaxPacketSize;  
+       UInt32 maxNumPackets = bufferSizeBytes / mClientMaxPacketSize;
        // older versions of AudioConverterFillComplexBuffer don't do this, so do our own sanity check
        UInt32 nPackets = std::min(ioNumPackets, maxNumPackets);
-       
+
        mMaxPacketsToRead = ~0UL;
-       
+
        if (mClientDataFormat.mFramesPerPacket == 1) {  // PCM or equivalent
                while (mFramesToSkipFollowingSeek > 0) {
                        UInt32 skipFrames = std::min(mFramesToSkipFollowingSeek, maxNumPackets);
@@ -931,7 +931,7 @@ void        CAAudioFile::Read(UInt32 &ioNumPackets, AudioBufferList *ioData)
                                ioData->mBuffers[i].mDataByteSize = bufferSizeBytes;
                }
        }
-       
+
        if (mFileDataFormat.mFramesPerPacket > 0)
                // don't read more packets than we are being asked to produce
                mMaxPacketsToRead = nPackets / mFileDataFormat.mFramesPerPacket + 1;
@@ -950,7 +950,7 @@ void        CAAudioFile::Read(UInt32 &ioNumPackets, AudioBufferList *ioData)
        }
        if (mClientDataFormat.mFramesPerPacket == 1)
                mFrameMark += nPackets;
-       
+
        ioNumPackets = nPackets;
 }
 
@@ -977,7 +977,7 @@ OSStatus CAAudioFile::ReadInputProc(        AudioConverterRef                               inAudioConverter,
                return noErr;   // not eofErr; EOF is signified by 0 packets/0 bytes
        }
 #endif
-       
+
        // determine how much to read
        AudioBufferList *readBuffer;
        UInt32 readPackets;
@@ -1003,11 +1003,11 @@ OSStatus CAAudioFile::ReadInputProc(    AudioConverterRef                               inAudioConverter,
 #endif
                readPackets = This->mMaxPacketsToRead;
        }
-       
+
        // read
        UInt32 bytesRead;
        OSStatus err;
-       
+
        StartTiming(This, read);
        StartTiming(This, readinconv);
        err = AudioFileReadPackets(This->mAudioFile, This->mUseCache, &bytesRead, This->mPacketDescs, This->mPacketMark, &readPackets, readBuffer->mBuffers[0].mData);
@@ -1020,7 +1020,7 @@ OSStatus CAAudioFile::ReadInputProc(      AudioConverterRef                               inAudioConverter,
                DebugMessageN1("Error %ld from AudioFileReadPackets!!!\n", err);
                return err;
        }
-       
+
 #if VERBOSE_IO
        printf("CAAudioFile::ReadInputProc: read %ld packets (%qd-%qd), %ld bytes, err %ld\n", readPackets, This->mPacketMark, This->mPacketMark + readPackets, bytesRead, err);
 #if VERBOSE_IO >= 2
@@ -1108,7 +1108,7 @@ void      CAAudioFile::FlushEncoder()
                        OSStatus err;
                        AudioConverterPrimeInfo primeInfo;
                        propertySize = sizeof(primeInfo);
-       
+
                        err = AudioConverterGetProperty(mConverter, kAudioConverterPrimeInfo, &propertySize, &primeInfo);
                        if (err == noErr) {
                                AudioFilePacketTableInfo pti;
@@ -1165,9 +1165,9 @@ static void       hexdump(const void *addr, long len)
 {
        const Byte *p = (Byte *)addr;
        UInt32 offset = 0;
-       
+
        if (len > 0x400) len = 0x400;
-       
+
        while (len > 0) {
                int n = len > 16 ? 16 : len;
                printf("%08lX:  ", offset);
index 594545a9d1f87b9066434b6df30d033547e082a7..8dd1d8690b036f0d1ce5386e58cdbe132d1af7d6 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAAudioFile.h
-       
+
 =============================================================================*/
 
 #ifndef __CAAudioFile_h__
@@ -122,7 +122,7 @@ public:
                                // open an existing file
                XThrowIfError(ExtAudioFileOpen(&fsref, &mExtAF), "ExtAudioFileOpen failed");
        }
-       
+
        void    CreateNew(const FSRef &inParentDir, CFStringRef inFileName,     AudioFileTypeID inFileType, const AudioStreamBasicDescription &inStreamDesc, const AudioChannelLayout *inChannelLayout=NULL) {
                XThrowIfError(ExtAudioFileCreateNew(&inParentDir, inFileName, inFileType, &inStreamDesc, inChannelLayout, &mExtAF), "ExtAudioFileCreateNew failed");
        }
@@ -131,7 +131,7 @@ public:
                                // use this to wrap an AudioFileID opened externally
                XThrowIfError(ExtAudioFileWrapAudioFileID(fileID, forWriting, &mExtAF), "ExtAudioFileWrapAudioFileID failed");
        }
-       
+
        void    Close() {
                std::cerr << "\tdisposeo of ext audio file @ " << mExtAF << std::endl;
                XThrowIfError(ExtAudioFileDispose(mExtAF), "ExtAudioFileClose failed");
@@ -143,11 +143,11 @@ public:
                XThrowIfError(ExtAudioFileGetProperty(mExtAF, kExtAudioFileProperty_FileDataFormat, &size, &mFileDataFormat), "Couldn't get file's data format");
                return mFileDataFormat;
        }
-       
+
        const CAAudioChannelLayout &    GetFileChannelLayout() {
                return FetchChannelLayout(mFileChannelLayout, kExtAudioFileProperty_FileChannelLayout);
        }
-       
+
        void    SetFileChannelLayout(const CAAudioChannelLayout &layout) {
                XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_FileChannelLayout, layout.Size(), &layout.Layout()), "Couldn't set file's channel layout");
                mFileChannelLayout = layout;
@@ -158,21 +158,21 @@ public:
                XThrowIfError(ExtAudioFileGetProperty(mExtAF, kExtAudioFileProperty_ClientDataFormat, &size, &mClientDataFormat), "Couldn't get client data format");
                return mClientDataFormat;
        }
-       
+
        const CAAudioChannelLayout &    GetClientChannelLayout() {
                return FetchChannelLayout(mClientChannelLayout, kExtAudioFileProperty_ClientChannelLayout);
        }
-       
+
        void    SetClientFormat(const CAStreamBasicDescription &dataFormat, const CAAudioChannelLayout *layout=NULL) {
                XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_ClientDataFormat, sizeof(dataFormat), &dataFormat), "Couldn't set client format");
                if (layout)
                        SetClientChannelLayout(*layout);
        }
-       
+
        void    SetClientChannelLayout(const CAAudioChannelLayout &layout) {
                XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_ClientChannelLayout, layout.Size(), &layout.Layout()), "Couldn't set client channel layout");
        }
-       
+
        AudioConverterRef                               GetConverter() const {
                UInt32 size = sizeof(AudioConverterRef);
                AudioConverterRef converter;
@@ -192,28 +192,28 @@ public:
                }
                return err;
        }
-       
+
        SInt64          GetNumberFrames() {
                SInt64 length;
                UInt32 size = sizeof(SInt64);
                XThrowIfError(ExtAudioFileGetProperty(mExtAF, kExtAudioFileProperty_FileLengthFrames, &size, &length), "Couldn't get file's length");
                return length;
        }
-       
+
        void            SetNumberFrames(SInt64 length) {
                XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_FileLengthFrames, sizeof(SInt64), &length), "Couldn't set file's length");
        }
-       
+
        void            Seek(SInt64 pos) {
                XThrowIfError(ExtAudioFileSeek(mExtAF, pos), "Couldn't seek in audio file");
        }
-       
+
        SInt64          Tell() {
                SInt64 pos;
                XThrowIfError(ExtAudioFileTell(mExtAF, &pos), "Couldn't get file's mark");
                return pos;
        }
-       
+
        void            Read(UInt32 &ioFrames, AudioBufferList *ioData) {
                XThrowIfError(ExtAudioFileRead(mExtAF, &ioFrames, ioData), "Couldn't read audio file");
        }
@@ -261,12 +261,12 @@ private:
        //              - Open
        //              - PrepareNew followed by Create
        //              - Wrap
-       
+
        void    Open(const FSRef &fsref);
                                // open an existing file
 
        void    CreateNew(const FSRef &inParentDir, CFStringRef inFileName,     AudioFileTypeID inFileType, const AudioStreamBasicDescription &inStreamDesc, const AudioChannelLayout *inChannelLayout=NULL);
-       
+
        void    Wrap(AudioFileID fileID, bool forWriting);
                                // use this to wrap an AudioFileID opened externally
 
@@ -274,7 +274,7 @@ private:
 
        void    Close();
                                // In case you want to close the file before the destructor executes
-       
+
        // --- Data formats ---
 
        // Allow specifying the file's channel layout. Must be called before SetClientFormat.
@@ -282,14 +282,14 @@ private:
        // the channel layout). When reading, the specified layout overrides the one read from the file,
        // if any.
        void    SetFileChannelLayout(const CAAudioChannelLayout &layout);
-       
+
        // This specifies the data format which the client will use for reading/writing the file,
        // which may be different from the file's format. An AudioConverter is created if necessary.
        // The client format must be linear PCM.
        void    SetClientFormat(const CAStreamBasicDescription &dataFormat, const CAAudioChannelLayout *layout=NULL);
        void    SetClientDataFormat(const CAStreamBasicDescription &dataFormat) { SetClientFormat(dataFormat, NULL); }
        void    SetClientChannelLayout(const CAAudioChannelLayout &layout) { SetClientFormat(mClientDataFormat, &layout); }
-       
+
        // Wrapping the underlying converter, if there is one
        OSStatus        SetConverterProperty(AudioConverterPropertyID   inPropertyID,
                                                                        UInt32                                          inPropertyDataSize,
@@ -298,7 +298,7 @@ private:
        void            SetConverterConfig(CFArrayRef config) {
                                        SetConverterProperty(kAudioConverterPropertySettings, sizeof(config), &config); }
        CFArrayRef  GetConverterConfig();
-       
+
        // --- I/O ---
        // All I/O is sequential, but you can seek to an arbitrary position when reading.
        // SeekToPacket and TellPacket's packet numbers are in the file's data format, not the client's.
@@ -310,7 +310,7 @@ private:
        // These can fail for files without a constant mFramesPerPacket
        void    Seek(SInt64 frameNumber);
        SInt64  Tell() const;   // frameNumber
-       
+
        // --- Accessors ---
        // note: client parameters only valid if SetClientFormat has been called
        AudioFileID                                             GetAudioFileID() const { return mAudioFile; }
@@ -331,27 +331,27 @@ private:
        SInt64  GetNumberFrames() const;
                                // will be 0 if the file's frames/packet is 0 (variable)
        void    SetNumberFrames(SInt64 length); // should only be set on a PCM file
-       
+
        // --- Tunable performance parameters ---
        void    SetUseCache(bool b) { mUseCache = b; }
        void    SetIOBufferSizeBytes(UInt32 bufferSizeBytes) { mIOBufferSizeBytes = bufferSizeBytes; }
        UInt32  GetIOBufferSizeBytes() { return mIOBufferSizeBytes; }
        void *  GetIOBuffer() { return mIOBufferList.mBuffers[0].mData; }
        void    SetIOBuffer(void *buf);
-       
+
        // -- Profiling ---
 #if CAAUDIOFILE_PROFILE
        void    EnableProfiling(bool b) { mProfiling = b; }
        UInt64  TicksInConverter() const { return (mTicksInConverter > 0) ? (mTicksInConverter - mTicksInReadInConverter) : 0; }
        UInt64  TicksInIO() const { return mTicksInIO; }
 #endif
-       
+
 // _______________________________________________________________________________________
 private:
        SInt64  FileDataOffset();
        void    SeekToPacket(SInt64 packetNumber);
        SInt64  TellPacket() const { return mPacketMark; }  // will be imprecise if SeekToFrame was called
-       
+
        void    SetConverterChannelLayout(bool output, const CAAudioChannelLayout &layout);
        void    WritePacketsFromCallback(
                                                                        AudioConverterComplexInputDataProc      inInputDataProc,
@@ -372,13 +372,13 @@ private:
                                                                                UInt32*                                                 ioNumberDataPackets,
                                                                                AudioBufferList*                                ioData,
                                                                                AudioStreamPacketDescription**  outDataPacketDescription,
-                                                                               void*                                                   inUserData);    
+                                                                               void*                                                   inUserData);
 
        static OSStatus WriteInputProc(         AudioConverterRef                               inAudioConverter,
                                                                                UInt32*                                                 ioNumberDataPackets,
                                                                                AudioBufferList*                                ioData,
                                                                                AudioStreamPacketDescription**  outDataPacketDescription,
-                                                                               void*                                                   inUserData);    
+                                                                               void*                                                   inUserData);
 // _______________________________________________________________________________________
 private:
 
@@ -389,7 +389,7 @@ private:
        bool                                            mUseCache;
        bool                                            mFinishingEncoding;
        enum { kClosed, kReading, kPreparingToCreate, kPreparingToWrite, kWriting } mMode;
-       
+
 //     SInt64                                          mNumberPackets;         // in file's format
        SInt64                                          mFileDataOffset;
        SInt64                                          mPacketMark;            // in file's format
@@ -398,7 +398,7 @@ private:
                                                                                                        // lie at frame 2112 of a decoded AAC file
        SInt32                                          mFrame0Offset;
        UInt32                                          mFramesToSkipFollowingSeek;
-       
+
        // buffers
        UInt32                                          mIOBufferSizeBytes;
        UInt32                                          mIOBufferSizePackets;
@@ -406,7 +406,7 @@ private:
        bool                                            mClientOwnsIOBuffer;
        AudioStreamPacketDescription *mPacketDescs;
        UInt32                                          mNumPacketDescs;
-       
+
        // formats/conversion
        AudioConverterRef                       mConverter;
        CAStreamBasicDescription        mFileDataFormat;
@@ -415,18 +415,18 @@ private:
        CAAudioChannelLayout            mClientChannelLayout;
        UInt32                                          mFileMaxPacketSize;
        UInt32                                          mClientMaxPacketSize;
-       
+
        // cookie
        Byte *                                          mMagicCookie;
        UInt32                                          mMagicCookieSize;
-       
+
        // for ReadPackets
        UInt32                                          mMaxPacketsToRead;
-       
+
        // for WritePackets
        UInt32                                          mWritePackets;
        CABufferList *                          mWriteBufferList;
-       
+
 #if CAAUDIOFILE_PROFILE
        // performance
        bool                                            mProfiling;
index 853cfc124c65725668a628a3bca721a56c3ee301..f0b0890c51505ee9089cfaadd128f7705ab77238 100644 (file)
@@ -55,7 +55,7 @@
 struct StackAUChannelInfo {
                StackAUChannelInfo (UInt32 inSize) : mChanInfo ((AUChannelInfo*)malloc (inSize)) {}
                ~StackAUChannelInfo() { free (mChanInfo); }
-               
+
        AUChannelInfo* mChanInfo;
 };
 
@@ -77,9 +77,9 @@ public:
                                                {
                                                        Init();
                                                }
-                                               
+
        ~AUState();
-                                                                                       
+
        AudioUnit                       mUnit;
        AUNode                          mNode;
 
@@ -89,7 +89,7 @@ public:
                        if (mGetParamProc != NULL) {
                                return reinterpret_cast<AudioUnitGetParameterProc>(mGetParamProc) (mConnInstanceStorage,
                                                                                inID, scope, element, &outValue);
-                       }                                                       
+                       }
                return AudioUnitGetParameter(mUnit, inID, scope, element, &outValue);
        }
 
@@ -99,10 +99,10 @@ public:
                        if (mSetParamProc != NULL) {
                                return reinterpret_cast<AudioUnitSetParameterProc>(mSetParamProc) (mConnInstanceStorage,
                                                                                inID, scope, element, value, bufferOffsetFrames);
-                       }                                                       
+                       }
                        return AudioUnitSetParameter(mUnit, inID, scope, element, value, bufferOffsetFrames);
        }
-       
+
        OSStatus                        Render (AudioUnitRenderActionFlags *  ioActionFlags,
                                                                const AudioTimeStamp *        inTimeStamp,
                                                                UInt32                        inOutputBusNumber,
@@ -112,10 +112,10 @@ public:
                if (mRenderProc != NULL) {
                        return reinterpret_cast<AudioUnitRenderProc>(mRenderProc) (mConnInstanceStorage,
                                                                        ioActionFlags, inTimeStamp, inOutputBusNumber, inNumberFrames, ioData);
-               }                                                       
+               }
                return AudioUnitRender(mUnit, ioActionFlags, inTimeStamp, inOutputBusNumber, inNumberFrames, ioData);
        }
-       
+
        OSStatus                MIDIEvent (UInt32                                       inStatus,
                                                                UInt32                                  inData1,
                                                                UInt32                                  inData2,
@@ -177,13 +177,13 @@ private:
                                                                kAudioUnitScope_Global, kMusicDeviceMIDIEventSelect,
                                                                &mMIDIEventProc, &size) != noErr)
                        mMIDIEventProc = NULL;
-               
+
                if (mRenderProc || mGetParamProc || mSetParamProc || mMIDIEventProc)
                        mConnInstanceStorage = GetComponentInstanceStorage(mUnit);
                else
                        mConnInstanceStorage = NULL;
        }
-       
+
        ProcPtr                                         mRenderProc, mGetParamProc, mSetParamProc, mMIDIEventProc;
 
        void *                                          mConnInstanceStorage;
@@ -193,9 +193,9 @@ private:
        AUState () {}
         AUState (const AUState& other) : CAReferenceCounted (other) {}
        AUState& operator= (const AUState&) { return *this; }
-};                                             
-                                               
-                                               
+};
+
+
 CAAudioUnit::AUState::~AUState ()
 {
        if (mUnit && (mNode == 0)) {
@@ -246,13 +246,13 @@ CAAudioUnit&      CAAudioUnit::operator= (const CAAudioUnit &a)
        if (mDataPtr != a.mDataPtr) {
                if (mDataPtr)
                        mDataPtr->release();
-       
+
                if ((mDataPtr = a.mDataPtr) != NULL)
                        mDataPtr->retain();
-               
+
                mComp = a.mComp;
        }
-       
+
        return *this;
 }
 
@@ -270,13 +270,13 @@ bool                      CAAudioUnit::operator== (const AudioUnit& y) const
        return mDataPtr->mUnit == y;
 }
 
-#pragma mark __State Management        
+#pragma mark __State Management
 
 bool                   CAAudioUnit::IsValid () const
 {
        return mDataPtr ? mDataPtr->mUnit != 0 : false;
 }
-       
+
 AudioUnit              CAAudioUnit::AU() const
 {
        return mDataPtr ? mDataPtr->mUnit : 0;
@@ -288,10 +288,10 @@ AUNode                    CAAudioUnit::GetAUNode () const
 }
 
 #pragma mark __Format Handling
-       
+
 bool           CAAudioUnit::CanDo (    int                             inChannelsIn,
                                                                        int                             inChannelsOut) const
-{              
+{
        // this is the default assumption of an audio effect unit
        Boolean* isWritable = 0;
        UInt32  dataSize = 0;
@@ -300,7 +300,7 @@ bool                CAAudioUnit::CanDo (    int                             inChannelsIn,
                                                                        kAudioUnitProperty_SupportedNumChannels,
                                                                        kAudioUnitScope_Global, 0,
                                                                        &dataSize, isWritable); //don't care if this is writable
-               
+
                // if this property is NOT implemented an FX unit
                // is expected to deal with same channel valance in and out
        if (result)
@@ -317,14 +317,14 @@ bool              CAAudioUnit::CanDo (    int                             inChannelsIn,
                        return false;
                }
        }
-       
+
        StackAUChannelInfo info (dataSize);
-       
+
        result = GetProperty (kAudioUnitProperty_SupportedNumChannels,
                                                        kAudioUnitScope_Global, 0,
                                                        info.mChanInfo, &dataSize);
        if (result) { return false; }
-       
+
        return ValidateChannelPair (inChannelsIn, inChannelsOut, info.mChanInfo, (dataSize / sizeof (AUChannelInfo)));
 }
 
@@ -338,10 +338,10 @@ int    CAAudioUnit::GetChannelInfo (AUChannelInfo** chaninfo, UInt32& cnt)
                                                    kAudioUnitProperty_SupportedNumChannels,
                                                    kAudioUnitScope_Global, 0,
                                                    &dataSize, isWritable); //don't care if this is writable
-       
+
        // if this property is NOT implemented an FX unit
        // is expected to deal with same channel valance in and out
-       
+
        if (result)
        {
                if (Comp().Desc().IsEffect())
@@ -452,7 +452,7 @@ bool        CAAudioUnit::ValidateChannelPair (int                           inChannelsIn,
                                }
                        }
                }
-                       
+
                        // special meaning on input, specific num on output
                else if (info[i].inChannels < 0) {
                        if (info[i].outChannels == inChannelsOut)
@@ -471,7 +471,7 @@ bool        CAAudioUnit::ValidateChannelPair (int                           inChannelsIn,
                                }
                        }
                }
-               
+
                        // special meaning on output, specific num on input
                else if (info[i].outChannels < 0) {
                        if (info[i].inChannels == inChannelsIn)
@@ -495,7 +495,7 @@ bool        CAAudioUnit::ValidateChannelPair (int                           inChannelsIn,
                else if ((info[i].inChannels == inChannelsIn) && (info[i].outChannels == inChannelsOut)) {
                        return true;
                }
-               
+
                        // now check to see if a wild card on the args (inChannelsIn or inChannelsOut chans is zero) is found
                        // tells us to match just one side of the scopes
                else if (inChannelsIn == 0) {
@@ -509,7 +509,7 @@ bool        CAAudioUnit::ValidateChannelPair (int                           inChannelsIn,
                        }
                }
        }
-       
+
        return false;
 }
 
@@ -553,14 +553,14 @@ bool              CAAudioUnit::CanDo (const CAAUChanHelper                &inputs,
 // first check our state
                // huh!
        if (inputs.mNumEls == 0 && outputs.mNumEls == 0) return false;
-       
+
        UInt32 elCount;
        if (GetElementCount (kAudioUnitScope_Input, elCount)) { return false; }
        if (elCount != inputs.mNumEls) return false;
 
        if (GetElementCount (kAudioUnitScope_Output, elCount)) { return false; }
        if (elCount != outputs.mNumEls) return false;
-               
+
 // (1) special cases (effects and sources (generators and instruments) only)
        UInt32  dataSize = 0;
        if (GetPropertyInfo (kAudioUnitProperty_SupportedNumChannels,
@@ -574,7 +574,7 @@ bool                CAAudioUnit::CanDo (const CAAUChanHelper                &inputs,
                                if (numChan != outputs.mChans[out]) return false;
                        return true;
                }
-               
+
                        // in this case, all the channels have to match the current config
                if (Comp().Desc().IsGenerator() || Comp().Desc().IsMusicDevice()) {
                        for (unsigned int in = 0; in < inputs.mNumEls; ++in) {
@@ -589,22 +589,22 @@ bool              CAAudioUnit::CanDo (const CAAUChanHelper                &inputs,
                        }
                        return true;
                }
-               
+
                        // if we get here we can't determine anything about channel capabilities
                return false;
        }
 
        StackAUChannelInfo info (dataSize);
-       
+
        if (GetProperty (kAudioUnitProperty_SupportedNumChannels,
                                                        kAudioUnitScope_Global, 0,
                                                        info.mChanInfo, &dataSize) != noErr)
        {
                return false;
        }
-       
+
        int numInfo = dataSize / sizeof(AUChannelInfo);
-       
+
 // (2) Test for dynamic capability (or no elements on that scope)
        SInt32 dynInChans = 0;
        if (ValidateDynamicScope (kAudioUnitScope_Input, dynInChans, info.mChanInfo, numInfo)) {
@@ -655,7 +655,7 @@ bool                CAAudioUnit::CanDo (const CAAUChanHelper                &inputs,
                        }
                }
        }
-       
+
        return true;
 }
 
@@ -669,7 +669,7 @@ bool                CAAudioUnit::SupportsNumChannels () const
                                                                        kAudioUnitProperty_SupportedNumChannels,
                                                                        kAudioUnitScope_Global, 0,
                                                                        &dataSize, isWritable); //don't care if this is writable
-               
+
                // if this property is NOT implemented an FX unit
                // is expected to deal with same channel valance in and out
        if (result) {
@@ -702,7 +702,7 @@ bool                CAAudioUnit::GetChannelLayouts (AudioUnitScope                  inScope,
        }
 
        if (result) return false;
-       
+
        bool canDo = false;
                // OK lets get our channel layouts and see if the one we want is present
        AudioChannelLayoutTag* info = (AudioChannelLayoutTag*)malloc (dataSize);
@@ -711,7 +711,7 @@ bool                CAAudioUnit::GetChannelLayouts (AudioUnitScope                  inScope,
                                                        inScope, inEl,
                                                        info, &dataSize);
        if (result) goto home;
-       
+
        outChannelVector.erase (outChannelVector.begin(), outChannelVector.end());
        for (unsigned int i = 0; i < (dataSize / sizeof (AudioChannelLayoutTag)); ++i)
                outChannelVector.push_back (info[i]);
@@ -739,14 +739,14 @@ OSStatus  CAAudioUnit::GetChannelLayout (AudioUnitScope           inScope,
        OSStatus result = AudioUnitGetPropertyInfo (AU(), kAudioUnitProperty_AudioChannelLayout,
                                                                        inScope, inEl, &size, NULL);
        if (result) return result;
-       
+
        AudioChannelLayout *layout = (AudioChannelLayout*)malloc (size);
 
        require_noerr (result = AudioUnitGetProperty (AU(), kAudioUnitProperty_AudioChannelLayout,
                                                                        inScope, inEl, layout, &size), home);
 
        outLayout = CAAudioChannelLayout (layout);
-       
+
 home:
        free (layout);
        return result;
@@ -827,7 +827,7 @@ OSStatus    CAAudioUnit::SetSampleRate (AudioUnitScope              inScope,
 OSStatus       CAAudioUnit::SetSampleRate (Float64                     inSampleRate)
 {
        OSStatus result;
-       
+
        UInt32 elCount;
        require_noerr (result = GetElementCount(kAudioUnitScope_Input, elCount), home);
        if (elCount) {
@@ -842,7 +842,7 @@ OSStatus    CAAudioUnit::SetSampleRate (Float64                     inSampleRate)
                        require_noerr (result = SetSampleRate (kAudioUnitScope_Output, i, inSampleRate), home);
                }
        }
-       
+
 home:
        return result;
 }
@@ -879,7 +879,7 @@ OSStatus            CAAudioUnit::IsElementCountWritable (AudioUnitScope inScope, bool &out
        if (result)
                return result;
        outWritable = isWritable ? true : false;
-       return noErr;   
+       return noErr;
 }
 
 OSStatus               CAAudioUnit::GetElementCount (AudioUnitScope inScope, UInt32 &outCount) const
@@ -902,12 +902,12 @@ bool                      CAAudioUnit::HasDynamicScope (AudioUnitScope inScope, SInt32 &outTotalNum
        OSStatus result = GetPropertyInfo (kAudioUnitProperty_SupportedNumChannels,
                                                                kAudioUnitScope_Global, 0,
                                                                &dataSize, isWritable); //don't care if this is writable
-               
+
                // AU has to explicitly tell us about this.
        if (result) return false;
 
        StackAUChannelInfo info (dataSize);
-       
+
        result = GetProperty (kAudioUnitProperty_SupportedNumChannels,
                                                        kAudioUnitScope_Global, 0,
                                                        info.mChanInfo, &dataSize);
@@ -945,36 +945,36 @@ bool      CAAudioUnit::ValidateDynamicScope (AudioUnitScope               inScope,
                        outTotalNumChannels = -1;
                        return true;
                }
-               
+
                // ok lets now test our special case....
                if (inScope == kAudioUnitScope_Input) {
                                // isn't dynamic on this side at least
                        if (info[i].inChannels >= 0)
                                continue;
-                               
+
                        if (info[i].inChannels < -2) {
                                outTotalNumChannels = abs (info[i].inChannels);
                                return true;
                        }
                }
-               
+
                else if (inScope == kAudioUnitScope_Output) {
                                // isn't dynamic on this side at least
                        if (info[i].outChannels >= 0)
                                continue;
-                               
+
                        if (info[i].outChannels < -2) {
                                outTotalNumChannels = abs (info[i].outChannels);
                                return true;
                        }
                }
-               
+
                else {
                        break; // wrong scope was specified
                }
        }
-       
-       return false;   
+
+       return false;
 }
 
 OSStatus       CAAudioUnit::ConfigureDynamicScope (AudioUnitScope              inScope,
@@ -986,7 +986,7 @@ OSStatus    CAAudioUnit::ConfigureDynamicScope (AudioUnitScope              inScope,
        bool isDyamic = HasDynamicScope (inScope, numChannels);
        if (isDyamic == false)
                return kAudioUnitErr_InvalidProperty;
-       
+
        //lets to a sanity check...
        // if numChannels == -1, then it can do "any"...
        if (numChannels > 0) {
@@ -996,11 +996,11 @@ OSStatus  CAAudioUnit::ConfigureDynamicScope (AudioUnitScope              inScope,
                if (count > numChannels)
                        return kAudioUnitErr_InvalidPropertyValue;
        }
-       
+
        OSStatus result = SetElementCount (inScope, inNumElements);
        if (result)
                return result;
-               
+
        CAStreamBasicDescription desc;
        desc.mSampleRate = inSampleRate;
        for (unsigned int i = 0; i < inNumElements; ++i) {
@@ -1034,7 +1034,7 @@ bool              CAAudioUnit::GetBypass          () const
 }
 
 OSStatus       CAAudioUnit::SetBypass          (bool   inBypass) const
-{      
+{
        UInt32 bypass = inBypass ? 1 : 0;
        return AudioUnitSetProperty (AU(), kAudioUnitProperty_BypassEffect,
                                                                kAudioUnitScope_Global, 0,
@@ -1085,7 +1085,7 @@ OSStatus  CAAudioUnit::GetPresentPreset (AUPreset &outData) const
        }
        return result;
 }
-       
+
 OSStatus       CAAudioUnit::SetPresentPreset (AUPreset &inData)
 {
        OSStatus result = AudioUnitSetProperty (AU(), kAudioUnitProperty_PresentPreset,
@@ -1184,18 +1184,18 @@ OSStatus        CAAudioUnit::Preroll (UInt32 inFrameSize)
        CAStreamBasicDescription desc;
        OSStatus result = GetFormat (kAudioUnitScope_Input, 0, desc);
        bool hasInput = false;
-                       //we have input 
+                       //we have input
        if (result == noErr)
        {
                sRenderCallback.inputProc = PrerollRenderProc;
                sRenderCallback.inputProcRefCon = 0;
-               
+
                result = SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input,
                                                                0, &sRenderCallback, sizeof(sRenderCallback));
                if (result) return result;
                hasInput = true;
        }
-       
+
        AudioUnitRenderActionFlags flags = 0;
        AudioTimeStamp time;
        memset (&time, 0, sizeof(time));
@@ -1206,7 +1206,7 @@ OSStatus  CAAudioUnit::Preroll (UInt32 inFrameSize)
        {
                AUOutputBL list (outputFormat, inFrameSize);
                list.Prepare ();
-               
+
                require_noerr (result = Render (&flags, &time, 0, inFrameSize, list.ABL()), home);
                require_noerr (result = GlobalReset(), home);
        }
@@ -1216,7 +1216,7 @@ home:
             // remove our installed callback
                sRenderCallback.inputProc = 0;
                sRenderCallback.inputProcRefCon = 0;
-               
+
                SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input,
                                                                0, &sRenderCallback, sizeof(sRenderCallback));
        }
@@ -1262,7 +1262,7 @@ CAAUChanHelper&           CAAUChanHelper::operator= (const CAAUChanHelper &c)
                mChans = mStaticChans;
        }
        memcpy (mChans, c.mChans, c.mNumEls * sizeof(int));
-       
+
        return *this;
 }
 
index e5927af1fc785fa93f8cd403f0e55c7455f59895..7be48464e77483f7c17df2a2d997592fd44f4756 100644 (file)
@@ -94,26 +94,26 @@ public:
 
                                                        ~CAAudioUnit ();
 
-       
+
        CAAudioUnit&                    operator= (const CAAudioUnit& y);
 
        bool                                    operator== (const CAAudioUnit& y) const;
 
        bool                                    operator== (const AudioUnit& y) const;
 
-#pragma mark __State Management        
+#pragma mark __State Management
        bool                                    IsValid () const;
-       
+
        AudioUnit                               AU() const;
        operator AudioUnit () const { return AU(); }
 
        const CAComponent&              Comp() const { return mComp; }
-       
+
        bool                                    FromAUGraph () const { return GetAUNode() != 0 || GetAUNode() != -1; }
-       
+
        AUNode                                  GetAUNode () const;
        operator AUNode () const { return GetAUNode(); }
-       
+
 #pragma mark __API Wrapper
        OSStatus                                Initialize() const { return AudioUnitInitialize(AU()); }
        OSStatus                                Uninitialize() const { return AudioUnitUninitialize(AU()); }
@@ -134,7 +134,7 @@ public:
                                                        }
        OSStatus                                SetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element,
                                                                                        Float32 value, UInt32 bufferOffsetFrames=0);
-                                                       
+
        OSStatus                                GetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element,
                                                                                        Float32 &outValue) const;
 
@@ -143,7 +143,7 @@ public:
                                                                                                UInt32                                          inOutputBusNumber,
                                                                                                UInt32                                          inNumberFrames,
                                                                                                AudioBufferList                         * ioData);
-                                                                                                                       
+
        OSStatus                                Reset (AudioUnitScope scope, AudioUnitElement element)
                                                        {
                                                                return AudioUnitReset (AU(), scope, element);
@@ -159,19 +159,19 @@ public:
                                                        {
                                                                return AudioUnitAddRenderNotify (AU(), inProc, inProcRefCon);
                                                        }
-       
+
        OSStatus                                RemoveRenderNotify (AURenderCallback   inProc, void *inProcRefCon)
                                                        {
                                                                return AudioUnitRemoveRenderNotify (AU(), inProc, inProcRefCon);
                                                        }
-       
 
-// Fast dispatch support for MIDI Effects or Music Devices     
+
+// Fast dispatch support for MIDI Effects or Music Devices
        OSStatus                                MIDIEvent (UInt32                                       inStatus,
                                                                                UInt32                                  inData1,
                                                                                UInt32                                  inData2,
                                                                                UInt32                                  inOffsetSampleFrame);
-                                                               
+
                                                                // uses the default VoiceForGroup value - this is the normal case
        OSStatus                                StartNote (MusicDeviceGroupID           inGroupID,
                                                                        NoteInstanceID *                        outNoteInstanceID,
@@ -203,29 +203,29 @@ public:
                                                        {
                                                                return CanDo (inChannelsInOut, inChannelsInOut);
                                                        }
-                                                       
+
        bool                                    CanDo (         int                             inChannelsIn,
                                                                                int                             inChannelsOut) const;
-               
+
                // This version does a more thorough test for ANY AU with ANY ins/outs
                // you pass in the channel helper (for the current element count on that scope)
-               
+
        bool                                    CanDo (         const CAAUChanHelper            &input,
                                                                                const CAAUChanHelper            &output) const;
-       
+
        bool                                    SupportsNumChannels () const;
-       
+
        bool                                    HasChannelLayouts (AudioUnitScope               inScope,
                                                                                        AudioUnitElement                inEl) const;
-               
+
        int                                     GetChannelInfo (AUChannelInfo** chaninfo, UInt32& cnt);
        bool                                    GetChannelLayouts (AudioUnitScope               inScope,
                                                                        AudioUnitElement                                inEl,
                                                                        ChannelTagVector                                &outChannelVector) const;
-       
+
        OSStatus                                GetChannelLayout (AudioUnitScope                inScope,
                                                                                        AudioUnitElement                inEl,
-                                                                                       CAAudioChannelLayout    &outLayout) const;      
+                                                                                       CAAudioChannelLayout    &outLayout) const;
 
        OSStatus                                SetChannelLayout (AudioUnitScope                inScope,
                                                                                        AudioUnitElement                inEl,
@@ -235,10 +235,10 @@ public:
                                                                                        AudioUnitElement                inEl,
                                                                                        AudioChannelLayout              &inLayout,
                                                                                        UInt32                                  inSize);
-                                                                                       
+
        OSStatus                                ClearChannelLayout (AudioUnitScope              inScope,
                                                                                        AudioUnitElement                inEl);
-                                                                                               
+
        OSStatus                                GetFormat (AudioUnitScope                                       inScope,
                                                                                        AudioUnitElement                        inEl,
                                                                                        AudioStreamBasicDescription     &outFormat) const;
@@ -257,7 +257,7 @@ public:
 
        // this sets the sample rate on all in/out buses of the AU
        OSStatus                                SetSampleRate (Float64                          inSampleRate);
-       
+
        OSStatus                                NumberChannels (AudioUnitScope          inScope,
                                                                                        AudioUnitElement        inEl,
                                                                                        UInt32                          &outChans) const;
@@ -278,7 +278,7 @@ public:
        OSStatus                                GetElementCount (AudioUnitScope         inScope, UInt32 &outCount) const;
 
        OSStatus                                SetElementCount (AudioUnitScope         inScope, UInt32 inCount);
-               
+
                // value of -1 for outTotalNumChannels indicates no restriction on num channels
                // for ex. the Matrix Mixer satisfies this (its in/out element count is writable, and can be set to
                // any number of channels.
@@ -287,19 +287,19 @@ public:
                                                        {
                                                                return HasDynamicScope (kAudioUnitScope_Input, outTotalNumChannels);
                                                        }
-                                                       
+
        bool                                    HasDynamicOutputs (SInt32 &outTotalNumChannels) const
                                                        {
                                                                return HasDynamicScope (kAudioUnitScope_Output, outTotalNumChannels);
                                                        }
-       
+
                // here, if the in (or out) elements are dynamic, then you supply the number of elements
                // you want on in (or out) scope, and the number of channels on each consecutive element
        OSStatus                                ConfigureDynamicInput (UInt32 inNumElements, UInt32 *inChannelsPerElement, Float64 inSampleRate)
                                                        {
                                                                return ConfigureDynamicScope (kAudioUnitScope_Input, inNumElements, inChannelsPerElement, inSampleRate);
                                                        }
-                                                       
+
        OSStatus                                ConfigureDynamicOutput (UInt32 inNumElements, UInt32 *inChannelsPerElement, Float64 inSampleRate)
                                                        {
                                                                return ConfigureDynamicScope (kAudioUnitScope_Output, inNumElements, inChannelsPerElement, inSampleRate);
@@ -310,31 +310,31 @@ public:
        bool                                    GetBypass               () const;
 
        OSStatus                                SetBypass               (bool                           inBypass) const;
-       
+
        Float64                                 Latency () const;
-       
+
                // these calls just deal with the global preset state
                // you could rescope them to deal with presets on the part scope
        OSStatus                                GetAUPreset (CFPropertyListRef &outData) const;
 
        OSStatus                                SetAUPreset (CFPropertyListRef &inData);
-       
+
        OSStatus                                GetPresentPreset (AUPreset &outData) const;
-       
+
        OSStatus                                SetPresentPreset (AUPreset &inData);
-       
+
        bool                                    HasCustomView () const;
-       
-#pragma mark __Print   
+
+#pragma mark __Print
        void                                    Print () const { Print (stdout); }
        void                                    Print (FILE* file) const;
-       
+
 private:
        CAComponent                             mComp;
-       
+
        class AUState;
        AUState*                mDataPtr;
-               
+
                // this can throw - so wrap this up in a static that returns a result code...
        CAAudioUnit (const CAComponent& inComp);
 
@@ -347,7 +347,7 @@ private:
                                                                                        int                             inChannelsOut,
                                                                                        const AUChannelInfo * info,
                                                                                        UInt32                          numChanInfo) const;
-                                                                                       
+
        bool                            ValidateDynamicScope (AudioUnitScope    inScope,
                                                                                        SInt32                          &outTotalNumChannels,
                                                                                        const AUChannelInfo * info,
@@ -356,7 +356,7 @@ private:
                                                                                        bool                            checkOutput,
                                                                                        const AUChannelInfo *info,
                                                                                        UInt32                          numInfo) const;
-       
+
 };
 
 class CAAUChanHelper {
@@ -368,14 +368,14 @@ public:
                                }
                                CAAUChanHelper(const CAAudioUnit &inAU, AudioUnitScope inScope);
                                CAAUChanHelper (const CAAUChanHelper &c) :mChans(mStaticChans), mNumEls(0), mDidAllocate(false) { *this = c; }
-                               
+
                                ~CAAUChanHelper();
 
        CAAUChanHelper& operator= (const CAAUChanHelper &c);
 
        UInt32          * mChans;
        UInt32          mNumEls;
-       
+
 private:
        UInt32 mStaticChans[8];
        bool mDidAllocate;
index 47fe524f6fe72a32e4522b1c037ce29ec8064478..581f1adda78894f01c3d8cdd1704b1d5d30ced02 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CABufferList.cpp
-       
+
 =============================================================================*/
 
 #include "CABufferList.h"
@@ -50,7 +50,7 @@
 void           CABufferList::AllocateBuffers(UInt32 nBytes)
 {
        if (nBytes <= GetNumBytes()) return;
-       
+
        if (mNumberBuffers > 1)
                // align successive buffers for Altivec and to take alternating
                // cache line hits by spacing them by odd multiples of 16
@@ -58,7 +58,7 @@ void          CABufferList::AllocateBuffers(UInt32 nBytes)
        UInt32 memorySize = nBytes * mNumberBuffers;
        Byte *newMemory = new Byte[memorySize], *p = newMemory;
        memset(newMemory, 0, memorySize);       // get page faults now, not later
-       
+
        AudioBuffer *buf = mBuffers;
        for (UInt32 i = mNumberBuffers; i--; ++buf) {
                if (buf->mData != NULL && buf->mDataByteSize > 0)
@@ -83,7 +83,7 @@ void          CABufferList::AllocateBuffersAndCopyFrom(UInt32 nBytes, CABufferList *inSr
        }
        inSetPtrList->VerifyNotTrashingOwnedBuffer();
        UInt32 fromByteSize = inSrcList->GetNumBytes();
-       
+
        if (mNumberBuffers > 1)
                // align successive buffers for Altivec and to take alternating
                // cache line hits by spacing them by odd multiples of 16
@@ -91,7 +91,7 @@ void          CABufferList::AllocateBuffersAndCopyFrom(UInt32 nBytes, CABufferList *inSr
        UInt32 memorySize = nBytes * mNumberBuffers;
        Byte *newMemory = new Byte[memorySize], *p = newMemory;
        memset(newMemory, 0, memorySize);       // make buffer "hot"
-       
+
        AudioBuffer *buf = mBuffers;
        AudioBuffer *ptrBuf = inSetPtrList->mBuffers;
        AudioBuffer *srcBuf = inSrcList->mBuffers;
index 8f69de9413138057a2be7239cfef416d902f62c8..fc947694587be323305991736d03f9205e5cec98 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CABufferList.h
-       
+
 =============================================================================*/
 
 #ifndef __CABufferList_h__
@@ -59,7 +59,7 @@ extern "C" void CAShowAudioBufferList(const AudioBufferList *abl, int framesToPr
 
        This class is designed for use in non-simplistic cases. For AudioUnits, AUBufferList
        is preferred.
-       
+
        CABufferList can be used in one of two ways:
                - as mutable pointers into non-owned memory
                - as an immutable array of buffers (owns its own memory).
@@ -99,22 +99,22 @@ public:
                if (mBufferMemory)
                        delete[] mBufferMemory;
        }
-       
+
        const char *                            Name() { return mName; }
-       
+
        const AudioBufferList &         GetBufferList() const { return *(AudioBufferList *)&mNumberBuffers; }
-       
+
        AudioBufferList &                       GetModifiableBufferList()
        {
                VerifyNotTrashingOwnedBuffer();
                return _GetBufferList();
        }
-       
+
        UInt32          GetNumBytes() const
        {
                return mBuffers[0].mDataByteSize;
        }
-       
+
        void            SetBytes(UInt32 nBytes, void *data)
        {
                VerifyNotTrashingOwnedBuffer();
@@ -122,7 +122,7 @@ public:
                mBuffers[0].mDataByteSize = nBytes;
                mBuffers[0].mData = data;
        }
-       
+
        void            CopyAllFrom(CABufferList *srcbl, CABufferList *ptrbl)
                                        // copies bytes from srcbl
                                        // make ptrbl reflect the length copied
@@ -144,7 +144,7 @@ public:
                if (srcbl != ptrbl)
                        srcbl->BytesConsumed(nBytes);
        }
-       
+
        void            AppendFrom(CABufferList *blp, UInt32 nBytes)
        {
                VerifyNotTrashingOwnedBuffer();
@@ -156,7 +156,7 @@ public:
                }
                blp->BytesConsumed(nBytes);
        }
-       
+
        void            PadWithZeroes(UInt32 desiredBufferSize)
                                        // for cases where an algorithm (e.g. SRC) requires some
                                        // padding to create silence following end-of-file
@@ -169,7 +169,7 @@ public:
                        buf->mDataByteSize = desiredBufferSize;
                }
        }
-       
+
        void            SetToZeroes(UInt32 nBytes)
        {
                VerifyNotTrashingOwnedBuffer();
@@ -179,23 +179,23 @@ public:
                        buf->mDataByteSize = nBytes;
                }
        }
-       
+
        void            Reset()
        {
                DeallocateBuffers();
        }
-       
+
        Boolean SameDataAs(const CABufferList* anotherBufferList)
        {
                // check to see if two buffer lists point to the same memory.
                if (mNumberBuffers != anotherBufferList->mNumberBuffers) return false;
-               
+
                for (UInt32 i = 0; i < mNumberBuffers; ++i) {
                        if (mBuffers[i].mData != anotherBufferList->mBuffers[i].mData) return false;
                }
                return true;
        }
-       
+
        void            BytesConsumed(UInt32 nBytes)
                                        // advance buffer pointers, decrease buffer sizes
        {
@@ -207,18 +207,18 @@ public:
                        buf->mDataByteSize -= nBytes;
                }
        }
-       
+
        void            SetFrom(const AudioBufferList *abl)
        {
                VerifyNotTrashingOwnedBuffer();
                memcpy(&_GetBufferList(), abl, (char *)&abl->mBuffers[abl->mNumberBuffers] - (char *)abl);
        }
-       
+
        void            SetFrom(const CABufferList *blp)
        {
                SetFrom(&blp->GetBufferList());
        }
-       
+
        void            SetFrom(const AudioBufferList *abl, UInt32 nBytes)
        {
                VerifyNotTrashingOwnedBuffer();
@@ -230,23 +230,23 @@ public:
                        mybuf->mData = srcbuf->mData;
                }
        }
-       
+
        void            SetFrom(const CABufferList *blp, UInt32 nBytes)
        {
                SetFrom(&blp->GetBufferList(), nBytes);
        }
-       
+
        AudioBufferList *       ToAudioBufferList(AudioBufferList *abl) const
        {
                memcpy(abl, &GetBufferList(), (char *)&abl->mBuffers[mNumberBuffers] - (char *)abl);
                return abl;
        }
-       
+
        void            AllocateBuffers(UInt32 nBytes);
        void            AllocateBuffersAndCopyFrom(UInt32 nBytes, CABufferList *inCopyFromList, CABufferList *inSetPtrList);
-       
+
        void            DeallocateBuffers();
-       
+
        void            UseExternalBuffer(Byte *ptr, UInt32 nBytes);
 
        void            AdvanceBufferPointers(UInt32 nBytes)
@@ -261,7 +261,7 @@ public:
                        buf->mDataByteSize -= nBytes;
                }
        }
-       
+
        void            SetNumBytes(UInt32 nBytes)
        {
                VerifyNotTrashingOwnedBuffer();
index c209b5fc36c5fe873452cdefcfc9253c704cb85e..ed983a828f9c58aee060ce8588a80c95b32ffb76 100644 (file)
@@ -74,7 +74,7 @@ void  CACFDictionary::GetKeys (const void **keys) const
 bool   CACFDictionary::GetBool(const CFStringRef inKey, bool& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -91,14 +91,14 @@ bool        CACFDictionary::GetBool(const CFStringRef inKey, bool& outValue) const
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetSInt32(const CFStringRef inKey, SInt32& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -108,14 +108,14 @@ bool      CACFDictionary::GetSInt32(const CFStringRef inKey, SInt32& outValue) const
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetUInt32(const CFStringRef inKey, UInt32& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -125,14 +125,14 @@ bool      CACFDictionary::GetUInt32(const CFStringRef inKey, UInt32& outValue) const
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetSInt64(const CFStringRef inKey, SInt64& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -142,14 +142,14 @@ bool      CACFDictionary::GetSInt64(const CFStringRef inKey, SInt64& outValue) const
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetUInt64(const CFStringRef inKey, UInt64& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -159,14 +159,14 @@ bool      CACFDictionary::GetUInt64(const CFStringRef inKey, UInt64& outValue) const
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetFloat32(const CFStringRef inKey, Float32& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -176,14 +176,14 @@ bool      CACFDictionary::GetFloat32(const CFStringRef inKey, Float32& outValue) cons
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetFloat64(const CFStringRef inKey, Float64& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -193,14 +193,14 @@ bool      CACFDictionary::GetFloat64(const CFStringRef inKey, Float64& outValue) cons
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetString(const CFStringRef inKey, CFStringRef& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -210,14 +210,14 @@ bool      CACFDictionary::GetString(const CFStringRef inKey, CFStringRef& outValue) c
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
-       
+
 bool   CACFDictionary::GetArray(const CFStringRef inKey, CFArrayRef& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -227,14 +227,14 @@ bool      CACFDictionary::GetArray(const CFStringRef inKey, CFArrayRef& outValue) con
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
-       
+
 bool   CACFDictionary::GetDictionary(const CFStringRef inKey, CFDictionaryRef& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -244,14 +244,14 @@ bool      CACFDictionary::GetDictionary(const CFStringRef inKey, CFDictionaryRef& out
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetData(const CFStringRef inKey, CFDataRef& outValue) const
 {
        bool theAnswer = false;
-       
+
        CFTypeRef theValue = NULL;
        if(GetCFType(inKey, theValue))
        {
@@ -261,27 +261,27 @@ bool      CACFDictionary::GetData(const CFStringRef inKey, CFDataRef& outValue) const
                        theAnswer = true;
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetCFType(const CFStringRef inKey, CFTypeRef& outValue) const
 {
        bool theAnswer = false;
-       
+
        if(mCFDictionary != NULL)
        {
                outValue = CFDictionaryGetValue(mCFDictionary, inKey);
                theAnswer = (outValue != NULL);
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::GetCFTypeWithCStringKey(const char* inKey, CFTypeRef& outValue) const
 {
        bool theAnswer = false;
-       
+
        if(mCFDictionary != NULL)
        {
                CACFString theKey(inKey);
@@ -290,165 +290,165 @@ bool    CACFDictionary::GetCFTypeWithCStringKey(const char* inKey, CFTypeRef& outVa
                        theAnswer = GetCFType(theKey.GetCFString(), outValue);
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddSInt32(const CFStringRef inKey, SInt32 inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CACFNumber theValue(inValue);
                theAnswer = AddCFType(inKey, theValue.GetCFNumber());
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddUInt32(const CFStringRef inKey, UInt32 inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CACFNumber theValue(inValue);
                theAnswer = AddCFType(inKey, theValue.GetCFNumber());
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddSInt64(const CFStringRef inKey, SInt64 inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CACFNumber theValue(inValue);
                theAnswer = AddCFType(inKey, theValue.GetCFNumber());
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddUInt64(const CFStringRef inKey, UInt64 inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CACFNumber theValue(inValue);
                theAnswer = AddCFType(inKey, theValue.GetCFNumber());
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddFloat32(const CFStringRef inKey, Float32 inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CACFNumber theValue(inValue);
                theAnswer = AddCFType(inKey, theValue.GetCFNumber());
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddFloat64(const CFStringRef inKey, Float64 inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CACFNumber theValue(inValue);
                theAnswer = AddCFType(inKey, theValue.GetCFNumber());
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddNumber(const CFStringRef inKey, const CFNumberRef inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                theAnswer = AddCFType(inKey, inValue);
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddString(const CFStringRef inKey, const CFStringRef inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                theAnswer = AddCFType(inKey, inValue);
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddArray(const CFStringRef inKey, const CFArrayRef inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                theAnswer = AddCFType(inKey, inValue);
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddDictionary(const CFStringRef inKey, const CFDictionaryRef inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                theAnswer = AddCFType(inKey, inValue);
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddData(const CFStringRef inKey, const CFDataRef inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                theAnswer = AddCFType(inKey, inValue);
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddCFType(const CFStringRef inKey, const CFTypeRef inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CFDictionarySetValue(mCFDictionary, inKey, inValue);
                theAnswer = true;
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddCFTypeWithCStringKey(const char* inKey, const CFTypeRef inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CACFString theKey(inKey);
@@ -457,14 +457,14 @@ bool      CACFDictionary::AddCFTypeWithCStringKey(const char* inKey, const CFTypeRef
                        theAnswer = AddCFType(theKey.GetCFString(), inValue);
                }
        }
-       
+
        return theAnswer;
 }
 
 bool   CACFDictionary::AddCString(const CFStringRef inKey, const char* inValue)
 {
        bool theAnswer = false;
-       
+
        if(mMutable && (mCFDictionary != NULL))
        {
                CACFString theValue(inValue);
@@ -473,6 +473,6 @@ bool        CACFDictionary::AddCString(const CFStringRef inKey, const char* inValue)
                        theAnswer = AddCFType(inKey, theValue.GetCFString());
                }
        }
-       
+
        return theAnswer;
 }
index ac82ebb87c84ede7f3313cfe955c5cc82cbb55ed..3221436a16dd0de55b9dce732d753801d4f9aef3 100644 (file)
@@ -68,16 +68,16 @@ public:
                                                        CACFDictionary(const CACFDictionary& inDictionary) : mCFDictionary(inDictionary.mCFDictionary), mRelease(inDictionary.mRelease), mMutable(inDictionary.mMutable) { if(mRelease && (mCFDictionary != NULL)) { CFRetain(mCFDictionary); } }
        CACFDictionary&                 operator=(const CACFDictionary& inDictionary) { mCFDictionary = inDictionary.mCFDictionary; mRelease = inDictionary.mRelease; mMutable = inDictionary.mMutable; if(mRelease && (mCFDictionary != NULL)) { CFRetain(mCFDictionary); } return *this; }
                                                        ~CACFDictionary() { if(mRelease && (mCFDictionary != NULL)) { CFRelease(mCFDictionary); } }
-               
+
 //     Attributes
 public:
        bool                                    IsValid() const { return mCFDictionary != NULL; }
        bool                                    IsMutable() const { return mMutable;}
        bool                                    CanModify() const { return mMutable && (mCFDictionary != NULL); }
-       
+
        bool                                    WillRelease() const { return mRelease; }
        void                                    ShouldRelease(bool inRelease) { mRelease = inRelease; }
-       
+
        CFDictionaryRef                 GetDict() const { return mCFDictionary; }
        CFDictionaryRef                 GetCFDictionary() const { return mCFDictionary; }
        CFDictionaryRef                 CopyCFDictionary() const { if(mCFDictionary != NULL) { CFRetain(mCFDictionary); } return mCFDictionary; }
@@ -95,7 +95,7 @@ public:
        bool                                    HasKey(const CFStringRef inKey) const;
        UInt32                                  Size() const;
        void                                    GetKeys(const void** keys) const;
-       
+
        bool                                    GetBool(const CFStringRef inKey, bool& outValue) const;
        bool                                    GetSInt32(const CFStringRef inKey, SInt32& outValue) const;
        bool                                    GetUInt32(const CFStringRef inKey, UInt32& outValue) const;
@@ -103,12 +103,12 @@ public:
        bool                                    GetUInt64(const CFStringRef inKey, UInt64& outValue) const;
        bool                                    GetFloat32(const CFStringRef inKey, Float32& outValue) const;
        bool                                    GetFloat64(const CFStringRef inKey, Float64& outValue) const;
-       bool                                    GetString(const CFStringRef inKey, CFStringRef& outValue) const;        
-       bool                                    GetArray(const CFStringRef inKey, CFArrayRef& outValue) const;  
-       bool                                    GetDictionary(const CFStringRef inKey, CFDictionaryRef& outValue) const;        
+       bool                                    GetString(const CFStringRef inKey, CFStringRef& outValue) const;
+       bool                                    GetArray(const CFStringRef inKey, CFArrayRef& outValue) const;
+       bool                                    GetDictionary(const CFStringRef inKey, CFDictionaryRef& outValue) const;
        bool                                    GetData(const CFStringRef inKey, CFDataRef& outValue) const;
        bool                                    GetCFType(const CFStringRef inKey, CFTypeRef& outValue) const;
-       
+
        bool                                    GetCFTypeWithCStringKey(const char* inKey, CFTypeRef& outValue) const;
 
        bool                                    AddSInt32(const CFStringRef inKey, SInt32 inValue);
@@ -123,14 +123,14 @@ public:
        bool                                    AddDictionary(const CFStringRef inKey, const CFDictionaryRef inValue);
        bool                                    AddData(const CFStringRef inKey, const CFDataRef inValue);
        bool                                    AddCFType(const CFStringRef inKey, const CFTypeRef inValue);
-       
+
        bool                                    AddCFTypeWithCStringKey(const char* inKey, const CFTypeRef inValue);
        bool                                    AddCString(const CFStringRef inKey, const char* inValue);
 
        void                                    Clear() { if(CanModify()) { CFDictionaryRemoveAllValues(mCFDictionary); } }
-       
+
        void                                    Show() { CFShow(mCFDictionary); }
-       
+
 //     Implementation
 private:
        CFMutableDictionaryRef  mCFDictionary;
index 3b6160c8bba1952ba8193961deec1dda5e2891e7..edbf3db2d9ba8f5e9d1b6d73b0dd94178ab9557c 100644 (file)
 Float32        CACFNumber::GetFixed32() const
 {
        SInt32 theFixedValue = GetSInt32();
-       
+
        //      this is a 16.16 value so convert it to a float
        Float32 theSign = theFixedValue < 0 ? -1.0 : 1.0;
        theFixedValue *= (SInt32)theSign;
        Float32 theWholePart = (theFixedValue & 0x7FFF0000) >> 16;
        Float32 theFractPart = theFixedValue & 0x0000FFFF;
        theFractPart /= 65536.0;
-       
+
        return theSign * (theWholePart + theFractPart);
 }
index 3991637bac228fa66413f1fec9bb8d2cff207a4e..450a94dd47879b98a7a659b3b0df2f3f7c25b639 100644 (file)
@@ -77,7 +77,7 @@ public:
 private:
        void            Retain() { if(mWillRelease && (mCFNumber != NULL)) { CFRetain(mCFNumber); } }
        void            Release() { if(mWillRelease && (mCFNumber != NULL)) { CFRelease(mCFNumber); } }
-       
+
        CFNumberRef     mCFNumber;
        bool            mWillRelease;
 
index ec3b18a8b62a4ee110ecacd7623bd2f46189472b..5e00b11db6f69bfc9e02317dc3cb28e13e066c04 100644 (file)
 UInt32 CACFString::GetStringByteLength(CFStringRef inCFString, CFStringEncoding inEncoding)
 {
        UInt32 theAnswer = 0;
-       
+
        if(inCFString != NULL)
        {
                CFRange theRange = { 0, CFStringGetLength(inCFString) };
                CFStringGetBytes(inCFString, theRange, inEncoding, 0, false, NULL, 0x7FFFFFFF, (CFIndex*)&theAnswer);
        }
-       
+
        return theAnswer;
 }
 
index 51fa64ebff086330f1c7a2334d246bd448310b78..4adc460e708e6926afe85472eaaa1f9827c722b5 100644 (file)
@@ -74,7 +74,7 @@ public:
 private:
        void                    Retain() { if(mWillRelease && (mCFString != NULL)) { CFRetain(mCFString); } }
        void                    Release() { if(mWillRelease && (mCFString != NULL)) { CFRelease(mCFString); } }
-       
+
        CFStringRef             mCFString;
        bool                    mWillRelease;
 
@@ -98,7 +98,7 @@ public:
        static UInt32   GetStringByteLength(CFStringRef inCFString, CFStringEncoding inEncoding = kCFStringEncodingUTF8);
        static void             GetCString(CFStringRef inCFString, char* outString, UInt32& ioStringSize, CFStringEncoding inEncoding = kCFStringEncodingUTF8);
        static void             GetUnicodeString(CFStringRef inCFString, UInt16* outString, UInt32& ioStringSize);
-       
+
 };
 
 inline bool    operator<(const CACFString& x, const CACFString& y) { return CFStringCompare(x.GetCFString(), y.GetCFString(), 0) == kCFCompareLessThan; }
@@ -129,7 +129,7 @@ public:
 private:
        void                            Retain() { if(mWillRelease && (mCFMutableString != NULL)) { CFRetain(mCFMutableString); } }
        void                            Release() { if(mWillRelease && (mCFMutableString != NULL)) { CFRelease(mCFMutableString); } }
-       
+
        CFMutableStringRef      mCFMutableString;
        bool                            mWillRelease;
 
index 914e8f3c08fd2ef6db82790b407f1cb587619ce5..5c9686df36aa5dee2b8c36c0d071b886d18b326b 100644 (file)
@@ -94,15 +94,15 @@ OSStatus            CAComponent::GetResourceVersion (UInt32 &outVersion) const
        ResFileRefNum componentResFileID = kResFileNotOpened;
        OSStatus result;
        short thngResourceCount;
-       
+
        short curRes = CurResFile();
        require_noerr (result = OpenAComponentResFile( mComp, &componentResFileID), home);
        require_noerr (result = componentResFileID <= 0, home);
-       
+
        UseResFile(componentResFileID);
 
        thngResourceCount = Count1Resources(kComponentResourceType);
-       
+
        require_noerr (result = ResError(), home);
                        // only go on if we successfully found at least 1 thng resource
        require_noerr (thngResourceCount <= 0 ? -1 : 0, home);
@@ -135,12 +135,12 @@ OSStatus          CAComponent::GetResourceVersion (UInt32 &outVersion) const
 
        if (!versionFound)
                result = resNotFound;
-               
+
        UseResFile(curRes);     // revert
-       
+
        if ( componentResFileID != kResFileNotOpened )
                CloseComponentResFile(componentResFileID);
-               
+
 home:
        return result;
 }
@@ -174,9 +174,9 @@ void                CAComponent::SetCompNames () const
                Handle h1 = NewHandle(4);
                CAComponentDescription desc;
                OSStatus err = GetComponentInfo (Comp(), &desc, h1, 0, 0);
-               
+
                if (err) { DisposeHandle(h1); return; }
-               
+
                HLock(h1);
                char* ptr1 = *h1;
                // Get the manufacturer's name... look for the ':' character convention
@@ -184,7 +184,7 @@ void                CAComponent::SetCompNames () const
                char* displayStr = 0;
 
                const_cast<CAComponent*>(this)->mCompName = CFStringCreateWithPascalString(NULL, (const unsigned char*)*h1, kCFStringEncodingMacRoman);
-                               
+
                for (int i = 0; i < len; ++i) {
                        if (ptr1[i] == ':') { // found the name
                                ptr1[i] = 0;
@@ -192,11 +192,11 @@ void              CAComponent::SetCompNames () const
                                break;
                        }
                }
-               
+
                if (displayStr)
                {
                        const_cast<CAComponent*>(this)->mManuName = CFStringCreateWithCString(NULL, displayStr, kCFStringEncodingMacRoman);
-                                                                               
+
                        //move displayStr ptr past the manu, to the name
                        // we move the characters down a index, because the handle doesn't have any room
                        // at the end for the \0
@@ -209,7 +209,7 @@ void                CAComponent::SetCompNames () const
 
                        const_cast<CAComponent*>(this)->mAUName = CFStringCreateWithCString(NULL, displayStr, kCFStringEncodingMacRoman);
                }
-               
+
                DisposeHandle (h1);
        }
 }
index 2e721d8df9a9a5e1f98a4e18960a9adf40d4dc22..4009bc42fea06271253b6837b4eeb82b854594dc 100644 (file)
@@ -57,59 +57,59 @@ class CAComponent
 public:
        CAComponent ()
                : mComp (0), mDesc(), mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) {}
-               
+
                // if next is specifed that is used to find the next component after that one
        CAComponent (const ComponentDescription& inDesc, CAComponent* next = 0);
-       
+
        CAComponent (const CAComponent& y)
                : mComp (0), mDesc(), mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) { *this = y; }
 
        CAComponent (const Component& comp);
-       
+
        CAComponent (const ComponentInstance& compInst);
 
        CAComponent (OSType inType, OSType inSubtype = 0, OSType inManu = 0);
-       
+
        ~CAComponent ();
-       
+
        CAComponent&    operator= (const CAComponent& y);
-       
+
                // returns true if this object references a valid component
        bool                    IsValid () const { return Comp() != 0; }
-       
+
        bool                    HasAUStrings() const {  SetCompNames (); return mManuName != 0; }
 
                // CFStringRef should be retained by caller if needed beyond lifetime of this object
-               
+
                // Can return NULL if component doesn't follow AU naming conventions
        CFStringRef             GetAUManu () const { SetCompNames (); return mManuName; }
        CFStringRef             GetAUName () const { SetCompNames (); return mAUName ? mAUName : mCompName; }
-               
+
                // Return value of NULL indicates a problem getting that information from the component
        CFStringRef             GetCompName () const { SetCompNames(); return mCompName; }
        CFStringRef             GetCompInfo () const { SetCompInfo(); return mCompInfo; }
-       
+
        const CAComponentDescription&   Desc () const { return mDesc; }
-                       
+
        OSStatus                Open (ComponentInstance& outInst) const
        {
                return OpenAComponent (Comp(), &outInst);
        }
 
        OSStatus                        GetResourceVersion (UInt32 &outVersion) const;
-       
+
        const Component&                Comp() const { return mComp; }
-       
+
        void                    Print(FILE* file = stdout) const;
 
        OSStatus                        Save (CFPropertyListRef *outData) const;
-               
+
        OSStatus                        Restore (CFPropertyListRef &inData);
-       
+
 private:
        Component mComp;
        CAComponentDescription mDesc;
-       
+
        CFStringRef mManuName, mAUName, mCompName, mCompInfo;
 
        void    SetCompNames () const;
index 7c3a449955c8e38c399e99db5ced47d34f1d26ee..70e02855016a63b94d1af2c16c66f342bf44bd6f 100644 (file)
@@ -73,7 +73,7 @@ void  CAComponentDescription::_CAShowComponentDescription(const ComponentDescrip
                char str[24];
                fprintf (file, "ComponentDescription: %s - ", StringForOSType(desc->componentType, str));
                fprintf (file, "%s - ", StringForOSType(desc->componentSubType, str));
-               fprintf (file, "%s", StringForOSType(desc->componentManufacturer, str));                
+               fprintf (file, "%s", StringForOSType(desc->componentManufacturer, str));
                fprintf (file, ", 0x%lX, 0x%lX\n", desc->componentFlags, desc->componentFlagsMask);
        }
 }
@@ -91,7 +91,7 @@ bool  CAComponentDescription::IsAU () const
 {
        bool flag = IsEffect() || IsMusicDevice() || IsOffline();
        if (flag) return true;
-       
+
        switch (componentType) {
                case kAudioUnitType_Output:
                case kAudioUnitType_FormatConverter:
@@ -109,15 +109,15 @@ inline bool _MatchTest (const OSType &inTypeA, const OSType &inTypeB)
 bool   CAComponentDescription::Matches (const ComponentDescription &desc) const
 {
        bool matches = false;
-               
+
                // see if the type matches
        matches = _MatchTest (componentType, desc.componentType);
-       
+
        if (matches)
                matches = _MatchTest (componentSubType, desc.componentSubType);
-       
+
        if (matches)
                matches = _MatchTest (componentManufacturer, desc.componentManufacturer);
-       
+
        return matches;
 }
index a681902b9159817890a395e550ba4aaa222e6ba7..a70d1eb2ecd370686b67159e8f15925a522b3b9d 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAComponentDescription.h
-       
+
 =============================================================================*/
 
 #ifndef __CAComponentDescription_h__
@@ -73,53 +73,53 @@ void CAShowComponentDescription(const ComponentDescription *desc);
 class CAComponentDescription : public ComponentDescription {
 public:
        CAComponentDescription() { memset (this, 0, sizeof (ComponentDescription)); }
-       
+
        CAComponentDescription (OSType inType, OSType inSubtype = 0, OSType inManu = 0);
 
        CAComponentDescription(const ComponentDescription& desc) { memcpy (this, &desc, sizeof (ComponentDescription)); }
-               
+
        // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
        //
        // interrogation
-       
+
        bool    IsAU () const;
-       
+
        bool    IsAUFX() const { return componentType == kAudioUnitType_Effect; }
        bool    IsAUFM() const { return componentType == kAudioUnitType_MusicEffect; }
-       
+
        bool    IsEffect () const { return IsAUFX() || IsAUFM() || IsPanner(); }
-       
+
        bool    IsOffline () const { return componentType == 'auol'; }
-       
+
        bool    IsFConv () const { return componentType == kAudioUnitType_FormatConverter; }
-       
+
        bool    IsPanner () const { return componentType == kAudioUnitType_Panner; }
-       
+
        bool    IsMusicDevice () const { return componentType == kAudioUnitType_MusicDevice; }
-       
+
 #ifndef MAC_OS_X_VERSION_10_4
        bool    IsGenerator () const { return componentType =='augn'; }
 #else
        bool    IsGenerator () const { return componentType ==kAudioUnitType_Generator; }
 #endif
-       
+
        bool    IsOutput () const { return componentType == kAudioUnitType_Output; }
-       
+
        bool    IsSource () const { return IsMusicDevice() || IsGenerator(); }
-       
+
        OSType  Type () const { return componentType; }
        OSType  SubType () const { return componentSubType; }
        OSType  Manu () const { return componentManufacturer; }
 
        int             Count() const { return CountComponents(const_cast<CAComponentDescription*>(this)); }
-       
+
                // does a semantic match where "wild card" values for type, subtype, manu will match
        bool    Matches (const ComponentDescription &desc) const;
-       
+
        // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
        //
        //      other
-       
+
        void    Print(FILE* file = stdout) const        { _CAShowComponentDescription (this, file); }
 
        OSStatus                        Save (CFPropertyListRef *outData) const;
index 1abae40187d1e841e8f319578b67f299353ac6a0..58e5387862c084b2cfe19891c467dc88344f07a7 100644 (file)
 #pragma mark   Basic Definitions
 
 #if    DEBUG || CoreAudio_Debug
-       
+
        // can be used to break into debugger immediately, also see CADebugger
        #define BusError()              (*(long *)0 = 0)
-       
+
        //      basic debugging print routines
        #if     TARGET_OS_MAC && !TARGET_API_MAC_CARBON
                extern pascal void DebugStr(const unsigned char* debuggerMsg);
                #define DebugMessageN3(msg, N1, N2, N3)
        #else
                #include "CADebugPrintf.h"
-               
+
                #if     (CoreAudio_FlushDebugMessages && !CoreAudio_UseSysLog) || defined(CoreAudio_UseSideFile)
                        #define FlushRtn        ;fflush(DebugPrintfFile)
                #else
                        #define FlushRtn
                #endif
-               
+
                #if             CoreAudio_ThreadStampMessages
                        #include <pthread.h>
                        #include "CAHostTimeBase.h"
        #else
                #define vprint(msg)
        #endif
-       
+
        #if     CoreAudio_StopOnFailure
                #include "CADebugger.h"
                #define STOP    CADebuggerStop()
index 32b4e7f0b30f5fae47cc778f1e62a82ce3affa66..bc9ec5166160773338e5d3ee57610b565a460985 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAMath.h
-       
+
 =============================================================================*/
 
 #ifndef __CAMath_h__
index 5c9b1168bd752132d6b8ed8ec85fb6e78ddf95db..c17b5c38bd49b1deba9d2999b4c7fe1ca92943d1 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAReferenceCounted.h
-       
+
 =============================================================================*/
 
 #ifndef __CAReferenceCounted_h__
@@ -57,9 +57,9 @@
 class CAReferenceCounted {
 public:
        CAReferenceCounted() : mRefCount(1) {}
-       
+
        void    retain() { IncrementAtomic(&mRefCount); }
-       
+
        void    release()
                        {
                                        // this returns the ORIGINAL value, not the new one.
index e89b8986660192c4ff9653f8f5834b6aed2f2582..bc48dd0f767ced6202d8d81c8786b4cbfc65a768 100644 (file)
@@ -76,7 +76,7 @@ void CAStreamBasicDescription::PrintFormat(FILE *f, const char *indent, const ch
        char formatID[5];
        *(UInt32 *)formatID = CFSwapInt32HostToBig(mFormatID);
        formatID[4] = '\0';
-       fprintf(f, "%2ld ch, %6.0f Hz, '%-4.4s' (0x%08lX) ",            
+       fprintf(f, "%2ld ch, %6.0f Hz, '%-4.4s' (0x%08lX) ",
                                NumberChannels(), mSampleRate, formatID,
                                mFormatFlags);
        if (mFormatID == kAudioFormatLinearPCM) {
@@ -99,7 +99,7 @@ void CAStreamBasicDescription::PrintFormat(FILE *f, const char *indent, const ch
                        ((mFormatFlags & kLinearPCMFormatFlagIsAlignedHigh) ? " high-aligned" : " low-aligned") : "";
                const char *deinter = (mFormatFlags & kAudioFormatFlagIsNonInterleaved) ? ", deinterleaved" : "";
                const char *commaSpace = (packed[0]!='\0') || (align[0]!='\0') ? ", " : "";
-               
+
                fprintf(f, "%ld-bit%s%s %s%s%s%s%s\n",
                        mBitsPerChannel, endian, sign, floatInt,
                        commaSpace, packed, align, deinter);
@@ -124,7 +124,7 @@ void CAStreamBasicDescription::PrintFormat(FILE *f, const char *indent, const ch
                        fprintf(f, "from %d-bit source, ", sourceBits);
                else
                        fprintf(f, "from UNKNOWN source bit depth, ");
-                       
+
                fprintf(f, "%ld frames/packet\n", mFramesPerPacket);
        }
        else
@@ -213,7 +213,7 @@ void        CAStreamBasicDescription::GetSimpleName(const AudioStreamBasicDescription&
                                                theEndianString = "Little Endian";
                                        #endif
                                }
-                               
+
                                const char* theKindString = NULL;
                                if((inDescription.mFormatFlags & kAudioFormatFlagIsFloat) != 0)
                                {
@@ -227,7 +227,7 @@ void        CAStreamBasicDescription::GetSimpleName(const AudioStreamBasicDescription&
                                {
                                        theKindString = (inAbbreviate ? "UInt" : "Unsigned Integer");
                                }
-                               
+
                                const char* thePackingString = NULL;
                                if((inDescription.mFormatFlags & kAudioFormatFlagIsPacked) == 0)
                                {
@@ -240,7 +240,7 @@ void        CAStreamBasicDescription::GetSimpleName(const AudioStreamBasicDescription&
                                                thePackingString = "Low";
                                        }
                                }
-                               
+
                                const char* theMixabilityString = NULL;
                                if((inDescription.mFormatFlags & kIsNonMixableFlag) == 0)
                                {
@@ -250,7 +250,7 @@ void        CAStreamBasicDescription::GetSimpleName(const AudioStreamBasicDescription&
                                {
                                        theMixabilityString = "Unmixable";
                                }
-                               
+
                                if(inAbbreviate)
                                {
                                        if(theEndianString != NULL)
@@ -303,15 +303,15 @@ void      CAStreamBasicDescription::GetSimpleName(const AudioStreamBasicDescription&
                                }
                        }
                        break;
-               
+
                case kAudioFormatAC3:
                        strcpy(outName, "AC-3");
                        break;
-               
+
                case kAudioFormat60958AC3:
                        strcpy(outName, "AC-3 for SPDIF");
                        break;
-               
+
                default:
                        {
                                char* the4CCString = (char*)&inDescription.mFormatID;
@@ -345,9 +345,9 @@ bool        operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescr
 {
        bool theAnswer = false;
        bool isDone = false;
-       
+
        //      note that if either side is 0, that field is skipped
-       
+
        //      format ID is the first order sort
        if((!isDone) && ((x.mFormatID != 0) && (y.mFormatID != 0)))
        {
@@ -370,8 +370,8 @@ bool        operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescr
                        isDone = true;
                }
        }
-       
-       
+
+
        //  mixable is always better than non-mixable for linear PCM and should be the second order sort item
        if((!isDone) && ((x.mFormatID == kAudioFormatLinearPCM) && (y.mFormatID == kAudioFormatLinearPCM)))
        {
@@ -386,7 +386,7 @@ bool        operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescr
                        isDone = true;
                }
        }
-       
+
        //      floating point vs integer for linear PCM only
        if((!isDone) && ((x.mFormatID == kAudioFormatLinearPCM) && (y.mFormatID == kAudioFormatLinearPCM)))
        {
@@ -397,7 +397,7 @@ bool        operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescr
                        isDone = true;
                }
        }
-       
+
        //      bit depth
        if((!isDone) && ((x.mBitsPerChannel != 0) && (y.mBitsPerChannel != 0)))
        {
@@ -408,7 +408,7 @@ bool        operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescr
                        isDone = true;
                }
        }
-       
+
        //      sample rate
        if((!isDone) && fnonzero(x.mSampleRate) && fnonzero(y.mSampleRate))
        {
@@ -419,7 +419,7 @@ bool        operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescr
                        isDone = true;
                }
        }
-       
+
        //      number of channels
        if((!isDone) && ((x.mChannelsPerFrame != 0) && (y.mChannelsPerFrame != 0)))
        {
@@ -430,7 +430,7 @@ bool        operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescr
                        isDone = true;
                }
        }
-       
+
        return theAnswer;
 }
 
@@ -438,29 +438,29 @@ static bool MatchFormatFlags(const AudioStreamBasicDescription& x, const AudioSt
 {
        UInt32 xFlags = x.mFormatFlags;
        UInt32 yFlags = y.mFormatFlags;
-       
+
        // match wildcards
        if (x.mFormatID == 0 || y.mFormatID == 0 || xFlags == 0 || yFlags == 0)
                return true;
-       
+
        if (x.mFormatID == kAudioFormatLinearPCM)
-       {                               
+       {
                // knock off the all clear flag
                xFlags = xFlags & ~kAudioFormatFlagsAreAllClear;
                yFlags = yFlags & ~kAudioFormatFlagsAreAllClear;
-       
+
                // if both kAudioFormatFlagIsPacked bits are set, then we don't care about the kAudioFormatFlagIsAlignedHigh bit.
                if (xFlags & yFlags & kAudioFormatFlagIsPacked) {
                        xFlags = xFlags & ~kAudioFormatFlagIsAlignedHigh;
                        yFlags = yFlags & ~kAudioFormatFlagIsAlignedHigh;
                }
-               
+
                // if both kAudioFormatFlagIsFloat bits are set, then we don't care about the kAudioFormatFlagIsSignedInteger bit.
                if (xFlags & yFlags & kAudioFormatFlagIsFloat) {
                        xFlags = xFlags & ~kAudioFormatFlagIsSignedInteger;
                        yFlags = yFlags & ~kAudioFormatFlagIsSignedInteger;
                }
-               
+
                //      if the bit depth is 8 bits or less and the format is packed, we don't care about endianness
                if((x.mBitsPerChannel <= 8) && ((xFlags & kAudioFormatFlagIsPacked) == kAudioFormatFlagIsPacked))
                {
@@ -470,7 +470,7 @@ static bool MatchFormatFlags(const AudioStreamBasicDescription& x, const AudioSt
                {
                        yFlags = yFlags & ~kAudioFormatFlagIsBigEndian;
                }
-               
+
                //      if the number of channels is 0 or 1, we don't care about non-interleavedness
                if (x.mChannelsPerFrame <= 1 && y.mChannelsPerFrame <= 1) {
                        xFlags &= ~kLinearPCMFormatFlagIsNonInterleaved;
@@ -485,31 +485,31 @@ bool      operator==(const AudioStreamBasicDescription& x, const AudioStreamBasicDesc
        //      the semantics for equality are:
        //              1) Values must match exactly
        //              2) wildcard's are ignored in the comparison
-       
+
 #define MATCH(name) ((x.name) == 0 || (y.name) == 0 || (x.name) == (y.name))
-       
+
        return
                        //      check the sample rate
                (fiszero(x.mSampleRate) || fiszero(y.mSampleRate) || fequal(x.mSampleRate, y.mSampleRate))
-               
+
                        //      check the format ids
                && MATCH(mFormatID)
-               
+
                        //      check the format flags
                && MatchFormatFlags(x, y)
-                       
+
                        //      check the bytes per packet
                && MATCH(mBytesPerPacket)
-               
+
                        //      check the frames per packet
                && MATCH(mFramesPerPacket)
-               
+
                        //      check the bytes per frame
                && MATCH(mBytesPerFrame)
-               
+
                        //      check the channels per frame
                && MATCH(mChannelsPerFrame)
-               
+
                        //      check the channels per frame
                && MATCH(mBitsPerChannel) ;
 }
index c9caed5aa077c5e04f3f51bcd74dc91722c6d4dc..db3faaea0d2ffdcda4eea1d0eaf7329092b17a99 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAStreamBasicDescription.h
-       
+
 =============================================================================*/
 
 #ifndef __CAStreamBasicDescription_h__
@@ -82,12 +82,12 @@ public:
 //     Construction/Destruction
 public:
        CAStreamBasicDescription() { memset (this, 0, sizeof(AudioStreamBasicDescription)); }
-       
+
        CAStreamBasicDescription(const AudioStreamBasicDescription &desc)
        {
                SetFrom(desc);
        }
-       
+
        CAStreamBasicDescription(               double inSampleRate,            UInt32 inFormatID,
                                                                        UInt32 inBytesPerPacket,        UInt32 inFramesPerPacket,
                                                                        UInt32 inBytesPerFrame,         UInt32 inChannelsPerFrame,
@@ -100,31 +100,31 @@ public:
        {
                memcpy(this, &desc, sizeof(AudioStreamBasicDescription));
        }
-       
+
        // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
        //
        // interrogation
-       
+
        bool    IsPCM() const { return mFormatID == kAudioFormatLinearPCM; }
-       
+
        bool    PackednessIsSignificant() const
        {
                Assert(IsPCM(), "PackednessIsSignificant only applies for PCM");
                return (SampleWordSize() << 3) != mBitsPerChannel;
        }
-       
+
        bool    AlignmentIsSignificant() const
        {
                return PackednessIsSignificant() || (mBitsPerChannel & 7) != 0;
        }
-       
+
        bool    IsInterleaved() const
        {
                return !IsPCM() || !(mFormatFlags & kAudioFormatFlagIsNonInterleaved);
        }
-       
+
        // for sanity with interleaved/deinterleaved possibilities, never access mChannelsPerFrame, use these:
-       UInt32  NumberInterleavedChannels() const       { return IsInterleaved() ? mChannelsPerFrame : 1; }     
+       UInt32  NumberInterleavedChannels() const       { return IsInterleaved() ? mChannelsPerFrame : 1; }
        UInt32  NumberChannelStreams() const            { return IsInterleaved() ? 1 : mChannelsPerFrame; }
        UInt32  NumberChannels() const                          { return mChannelsPerFrame; }
        UInt32  SampleWordSize() const                          { return (mBytesPerFrame > 0) ? mBytesPerFrame / NumberInterleavedChannels() :  0;}
@@ -134,16 +134,16 @@ public:
                Assert(mBytesPerFrame > 0, "bytesPerFrame must be > 0 in BytesToFrames");
                return nbytes / mBytesPerFrame;
        }
-       
+
        bool    SameChannelsAndInterleaving(const CAStreamBasicDescription &a) const
        {
                return this->NumberChannels() == a.NumberChannels() && this->IsInterleaved() == a.IsInterleaved();
        }
-       
+
        // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
        //
        //      manipulation
-       
+
        void    SetCanonical(UInt32 nChannels, bool interleaved)
                                // note: leaves sample rate untouched
        {
@@ -159,7 +159,7 @@ public:
                        mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
                }
        }
-       
+
        void    ChangeNumberChannels(UInt32 nChannels, bool interleaved)
                                // alter an existing format
        {
@@ -177,11 +177,11 @@ public:
                        mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
                }
        }
-       
+
        // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
        //
        //      other
-       
+
        void    Print() const
        {
                Print (stdout);
@@ -189,13 +189,13 @@ public:
 
        void    Print(FILE* file) const
        {
-               PrintFormat (file, "", "AudioStreamBasicDescription:"); 
+               PrintFormat (file, "", "AudioStreamBasicDescription:");
        }
 
        void PrintFormat(FILE *f, const char *indent, const char *name) const;
 
        OSStatus                        Save(CFPropertyListRef *outData) const;
-               
+
        OSStatus                        Restore(CFPropertyListRef &inData);
 
 //     Operations
index 088575f041318814258933888f3f9822f8d0344e..744a77ffa8a16c780506943af3776af099221a42 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAXException.cpp
-       
+
 =============================================================================*/
 
 #include "CAXException.h"
index 796119763d00d83e71971aca28751abf3ab520a7..b27f833805ecf4a2905007fc101a6467170d26b2 100644 (file)
@@ -37,7 +37,7 @@
 */
 /*=============================================================================
        CAXException.h
-       
+
 =============================================================================*/
 
 #ifndef __CAXException_h__
@@ -68,24 +68,24 @@ public:
                        } else
                                strcpy(mOperation, operation);
                }
-       
+
        char *FormatError(char *str) const
        {
                return FormatError(str, mError);
        }
-       
+
        char                            mOperation[256];
        const OSStatus          mError;
-       
+
        // -------------------------------------------------
-       
+
        typedef void (*WarningHandler)(const char *msg, OSStatus err);
-       
+
        /*static void Throw(const char *operation, OSStatus err)
        {
                throw CAXException(operation, err);
        }*/
-       
+
        static char *FormatError(char *str, OSStatus error)
        {
                // see if it appears to be a 4-char-code
@@ -98,13 +98,13 @@ public:
                        sprintf(str, "%ld", error);
                return str;
        }
-       
+
        static void Warning(const char *s, OSStatus error)
        {
                if (sWarningHandler)
                        (*sWarningHandler)(s, error);
        }
-       
+
        static void SetWarningHandler(WarningHandler f) { sWarningHandler = f; }
 private:
        static WarningHandler   sWarningHandler;
index 25e2518c8311a2f7c37062ae57b0ecdf5acdb79b..ddea43f8890ca6390e185bad46ab0e7bddccb4d3 100644 (file)
@@ -69,7 +69,7 @@ namespace ARDOUR {
        LIBARDOUR_API void make_property_quarks ();
 
        extern LIBARDOUR_API PBD::PropertyChange bounds_change;
-       
+
        extern LIBARDOUR_API const char* const ardour_config_info;
 
        LIBARDOUR_API void find_bindings_files (std::map<std::string,std::string>&);
index db86fda798d79b8b046f25dffae062ddd8719d82..e28c6922d2c92d43a47047bc0a1c3975de533720 100644 (file)
@@ -77,7 +77,7 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
        static pthread_t get_process_thread () { return _process_thread; }
        static bool is_process_thread();
 
-  private:     
+  private:
        bool                    _currently_in_cycle;
         MIDI::timestamp_t       _last_write_timestamp;
        bool                    have_timer;
@@ -90,7 +90,7 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
        int create_port ();
 
        /** Channel used to signal to the MidiControlUI that input has arrived */
-       
+
        std::string _connections;
        PBD::ScopedConnection connect_connection;
        PBD::ScopedConnection halt_connection;
index 91f463cc7f6d11c9ba742d8e567b1f98c4867921..f3ec2ed25a4b157e701966f5cb9ba187f2cf8a9c 100644 (file)
@@ -103,7 +103,7 @@ public:
                const Sample* const src_raw = src + src_offset;
 
                mix_buffers_no_gain(dst_raw, src_raw, len);
-               
+
                _silent = false;
                _written = true;
        }
index e4a5dc356d7222ea2f4f702fec082d1cde80a2ae..17e22236800aadd3ec88f5a7e0a13de3ccb54c48 100644 (file)
@@ -71,7 +71,7 @@ class LIBARDOUR_API AudioTrack : public Track
   private:
 
        boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &);
-       
+
        int  deprecated_use_diskstream_connections ();
        void set_state_part_two ();
        void set_state_part_three ();
index fe5327fd03f283e69bdfc1efaea8184ac56ec216..41654a811aae101f4598eaca83a4f7c64fe694d1 100644 (file)
@@ -93,7 +93,7 @@ class LIBARDOUR_API AUPlugin : public ARDOUR::Plugin
        bool parameter_is_control (uint32_t) const;
        bool parameter_is_input (uint32_t) const;
        bool parameter_is_output (uint32_t) const;
-       
+
        void set_info (PluginInfoPtr);
 
        int set_state(const XMLNode& node, int);
index e2ae52996df1800b9eaaa260b6dcbf989b49bd1a..330af8d90069ffa07894f602a8205c15c363d192 100644 (file)
@@ -243,10 +243,10 @@ class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager
         * countdown, whose duration will be reduced to half of its previous
         * value.
         */
-       
+
        PBD::Signal0<void> BecameSilent;
        void reset_silence_countdown ();
-       
+
   private:
        AudioEngine ();
 
@@ -308,10 +308,10 @@ class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager
 #ifdef SILENCE_AFTER
        framecnt_t _silence_countdown;
        uint32_t   _silence_hit_cnt;
-#endif 
+#endif
 
 };
-       
+
 } // namespace ARDOUR
 
 #endif /* __ardour_audioengine_h__ */
index 3de6de11fa4b7c7b2fd08d07912b7e57e18ee486..45b7fea520056ef5e4fabd4f5c038d04155f8bb2 100644 (file)
@@ -140,7 +140,7 @@ class LIBARDOUR_API AudioRegion : public Region
        void set_default_fade_out ();
 
        framecnt_t verify_xfade_bounds (framecnt_t, bool start);
-       
+
        void set_envelope_active (bool yn);
        void set_default_envelope ();
 
@@ -187,7 +187,7 @@ class LIBARDOUR_API AudioRegion : public Region
   private:
        friend class ::AudioRegionReadTest;
        friend class ::PlaylistReadTest;
-       
+
        PBD::Property<bool>     _envelope_active;
        PBD::Property<bool>     _default_fade_in;
        PBD::Property<bool>     _default_fade_out;
index cfeaeafa86df7793a46765ef32257ccc32321ac6..bc47f2fe0672d520996b8cb6cdb0e6ebb6d16646 100644 (file)
@@ -52,9 +52,9 @@ public:
        AutomationListProperty (PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > d, Ptr o, Ptr c)
                : PBD::SharedStatefulProperty<AutomationList> (d.property_id, o, c)
        {}
-       
+
        PBD::PropertyBase* clone () const;
-       
+
 private:
        /* No copy-construction nor assignment */
        AutomationListProperty (AutomationListProperty const &);
index 8d196b36d7274a6aaac1dc2fd6cce8b75ca4f812..0c14d2a049c3ca54860b9b8a213aef050a587a90 100644 (file)
@@ -65,10 +65,10 @@ class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR
        void load_mandatory_protocols ();
        void midi_connectivity_established ();
        void drop_protocols ();
-       
+
        int activate (ControlProtocolInfo&);
         int deactivate (ControlProtocolInfo&);
-       
+
        std::list<ControlProtocolInfo*> control_protocol_info;
 
        static const std::string state_node_name;
index e19eef719fca280f7e2b0d5d75306ce244eee7b8..13e1cdcda3902bcd899b5e92bde0804a163b91ae 100644 (file)
@@ -114,7 +114,7 @@ public:
   private:
        bool        _no_outs_cuz_we_no_monitor;
        boost::shared_ptr<MuteMaster> _mute_master;
-       
+
        static bool panners_legal;
        static PBD::Signal0<void> PannersLegal;
 
index 76ed08b3abc33fdecc82b8091c5b58f73537dbac..7cf4e057dc24aa5c61557ee58dfc9ae21025fafb 100644 (file)
@@ -472,7 +472,7 @@ class EngineStateController
                std::string device_name; ///< state device name
                ARDOUR::framecnt_t sample_rate; ///< sample rate used by the device in this state
                ARDOUR::pframes_t buffer_size; ///< buffer size used by the device in this state
-               
+
                PortStateList input_channel_states; ///< states of device Audio inputs
                PortStateList multi_out_channel_states; ///< states of device Audio inputs in Multi Out mode
                PortStateList stereo_out_channel_states; ///< states of device Audio inputs in Stereo Out mode
index 87a77298878639d7d1e00472ce32b5b5e376afa2..1223fa2d4bc3012b566386e085b467ffd0766602 100644 (file)
@@ -114,36 +114,36 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
        std::string format_name () const { return _format_name; }
 
        Type type () const { return _type; }
-       
+
        FormatId format_id () const {
                if (!format_ids.empty() )
                        return *format_ids.begin();
                else
                        return FormatId(0);
        }
-       
+
        Endianness endianness () const {
                if (!endiannesses.empty() )
                        return *endiannesses.begin();
                else
                        return Endianness(0);
        }
-       
+
        SampleFormat sample_format () const {
                if (!sample_formats.empty() )
                        return *sample_formats.begin();
                else
                        return SampleFormat(0);
        }
-       
+
        SampleRate sample_rate () const {
                if (!sample_rates.empty() )
                        return *sample_rates.begin();
                else
                        return SampleRate(0);
-               
+
        }
-       
+
        Quality quality () const {
                if (!qualities.empty() )
                        return *qualities.begin();
index 0929c3303fa5947fc3b29fd203c0d73b17f02548..00fb74b426114370723a717526744c9ea78f0451 100644 (file)
@@ -47,7 +47,7 @@ public:
        virtual ~FileSource ();
 
        const std::string& path() const { return _path; }
-       
+
        virtual bool safe_file_extension (const std::string& path) const = 0;
 
        int  move_to_trash (const std::string& trash_dir_name);
@@ -79,7 +79,7 @@ public:
        const std::string& origin() const { return _origin; }
 
        virtual void set_path (const std::string&);
-       
+
        static PBD::Signal2<int,std::string,std::vector<std::string> > AmbiguousFileName;
 
        void existence_check ();
index 7a2ac9455a632908559805354e15537131e8b4c5..2d4a0adb308bdceef06bdfb843739fd2b6d972e7 100644 (file)
@@ -45,7 +45,7 @@ class Graph;
 
 class Route;
 class Session;
-class GraphEdges;      
+class GraphEdges;
 
 typedef boost::shared_ptr<GraphNode> node_ptr_t;
 
index 55867eac4c7e03893ebfe3c2af2a2da1a9529365..aa04d9b20a0ae72666ab2747c044a9243f581bd5 100644 (file)
@@ -37,7 +37,7 @@ typedef boost::shared_ptr<GraphNode> node_ptr_t;
 typedef std::set< node_ptr_t > node_set_t;
 typedef std::list< node_ptr_t > node_list_t;
 
-/** A node on our processing graph, ie a Route */      
+/** A node on our processing graph, ie a Route */
 class LIBARDOUR_API GraphNode
 {
     public:
index b55a976023b6268b5e8154974ddcfec87554e6ff..17ebf860342198b1c14d3eba1438b13056ba4322 100644 (file)
@@ -71,7 +71,7 @@ class LIBARDOUR_API MidiDiskstream : public Diskstream
 
        void set_record_enabled (bool yn);
        void set_record_safe (bool yn);
-       
+
        void reset_tracker ();
        void resolve_tracker (Evoral::EventSink<framepos_t>& buffer, framepos_t time);
 
index b410f3d5af32c08b2527086a7c2f0ae63618ba7d..eb90dc1e35ef01ff9913ded6852b377efc579696 100644 (file)
@@ -57,7 +57,7 @@ class LIBARDOUR_API MidiPort : public Port {
 
        void set_always_parse (bool yn);
        void set_trace_on (bool yn);
-       
+
        MIDI::Parser& self_parser() { return _self_parser; }
 
   protected:
@@ -72,7 +72,7 @@ class LIBARDOUR_API MidiPort : public Port {
        bool        _input_active;
        bool        _always_parse;
        bool        _trace_on;
-       
+
     /* Naming this is tricky. AsyncMIDIPort inherits (for now, aug 2013) from
      * both MIDI::Port, which has _parser, and this (ARDOUR::MidiPort). We
      * need parsing support in this object, independently of what the
index 41167f167da854bfa12d756b2de65f5fa9f68ad2..245b749272827d784b07486243cc45c233ee0240 100644 (file)
@@ -62,6 +62,6 @@ class MIDISceneChange : public SceneChange
 };
 
 } /* namespace */
-       
+
 
 #endif /* __libardour_scene_change_h__ */
index 2ba57e4e0104b111b9f0b381d63ae00162502ab5..c48f384ce922f93e22aace9f94399fd1f74b809a 100644 (file)
@@ -150,7 +150,7 @@ private:
        MidiChannelFilter          _capture_filter;
 
        virtual boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &);
-       
+
        boost::shared_ptr<MidiDiskstream> midi_diskstream () const;
 
        void write_out_of_band_data (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, framecnt_t nframes);
index fade9c8beb1bc894f05799a7c263847e69445f19..4e0f98cb3cec4d37c7303d631ee002cc216ffe12 100644 (file)
@@ -42,7 +42,7 @@ class LIBARDOUR_API MidiPortManager {
   public:
     MidiPortManager();
     virtual ~MidiPortManager ();
-       
+
     /* Ports used for control. These are read/written to outside of the
      * process callback (asynchronously with respect to when data
      * actually arrives).
index 56c65a4dc22bef1c9725aa2e39234bf48d66da63..1838fb5f56b807c97227b6fa767f291af1b8b25b 100644 (file)
@@ -159,7 +159,7 @@ public:
 
        int set_state (const XMLNode&, int version);
        XMLNode& get_state ();
-       
+
        boost::shared_ptr<Pannable> pannable() const { return _pannable; }
 
        static bool equivalent (pan_t a, pan_t b) {
index 1b3f1d530f6ac45f9f9b6185cdc4d69272b42f2e..de5a5dcb05f3c135c8a488bb50b65457b71e67de 100644 (file)
@@ -237,7 +237,7 @@ public:
        void set_layer (boost::shared_ptr<Region>, double);
 
        void set_capture_insertion_in_progress (bool yn);
-       
+
   protected:
        friend class Session;
 
index c927c1c0611fbd2f0239291c7ff11d68e2b565c2..f9831afcad3e06060577e6346dd6be5d1dfeb028 100644 (file)
@@ -144,11 +144,11 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
        struct PresetRecord {
            PresetRecord () : number (-1), user (true) {}
            PresetRecord (const std::string& u, const std::string& l, int n = -1, bool s = true) : uri (u), label (l), number (n), user (s)  {}
-       
+
            bool operator!= (PresetRecord const & a) const {
                    return number != a.number || uri != a.uri || label != a.label;
            }
-       
+
            std::string uri;
            std::string label;
            int number; // if <0, invalid
index f9578a188d1fa78e2eccc3b72cdbe2dc2c5fc688..8788778a3a5a8f0177b618e034b22483d72835fa 100644 (file)
@@ -191,7 +191,7 @@ class LIBARDOUR_API PluginInsert : public Processor
        struct Match {
                Match () : method (Impossible), plugins (0) {}
                Match (MatchingMethod m, int32_t p, ChanCount h = ChanCount ()) : method (m), plugins (p), hide (h) {}
-               
+
                MatchingMethod method; ///< method to employ
                int32_t plugins;       ///< number of copies of the plugin that we need
                ChanCount hide;        ///< number of channels to hide
index 663bb92324ab7a839248b81a27817ab51e916097..2c081ddfa3b920519b4ce624a8a3f1909572b8d8 100644 (file)
@@ -135,7 +135,7 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
 
        int windows_vst_discover_from_path (std::string path, bool cache_only = false);
        int windows_vst_discover (std::string path, bool cache_only = false);
-       
+
        int lxvst_discover_from_path (std::string path, bool cache_only = false);
        int lxvst_discover (std::string path, bool cache_only = false);
 
index d76016c6a31e7ab093183efd53f425729de25666..97b7a9c2f56fb160ea50b9df6007f4e7a86ca100 100644 (file)
@@ -106,11 +106,11 @@ class LIBARDOUR_API PortManager
                                                public:
                PortRegistrationFailure (std::string const & why = "")
                        : reason (why) {}
-       
+
                ~PortRegistrationFailure () throw () {}
-       
+
                const char *what() const throw () { return reason.c_str(); }
-       
+
                                                private:
                std::string reason;
        };
@@ -157,7 +157,7 @@ class LIBARDOUR_API PortManager
         * Realtime safe.
         */
        void cycle_start (pframes_t nframes);
-       
+
        /** Signal the end of an audio cycle.
         * This signifies that the cycle began with @ref cycle_start has ended.
         * This MUST be called at the end of each cycle.
@@ -167,7 +167,7 @@ class LIBARDOUR_API PortManager
 };
 
 
-       
+
 } // namespace
 
 #endif /* __libardour_port_manager_h__ */
index 54cfd57fea55b478b3640b76d016d6bd405dff9f..60999bf73aaa8c4e0228fda6e06bb1cb2a1ffc18 100644 (file)
@@ -153,7 +153,7 @@ class LIBARDOUR_API Region
        Evoral::Range<framepos_t> last_range () const {
                return Evoral::Range<framepos_t> (_last_position, _last_position + _last_length - 1);
        }
-       
+
        Evoral::Range<framepos_t> range () const {
                return Evoral::Range<framepos_t> (first_frame(), last_frame());
        }
@@ -354,7 +354,7 @@ class LIBARDOUR_API Region
        virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute);
        virtual void set_length_internal (framecnt_t);
        virtual void set_start_internal (framecnt_t);
-       
+
        DataType _type;
 
        PBD::Property<bool>        _sync_marked;
@@ -366,15 +366,15 @@ class LIBARDOUR_API Region
        PBD::Property<framepos_t>  _position;
        /** Sync position relative to the start of our file */
        PBD::Property<framepos_t>  _sync_position;
-       
+
        SourceList              _sources;
        /** Used when timefx are applied, so we can always use the original source */
        SourceList              _master_sources;
 
        AnalysisFeatureList     _transients;
-       
+
        boost::weak_ptr<ARDOUR::Playlist> _playlist;
-       
+
   private:
        void mid_thaw (const PBD::PropertyChange&);
 
index d5228fadb71f6785cc8f308726b06f7dd48dc88b..08d9affc91e6502e0e03e6862ead0c405ca5262a 100644 (file)
@@ -117,7 +117,7 @@ public:
         * announce=false but they still need to be in the map soon after
         * creation.
         */
-       
+
        static void map_add (boost::shared_ptr<Region>);
 
   private:
index 7d746f2e2fe05633f2d828e3279914947e9165de..da589278b22919d49262d89adfebbada4c876c9e 100644 (file)
@@ -25,7 +25,7 @@
 namespace ARDOUR {
 
        extern LIBARDOUR_API const char* revision;
-       
+
        extern "C" {
                LIBARDOUR_API const char* get_ardour_revision();
        }
index c4decd48c80a3ac524875c11aa8dcc55ac71a2f9..d59c1e061075a3acfd7180021ab629b99c5427cc 100644 (file)
@@ -113,7 +113,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
 
        virtual MonitorState monitoring_state () const;
        virtual MeterState metering_state () const;
-       
+
        /* these are the core of the API of a Route. see the protected sections as well */
 
        virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
@@ -152,7 +152,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
 
        bool muted () const;
        void set_mute (bool yn, void* src);
-       
+
        bool muted_by_others() const;
 
        /* controls use set_solo() to modify this route's solo state
@@ -547,7 +547,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
        uint32_t       _solo_isolated_by_upstream;
 
        void mod_solo_isolated_by_upstream (bool, void*);
-       
+
        bool           _denormal_protection;
 
        bool _recordable : 1;
@@ -668,7 +668,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
        Route (Route const &);
 
        void maybe_note_meter_position ();
-       
+
        /** true if we've made a note of a custom meter position in these variables */
        bool _custom_meter_position_noted;
        /** the processor that came after the meter when it was last set to a custom position,
index 77e74ceafd848f5fe145ceabe470b87330a1219a..e1e1049cd6562d01b20d892ba53c85a9601d9041 100644 (file)
@@ -41,7 +41,7 @@ class LIBARDOUR_API GraphEdges
 {
 public:
        typedef std::map<GraphVertex, std::set<GraphVertex> > EdgeMap;
-       
+
        void add (GraphVertex from, GraphVertex to, bool via_sends_only);
        bool has (GraphVertex from, GraphVertex to, bool* via_sends_only);
        std::set<GraphVertex> from (GraphVertex r) const;
@@ -49,12 +49,12 @@ public:
        bool has_none_to (GraphVertex to) const;
        bool empty () const;
        void dump () const;
-       
+
 private:
        void insert (EdgeMap& e, GraphVertex a, GraphVertex b);
-       
+
        typedef std::multimap<GraphVertex, std::pair<GraphVertex, bool> > EdgeMapWithSends;
-       
+
        EdgeMapWithSends::iterator find_in_from_to_with_sends (GraphVertex, GraphVertex);
 
        /** map of edges with from as `first' and to as `second' */
index 1513622ed0dbc9f60f0347dbafe93377d7ed1f4f..adb65546b5cc40a3078675ce7b4d8cf27889f1e6 100644 (file)
@@ -54,6 +54,6 @@ class SceneChange : public PBD::Stateful
 };
 
 } /* namespace */
-       
+
 
 #endif /* __libardour_scene_change_h__ */
index 6019ed9c6cd990dff9953064e0f6845b0b326c1e..4b837f4cdb4ef2ed8c8a2eb98ca949fc75176add 100644 (file)
@@ -45,12 +45,12 @@ class SceneChanger : public SessionHandleRef
     public:
         SceneChanger (Session& s) : SessionHandleRef (s) {}
         virtual ~SceneChanger () {};
-       
+
        virtual void run (framepos_t start, framepos_t end) = 0;
        virtual void locate (framepos_t where) = 0;
 };
 
 } /* namespace */
-       
+
 
 #endif /* __libardour_scene_change_h__ */
index 17343bff96d6916bb00acea91b0a495a5779b0a7..f944dcabfbac92f4fcf4da3d28b4ac9b5aa7b7be 100644 (file)
@@ -72,7 +72,7 @@ class LIBARDOUR_API Send : public Delivery
        bool set_name (const std::string& str);
 
        std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
-       
+
        static uint32_t how_many_sends();
        static std::string name_and_id_new_send (Session&, Delivery::Role r, uint32_t&, bool);
 
index 2e6024badbe92691ff52d3395f429190bf8c60a3..3d280be0165c0c2da82a65452b95d2de492376f5 100644 (file)
@@ -312,7 +312,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        /* Timecode status signals */
        PBD::Signal1<void, bool> MTCSyncStateChanged;
-       PBD::Signal1<void, bool> LTCSyncStateChanged;   
+       PBD::Signal1<void, bool> LTCSyncStateChanged;
 
        /* Record status signals */
 
@@ -362,7 +362,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        /* Timecode state signals */
        PBD::Signal0<void> MtcOrLtcInputPortChanged;
-       
+
        void queue_event (SessionEvent*);
 
        void request_roll_at_and_return (framepos_t start, framepos_t return_to);
@@ -427,7 +427,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        framecnt_t worst_input_latency ()  const { return _worst_input_latency; }
        framecnt_t worst_track_latency ()  const { return _worst_track_latency; }
        framecnt_t worst_playback_latency () const { return _worst_output_latency + _worst_track_latency; }
-       
+
        struct SaveAs {
                std::string new_parent_folder;  /* parent folder where new session folder will be created */
                std::string new_name;           /* name of newly saved session */
@@ -437,7 +437,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
                bool        copy_external; /* true if external media should be consolidated into the newly saved session; false otherwise */
 
                std::string final_session_folder_name; /* filled in by * Session::save_as(), provides full path to newly saved session */
-               
+
                /* emitted as we make progress. 3 arguments passed to signal
                 * handler:
                 *
@@ -582,7 +582,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        AudioEngine const & engine () const { return _engine; }
 
        static std::string default_track_name_pattern (DataType);
-       
+
        /* Time */
 
        framepos_t transport_frame () const {return _transport_frame; }
@@ -625,7 +625,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        bool   synced_to_engine() const { return _slave && config.get_external_sync() && Config->get_sync_source() == Engine; }
        bool   synced_to_mtc () const { return config.get_external_sync() && Config->get_sync_source() == MTC && g_atomic_int_get (const_cast<gint*>(&_mtc_active)); }
        bool   synced_to_ltc () const { return config.get_external_sync() && Config->get_sync_source() == LTC && g_atomic_int_get (const_cast<gint*>(&_ltc_active)); }
-       
+
        double transport_speed() const { return _transport_speed; }
        bool   transport_stopped() const { return _transport_speed == 0.0f; }
        bool   transport_rolling() const { return _transport_speed != 0.0f; }
@@ -877,7 +877,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        void set_object_selection (framepos_t start, framepos_t end);
        void clear_range_selection ();
        void clear_object_selection ();
-       
+
        /* buffers for gain and pan */
 
        gain_t* gain_automation_buffer () const;
@@ -901,7 +901,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
                void* ptr,
                float opt
                );
-                       
+
        static PBD::Signal0<void> SendFeedback;
 
        /* Speakers */
@@ -1025,7 +1025,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        boost::shared_ptr<MidiPort> scene_in () const;
        boost::shared_ptr<MidiPort> scene_out () const;
-       
+
        boost::shared_ptr<MidiPort> midi_clock_output_port () const;
        boost::shared_ptr<MidiPort> midi_clock_input_port () const;
        boost::shared_ptr<MidiPort> mtc_output_port () const;
@@ -1039,7 +1039,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        void reconnect_ltc_input ();
        void reconnect_ltc_output ();
-       
+
   protected:
        friend class AudioEngine;
        void set_block_size (pframes_t nframes);
@@ -1115,7 +1115,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        PBD::ScopedConnection mtc_status_connection;
        void ltc_status_changed (bool);
        PBD::ScopedConnection ltc_status_connection;
-       
+
        void initialize_latencies ();
        void set_worst_io_latencies ();
        void set_worst_playback_latency ();
@@ -1319,7 +1319,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        int  post_engine_init ();
        int  immediately_post_engine ();
        void remove_empty_sounds ();
-       
+
        void session_loaded ();
 
        void setup_midi_control ();
@@ -1485,7 +1485,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        void set_track_loop (bool);
        bool select_playhead_priority_target (framepos_t&);
        void follow_playhead_priority ();
-       
+
        /* These are synchronous and so can only be called from within the process
         * cycle
         */
@@ -1712,7 +1712,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        */
        Evoral::Range<framepos_t> _range_selection;
        Evoral::Range<framepos_t> _object_selection;
-       
+
        /* main outs */
        uint32_t main_outs;
 
@@ -1770,7 +1770,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
                ev->rt_slot = boost::bind (method, this, rl, targ, group_override);
                ev->rt_return = after;
                ev->event_loop = PBD::EventLoop::get_event_loop_for_thread ();
-               
+
                return ev;
        }
 
@@ -1824,16 +1824,16 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        /* Scene Changing */
        SceneChanger* _scene_changer;
-       
+
        /* persistent, non-track related MIDI ports */
        MidiPortManager* _midi_ports;
        MIDI::MachineControl* _mmc;
-       
+
        void setup_ltc ();
        void setup_click ();
        void setup_click_state (const XMLNode*);
        void setup_bundles ();
-       
+
        void save_as_bring_callback (uint32_t, uint32_t, std::string);
 
        static int get_session_info_from_path (XMLTree& state_tree, const std::string& xmlpath);
index 02759bba7e49a17b1defad913e5d90cc0b866bb9..cca7f1274e5c189cc4f4e4aecf865a14a0b0a95b 100644 (file)
@@ -139,7 +139,7 @@ public:
        static void init_event_pool ();
 
        CrossThreadPool* event_pool() const { return own_pool; }
-       
+
 private:
        static PerThreadPool* pool;
        CrossThreadPool* own_pool;
index 61a5737afaee8fe95db6f31f3b1ed8aa78da06a9..22bfc1f032b1030a1a9166cf913aec5ad5e2a983 100644 (file)
@@ -34,11 +34,11 @@ Session::foreach_route (T *obj, void (T::*func)(Route&), bool sort)
 {
        boost::shared_ptr<RouteList> r = routes.reader();
        RouteList public_order (*r);
-       
+
        if (sort) {
                public_order.sort (RoutePublicOrderSorter());
        }
-       
+
        for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
                (obj->*func) (**i);
        }
@@ -64,7 +64,7 @@ Session::foreach_route (T *obj, void (T::*func)(Route&, A), A arg1, bool sort)
 {
        boost::shared_ptr<RouteList> r = routes.reader();
        RouteList public_order (*r);
-       
+
        if (sort) {
                public_order.sort (RoutePublicOrderSorter());
        }
index bda47ceba099ca89f2f51c341cb1ed6eaa46c89e..cf8060d029efeb6dd98a4b810fe3b86be2da4425 100644 (file)
@@ -238,19 +238,19 @@ struct LIBARDOUR_API SafeTime {
 class LIBARDOUR_API TimecodeSlave : public Slave {
   public:
        TimecodeSlave () {}
-       
+
        virtual Timecode::TimecodeFormat apparent_timecode_format() const = 0;
-       
+
        /* this is intended to be used by a UI and polled from a timeout. it should
           return a string describing the current position of the TC source. it
           should NOT do any computation, but should use a cached value
           of the TC source position.
        */
        virtual std::string approximate_current_position() const = 0;
-       
+
        framepos_t        timecode_offset;
        bool              timecode_negative_offset;
-       
+
        PBD::Signal1<void, bool> ActiveChanged;
 };
 
index 35e0c892970da18c338c430ebfc048924f70b32c..8f58fda2fea7b0cf0c83fa0facaedca0d216b661 100644 (file)
@@ -86,7 +86,7 @@ public:
        mutable framepos_t _smf_last_read_time;
 
        int open_for_write ();
-       
+
        void ensure_disk_file (const Lock& lock);
 
        framecnt_t read_unlocked (const Lock&                    lock,
index 09b3d8b5ebe4eda5cdbc7d28b2b402824867c160..bb22a79c8edae48373841ac592635f8db400ce5c 100644 (file)
@@ -158,7 +158,7 @@ class LIBARDOUR_API TempoSection : public MetricSection, public Tempo {
           the tempo section is located in. A value of 0.0 indicates that
           it occurs on the first beat of the bar, a value of 0.5 indicates
           that it occurs halfway through the bar and so on.
-       
+
           this enables us to keep the tempo change at the same relative
           position within the bar if/when the meter changes.
        */
@@ -228,7 +228,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
                BBTPoint (const MeterSection& m, const TempoSection& t, framepos_t f,
                          uint32_t b, uint32_t e)
                        : frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}
-               
+
                Timecode::BBT_Time bbt() const { return Timecode::BBT_Time (bar, beat, 0); }
                operator Timecode::BBT_Time() const { return bbt(); }
                operator framepos_t() const { return frame; }
@@ -244,13 +244,13 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
 
        void get_grid (BBTPointList::const_iterator&, BBTPointList::const_iterator&,
                       framepos_t start, framepos_t end);
-       
+
        /* TEMPO- AND METER-SENSITIVE FUNCTIONS
 
           bbt_time(), bbt_time_rt(), frame_time() and bbt_duration_at()
           are all sensitive to tempo and meter, and will give answers
           that align with the grid formed by tempo and meter sections.
-       
+
           They SHOULD NOT be used to determine the position of events
           whose location is canonically defined in beats.
        */
@@ -266,7 +266,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
        framecnt_t bbt_duration_at (framepos_t, const Timecode::BBT_Time&, int dir);
 
        /* TEMPO-SENSITIVE FUNCTIONS
-       
+
           These next 4 functions will all take tempo in account and should be
           used to determine position (and in the last case, distance in beats)
           when tempo matters but meter does not.
@@ -324,7 +324,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
 
        void insert_time (framepos_t, framecnt_t);
        bool remove_time (framepos_t where, framecnt_t amount);  //returns true if anything was moved
-       
+
        int n_tempos () const;
        int n_meters () const;
 
@@ -335,7 +335,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
        friend class ::BBTTest;
        friend class ::FrameposPlusBeatsTest;
        friend class ::TempoTest;
-       
+
        static Tempo    _default_tempo;
        static Meter    _default_meter;
 
@@ -355,16 +355,16 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
        BBTPointList::const_iterator bbt_before_or_at (framepos_t);
        BBTPointList::const_iterator bbt_before_or_at (const Timecode::BBT_Time&);
        BBTPointList::const_iterator bbt_after_or_at (framepos_t);
-       
+
        framepos_t round_to_type (framepos_t fr, RoundMode dir, BBTPointType);
        void bbt_time (framepos_t, Timecode::BBT_Time&, const BBTPointList::const_iterator&);
        framecnt_t bbt_duration_at_unlocked (const Timecode::BBT_Time& when, const Timecode::BBT_Time& bbt, int dir);
-       
+
        const MeterSection& first_meter() const;
        MeterSection&       first_meter();
        const TempoSection& first_tempo() const;
        TempoSection&       first_tempo();
-       
+
        void do_insert (MetricSection* section);
 
        void add_tempo_locked (const Tempo&, Timecode::BBT_Time where, bool recompute);
index 2d67a0aa75e821f4b7778b480839821fee3f4c5c..31ae261ea777f3fd808358b3c349fa346d731436 100644 (file)
@@ -57,7 +57,7 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream
        PBD::Signal0<void> MonitoringChanged;
 
        MeterState metering_state () const;
-       
+
        virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                             bool state_changing);
 
@@ -221,13 +221,13 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream
        void maybe_declick (BufferSet&, framecnt_t, int);
 
        boost::shared_ptr<RecEnableControl> _rec_enable_control;
-       
+
        framecnt_t check_initial_delay (framecnt_t nframes, framepos_t&);
 
 private:
 
        virtual boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &) = 0;
-       
+
        void diskstream_playlist_changed ();
        void diskstream_record_enable_changed ();
        void diskstream_record_safe_changed ();
index d073588b9e86341065e6e8b71869d2dd8b461d88..f3767d471a3c4a03a4ce90a7ef01fde5fd7b817f 100644 (file)
@@ -93,7 +93,7 @@ gain_to_slider_position (ARDOUR::gain_t g)
           K =  7.8990885960495589E+00
 
         */
-       
+
        return 8.2857630370864188E-01 * pow(g,5.1526743785019269E-01) * exp (-g/7.8990885960495589E+00);
 #else
        return pow((6.0*log(g)/log(2.0)+192.0)/198.0, 8.0);
@@ -110,9 +110,9 @@ slider_position_to_gain (double pos)
 #ifndef OLD_GAIN_MATH
        /* 5th order polynomial function fit to data from a TC Spectra console
           fader (image of fader gradations).
-       
+
           y = a + bx1 + cx2 + dx3 + fx4 + gx5
-       
+
           a = -1.1945480381045521E-02
           b =  1.5809476525537265E+00
           c = -1.5850710838966151E+01
index 3450e2a480d22fc0b938590380574feb459865fe..8e2e313c1f92f24512f25dac6d5d32040ee2bcbd 100644 (file)
@@ -56,7 +56,7 @@ public:
        bool parameter_is_control (uint32_t) const { return true; }
        bool parameter_is_input (uint32_t) const { return true; }
        bool parameter_is_output (uint32_t) const { return false; }
-       
+
        int connect_and_run (
                BufferSet&, ChanMapping in, ChanMapping out,
                pframes_t nframes, framecnt_t offset
@@ -70,7 +70,7 @@ public:
         void print_parameter (uint32_t, char*, uint32_t len) const;
 
        bool has_editor () const;
-       
+
        AEffect * plugin () const { return _plugin; }
        VSTState * state () const { return _state; }
        MidiBuffer * midi_buffer () const { return _midi_out_buf; }
@@ -78,7 +78,7 @@ public:
        int set_state (XMLNode const &, int);
 
        int first_user_preset_index () const;
-       
+
 protected:
        void set_plugin (AEffect *);
        gchar* get_chunk (bool) const;
@@ -91,7 +91,7 @@ protected:
        XMLTree * presets_tree () const;
        std::string presets_file () const;
        void find_presets ();
-       
+
        VSTHandle* _handle;
        VSTState*  _state;
        AEffect*   _plugin;
index 9d4fc3450f3a29c7bae46872245401e46d71308d..2e1c4074f27f603f52f964c605fce38cbf4e00ef 100644 (file)
@@ -44,12 +44,12 @@ struct LIBARDOUR_API _VSTInfo
        int    numInputs;
        int    numOutputs;
        int    numParams;
-       
+
        int    wantMidi;
        int    wantEvents;
        int    hasEditor;
        int    canProcessReplacing;
-       
+
        char** ParamNames;
        char** ParamLabels;
 };
@@ -63,7 +63,7 @@ struct LIBARDOUR_API _VSTHandle
        void*        dll;
        char*        name;
        char*        path;
-       
+
        main_entry_t main_entry;
 
        int          plugincnt;
@@ -83,13 +83,13 @@ struct LIBARDOUR_API _VSTState
        void*       windows_window;
 
        int         xid;               ///< X11 XWindow
-       
+
        int         want_resize;       ///< Set to signal the plugin resized its UI
        void*       extra_data;        ///< Pointer to any extra data
-       
+
        void * event_callback_thisptr;
        void  (* eventProc) (void * event);
-       
+
        VSTHandle*  handle;
 
        int width;
@@ -102,9 +102,9 @@ struct LIBARDOUR_API _VSTState
        int destroy;
        int vst_version;
        int has_editor;
-       
+
        int         program_set_without_editor;
-       
+
        int         want_program;
        int         want_chunk;
        int         n_pending_keys;
@@ -112,7 +112,7 @@ struct LIBARDOUR_API _VSTState
        int         wanted_chunk_size;
        float *     want_params;
        float *     set_params;
-       
+
        VSTKey      pending_keys[16];
 
        int         dispatcher_wantcall;
index 17b72ac8dad68940af0fc440947e6562fe61c43b..c4648564af827a49319266f922f537fb942829dd 100644 (file)
@@ -26,7 +26,7 @@ struct LIBARDOUR_API _VSTHandle;
 typedef struct _VSTHandle VSTHandle;
 
 namespace ARDOUR {
-       
+
 class AudioEngine;
 class Session;
 
index 86f111b520db196e574f758a24d0a8a8a43bdb81..6c5625e716e7f623631a12e7d1f1bd42e69e23b3 100644 (file)
@@ -73,15 +73,15 @@ AsyncMIDIPort::flush_output_fifo (MIDI::pframes_t nframes)
        output_fifo.get_read_vector (&vec);
 
        MidiBuffer& mb (get_midi_buffer (nframes));
-                       
+
        if (vec.len[0]) {
                Evoral::Event<double>* evp = vec.buf[0];
-               
+
                for (size_t n = 0; n < vec.len[0]; ++n, ++evp) {
                        mb.push_back (evp->time(), evp->size(), evp->buffer());
                }
        }
-       
+
        if (vec.len[1]) {
                Evoral::Event<double>* evp = vec.buf[1];
 
@@ -89,7 +89,7 @@ AsyncMIDIPort::flush_output_fifo (MIDI::pframes_t nframes)
                        mb.push_back (evp->time(), evp->size(), evp->buffer());
                }
        }
-       
+
        if ((written = vec.len[0] + vec.len[1]) != 0) {
                output_fifo.increment_read_idx (written);
        }
@@ -108,7 +108,7 @@ AsyncMIDIPort::cycle_start (MIDI::pframes_t nframes)
        if (ARDOUR::Port::sends_output()) {
                flush_output_fifo (nframes);
        }
-       
+
        /* copy incoming data from the port buffer into the input FIFO
           and if necessary wakeup the reader
        */
@@ -116,7 +116,7 @@ AsyncMIDIPort::cycle_start (MIDI::pframes_t nframes)
        if (ARDOUR::Port::receives_input()) {
                MidiBuffer& mb (get_midi_buffer (nframes));
                framecnt_t when;
-               
+
                if (have_timer) {
                        when = timer ();
                } else {
@@ -194,7 +194,7 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
                /* this is the best estimate of "when" this MIDI data is being
                 * delivered
                 */
-               
+
                _parser->set_timestamp (AudioEngine::instance()->sample_time() + timestamp);
                for (size_t n = 0; n < msglen; ++n) {
                        _parser->scanner (msg[n]);
@@ -202,7 +202,7 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
 
                Glib::Threads::Mutex::Lock lm (output_fifo_lock);
                RingBuffer< Evoral::Event<double> >::rw_vector vec = { { 0, 0 }, { 0, 0} };
-               
+
                output_fifo.get_write_vector (&vec);
 
                if (vec.len[0] + vec.len[1] < 1) {
@@ -223,7 +223,7 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
                }
 
                output_fifo.increment_write_idx (1);
-               
+
                ret = msglen;
 
        } else {
@@ -249,11 +249,11 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
                if (_currently_in_cycle) {
 
                        MidiBuffer& mb (get_midi_buffer (_cycle_nframes));
-                       
+
                        if (timestamp == 0) {
                                timestamp = _last_write_timestamp;
                        }
-                       
+
                        if (mb.push_back (timestamp, msglen, msg)) {
                                ret = msglen;
                                _last_write_timestamp = timestamp;
@@ -279,7 +279,7 @@ AsyncMIDIPort::read (MIDI::byte *, size_t)
        if (!ARDOUR::Port::receives_input()) {
                return 0;
        }
-       
+
        timestamp_t time;
        Evoral::EventType type;
        uint32_t size;
index 31baf47039492a7c9ebf4f49ad9ffc5aed33b640..3d719cc30b122f6c57458973a9936a3a90e15239 100644 (file)
@@ -524,7 +524,7 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
 
                                Sample *buf = bufs.get_audio (n).data(rec_offset);
                                memcpy (chaninfo->current_capture_buffer, buf, sizeof (Sample) * rec_nframes);
-                               
+
                        } else {
 
                                framecnt_t total = chaninfo->capture_vector.len[0] + chaninfo->capture_vector.len[1];
@@ -600,7 +600,7 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
        }
 
        if ((_track->monitoring_state () & MonitoringDisk) || collect_playback) {
-               
+
                /* we're doing playback */
 
                framecnt_t necessary_samples;
@@ -656,7 +656,7 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
                                        memcpy ((char *) chaninfo->playback_wrap_buffer,
                                                        chaninfo->playback_vector.buf[0],
                                                        chaninfo->playback_vector.len[0] * sizeof (Sample));
-                                       
+
                                        /* Copy buf[1] from playback_buf */
                                        memcpy (chaninfo->playback_wrap_buffer + chaninfo->playback_vector.len[0],
                                                        chaninfo->playback_vector.buf[1],
@@ -675,13 +675,13 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
                        int channel = 0;
                        for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan, ++channel) {
                                ChannelInfo* chaninfo (*chan);
-                               
+
                                playback_distance = interpolation.interpolate (
                                        channel, nframes, chaninfo->current_playback_buffer, chaninfo->speed_buffer);
-                               
+
                                chaninfo->current_playback_buffer = chaninfo->speed_buffer;
                        }
-                       
+
                } else {
                        playback_distance = nframes;
                }
@@ -692,20 +692,20 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
        if (need_disk_signal) {
 
                /* copy data over to buffer set */
-               
+
                size_t n_buffers = bufs.count().n_audio();
                size_t n_chans = c->size();
                gain_t scaling = 1.0f;
-               
+
                if (n_chans > n_buffers) {
                        scaling = ((float) n_buffers)/n_chans;
                }
 
                for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) {
-                       
+
                        AudioBuffer& buf (bufs.get_audio (n%n_buffers));
                        ChannelInfo* chaninfo (*chan);
-                       
+
                        if (n < n_chans) {
                                if (scaling != 1.0f) {
                                        buf.read_from_with_gain (chaninfo->current_playback_buffer, nframes, scaling);
@@ -725,7 +725,7 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
                ChanCount cnt (DataType::AUDIO, n_chans);
                cnt.set (DataType::MIDI, bufs.count().n_midi());
                bufs.set_count (cnt);
-       
+
                /* extra buffers will already be silent, so leave them alone */
        }
 
@@ -1124,11 +1124,11 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer, framecn
        /* do not read from disk while session is marked as Loading, to avoid
           useless redundant I/O.
        */
-       
+
        if (_session.state_of_the_state() & Session::Loading) {
                return 0;
        }
-       
+
        if (c->empty()) {
                return 0;
        }
@@ -1263,14 +1263,14 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer, framecn
        /* now back to samples */
 
        framecnt_t samples_to_read = byte_size_for_read / (bits_per_sample / 8);
-       
+
        //cerr << name() << " will read " << byte_size_for_read << " out of total bytes " << total_bytes << " in buffer of "
        // << c->front()->playback_buf->bufsize() * bits_per_sample / 8 << " bps = " << bits_per_sample << endl;
        // cerr << name () << " read samples = " << samples_to_read << " out of total space " << total_space << " in buffer of " << c->front()->playback_buf->bufsize() << " samples\n";
 
        // uint64_t before = g_get_monotonic_time ();
        // uint64_t elapsed;
-       
+
        for (chan_n = 0, i = c->begin(); i != c->end(); ++i, ++chan_n) {
 
                ChannelInfo* chan (*i);
@@ -1352,14 +1352,14 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer, framecn
 
        // elapsed = g_get_monotonic_time () - before;
        // cerr << "\tbandwidth = " << (byte_size_for_read / 1048576.0) / (elapsed/1000000.0) << "MB/sec\n";
-               
+
        file_frame = file_frame_tmp;
        assert (file_frame >= 0);
 
        ret = ((total_space - samples_to_read) > disk_read_chunk_frames);
-       
+
        c->front()->playback_buf->get_write_vector (&vector);
-       
+
   out:
        return ret;
 }
@@ -1630,7 +1630,7 @@ AudioDiskstream::transport_stopped_wallclock (struct tm& when, time_t twhen, boo
                }
 
                _last_capture_sources.insert (_last_capture_sources.end(), srcs.begin(), srcs.end());
-               
+
                _playlist->clear_changes ();
                _playlist->set_capture_insertion_in_progress (true);
                _playlist->freeze ();
@@ -1774,7 +1774,7 @@ AudioDiskstream::finish_capture (boost::shared_ptr<ChannelList> c)
        */
 
        DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("Finish capture, add new CI, %1 + %2\n", ci->start, ci->frames));
-       
+
        capture_info.push_back (ci);
        capture_captured = 0;
 
@@ -1816,25 +1816,25 @@ AudioDiskstream::set_record_safe (bool yn)
        if (!recordable() || !_session.record_enabling_legal() || _io->n_ports().n_audio() == 0) {
                return;
        }
-       
+
        /* can't rec-safe in destructive mode if transport is before start ????
         REQUIRES REVIEW */
-       
+
        if (destructive() && yn && _session.transport_frame() < _session.current_start_frame()) {
                return;
        }
-       
+
        /* yes, i know that this not proof against race conditions, but its
         good enough. i think.
         */
-       
+
        if (record_safe () != yn) {
                if (yn) {
                        engage_record_safe ();
                } else {
                        disengage_record_safe ();
                }
-       
+
                RecordSafeChanged (); /* EMIT SIGNAL */
        }
 }
@@ -2334,11 +2334,11 @@ AudioDiskstream::use_pending_capture_data (XMLNode& node)
 
                boost::shared_ptr<AudioRegion> wf_region;
                boost::shared_ptr<AudioRegion> region;
-               
+
                /* First create the whole file region */
 
                PropertyList plist;
-               
+
                plist.add (Properties::start, 0);
                plist.add (Properties::length, first_fs->length (first_fs->timeline_position()));
                plist.add (Properties::name, region_name_from_path (first_fs->name(), true));
@@ -2353,7 +2353,7 @@ AudioDiskstream::use_pending_capture_data (XMLNode& node)
                 * the playlist */
 
                region = boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (pending_sources, plist));
-               
+
                _playlist->add_region (region, position);
        }
 
@@ -2414,7 +2414,7 @@ AudioDiskstream::can_become_destructive (bool& requires_bounce) const
        if (Profile->get_trx()) {
                return false;
        }
-       
+
        if (!_playlist) {
                requires_bounce = false;
                return false;
index 06d5f476a11881adaa9a917b48d5612b1f113ad4..0553206367676e1ecb261e6bd657f697cc0230a8 100644 (file)
@@ -152,7 +152,7 @@ struct ReadSorter {
 /** A segment of region that needs to be read */
 struct Segment {
        Segment (boost::shared_ptr<AudioRegion> r, Evoral::Range<framepos_t> a) : region (r), range (a) {}
-       
+
        boost::shared_ptr<AudioRegion> region; ///< the region
        Evoral::Range<framepos_t> range;       ///< range of the region to read, in session frames
 };
@@ -493,7 +493,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
                        if (!string_is_affirmative (p->value())) {
                                continue;
                        }
-                       
+
                        if ((p = (*i)->property (X_("in"))) == 0) {
                                continue;
                        }
@@ -537,7 +537,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
                                 */
 
                                const XMLNodeList c = (*i)->children ();
-                               
+
                                for (XMLNodeConstIterator j = c.begin(); j != c.end(); ++j) {
                                        if ((*j)->name() == X_("FadeOut")) {
                                                out_a->fade_out()->set_state (**j, version);
@@ -545,7 +545,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
                                                out_a->inverse_fade_out()->set_state (**j, version);
                                        }
                                }
-                               
+
                                out_a->set_fade_out_active (true);
 
                        } else {
@@ -555,7 +555,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
                                 */
 
                                const XMLNodeList c = (*i)->children ();
-                               
+
                                for (XMLNodeConstIterator j = c.begin(); j != c.end(); ++j) {
                                        if ((*j)->name() == X_("FadeIn")) {
                                                in_a->fade_in()->set_state (**j, version);
@@ -563,7 +563,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
                                                in_a->inverse_fade_in()->set_state (**j, version);
                                        }
                                }
-                               
+
                                in_a->set_fade_in_active (true);
                        }
                }
index 08cd090cdb865a9c529b9c1943ef2309209ad705..5390f1c9d4c399a3a2a9c3c4da1683a87a54fc95 100644 (file)
@@ -177,7 +177,7 @@ AudioPlaylistImporter::_prepare_move ()
                }
                name = rename_pair.second;
        }
-       
+
        XMLProperty* p = xml_playlist.property ("name");
        if (!p) {
                error << _("badly-formed XML in imported playlist") << endmsg;
index 4f414ac2fdf560a33bb47b3f894c054df84e79b5..99115d5d6fbc3eb362abfce87d1f8b910b4a1beb 100644 (file)
@@ -355,7 +355,7 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
 
        int dret;
        framecnt_t playback_distance;
-       
+
        if ((nframes = check_initial_delay (nframes, transport_frame)) == 0) {
 
                /* need to do this so that the diskstream sets its
@@ -386,7 +386,7 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
        BufferSet& bufs = _session.get_route_buffers (n_process_buffers ());
 
        fill_buffers_with_input (bufs, _input, nframes);
-       
+
        if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) {
                _meter->run (bufs, start_frame, end_frame, nframes, true);
        }
@@ -486,7 +486,7 @@ AudioTrack::bounceable (boost::shared_ptr<Processor> endpoint, bool include_endp
                /* does the output from the last considered processor match the
                 * input to this one?
                 */
-               
+
                if (naudio != (*r)->input_streams().n_audio()) {
                        return false;
                }
@@ -591,7 +591,7 @@ AudioTrack::freeze_me (InterThreadInfo& itt)
                                        (*r)->deactivate ();
                                }
                        }
-                       
+
                        _session.set_dirty ();
                }
        }
index cf9a25962c9d21829fa6defd4cb7e0944a2b860a..43a40101cf9aeb64f834b77f6ae79600b937e920 100644 (file)
@@ -247,7 +247,7 @@ AudioTrackImporter::_prepare_move ()
                }
                name = rename_pair.second;
        }
-       
+
        XMLNode* c = xml_track.child ("IO");
        if (!c) {
                error << _("badly-formed XML in imported track") << endmsg;
@@ -259,9 +259,9 @@ AudioTrackImporter::_prepare_move ()
                error << _("badly-formed XML in imported track") << endmsg;
                return false;
        }
-       
+
        p->set_value (name);
-       
+
        track_handler.add_name (name);
 
        return true;
index 9f91d3f9bdafd35b2e2f0e1bd378f00d6ca03b05..485e4ef56a6243f72eabc859d8ca89164ed76060 100644 (file)
@@ -471,7 +471,7 @@ AUPlugin::~AUPlugin ()
                AUListenerDispose (_parameter_listener);
                _parameter_listener = 0;
        }
-       
+
        if (unit) {
                DEBUG_TRACE (DEBUG::AudioUnits, "about to call uninitialize in plugin destructor\n");
                unit->Uninitialize ();
@@ -569,12 +569,12 @@ AUPlugin::init ()
        if (input_elements > 0) {
                /* setup render callback: the plugin calls this to get input data
                 */
-               
+
                AURenderCallbackStruct renderCallbackInfo;
-               
+
                renderCallbackInfo.inputProc = _render_callback;
                renderCallbackInfo.inputProcRefCon = this;
-               
+
                DEBUG_TRACE (DEBUG::AudioUnits, "set render callback in input scope\n");
                if ((err = unit->SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input,
                                              0, (void*) &renderCallbackInfo, sizeof(renderCallbackInfo))) != 0) {
@@ -1062,7 +1062,7 @@ AUPlugin::configure_io (ChanCount in, ChanCount out)
        }
 
        /* reset plugin info to show currently configured state */
-       
+
        _info->n_inputs = in;
        _info->n_outputs = out;
 
@@ -1495,14 +1495,14 @@ AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping in_map, ChanMapping out_
                uint32_t nmidi = bufs.count().n_midi();
 
                for (uint32_t i = 0; i < nmidi; ++i) {
-                       
+
                        /* one MIDI port/buffer only */
-                       
+
                        MidiBuffer& m = bufs.get_midi (i);
-                       
+
                        for (MidiBuffer::iterator i = m.begin(); i != m.end(); ++i) {
                                Evoral::MIDIEvent<framepos_t> ev (*i);
-                               
+
                                if (ev.is_channel_event()) {
                                        const uint8_t* b = ev.buffer();
                                        DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1: MIDI event %2\n", name(), ev));
@@ -2550,7 +2550,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
 
                        int32_t possible_in = info->cache.io_configs.front().first;
                        int32_t possible_out = info->cache.io_configs.front().second;
-                       
+
                        if (possible_in > 0) {
                                info->n_inputs.set (DataType::AUDIO, possible_in);
                        } else {
@@ -2917,7 +2917,7 @@ void
 AUPlugin::set_info (PluginInfoPtr info)
 {
        Plugin::set_info (info);
-       
+
        AUPluginInfoPtr pinfo = boost::dynamic_pointer_cast<AUPluginInfo>(get_info());
        _has_midi_input = pinfo->needs_midi_input ();
        _has_midi_output = false;
index 50284128de31d25571b3183fa2e8b4b1c1786db3..c5566e1630923a01c9ae3bd265ce7522aa7a7016 100644 (file)
@@ -121,7 +121,7 @@ AudioEngine::create ()
        }
 
        _instance = new AudioEngine ();
-       
+
        return _instance;
 }
 
@@ -158,7 +158,7 @@ AudioEngine::sample_rate_change (pframes_t nframes)
 #ifdef SILENCE_AFTER_SECONDS
        _silence_countdown = nframes * SILENCE_AFTER_SECONDS;
 #endif
-       
+
        return 0;
 }
 
@@ -219,11 +219,11 @@ AudioEngine::process_callback (pframes_t nframes)
        if (_measuring_latency == MeasureAudio && _mtdm) {
                /* run a normal cycle from the perspective of the PortManager
                   so that we get silence on all registered ports.
-               
+
                   we overwrite the silence on the two ports used for latency
                   measurement.
                */
-               
+
                PortManager::cycle_start (nframes);
                PortManager::silence (nframes);
 
@@ -262,7 +262,7 @@ AudioEngine::process_callback (pframes_t nframes)
                return_after_remove_check = true;
 
        } else if (_latency_flush_frames) {
-               
+
                /* wait for the appropriate duration for the MTDM signal to
                 * drain from the ports before we revert to normal behaviour.
                 */
@@ -270,7 +270,7 @@ AudioEngine::process_callback (pframes_t nframes)
                PortManager::cycle_start (nframes);
                PortManager::silence (nframes);
                PortManager::cycle_end (nframes);
-               
+
                 if (_latency_flush_frames > nframes) {
                         _latency_flush_frames -= nframes;
                 } else {
@@ -294,7 +294,7 @@ AudioEngine::process_callback (pframes_t nframes)
                } else if (session_removal_countdown > 0) {
 
                        /* we'll be fading audio out.
-                       
+
                           if this is the last time we do this as part
                           of session removal, do a MIDI panic now
                           to get MIDI stopped. This relies on the fact
@@ -362,7 +362,7 @@ AudioEngine::process_callback (pframes_t nframes)
        }
 
        if (last_monitor_check + monitor_check_interval < next_processed_frames) {
-               
+
                PortManager::check_monitoring ();
                last_monitor_check = next_processed_frames;
        }
@@ -370,7 +370,7 @@ AudioEngine::process_callback (pframes_t nframes)
 #ifdef SILENCE_AFTER_SECONDS
 
        bool was_silent = (_silence_countdown == 0);
-       
+
        if (_silence_countdown >= nframes) {
                _silence_countdown -= nframes;
        } else {
@@ -385,17 +385,17 @@ AudioEngine::process_callback (pframes_t nframes)
        if (_silence_countdown == 0 || _session->silent()) {
                PortManager::silence (nframes);
        }
-       
-#else  
+
+#else
        if (_session->silent()) {
                PortManager::silence (nframes);
        }
 #endif
-       
+
        if (session_remove_pending && session_removal_countdown) {
 
                PortManager::fade_out (session_removal_gain, session_removal_gain_step, nframes);
-               
+
                if (session_removal_countdown > nframes) {
                        session_removal_countdown -= nframes;
                } else {
@@ -410,7 +410,7 @@ AudioEngine::process_callback (pframes_t nframes)
        _processed_frames = next_processed_frames;
 
        PT_TIMING_CHECK (2);
-       
+
        return 0;
 }
 
@@ -462,12 +462,12 @@ AudioEngine::do_reset_backend()
        while (!_stop_hw_reset_processing) {
 
                if (g_atomic_int_get (&_hw_reset_request_count) != 0 && _backend) {
-       
+
                        _reset_request_lock.unlock();
-       
+
                        Glib::Threads::RecMutex::Lock pl (_state_lock);
                        g_atomic_int_dec_and_test (&_hw_reset_request_count);
-       
+
             std::cout << "AudioEngine::RESET::Reset request processing. Requests left: " << _hw_reset_request_count << std::endl;
                         DeviceResetStarted(); // notify about device reset to be started
 
@@ -478,9 +478,9 @@ AudioEngine::do_reset_backend()
                        if ( ( 0 == stop () ) &&
                  ( 0 == _backend->reset_device () ) &&
                  ( 0 == start () ) ) {
-                               
+
                                std::cout << "AudioEngine::RESET::Engine started..." << std::endl;
-                               
+
                                // inform about possible changes
                                BufferSizeChanged (_backend->buffer_size() );
                 DeviceResetFinished(); // notify about device reset finish
@@ -491,7 +491,7 @@ AudioEngine::do_reset_backend()
                                // we've got an error
                 DeviceError();
                        }
-                       
+
                        std::cout << "AudioEngine::RESET::Done." << std::endl;
 
                        _reset_request_lock.lock();
@@ -574,7 +574,7 @@ AudioEngine::stop_hw_event_processing()
         _hw_devicelist_update_thread->join ();
         _hw_devicelist_update_thread = 0;
     }
-       
+
 }
 
 
@@ -633,7 +633,7 @@ AudioEngine::reconnect_session_routes (bool reconnect_inputs, bool reconnect_out
        if (_session) {
                _session->reconnect_existing_routes(true, true, reconnect_inputs, reconnect_outputs);
        }
-#endif 
+#endif
 }
 
 
@@ -733,13 +733,13 @@ AudioEngine::backend_discover (const string& path)
                                        Glib::Module::get_last_error()) << endmsg;
                return 0;
        }
-       
+
        if (!module.get_symbol ("descriptor", func)) {
                error << string_compose(_("AudioEngine: backend at \"%1\" has no descriptor function."), path) << endmsg;
                error << Glib::Module::get_last_error() << endmsg;
                return 0;
        }
-       
+
        dfunc = (AudioBackendInfo* (*)(void))func;
        info = dfunc();
        if (!info->available()) {
@@ -747,7 +747,7 @@ AudioEngine::backend_discover (const string& path)
        }
 
        module.make_resident ();
-       
+
        return info;
 }
 
@@ -755,7 +755,7 @@ vector<const AudioBackendInfo*>
 AudioEngine::available_backends() const
 {
        vector<const AudioBackendInfo*> r;
-       
+
        for (BackendMap::const_iterator i = _backends.begin(); i != _backends.end(); ++i) {
                r.push_back (i->second);
        }
@@ -805,12 +805,12 @@ AudioEngine::set_backend (const std::string& name, const std::string& arg1, cons
        }
 
        drop_backend ();
-       
+
        try {
                if (b->second->instantiate (arg1, arg2)) {
                        throw failed_constructor ();
                }
-               
+
                _backend = b->second->factory (*this);
 
        } catch (exception& e) {
@@ -846,20 +846,20 @@ AudioEngine::start (bool for_latency)
        }
 
        _running = true;
-       
+
        if (_session) {
                _session->set_frame_rate (_backend->sample_rate());
-               
+
                if (_session->config.get_jack_time_master()) {
                        _backend->set_time_master (true);
                }
 
        }
-       
+
        if (!for_latency) {
                Running(); /* EMIT SIGNAL */
        }
-       
+
        return 0;
 }
 
@@ -898,13 +898,13 @@ AudioEngine::stop (bool for_latency)
        _latency_output_port = 0;
        _latency_input_port = 0;
        _started_for_latency = false;
-       
+
        Port::PortDrop ();
 
        if (!for_latency) {
                Stopped (); /* EMIT SIGNAL */
        }
-       
+
        return 0;
 }
 
@@ -1264,7 +1264,7 @@ AudioEngine::setup_required () const
                        return false;
                }
        }
-       
+
        return true;
 }
 
index 722d6acc172fc3a293d0665849bdeb99c4650a5f..257d396fb875a373f641ab942ef456e716bf66c6 100644 (file)
@@ -343,4 +343,4 @@ AudioFileSource::get_interleave_buffer (framecnt_t size)
 
        return ssb->buf;
 }
-       
+
index 361b4634503cd9df2465601f515ac439a063abd8..8f5228ad6a7208e7c7a268db643b501f7469ad95 100644 (file)
@@ -131,13 +131,13 @@ merge_curves (boost::shared_ptr<Evoral::ControlList> dst,
        if (size != curve2->size()) {
                return;
        }
-       
+
        Evoral::ControlList::const_iterator c1 = curve1->begin();
        int count = 0;
        for (Evoral::ControlList::const_iterator c2 = curve2->begin(); c2!=curve2->end(); c2++ ) {
                float v1 = accurate_coefficient_to_dB((*c1)->value);
                float v2 = accurate_coefficient_to_dB((*c2)->value);
-               
+
                double interp = v1 * ( 1.0-( (double)count / (double)size) );
                interp += v2 * ( (double)count / (double)size );
 
@@ -491,7 +491,7 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
        */
 
        assert (cnt >= 0);
-       
+
        if (n_channels() == 0) {
                return 0;
        }
@@ -521,29 +521,29 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
           of any fade out that we are dealing with
        */
        frameoffset_t fade_out_offset = 0;
-       
+
        /* Amount (length) of fade out that we are dealing with in this read */
        framecnt_t fade_out_limit = 0;
 
        framecnt_t fade_interval_start = 0;
 
        /* Fade in */
-       
+
        if (_fade_in_active && _session.config.get_use_region_fades()) {
-               
+
                framecnt_t fade_in_length = (framecnt_t) _fade_in->back()->when;
 
                /* see if this read is within the fade in */
-               
+
                if (internal_offset < fade_in_length) {
                        fade_in_limit = min (to_read, fade_in_length - internal_offset);
                }
        }
-       
+
        /* Fade out */
-       
+
        if (_fade_out_active && _session.config.get_use_region_fades()) {
-               
+
                /* see if some part of this read is within the fade out */
 
                /* .................        >|            REGION
@@ -565,7 +565,7 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
 
                fade_interval_start = max (internal_offset, _length - framecnt_t (_fade_out->back()->when));
                framecnt_t fade_interval_end = min(internal_offset + to_read, _length.val());
-               
+
                if (fade_interval_end > fade_interval_start) {
                        /* (part of the) the fade out is in this buffer */
                        fade_out_limit = fade_interval_end - fade_interval_start;
@@ -616,26 +616,26 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
                                /* explicit inverse fade in curve (e.g. for constant
                                 * power), so we have to fetch it.
                                 */
-                               
+
                                _inverse_fade_in->curve().get_vector (internal_offset, internal_offset + fade_in_limit, gain_buffer, fade_in_limit);
-                               
+
                                /* Fade the data from lower layers out */
                                for (framecnt_t n = 0; n < fade_in_limit; ++n) {
                                        buf[n] *= gain_buffer[n];
                                }
-                               
+
                                /* refill gain buffer with the fade in */
-                               
+
                                _fade_in->curve().get_vector (internal_offset, internal_offset + fade_in_limit, gain_buffer, fade_in_limit);
-                               
+
                        } else {
-                               
+
                                /* no explicit inverse fade in, so just use (1 - fade
                                 * in) for the fade out of lower layers
                                 */
-                               
+
                                _fade_in->curve().get_vector (internal_offset, internal_offset + fade_in_limit, gain_buffer, fade_in_limit);
-                               
+
                                for (framecnt_t n = 0; n < fade_in_limit; ++n) {
                                        buf[n] *= 1 - gain_buffer[n];
                                }
@@ -656,27 +656,27 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
 
                if (opaque()) {
                        if (_inverse_fade_out) {
-                               
+
                                _inverse_fade_out->curve().get_vector (curve_offset, curve_offset + fade_out_limit, gain_buffer, fade_out_limit);
-                               
+
                                /* Fade the data from lower levels in */
                                for (framecnt_t n = 0, m = fade_out_offset; n < fade_out_limit; ++n, ++m) {
                                        buf[m] *= gain_buffer[n];
                                }
-                               
+
                                /* fetch the actual fade out */
 
                                _fade_out->curve().get_vector (curve_offset, curve_offset + fade_out_limit, gain_buffer, fade_out_limit);
-                               
+
                        } else {
 
                                /* no explicit inverse fade out (which is
                                 * actually a fade in), so just use (1 - fade
                                 * out) for the fade in of lower layers
                                 */
-                               
+
                                _fade_out->curve().get_vector (curve_offset, curve_offset + fade_out_limit, gain_buffer, fade_out_limit);
-                               
+
                                for (framecnt_t n = 0, m = fade_out_offset; n < fade_out_limit; ++n, ++m) {
                                        buf[m] *= 1 - gain_buffer[n];
                                }
@@ -692,7 +692,7 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
                        buf[m] += mixdown_buffer[m] * gain_buffer[n];
                }
        }
-       
+
        /* MIX OR COPY THE REGION BODY FROM mixdown_buffer INTO buf */
 
        framecnt_t const N = to_read - fade_in_limit - fade_out_limit;
@@ -733,7 +733,7 @@ AudioRegion::read_from_sources (SourceList const & srcs, framecnt_t limit, Sampl
        if (to_read == 0) {
                return 0;
        }
-       
+
        if (chan_n < n_channels()) {
 
                boost::shared_ptr<AudioSource> src = boost::dynamic_pointer_cast<AudioSource> (srcs[chan_n]);
@@ -759,7 +759,7 @@ AudioRegion::read_from_sources (SourceList const & srcs, framecnt_t limit, Sampl
                        }
 
                } else {
-                       
+
                        /* use silence */
                        memset (buf, 0, sizeof (Sample) * to_read);
                }
@@ -921,7 +921,7 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_
                                        _fade_out->set_state (*grandchild, version);
                                }
                        }
-                       
+
                        if ((prop = child->property ("active")) != 0) {
                                if (string_is_affirmative (prop->value())) {
                                        set_fade_out_active (true);
@@ -929,7 +929,7 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_
                                        set_fade_out_active (false);
                                }
                        }
-       
+
                } else if ( (child->name() == "InverseFadeIn") || (child->name() == "InvFadeIn")  ) {
                        XMLNode* grandchild = child->child ("AutomationList");
                        if (grandchild) {
@@ -1063,7 +1063,7 @@ AudioRegion::set_fade_in (FadeShape shape, framecnt_t len)
                _fade_in->fast_simple_add (len, GAIN_COEFF_UNITY);
                reverse_curve (_inverse_fade_in.val(), _fade_in.val());
                break;
-               
+
        case FadeSymmetric:
                //start with a nearly linear cuve
                _fade_in->fast_simple_add (0, 1);
@@ -1119,12 +1119,12 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len)
                _fade_out->fast_simple_add (len, GAIN_COEFF_SMALL);
                reverse_curve (_inverse_fade_out.val(), _fade_out.val());
                break;
-               
+
        case FadeFast:
                generate_db_fade (_fade_out.val(), len, num_steps, -60);
                generate_inverse_power_curve (_inverse_fade_out.val(), _fade_out.val());
                break;
-               
+
        case FadeSlow:
                generate_db_fade (c1, len, num_steps, -1);  //start off with a slow fade
                generate_db_fade (c2, len, num_steps, -80);  //end with a fast fade
@@ -1143,7 +1143,7 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len)
                _fade_out->fast_simple_add (len, GAIN_COEFF_SMALL);
                reverse_curve (_inverse_fade_out.val(), _fade_out.val());
                break;
-               
+
        case FadeSymmetric:
                //start with a nearly linear cuve
                _fade_out->fast_simple_add (0, 1);
@@ -1173,7 +1173,7 @@ AudioRegion::set_fade_in_length (framecnt_t len)
        if (len > _length) {
                len = _length - 1;
        }
-       
+
        if (len < 64) {
                len = 64;
        }
@@ -1204,7 +1204,7 @@ AudioRegion::set_fade_out_length (framecnt_t len)
        bool changed =  _fade_out->extend_to (len);
 
        if (changed) {
-               
+
                if (_inverse_fade_out) {
                        _inverse_fade_out->extend_to (len);
                }
@@ -1893,7 +1893,7 @@ AudioRegion::get_single_other_xfade_region (bool start) const
        } else {
                rl = pl->regions_at (last_frame());
        }
-       
+
        RegionList::iterator i;
        boost::shared_ptr<Region> other;
        uint32_t n = 0;
@@ -1946,6 +1946,6 @@ AudioRegion::verify_xfade_bounds (framecnt_t len, bool start)
        }
 
        return min (length(), min (maxlen, len));
-               
+
 }
 
index 89e1e0593b6707e121e4dd157e460716ce47cc0c..9c4c49e7377f5b2515dffc6541afbec2b5688fd9 100644 (file)
@@ -317,7 +317,7 @@ framecnt_t
 AudioSource::read (Sample *dst, framepos_t start, framecnt_t cnt, int /*channel*/) const
 {
        assert (cnt >= 0);
-       
+
        Glib::Threads::Mutex::Lock lm (_lock);
        return read_unlocked (dst, start, cnt);
 }
@@ -370,7 +370,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
        }
 
        if (!_captured_for.empty()) {
-       
+
                /* _captured_for is only set after a capture pass is
                 * complete. so we know that capturing is finished for this
                 * file, and now we can check actual size of the peakfile is at
@@ -382,9 +382,9 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
                 * might decided to get rid of that anyway.
                 *
                 */
-               
+
                const off_t expected_file_size = (_length / (double) samples_per_file_peak) * sizeof (PeakData);
-               
+
                if (statbuf.st_size < expected_file_size) {
                        warning << string_compose (_("peak file %1 is truncated from %2 to %3"), _peakpath, expected_file_size, statbuf.st_size) << endmsg;
                        const_cast<AudioSource*>(this)->build_peaks_from_scratch ();
@@ -404,7 +404,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
                error << string_compose (_("Cannot open peakfile @ %1 for reading (%2)"), _peakpath, strerror (errno)) << endmsg;
                return -1;
        }
-                               
+
        scale = npeaks/expected_peaks;
 
 
@@ -728,7 +728,7 @@ AudioSource::build_peaks_from_scratch ()
                /* hold lock while building peaks */
 
                Glib::Threads::Mutex::Lock lp (_lock);
-               
+
                if (prepare_for_peakfile_writes ()) {
                        goto out;
                }
@@ -743,7 +743,7 @@ AudioSource::build_peaks_from_scratch ()
 
                        framecnt_t frames_to_read = min (bufsize, cnt);
                        framecnt_t frames_read;
-                       
+
                        if ((frames_read = read_unlocked (buf.get(), current_frame, frames_to_read)) != frames_to_read) {
                                error << string_compose(_("%1: could not write read raw data for peak computation (%2)"), _name, strerror (errno)) << endmsg;
                                done_with_peakfile_writes (false);
index 27d56d7e1b4b98b687af0e9a9dd1b9cea1e73807..fe84a2d717b884bda0d980152fd9eaf20ef1597f 100644 (file)
@@ -165,20 +165,20 @@ Auditioner::connect ()
                        /* create (and connect) new ports */
 
                        _main_outs->defer_pan_reset ();
-                       
+
                        if (left.length()) {
                                _output->add_port (left, this, DataType::AUDIO);
                        }
-                       
+
                        if (right.length()) {
                                _output->add_port (right, this, DataType::AUDIO);
                        }
-                       
+
                        _main_outs->allow_pan_reset ();
                        _main_outs->reset_panner ();
 
                } else {
-                       
+
                        /* reconnect existing ports */
 
                        boost::shared_ptr<Port> oleft (_output->nth (0));
@@ -190,7 +190,7 @@ Auditioner::connect ()
                                oright->connect (right);
                        }
                }
-                       
+
        }
 
        return 0;
index f928ee01b3c5eda0902fec5d043e8fd0840a4cd9..a2ce81acca360acd203d97fcb120403da65572ce 100644 (file)
@@ -66,7 +66,7 @@ Automatable::~Automatable ()
 {
        {
                Glib::Threads::Mutex::Lock lm (_control_lock);
-               
+
                for (Controls::const_iterator li = _controls.begin(); li != _controls.end(); ++li) {
                        boost::dynamic_pointer_cast<AutomationControl>(li->second)->drop_references ();
                }
@@ -288,7 +288,7 @@ Automatable::get_parameter_automation_state (Evoral::Parameter param)
        AutoState result = Off;
 
        boost::shared_ptr<AutomationControl> c = automation_control(param);
-       
+
        if (c) {
                result = c->automation_state();
        }
index 3cf3d6af8bf6f65cb0629e56462492acb615678d..91609f6acbe05aa2183255552657e4f3c561b1ce 100644 (file)
@@ -224,7 +224,7 @@ AutomationList::stop_touch (bool mark, double)
         if (_state == Touch) {
 
                 if (mark) {
-                       
+
                        /* XXX need to mark the last added point with the
                         * current time
                         */
@@ -520,4 +520,4 @@ AutomationListProperty::clone () const
                boost::shared_ptr<AutomationList> (new AutomationList (*this->_current.get()))
                );
 }
-       
+
index e9fecb5973e3467e4d1c767c33c8c3d3b9d5b05e..6ebf1aab71fd4808997c9cc22c7302e7439ab4c6 100644 (file)
@@ -47,7 +47,7 @@ AutomationWatch::AutomationWatch ()
        , _last_time (0)
        , _run_thread (false)
 {
-       
+
 }
 
 AutomationWatch::~AutomationWatch ()
@@ -85,7 +85,7 @@ AutomationWatch::add_automation_watch (boost::shared_ptr<AutomationControl> ac)
         * creates reference cycles. we don't need to make the weak_ptr<>
         * explicit here, but it helps to remind us what is going on.
         */
-       
+
        boost::weak_ptr<AutomationControl> wac (ac);
        ac->DropReferences.connect_same_thread (*this, boost::bind (&AutomationWatch::remove_weak_automation_watch, this, wac));
 }
@@ -139,7 +139,7 @@ AutomationWatch::timer ()
                                }
                        }
                }
-               
+
                _last_time = time;
        }
 
@@ -171,7 +171,7 @@ AutomationWatch::set_session (Session* s)
        if (_session) {
                _run_thread = true;
                _thread = Glib::Threads::Thread::create (boost::bind (&AutomationWatch::thread, this));
-               
+
                _session->TransportStateChange.connect_same_thread (transport_connection, boost::bind (&AutomationWatch::transport_state_change, this));
        }
 }
@@ -184,7 +184,7 @@ AutomationWatch::transport_state_change ()
        }
 
        bool rolling = _session->transport_rolling();
-       
+
        _last_time = _session->audible_frame ();
 
        {
index 82e96be75081d10f9409a473b3e38fa0dc271caf..92f5272b3b2bee945c8723eb0b2188ff58518e9b 100644 (file)
@@ -187,7 +187,7 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
                for (size_t i = 0; i < num_buffers; ++i) {
                        bufs.push_back(Buffer::create(type, buffer_capacity));
                }
-               
+
                _available.set(type, num_buffers);
                _count.set (type, num_buffers);
        }
index 7e50807c6e14501ca4d91317f3c2c51471e8e5d6..99340839d2bc080bdc6a6ce5acf8f04b82b303ea 100644 (file)
@@ -568,7 +568,7 @@ Bundle::type_channel_to_overall (DataType t, uint32_t c) const
        if (t == DataType::NIL) {
                return c;
        }
-       
+
        Glib::Threads::Mutex::Lock lm (_channel_mutex);
 
        vector<Channel>::const_iterator i = _channel.begin ();
@@ -602,11 +602,11 @@ Bundle::overall_channel_to_type (DataType t, uint32_t c) const
        if (t == DataType::NIL) {
                return c;
        }
-       
+
        Glib::Threads::Mutex::Lock lm (_channel_mutex);
 
        uint32_t s = 0;
-       
+
        vector<Channel>::const_iterator i = _channel.begin ();
        for (uint32_t j = 0; j < c; ++j) {
                if (i->type == t) {
index 272612f7b5899a8b0f0ad5d8497c507a33600bd1..62f3a525ea82582c8dc866a627d0ef715a0de2e3 100644 (file)
@@ -106,7 +106,7 @@ Butler::start_thread()
 {
        // set up capture and playback buffering
        Diskstream::set_buffering_parameters (Config->get_buffering_preset());
-       
+
        /* size is in Samples, not bytes */
        const float rate = (float)_session.frame_rate();
        audio_dstream_capture_buffer_size = (uint32_t) floor (Config->get_audio_capture_buffer_seconds() * rate);
@@ -133,7 +133,7 @@ Butler::start_thread()
        // we are ready to request buffer adjustments
        _session.adjust_capture_buffering ();
        _session.adjust_playback_buffering ();
-       
+
        return 0;
 }
 
@@ -198,7 +198,7 @@ Butler::thread_work ()
                        }
                }
 
-               
+
          restart:
                DEBUG_TRACE (DEBUG::Butler, "at restart for disk work\n");
                disk_work_outstanding = false;
@@ -244,7 +244,7 @@ Butler::thread_work ()
                        case 0:
                                DEBUG_TRACE (DEBUG::Butler, string_compose ("\ttrack refill done %1\n", tr->name()));
                                break;
-                               
+
                        case 1:
                                DEBUG_TRACE (DEBUG::Butler, string_compose ("\ttrack refill unfinished %1\n", tr->name()));
                                disk_work_outstanding = true;
@@ -315,7 +315,7 @@ Butler::flush_tracks_to_disk_normal (boost::shared_ptr<RouteList> rl, uint32_t&
        for (RouteList::iterator i = rl->begin(); !transport_work_requested() && should_run && i != rl->end(); ++i) {
 
                // cerr << "write behind for " << (*i)->name () << endl;
-               
+
                boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
 
                if (!tr) {
@@ -350,7 +350,7 @@ Butler::flush_tracks_to_disk_normal (boost::shared_ptr<RouteList> rl, uint32_t&
        }
 
        return disk_work_outstanding;
-}      
+}
 
 bool
 Butler::flush_tracks_to_disk_after_locate (boost::shared_ptr<RouteList> rl, uint32_t& errors)
@@ -360,7 +360,7 @@ Butler::flush_tracks_to_disk_after_locate (boost::shared_ptr<RouteList> rl, uint
        /* almost the same as the "normal" version except that we do not test
         * for transport_work_requested() and we force flushes.
         */
-       
+
        for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
 
                // cerr << "write behind for " << (*i)->name () << endl;
@@ -399,7 +399,7 @@ Butler::flush_tracks_to_disk_after_locate (boost::shared_ptr<RouteList> rl, uint
        }
 
        return disk_work_outstanding;
-}      
+}
 
 void
 Butler::schedule_transport_work ()
index 8b137843dd6864435db38f9fefa5f924034b15b1..4e2cb7d9f76aa6aca6073d462553b4c28268d98e 100644 (file)
@@ -113,7 +113,7 @@ ControlProtocolManager::activate (ControlProtocolInfo& cpi)
        cp->set_active (true);
 
        return 0;
-}      
+}
 
 int
 ControlProtocolManager::deactivate (ControlProtocolInfo& cpi)
@@ -137,15 +137,15 @@ ControlProtocolManager::drop_protocols ()
        /* called explicitly by Session::destroy() so that we can clean up
         * before the process cycle stops and ports vanish.
         */
-       
+
        Glib::Threads::Mutex::Lock lm (protocols_lock);
-       
+
        for (list<ControlProtocol*>::iterator p = control_protocols.begin(); p != control_protocols.end(); ++p) {
                delete *p;
        }
-       
+
        control_protocols.clear ();
-       
+
        for (list<ControlProtocolInfo*>::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) {
                // mark existing protocols as requested
                // otherwise the ControlProtocol instances are not recreated in set_session
@@ -154,7 +154,7 @@ ControlProtocolManager::drop_protocols ()
                        (*p)->protocol = 0;
                }
        }
-}      
+}
 
 ControlProtocol*
 ControlProtocolManager::instantiate (ControlProtocolInfo& cpi)
@@ -202,7 +202,7 @@ ControlProtocolManager::teardown (ControlProtocolInfo& cpi)
        if (cpi.mandatory) {
                return 0;
        }
-       
+
        /* save current state */
 
        delete cpi.state;
@@ -288,7 +288,7 @@ ControlProtocolManager::discover_control_protocols ()
 
        DEBUG_TRACE (DEBUG::ControlProtocols,
                     string_compose (_("looking for control protocols in %1\n"), control_protocol_search_path().to_string()));
-       
+
        for (vector<std::string>::iterator i = cp_modules.begin(); i != cp_modules.end(); ++i) {
                control_protocol_discover (*i);
        }
@@ -409,16 +409,16 @@ ControlProtocolManager::set_state (const XMLNode& node, int /*version*/)
                        }
 
                        bool active = string_is_affirmative (prop->value());
-                       
+
                        if ((prop = (*citer)->property (X_("name"))) == 0) {
                                continue;
                        }
 
                        ControlProtocolInfo* cpi = cpi_by_name (prop->value());
-                       
+
                        if (cpi) {
                                cpi->state = new XMLNode (**citer);
-                               
+
                                if (active) {
                                        if (_session) {
                                                instantiate (*cpi);
index 84dafd00cc30a6b0498772fb4cd3c98acf446aad..ad91fa68744ffe49ac17165d295f7d205bab7432 100644 (file)
@@ -85,7 +85,7 @@ StoringTimer::StoringTimer (int N)
        _max_points = N;
        _points = 0;
 }
-       
+
 
 void
 StoringTimer::dump (string const & file)
@@ -114,11 +114,11 @@ StoringTimer::check (int p)
        } else if (_points > _max_points) {
                return;
        }
-       
+
        _point[_points] = p;
        _value[_points] = get_cycles ();
        _ref[_points] = _current_ref;
-       
+
        ++_points;
 }
 
index 7bccf3121d4798115dc9966c75a1283e041bd933..b70d86a75d7fd9efe773fb1902c43dd08e996c5a 100644 (file)
@@ -97,7 +97,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr<Pannable> pannable, boost::sha
 
 Delivery::~Delivery()
 {
-       DEBUG_TRACE (DEBUG::Destruction, string_compose ("delivery %1 destructor\n", _name));   
+       DEBUG_TRACE (DEBUG::Destruction, string_compose ("delivery %1 destructor\n", _name));
 
        /* this object should vanish from any signal callback lists
           that it is on before we get any further. The full qualification
@@ -462,7 +462,7 @@ Delivery::flush_buffers (framecnt_t nframes)
        if (!_output) {
                return;
        }
-       
+
        PortSet& ports (_output->ports());
 
        for (PortSet::iterator i = ports.begin(); i != ports.end(); ++i) {
index f2da7982fe5e002e8748f1933e2e9c344f58eb1f..c0ed359bdd44dd960d0a1e21d903f684b64505b6 100644 (file)
@@ -504,7 +504,7 @@ Diskstream::set_state (const XMLNode& node, int /*version*/)
                error << string_compose (_("%1: this session uses destructive tracks, which are not supported"), PROGRAM_NAME) << endmsg;
                return -1;
        }
-       
+
         if ((prop = node.property (X_("capture-alignment"))) != 0) {
                 set_align_choice (AlignChoice (string_2_enum (prop->value(), _alignment_choice)), true);
         } else {
@@ -526,7 +526,7 @@ Diskstream::set_state (const XMLNode& node, int /*version*/)
                        non_realtime_set_speed ();
                }
        }
-       
+
        if ((prop = node.property ("record-safe")) != 0) {
            _record_safe = PBD::string_is_affirmative (prop->value()) ? 1 : 0;
        }
@@ -799,7 +799,7 @@ framecnt_t
 Diskstream::default_disk_read_chunk_frames()
 {
        return 65536;
-}      
+}
 
 framecnt_t
 Diskstream::default_disk_write_chunk_frames ()
@@ -818,7 +818,7 @@ Diskstream::set_buffering_parameters (BufferingPreset bp)
        if (!get_buffering_presets (bp, read_chunk_size, read_buffer_size, write_chunk_size, write_buffer_size)) {
                return;
        }
-       
+
        disk_read_chunk_frames = read_chunk_size;
        disk_write_chunk_frames = write_chunk_size;
        Config->set_audio_capture_buffer_seconds (write_buffer_size);
index 849b7320d3aec6e5f1b0aa30e316885e7f6e942c..8b7c3ba510512bf7eb8a031672d28a285ec971a6 100644 (file)
@@ -62,6 +62,6 @@ Engine_Slave::speed_and_position (double& sp, framepos_t& position)
        } else {
                _starting = false;
        }
-       
+
        return true;
 }
index 991af4cf4ed0b88aa7b15d58d11f7e2e9278f343..57b8a848884501e50ec0616cf2f78d726cc19c8b 100644 (file)
@@ -583,7 +583,7 @@ EngineStateController::_validate_current_device_state ()
        // if current is not found switch to default if is supported
        if (bs_iter == buffer_sizes.end ()) {
                bs_iter = std::find (buffer_sizes.begin (), buffer_sizes.end (), backend->default_buffer_size (_current_state->device_name));
-       
+
                if (bs_iter != buffer_sizes.end ()) {
                        _current_state->buffer_size = backend->default_buffer_size (_current_state->device_name);
                } else {
@@ -1423,7 +1423,7 @@ EngineStateController::_on_session_loaded ()
        // This is done during session construction
        // _session->reconnect_ltc_input ();
        // _session->reconnect_ltc_output ();
-       
+
        framecnt_t desired_sample_rate = _session->nominal_frame_rate ();
        if ( desired_sample_rate > 0 && set_new_sample_rate_in_controller (desired_sample_rate))
        {
@@ -1780,7 +1780,7 @@ bool
 EngineStateController::push_current_state_to_backend (bool start)
 {
        boost::shared_ptr<AudioBackend> backend = AudioEngine::instance ()->current_backend ();
-       
+
        if (!backend) {
                return false;
        }
@@ -1820,7 +1820,7 @@ EngineStateController::push_current_state_to_backend (bool start)
                        if (!result ) {
                                std::cout << "EngineStateController::Setting device sample rate " << _current_state->sample_rate << std::endl;
                                result = backend->set_sample_rate (_current_state->sample_rate);
-                               
+
                                if (result) {
                                        error << string_compose (_("Cannot set sample rate to %1"), get_current_sample_rate ()) << endmsg;
                                }
index f6044aeb088967aa4357772c35986aa0229d3a2a..e681eacbac469829785a327ee9d2ee0de25199f1 100644 (file)
@@ -405,7 +405,7 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (SessionEvent, Replace);
        REGISTER_CLASS_ENUM (SessionEvent, Clear);
        REGISTER (_SessionEvent_Action);
-       
+
        REGISTER_CLASS_ENUM (Session, Stopped);
        REGISTER_CLASS_ENUM (Session, Waiting);
        REGISTER_CLASS_ENUM (Session, Running);
index 8782162304a0d9155ee23ab37cb5c5c65bb3b102..28f688df8124a0f656decbfb853c1a403987e60b 100644 (file)
@@ -195,7 +195,7 @@ EventTypeMap::from_symbol(const string& str) const
        } else {
                PBD::warning << "Unknown Parameter '" << str << "'" << endmsg;
        }
-       
+
        return Evoral::Parameter(p_type, p_channel, p_id);
 }
 
index 945af25dee12b2adcb73e27d5415c4b1539b5181..077106a4b0a8e0afe73d9bf31d25336300fcf91d 100644 (file)
@@ -128,7 +128,7 @@ ExportFilename::set_state (const XMLNode & node)
                        folder = tmp;
                }
        }
-       
+
        if (folder.empty()) {
                folder = session.session_directory().export_path();
        }
index 8ef69f2472eacaa9f0f27bf8fdf3134d14b52784..c054d85242d1f619fc46779101fc841ca1223587 100644 (file)
@@ -378,7 +378,7 @@ ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpe
        config = new_config;
        uint32_t const channels = config.channel_config->get_n_chans();
        max_frames_out = 4086 - (4086 % channels); // TODO good chunk size
-       
+
        buffer.reset (new AllocatingProcessContext<Sample> (max_frames_out, channels));
        peak_reader.reset (new PeakReader ());
        normalizer.reset (new AudioGrapher::Normalizer (config.format->normalize_target()));
index 16aee32a3cf73fa37fa941bd3b9e39c305d977ec..c7dd71040b4d89c45a74dba3a1e59490b07d86ae 100644 (file)
@@ -168,7 +168,7 @@ ExportHandler::start_timespan ()
           this is the timespan to do this time
        */
        current_timespan = config_map.begin()->first;
-       
+
        export_status->total_frames_current_timespan = current_timespan->get_length();
        export_status->timespan_name = current_timespan->name();
        export_status->processed_frames_current_timespan = 0;
@@ -564,7 +564,7 @@ ExportHandler::write_cue_header (CDMarkerStatus & status)
                BINARY   = "header-less" audio (44.1 kHz, 16 Bit, little endian),
                MOTOROLA = "header-less" audio (44.1 kHz, 16 Bit, big endian),
                and MP3
-               
+
                We try to use these file types whenever appropriate and
                default to our own names otherwise.
        */
@@ -688,14 +688,14 @@ ExportHandler::write_track_info_toc (CDMarkerStatus & status)
 
        status.out << "CD_TEXT {" << endl << "  LANGUAGE 0 {" << endl;
        status.out << "     TITLE " << toc_escape_cdtext (status.marker->name()) << endl;
-       
+
        status.out << "     PERFORMER ";
        if (status.marker->cd_info.find("performer") != status.marker->cd_info.end()) {
                status.out << toc_escape_cdtext (status.marker->cd_info["performer"]) << endl;
        } else {
                status.out << "\"\"" << endl;
        }
-       
+
        if (status.marker->cd_info.find("composer") != status.marker->cd_info.end()) {
                status.out  << "     SONGWRITER " << toc_escape_cdtext (status.marker->cd_info["composer"]) << endl;
        }
@@ -816,7 +816,7 @@ ExportHandler::toc_escape_cdtext (const std::string& txt)
                        out += buf;
                }
        }
-       
+
        out += '"';
 
        return out;
@@ -841,7 +841,7 @@ ExportHandler::toc_escape_filename (const std::string& txt)
                        out += *c;
                }
        }
-       
+
        out += '"';
 
        return out;
@@ -852,13 +852,13 @@ ExportHandler::cue_escape_cdtext (const std::string& txt)
 {
        std::string latin1_txt;
        std::string out;
-       
+
        try {
                latin1_txt = Glib::convert (txt, "ISO-8859-1", "UTF-8");
        } catch (Glib::ConvertError& err) {
                throw Glib::ConvertError (err.code(), string_compose (_("Cannot convert %1 to Latin-1 text"), txt));
        }
-       
+
        // does not do much mor than UTF-8 to Latin1 translation yet, but
        // that may have to change if cue parsers in burning programs change
        out = '"' + latin1_txt + '"';
index a4d6239ae4bc1f5de0789c43e127e77fc63ed70f..e94486bd465b701f32fabcb59ae9a9b0fbf1bb3e 100644 (file)
@@ -400,7 +400,7 @@ ExportProfileManager::init_timespans (XMLNodeList nodes)
                } else {
                        session_range = session.locations()->session_range_location();
                }
-                       
+
                if (!session_range) { return false; }
 
                ExportTimespanPtr timespan = handler->add_timespan();
@@ -789,7 +789,7 @@ std::string
 ExportProfileManager::get_sample_filename_for_format (ExportFilenamePtr filename, ExportFormatSpecPtr format)
 {
        assert (format);
-       
+
        if (channel_configs.empty()) { return ""; }
 
        std::list<string> filenames;
@@ -829,7 +829,7 @@ ExportProfileManager::get_warnings ()
        if (!channel_configs.empty ()) {
                channel_config_state = channel_configs.front();
        }
-       
+
        TimespanStatePtr timespan_state = timespans.front();
 
        /*** Check "global" config ***/
@@ -867,7 +867,7 @@ ExportProfileManager::get_warnings ()
                        check_config (warnings, timespan_state, channel_config_state, *format_it, *filename_it);
                }
        }
-       
+
        return warnings;
 }
 
index f5c241eaf83f4dcea5ed59b2717128c94a9c5840..3ec561d66718f103db1dd1ed7c3d56619676e3c9 100644 (file)
@@ -274,7 +274,7 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
 
                        vector<string>::iterator j = i;
                        ++j;
-                       
+
                        while (j != hits.end()) {
                                if (PBD::equivalent_paths (*i, *j)) {
                                        /* *i and *j are the same file; break out of the loop early */
@@ -316,10 +316,10 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
                 } else {
 
                        /* only one match: happy days */
-                       
+
                        keeppath = de_duped_hits[0];
                }
-                                               
+
        } else {
                 keeppath = path;
         }
@@ -566,7 +566,7 @@ FileSource::is_stub () const
        if (!empty()) {
                return false;
        }
-       
+
        if (!removable()) {
                return false;
        }
@@ -577,7 +577,7 @@ FileSource::is_stub () const
 
        return true;
 }
-               
+
 int
 FileSource::rename (const string& newpath)
 {
@@ -604,4 +604,4 @@ FileSource::rename (const string& newpath)
        return 0;
 }
 
-       
+
index c5cd86459023302a96067b42fdc1efef07ec3916..fcdf42cbbef8db57425bee1170a0cc83e99be407 100644 (file)
@@ -53,14 +53,14 @@ user_config_directory_name (int version = -1)
           called, so rely on build-time detection of the
           product name etc.
        */
-       
+
 #ifdef USE_TRACKS_CODE_FEATURES
        /* Tracks does not use versioned configuration folders, which may or
           may not be problematic in the future.
        */
        return X_(PROGRAM_NAME);
 
-#else          
+#else
        const string config_dir_name = string_compose ("%1%2", X_(PROGRAM_NAME), version);
 
 #if defined (__APPLE__) || defined (PLATFORM_WINDOWS)
@@ -70,8 +70,8 @@ user_config_directory_name (int version = -1)
        /* use lower case folder name on Linux */
        return downcase (config_dir_name);
 #endif
-#endif 
-}      
+#endif
+}
 
 std::string
 user_config_directory (int version)
@@ -208,7 +208,7 @@ ardour_dll_directory ()
        if (s.empty()) {
                std::cerr << _("ARDOUR_DLL_PATH not set in environment - exiting\n");
                ::exit (1);
-       }       
+       }
        return s;
 #endif
 }
index 382e6d9d86c61985b7595356f875bebd8f7a020b..36a74da0f50756375ecb5490c85deb39a84c5682 100644 (file)
@@ -75,19 +75,19 @@ Filter::make_new_sources (boost::shared_ptr<Region> region, SourceList& nsrcs, s
                                sample_rate = session.frame_rate();
                        } else {
                                boost::shared_ptr<AudioRegion> aregion = boost::dynamic_pointer_cast<AudioRegion>(region);
-                               
+
                                if (aregion) {
                                        sample_rate = aregion->audio_source()->sample_rate();
                                } else {
                                        return -1;
                                }
                        }
-                       
+
                        nsrcs.push_back (boost::dynamic_pointer_cast<Source> (
                                                 SourceFactory::createWritable (region->data_type(), session,
                                                                                path, false, sample_rate)));
                }
-               
+
                catch (failed_constructor& err) {
                        error << string_compose (_("filter: error creating new file %1 (%2)"), path, strerror (errno)) << endmsg;
                        return -1;
index 5ef66c10c2842bfd6c8332e1ccbc309d41f5929a..d9e0602f6ccb08693bc0ad9b747b85cc9c1e138d 100644 (file)
@@ -168,15 +168,15 @@ setup_hardware_optimization (bool try_optimization)
 
 #ifdef PLATFORM_WINDOWS
                /* We have AVX-optimized code for Windows */
-               
+
                if (fpu->has_avx()) {
-#else                  
+#else
                /* AVX code doesn't compile on Linux yet */
-               
+
                if (false) {
-#endif                 
+#endif
                        info << "Using AVX optimized routines" << endmsg;
-                       
+
                        // AVX SET
                        compute_peak          = x86_sse_avx_compute_peak;
                        find_peaks            = x86_sse_avx_find_peaks;
@@ -287,9 +287,9 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
        if (g_mkdir_with_parents (new_dir.c_str(), 0755)) {
                return -1;
        }
-       
+
        if (old_version == 3) {
-       
+
                old_name = Glib::build_filename (old_dir, X_("recent"));
                new_name = Glib::build_filename (new_dir, X_("recent"));
 
@@ -307,7 +307,7 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
                 * $CONFIG/ardour.rc. Pick up the newer "old" config file,
                 * to avoid confusion.
                 */
-               
+
                string old_name = Glib::build_filename (old_dir, X_("config"));
 
                if (!Glib::file_test (old_name, Glib::FILE_TEST_EXISTS)) {
@@ -334,7 +334,7 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
 
                old_name = Glib::build_filename (old_dir, X_("presets"));
                new_name = Glib::build_filename (new_dir, X_("presets"));
-               
+
                copy_recurse (old_name, new_name);
 
                /* presets */
@@ -343,12 +343,12 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
                new_name = Glib::build_filename (new_dir, X_("plugin_statuses"));
 
                copy_file (old_name, new_name);
-               
+
                /* export formats */
 
                old_name = Glib::build_filename (old_dir, export_formats_dir_name);
                new_name = Glib::build_filename (new_dir, export_formats_dir_name);
-               
+
                vector<string> export_formats;
                g_mkdir_with_parents (Glib::build_filename (new_dir, export_formats_dir_name).c_str(), 0755);
                find_files_matching_pattern (export_formats, old_name, X_("*.format"));
@@ -366,7 +366,7 @@ void
 ARDOUR::check_for_old_configuration_files ()
 {
        int current_version = atoi (X_(PROGRAM_VERSION));
-       
+
        if (current_version <= 1) {
                return;
        }
@@ -515,7 +515,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
           surface support that would list their port names, we do have to
           list them here.
        */
-       
+
        char const * const reserved[] = {
                _("Monitor"),
                _("Master"),
@@ -528,7 +528,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
        for (int n = 0; reserved[n]; ++n) {
                reserved_io_names.push_back (reserved[n]);
        }
-       
+
        libardour_initialized = true;
 
        return true;
@@ -612,7 +612,7 @@ void
 ARDOUR::setup_fpu ()
 {
        FPU* fpu = FPU::instance ();
-       
+
        if (getenv ("ARDOUR_RUNNING_UNDER_VALGRIND")) {
                // valgrind doesn't understand this assembler stuff
                // September 10th, 2007
@@ -632,7 +632,7 @@ ARDOUR::setup_fpu ()
 #ifdef DEBUG_DENORMAL_EXCEPTION
        /* This will raise a FP exception if a denormal is detected */
        MXCSR &= ~_MM_MASK_DENORM;
-#endif 
+#endif
 
        switch (Config->get_denormal_model()) {
        case DenormalNone:
@@ -709,15 +709,15 @@ ARDOUR::set_translations_enabled (bool yn)
        if (fd < 0) {
                return false;
        }
-       
+
        char c;
-       
+
        if (yn) {
                c = '1';
        } else {
                c = '0';
        }
-       
+
        (void) ::write (fd, &c, 1);
        (void) ::close (fd);
 
index 8cce0efdbccee85ccc226be6c8b88efb44866453..ff4f860d683b1103eb9613495a4243d25a0cdabc 100644 (file)
@@ -435,7 +435,7 @@ Graph::main_thread()
 
   again:
         _callback_start_sem.wait ();
-       
+
        DEBUG_TRACE(DEBUG::ProcessThreads, "main thread is awake\n");
 
         if (!_threads_active) {
index 2524a3c0b0ce6720ac1d28d1104f9e8ff0bfcfbc..87ef3d247636206521dee86439deddedd5086788 100644 (file)
@@ -488,7 +488,7 @@ Session::import_files (ImportStatus& status)
                                return;
                        }
                }
-               
+
                if (channels == 0) {
                        error << _("Import: file contains no channels.") << endmsg;
                        continue;
@@ -553,7 +553,7 @@ Session::import_files (ImportStatus& status)
                                        Analyser::queue_source_for_analysis (boost::static_pointer_cast<Source>(*x), false);
                                }
                        }
-                       
+
                        /* imported, copied files cannot be written or removed
                         */
 
@@ -591,7 +591,7 @@ Session::import_files (ImportStatus& status)
                } catch (...) {
                        error << _("Failed to remove some files after failed/cancelled import operation") << endmsg;
                }
-                               
+
        }
 
        status.done = true;
index c2055e207e6523a500eccdad2c401204f93abaad..c673170b723a017a0c3884305d014f4d9f172ac2 100644 (file)
@@ -88,7 +88,7 @@ InstrumentInfo::get_patch_name (uint16_t bank, uint8_t program, uint8_t channel)
        }
 
        MIDI::Name::PatchPrimaryKey patch_key (program, bank);
-       
+
        boost::shared_ptr<MIDI::Name::Patch> patch =
                MIDI::Name::MidiPatchManager::instance().find_patch (external_instrument_model,
                                                                     external_instrument_mode, channel, patch_key);
@@ -102,7 +102,7 @@ InstrumentInfo::get_patch_name (uint16_t bank, uint8_t program, uint8_t channel)
 
                return string_compose ("prg %1 bnk %2",program + MIDI_BP_ZERO , bank + MIDI_BP_ZERO);
        }
-}      
+}
 
 string
 InstrumentInfo::get_controller_name (Evoral::Parameter param) const
@@ -118,7 +118,7 @@ InstrumentInfo::get_controller_name (Evoral::Parameter param) const
        if (!dev_names) {
                return "";
        }
-       
+
        boost::shared_ptr<ChannelNameSet> chan_names(
                dev_names->channel_name_set_by_channel(
                        external_instrument_mode, param.channel()));
@@ -133,7 +133,7 @@ InstrumentInfo::get_controller_name (Evoral::Parameter param) const
        }
 
        return control_names->control(param.id())->name();
-}      
+}
 
 boost::shared_ptr<MIDI::Name::ChannelNameSet>
 InstrumentInfo::get_patches (uint8_t channel)
@@ -164,7 +164,7 @@ InstrumentInfo::plugin_programs_to_channel_name_set (boost::shared_ptr<Processor
        }
 
        boost::shared_ptr<Plugin> pp = insert->plugin();
-       
+
        if (pp->current_preset_uses_general_midi()) {
 
                patch_list = InstrumentInfo::general_midi_patches ();
@@ -174,11 +174,11 @@ InstrumentInfo::plugin_programs_to_channel_name_set (boost::shared_ptr<Processor
                std::vector<Plugin::PresetRecord> presets = pp->get_presets ();
                std::vector<Plugin::PresetRecord>::iterator i;
                int n;
-               
+
                /* XXX note the assumption that plugin presets start their numbering at
                 * zero
                 */
-               
+
                for (n = 0, i = presets.begin(); i != presets.end(); ++i, ++n) {
                        if ((*i).number >= 0) {
                                patch_list.push_back (boost::shared_ptr<Patch> (new Patch ((*i).label, n)));
@@ -202,7 +202,7 @@ InstrumentInfo::plugin_programs_to_channel_name_set (boost::shared_ptr<Processor
        cns->set_patch_banks (patch_banks);
 
        return cns;
-}      
+}
 
 const MIDI::Name::PatchNameList&
 InstrumentInfo::general_midi_patches()
@@ -222,7 +222,7 @@ InstrumentInfo::get_plugin_patch_name (boost::shared_ptr<Processor> p, uint16_t
        boost::shared_ptr<PluginInsert> insert = boost::dynamic_pointer_cast<PluginInsert> (p);
        if (insert) {
                boost::shared_ptr<Plugin> pp = insert->plugin();
-               
+
                if (pp->current_preset_uses_general_midi()) {
                        return MIDI::Name::general_midi_program_names[std::min((uint8_t) 127,program)];
                }
index 1eae5d31719e4fde4a97f8a19e1594729e4264f1..4947231c84717b9836a405c7d5dfc09eaa7aa6f3 100644 (file)
@@ -39,7 +39,7 @@ InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*e
        }
 
        Glib::Threads::Mutex::Lock lm (_sends_mutex, Glib::Threads::TRY_LOCK);
-       
+
        if (lm.locked ()) {
                for (list<InternalSend*>::iterator i = _sends.begin(); i != _sends.end(); ++i) {
                        if ((*i)->active () && (!(*i)->source_route() || (*i)->source_route()->active())) {
index e8e560c7c082fb198dd8fa9017d69babd91067c0..60de2087f3701a58ec3685789ccc0a01a8d121cb 100644 (file)
@@ -148,10 +148,10 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
        } else {
                if (role() == Listen) {
                        /* We're going to the monitor bus, so discard MIDI data */
-                       
+
                        uint32_t const bufs_audio = bufs.count().get (DataType::AUDIO);
                        uint32_t const mixbufs_audio = mixbufs.count().get (DataType::AUDIO);
-                       
+
                        /* monitor-section has same number of channels as master-bus (on creation).
                         *
                         * There is no clear answer what should happen when trying to PFL or AFL
@@ -400,4 +400,4 @@ InternalSend::cycle_start (pframes_t /*nframes*/)
        for (BufferSet::audio_iterator b = mixbufs.audio_begin(); b != mixbufs.audio_end(); ++b) {
                b->prepare ();
        }
-}      
+}
index c69006c7452e72485e8dbc8147e857ed20ba2368..a274f4995b8c7fee684ce8099edf542bdf5576ab 100644 (file)
@@ -113,7 +113,7 @@ IO::disconnect_check (boost::shared_ptr<Port> a, boost::shared_ptr<Port> b)
                 * ::disconnect()
                 */
                if (_ports.contains (a) || _ports.contains (b)) {
-                       changed (IOChange (IOChange::ConnectionsChanged), this); /* EMIT SIGNAL */              
+                       changed (IOChange (IOChange::ConnectionsChanged), this); /* EMIT SIGNAL */
                }
        } else {
                /* we didn't get the lock, so assume that we're inside
@@ -299,7 +299,7 @@ IO::remove_port (boost::shared_ptr<Port> port, void* src)
        }
 
        _session.set_dirty ();
-       
+
        return 0;
 }
 
@@ -321,12 +321,12 @@ IO::add_port (string destination, void* src, DataType type)
        ChanCount before = _ports.count ();
        ChanCount after = before;
        after.set (type, after.get (type) + 1);
-       
+
        bool const r = PortCountChanging (after); /* EMIT SIGNAL */
        if (r) {
                return -1;
        }
-       
+
        IOChange change;
 
        {
@@ -339,7 +339,7 @@ IO::add_port (string destination, void* src, DataType type)
                        /* Create a new port */
 
                        string portname = build_legal_port_name (type);
-                       
+
                        if (_direction == Input) {
                                if ((our_port = _session.engine().register_input_port (type, portname)) == 0) {
                                        error << string_compose(_("IO: cannot register input port %1"), portname) << endmsg;
@@ -355,7 +355,7 @@ IO::add_port (string destination, void* src, DataType type)
                        change.before = _ports.count ();
                        _ports.add (our_port);
                }
-               
+
                PortCountChanged (n_ports()); /* EMIT SIGNAL */
                change.type = IOChange::ConfigurationChanged;
                change.after = _ports.count ();
@@ -575,7 +575,7 @@ IO::state (bool /*full_state*/)
 
        snprintf (buf, sizeof (buf), "%" PRId64, _user_latency);
        node->add_property (X_("user-latency"), buf);
-       
+
        return *node;
 }
 
@@ -983,9 +983,9 @@ IO::prepare_for_reset (XMLNode& node, const std::string& name)
        for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
 
                if ((*i)->name() == "Port") {
-                       
+
                        prop = (*i)->property (X_("name"));
-                       
+
                        if (prop) {
                                string new_name;
                                string old = prop->value();
@@ -993,10 +993,10 @@ IO::prepare_for_reset (XMLNode& node, const std::string& name)
 
                                if (slash != string::npos) {
                                        /* port name is of form: <IO-name>/<port-name> */
-                                       
+
                                        new_name = name;
                                        new_name += old.substr (old.find ('/'));
-                                       
+
                                        prop->set_value (new_name);
                                }
                        }
index d23afce6120a6d32fbb63e341a6ce4132fd74c85..824006206fac1bb919d68d24a4dd226905a4ffac 100644 (file)
@@ -167,7 +167,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
        XMLNodeIterator niter;
        const string instr = enum_2_string (IO::Input);
        const string outstr = enum_2_string (IO::Output);
-       
+
        if (_own_input) {
                for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                        const XMLProperty* prop;
@@ -182,21 +182,21 @@ IOProcessor::set_state (const XMLNode& node, int version)
                                }
                        }
                }
-               
+
                if (io_node) {
                        _input->set_state(*io_node, version);
-                       
+
                        // legacy sessions: use IO name
                        if ((prop = node.property ("name")) == 0) {
                                set_name (_input->name());
                        }
-                       
+
                } else {
                        /* no input, which is OK */
                }
-               
+
        }
-       
+
        if (_own_output) {
                for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                        if ((*niter)->name() == "IO") {
@@ -213,10 +213,10 @@ IOProcessor::set_state (const XMLNode& node, int version)
                                }
                        }
                }
-               
+
                if (io_node) {
                        _output->set_state(*io_node, version);
-                       
+
                        // legacy sessions: use IO name
                        if ((prop = node.property ("name")) == 0) {
                                set_name (_output->name());
index 61149c78a01d61c81786aeddc9c2dede3f888560..88f40c1f84041ac0530dbc2604195124c68d105c 100644 (file)
@@ -956,13 +956,13 @@ LadspaPlugin::do_save_preset (string name)
 LADSPA_PortDescriptor
 LadspaPlugin::port_descriptor (uint32_t i) const
 {
-       if (i < _descriptor->PortCount) {               
+       if (i < _descriptor->PortCount) {
                return _descriptor->PortDescriptors[i];
        }
-       
+
        warning << "LADSPA plugin port index " << i << " out of range." << endmsg;
        return 0;
 }
 
-               
-       
+
+
index 7918f344495cced85b80e6e00f3c276b0c3f3eb1..cd3191b1ffe9bdb017885fb866cf4622e79245da 100644 (file)
@@ -83,16 +83,16 @@ VSTState *
 vstfx_new ()
 {
        VSTState* vstfx = (VSTState *) calloc (1, sizeof (VSTState));
-       
+
        /*Mutexes*/
-       
+
        pthread_mutex_init (&vstfx->lock, 0);
        pthread_cond_init (&vstfx->window_status_change, 0);
        pthread_cond_init (&vstfx->plugin_dispatcher_called, 0);
        pthread_cond_init (&vstfx->window_created, 0);
 
        /*Safe values*/
-       
+
        vstfx->want_program = -1;
        vstfx->want_chunk = 0;
        vstfx->n_pending_keys = 0;
@@ -103,7 +103,7 @@ vstfx_new ()
        vstfx->eventProc = 0;
        vstfx->extra_data = 0;
        vstfx->want_resize = 0;
-       
+
        return vstfx;
 }
 
@@ -131,35 +131,35 @@ void* vstfx_load_vst_library(const char* path)
                PBD::error << string_compose (_("Could not open existing LXVST plugin: %1"), dlerror()) << endmsg;
                return 0;
        }
-               
+
        /*We didn't find the library so try and get the path specified in the
        env variable LXVST_PATH*/
 
        envdup = getenv ("LXVST_PATH");
-       
+
        /*Path not specified - not much more we can do*/
-       
+
        if (envdup == 0)
                return 0;
-       
+
        /*Copy the path into envdup*/
-               
+
        envdup = strdup (envdup);
-       
+
        if (envdup == 0)
                return 0;
-               
+
        len2 = strlen(path);
 
        /*Try all the possibilities in the path - deliminated by : */
        char *saveptr;
        lxvst_path = strtok_r (envdup, ":", &saveptr);
-       
+
        while (lxvst_path != 0)
        {
                vstfx_error ("\"%s\"", lxvst_path);
                len1 = strlen(lxvst_path);
-               
+
                if (full_path) free(full_path);
                full_path = (char*)malloc(len1 + 1 + len2 + 1);
                memcpy(full_path, lxvst_path, len1);
@@ -174,7 +174,7 @@ void* vstfx_load_vst_library(const char* path)
                        /*Succeeded */
                        break;
                }
-       
+
                /*Try again*/
 
                lxvst_path = strtok_r (0, ":", &saveptr);
@@ -195,18 +195,18 @@ vstfx_load (const char *path)
 {
        char* buf = 0;
        VSTHandle* fhandle;
-       
+
        /*Create a new handle we can use to reference the plugin*/
 
        fhandle = vstfx_handle_new();
-       
+
        /*See if we have .so appended to the path - if not we need to make sure it is added*/
 
        if (strstr (path, ".so") == 0)
        {
 
                /*Append the .so to the path - Make sure the path has enough space*/
-               
+
                buf = (char *)malloc(strlen(path) + 4); //The .so and a terminating zero
 
                sprintf (buf, "%s.so", path);
@@ -215,7 +215,7 @@ vstfx_load (const char *path)
        else
        {
                /*We already have .so appened to the filename*/
-               
+
                buf = strdup(path);
        }
 
@@ -223,7 +223,7 @@ vstfx_load (const char *path)
           we don't know anything about its name until we load and instantiate the plugin
           which we don't want to do at this point
        */
-       
+
        fhandle->name = strdup (PBD::basename_nosuffix (path).c_str());
 
        /*call load_vstfx_library to actually load the .so into memory*/
@@ -231,9 +231,9 @@ vstfx_load (const char *path)
        if ((fhandle->dll = vstfx_load_vst_library (buf)) == 0)
        {
                vstfx_unload (fhandle);
-               
+
                free(buf);
-               
+
                return 0;
        }
 
@@ -250,11 +250,11 @@ vstfx_load (const char *path)
        if (fhandle->main_entry == 0)
        {
                /*If it can't be found, unload the plugin and return a 0 handle*/
-               
+
                vstfx_unload (fhandle);
-               
+
                free(buf);
-               
+
                return 0;
        }
 
@@ -274,7 +274,7 @@ vstfx_unload (VSTHandle* fhandle)
        {
                /*Still have plugin instances - can't unload the library
                - actually dlclose keeps an instance count anyway*/
-               
+
                return -1;
        }
 
@@ -290,9 +290,9 @@ vstfx_unload (VSTHandle* fhandle)
        {
                free (fhandle->name);
        }
-       
+
        /*Don't need the plugin handle any more*/
-       
+
        free (fhandle);
        return 0;
 }
@@ -317,29 +317,29 @@ vstfx_instantiate (VSTHandle* fhandle, audioMasterCallback amc, void* userptr)
                free (vstfx);
                return 0;
        }
-       
+
        vstfx->handle = fhandle;
        vstfx->plugin->user = userptr;
-               
+
        if (vstfx->plugin->magic != kEffectMagic)
        {
                vstfx_error ("** ERROR ** VSTFX : %s is not a VST plugin\n", fhandle->name);
                free (vstfx);
                return 0;
        }
-       
+
        vstfx->plugin->dispatcher (vstfx->plugin, effOpen, 0, 0, 0, 0);
-       
+
        /*May or May not need to 'switch the plugin on' here - unlikely
        since FST doesn't and most plugins start up 'On' by default - I think this is the least of our worries*/
-       
+
        //vstfx->plugin->dispatcher (vstfx->plugin, effMainsChanged, 0, 1, 0, 0);
-       
+
        vstfx->vst_version = vstfx->plugin->dispatcher (vstfx->plugin, effGetVstVersion, 0, 0, 0, 0);
-       
+
        vstfx->handle->plugincnt++;
        vstfx->wantIdle = 0;
-       
+
        return vstfx;
 }
 
@@ -348,33 +348,33 @@ vstfx_instantiate (VSTHandle* fhandle, audioMasterCallback amc, void* userptr)
 void vstfx_close (VSTState* vstfx)
 {
        vstfx_destroy_editor(vstfx);
-       
+
        if(vstfx->plugin)
        {
                vstfx->plugin->dispatcher (vstfx->plugin, effMainsChanged, 0, 0, 0, 0);
-               
+
                /*Calling dispatcher with effClose will cause the plugin's destructor to
                be called, which will also remove the editor if it exists*/
-               
+
                vstfx->plugin->dispatcher (vstfx->plugin, effClose, 0, 0, 0, 0);
        }
 
        if (vstfx->handle->plugincnt)
                        vstfx->handle->plugincnt--;
-               
+
        /*vstfx_unload will unload the dll if the instance count allows -
        we need to do this because some plugins keep their own instance count
        and (JUCE) manages the plugin UI in its own thread.  When the plugins
        internal instance count reaches zero, JUCE stops the UI thread and won't
        restart it until the next time the library is loaded.  If we don't unload
        the lib JUCE will never restart*/
-       
-       
+
+
        if (vstfx->handle->plugincnt)
        {
                return;
        }
-       
+
        /*Valid plugin loaded - so we can unload it and 0 the pointer
        to it.  We can't free the handle here because we don't know what else
        might need it.  It should be / is freed when the plugin is deleted*/
@@ -403,11 +403,11 @@ vstfx_save_state (VSTState* vstfx, char * filename)
                int success;
 
                /* write header */
-               
+
                fprintf(f, "<plugin_state>\n");
 
                success = vstfx_call_dispatcher(vstfx, effGetProductString, 0, 0, productString, 0);
-               
+
                if(success == 1)
                {
                        fprintf (f, "  <check field=\"productString\" value=\"%s\"/>\n", productString);
@@ -418,7 +418,7 @@ vstfx_save_state (VSTState* vstfx, char * filename)
                }
 
                success = vstfx_call_dispatcher(vstfx, effGetEffectName, 0, 0, effectName, 0);
-               
+
                if(success == 1)
                {
                        fprintf (f, "  <check field=\"effectName\" value=\"%s\"/>\n", effectName);
@@ -430,7 +430,7 @@ vstfx_save_state (VSTState* vstfx, char * filename)
                }
 
                success = vstfx_call_dispatcher(vstfx, effGetVendorString, 0, 0, vendorString, 0);
-               
+
                if( success == 1 )
                {
                        fprintf (f, "  <check field=\"vendorString\" value=\"%s\"/>\n", vendorString);
@@ -450,7 +450,7 @@ vstfx_save_state (VSTState* vstfx, char * filename)
                for(i=0; i < numParams; i++)
                {
                        float val;
-                       
+
                        pthread_mutex_lock( &vstfx->lock );
                        val = vstfx->plugin->getParameter(vstfx->plugin, i );
                        pthread_mutex_unlock( &vstfx->lock );
@@ -494,17 +494,17 @@ vstfx_save_state (VSTState* vstfx, char * filename)
 int vstfx_call_dispatcher (VSTState* vstfx, int opcode, int index, int val, void *ptr, float opt)
 {
        pthread_mutex_lock (&vstfx->lock);
-       
+
        /*Set up the opcode and parameters*/
-       
+
        vstfx->dispatcher_opcode = opcode;
        vstfx->dispatcher_index = index;
        vstfx->dispatcher_val = val;
        vstfx->dispatcher_ptr = ptr;
        vstfx->dispatcher_opt = opt;
-       
+
        /*Signal that we want the call to happen*/
-       
+
        vstfx->dispatcher_wantcall = 1;
 
        /*Wait for the call to happen*/
@@ -513,6 +513,6 @@ int vstfx_call_dispatcher (VSTState* vstfx, int opcode, int index, int val, void
        pthread_mutex_unlock (&vstfx->lock);
 
        /*Return the result*/
-       
+
        return vstfx->dispatcher_retval;
 }
index 685cd6dd94eca221961bc6854377dfe6d0500bf5..1b63ce4431cf3b86f8ceefe8afa824088a37734d 100644 (file)
@@ -148,7 +148,7 @@ Location::operator= (const Location& other)
        _bbt_end = other._bbt_end;
        _flags = other._flags;
        _position_lock_style = other._position_lock_style;
-       
+
        /* XXX need to copy scene change */
 
        /* copy is not locked even if original was */
@@ -240,7 +240,7 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute)
                }
                start_changed (this); /* EMIT SIGNAL */
                StartChanged (); /* EMIT SIGNAL */
-                               
+
                if (is_session_range ()) {
                        Session::StartTimeChanged (old); /* EMIT SIGNAL */
                        AudioFileSource::set_header_position_offset (s);
@@ -688,7 +688,7 @@ Location::set_state (const XMLNode& node, int version)
        }
 
        XMLNode* scene_child = find_named_node (node, SceneChange::xml_node_name);
-       
+
        if (scene_child) {
                _scene_change = SceneChange::factory (*scene_child, version);
        }
@@ -1191,7 +1191,7 @@ Locations::first_mark_before (framepos_t frame, bool include_special_ranges)
 {
        Glib::Threads::Mutex::Lock lm (lock);
        vector<LocationPair> locs;
-       
+
        for (LocationList::iterator i = locations.begin(); i != locations.end(); ++i) {
                locs.push_back (make_pair ((*i)->start(), (*i)));
                if (!(*i)->is_mark()) {
@@ -1239,7 +1239,7 @@ Locations::mark_at (framepos_t pos, framecnt_t slop) const
                        } else {
                                delta = (*i)->start() - pos;
                        }
-                       
+
                        if (slop == 0 && delta == 0) {
                                /* special case: no slop, and direct hit for position */
                                return *i;
@@ -1272,7 +1272,7 @@ Locations::first_mark_after (framepos_t frame, bool include_special_ranges)
 
        LocationStartEarlierComparison cmp;
        sort (locs.begin(), locs.end(), cmp);
-       
+
        /* locs is sorted in reverse order */
 
        for (vector<LocationPair>::iterator i = locs.begin(); i != locs.end(); ++i) {
index 1c3db86db552febb1316a5436e24cc11c942f475..2294c467c3c546116cb938f6dfdb127488c3c5f4 100644 (file)
@@ -2388,7 +2388,7 @@ LV2Plugin::Impl::designated_input (const char* uri, void** bufptrs[], void** buf
 static bool lv2_filter (const string& str, void* /*arg*/)
 {
        /* Not a dotfile, has a prefix before a period, suffix is "lv2" */
-       
+
        return str[0] != '.' && (str.length() > 3 && str.find (".lv2") == (str.length() - 4));
 }
 
index b735fe74fb5923a2d435bd887a6eccbade75a736..dc8deb7727a723ffd1f91e0209a4935db1756bba 100644 (file)
@@ -304,9 +304,9 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
 
        /* two events at identical times. we need to determine
           the order in which they should occur.
-       
+
           the rule is:
-       
+
           Controller messages
           Program Change
           Note Off
@@ -315,22 +315,22 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
           Channel Pressure
           Pitch Bend
        */
-       
+
        if ((a) >= 0xf0 || (b) >= 0xf0 || ((a & 0xf) != (b & 0xf))) {
-               
+
                /* if either message is not a channel message, or if the channels are
                 * different, we don't care about the type.
                 */
-               
+
                b_first = true;
-               
+
        } else {
-               
+
                switch (b & 0xf0) {
                case MIDI_CMD_CONTROL:
                        b_first = true;
                        break;
-                       
+
                case MIDI_CMD_PGM_CHANGE:
                        switch (a & 0xf0) {
                        case MIDI_CMD_CONTROL:
@@ -344,7 +344,7 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
                                b_first = true;
                        }
                        break;
-                       
+
                case MIDI_CMD_NOTE_OFF:
                        switch (a & 0xf0) {
                        case MIDI_CMD_CONTROL:
@@ -358,7 +358,7 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
                                b_first = true;
                        }
                        break;
-                       
+
                case MIDI_CMD_NOTE_ON:
                        switch (a & 0xf0) {
                        case MIDI_CMD_CONTROL:
@@ -385,7 +385,7 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
                                b_first = true;
                        }
                        break;
-                       
+
                case MIDI_CMD_CHANNEL_PRESSURE:
                        switch (a & 0xf0) {
                        case MIDI_CMD_CONTROL:
@@ -414,10 +414,10 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
                        break;
                }
        }
-       
+
        return b_first;
 }
-       
+
 /** Merge \a other into this buffer.  Realtime safe. */
 bool
 MidiBuffer::merge_in_place (const MidiBuffer &other)
@@ -507,20 +507,20 @@ MidiBuffer::merge_in_place (const MidiBuffer &other)
                                                     (*us).time(), (*them).time(),
                                                     (int) *(_data + us.offset + sizeof (TimeType)),
                                                     (int) *(other._data + them.offset + sizeof (TimeType))));
-                       
+
                        uint8_t our_midi_status_byte = *(_data + us.offset + sizeof (TimeType));
                        uint8_t their_midi_status_byte = *(other._data + them.offset + sizeof (TimeType));
                        bool them_first = second_simultaneous_midi_byte_is_first (our_midi_status_byte, their_midi_status_byte);
-                       
+
                        DEBUG_TRACE (DEBUG::MidiIO, string_compose ("other message came first ? %1\n", them_first));
-                       
+
                        if (!them_first) {
                                /* skip past our own event */
                                ++us;
                        }
-                               
+
                        bytes_to_merge = sizeof (TimeType) + (*them).size();
-                       
+
                        /* move our remaining events later in the buffer by
                         * enough to fit the one message we're going to merge
                         */
@@ -554,11 +554,11 @@ MidiBuffer::merge_in_place (const MidiBuffer &other)
                        ++them;
 
                } else {
-                       
+
                        /* advance past our own events to get to the correct insertion
                           point for the next event(s) from "other"
                        */
-               
+
                        while (us != end() && (*us).time() <= (*them).time()) {
                                ++us;
                        }
@@ -571,7 +571,7 @@ MidiBuffer::merge_in_place (const MidiBuffer &other)
                if (us == end()) {
 
                        /* just append the rest of other and we're done*/
-                       
+
                        memcpy (_data + us.offset, other._data + them.offset, other._size - them.offset);
                        _size += other._size - them.offset;
                        assert(_size <= _capacity);
index c2da2307015c96a135e3667dc038a51802e954fa..7d980e5d1e6c448e1ebc0789c5e18a1a8625913d 100644 (file)
@@ -458,7 +458,7 @@ MidiDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
                                   that it can read it if it likes.
                                */
                                _gui_feed_buffer.clear ();
-                               
+
                                for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
                                        /* This may fail if buf is larger than _gui_feed_buffer, but it's not really
                                           the end of the world if it does.
@@ -509,7 +509,7 @@ MidiDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
 
        if (need_disk_signal) {
                /* copy the diskstream data to all output buffers */
-               
+
                MidiBuffer& mbuf (bufs.get_midi (0));
                get_playback (mbuf, playback_distance);
 
@@ -583,7 +583,7 @@ MidiDiskstream::commit (framecnt_t playback_distance)
         * but we do need to check so that the decision on whether or not we
         * need the butler is done correctly.
         */
-       
+
        /* furthermore..
         *
         * Doing heavy GUI operations[1] can stall also the butler.
@@ -755,7 +755,7 @@ MidiDiskstream::read (framepos_t& start, framecnt_t dur, bool reversed)
                                        id(), this_read, start) << endmsg;
                        return -1;
                }
-               
+
                g_atomic_int_add (&_frames_written_to_ringbuffer, this_read);
 
                if (reversed) {
@@ -1157,7 +1157,7 @@ MidiDiskstream::set_record_enabled (bool yn)
                } else {
                        disengage_record_enable ();
                }
-               
+
                RecordEnableChanged (); /* EMIT SIGNAL */
        }
 }
@@ -1168,18 +1168,18 @@ MidiDiskstream::set_record_safe (bool yn)
        if (!recordable() || !_session.record_enabling_legal() || _io->n_ports().n_midi() == 0) { // REQUIRES REVIEW
                return;
        }
-       
+
        /* yes, i know that this not proof against race conditions, but its
         good enough. i think.
         */
-       
+
        if (record_safe () != yn) {
                if (yn) {
                        engage_record_safe ();
                } else {
                        disengage_record_safe ();
                }
-               
+
                RecordSafeChanged (); /* EMIT SIGNAL */
        }
 }
@@ -1194,7 +1194,7 @@ MidiDiskstream::prep_record_enable ()
        bool const rolling = _session.transport_speed() != 0.0f;
 
        boost::shared_ptr<MidiPort> sp = _source_port.lock ();
-       
+
        if (sp && Config->get_monitoring_model() == HardwareMonitoring) {
                sp->request_input_monitoring (!(_session.config.get_auto_input() && rolling));
        }
@@ -1321,14 +1321,14 @@ MidiDiskstream::steal_write_source_name ()
 
        try {
                string new_path = _session.new_midi_source_path (name());
-               
+
                if (_write_source->rename (new_path)) {
                        return string();
                }
        } catch (...) {
                return string ();
        }
-       
+
        return our_old_name;
 }
 
@@ -1360,7 +1360,7 @@ void
 MidiDiskstream::ensure_input_monitoring (bool yn)
 {
        boost::shared_ptr<MidiPort> sp = _source_port.lock ();
-       
+
        if (sp) {
                sp->ensure_input_monitoring (yn);
        }
@@ -1385,7 +1385,7 @@ float
 MidiDiskstream::playback_buffer_load () const
 {
        /* For MIDI it's not trivial to differentiate the following two cases:
-       
+
           1.  The playback buffer is empty because the system has run out of time to fill it.
           2.  The playback buffer is empty because there is no more data on the playlist.
 
@@ -1393,7 +1393,7 @@ MidiDiskstream::playback_buffer_load () const
           cannot keep up when #2 happens, when in fact it can.  Since MIDI data rates
           are so low compared to audio, just give a pretend answer here.
        */
-       
+
        return 1;
 }
 
@@ -1401,7 +1401,7 @@ float
 MidiDiskstream::capture_buffer_load () const
 {
        /* We don't report playback buffer load, so don't report capture load either */
-       
+
        return 1;
 }
 
@@ -1437,7 +1437,7 @@ MidiDiskstream::get_playback (MidiBuffer& dst, framecnt_t nframes)
         // _playback_buf->dump (cerr);
         // cerr << "----------------\n";
 
-       size_t events_read = 0; 
+       size_t events_read = 0;
 
        if (loc) {
                framepos_t effective_start;
@@ -1447,7 +1447,7 @@ MidiDiskstream::get_playback (MidiBuffer& dst, framecnt_t nframes)
                } else {
                        effective_start = playback_sample;
                }
-               
+
                DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose ("looped, effective start adjusted to %1\n", effective_start));
 
                if (effective_start == loc->start()) {
@@ -1484,7 +1484,7 @@ MidiDiskstream::get_playback (MidiBuffer& dst, framecnt_t nframes)
                                                                                      loc->start(), second));
                                events_read += _playback_buf->read (dst, loc->start(), second);
                        }
-                                                               
+
                } else {
                        DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose ("loop read #3, adjusted start as %1 for %2\n",
                                                                              effective_start, nframes));
@@ -1535,7 +1535,7 @@ boost::shared_ptr<MidiBuffer>
 MidiDiskstream::get_gui_feed_buffer () const
 {
        boost::shared_ptr<MidiBuffer> b (new MidiBuffer (AudioEngine::instance()->raw_buffer_size (DataType::MIDI)));
-       
+
        Glib::Threads::Mutex::Lock lm (_gui_feed_buffer_mutex);
        b->copy (_gui_feed_buffer);
        return b;
index 27fb61b11d0fcc77e15b2d13765c98b08ede609f..fd08428a68d0a06b8bb1a72303d7943df0c26a58 100644 (file)
@@ -321,7 +321,7 @@ MidiModel::NoteDiffCommand::operator() ()
                                _removed_notes.push_back (*i);
                        }
                }
-               
+
                if (!side_effect_removals.empty()) {
                        cerr << "SER: \n";
                        for (set<NotePtr>::iterator i = side_effect_removals.begin(); i != side_effect_removals.end(); ++i) {
@@ -364,7 +364,7 @@ MidiModel::NoteDiffCommand::undo ()
                                assert (i->note);
                        }
                }
-                               
+
                for (ChangeList::iterator i = _changes.begin(); i != _changes.end(); ++i) {
                        Property prop = i->property;
 
@@ -439,7 +439,7 @@ MidiModel::NoteDiffCommand::undo ()
                        _model->add_note_unlocked (*i);
                }
        }
-       
+
        _model->ContentsChanged(); /* EMIT SIGNAL */
 }
 
@@ -1242,7 +1242,7 @@ MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n)
        int channel = 0;
        int program = 0;
        int bank = 0;
-       
+
        if ((prop_id = n->property ("id")) != 0) {
                istringstream s (prop_id->value());
                s >> id;
@@ -2027,6 +2027,6 @@ void
 MidiModel::control_list_marked_dirty ()
 {
        AutomatableSequence<Evoral::Beats>::control_list_marked_dirty ();
-       
+
        ContentsChanged (); /* EMIT SIGNAL */
 }
index 93f0b7e2356dd16b2abee23ede908ee89de9bd03..4f5cff1747314a154a194151ea2f2065f2c8923e 100644 (file)
@@ -60,7 +60,7 @@ MidiPatchManager::add_session_patches ()
        if (!_session) {
                return;
        }
-       
+
        std::string path_to_patches = _session->session_directory().midi_patch_path();
 
        if (!Glib::file_test (path_to_patches, Glib::FILE_TEST_EXISTS)) {
@@ -135,7 +135,7 @@ MidiPatchManager::refresh()
                                        << endmsg;
                                continue;
                        }
-                               
+
                        _documents[device->first]               = document;
                        _master_devices_by_model[device->first] = device->second;
 
index 85d5c95a5f14866191b3722309dd90e248048a26..d959ff9d91d758ac2524baef07d221bdf5cf7d08 100644 (file)
@@ -67,14 +67,14 @@ MidiPort::cycle_start (pframes_t nframes)
                MidiBuffer& mb (get_midi_buffer (nframes));
 
                /* dump incoming MIDI to parser */
-               
+
                for (MidiBuffer::iterator b = mb.begin(); b != mb.end(); ++b) {
                        uint8_t* buf = (*b).buffer();
-                       
+
                        _self_parser.set_timestamp (now + (*b).time());
-                       
+
                        uint32_t limit = (*b).size();
-                       
+
                        for (size_t n = 0; n < limit; ++n) {
                                _self_parser.scanner (buf[n]);
                        }
@@ -107,13 +107,13 @@ MidiPort::get_midi_buffer (pframes_t nframes)
                        */
 
                        for (pframes_t i = 0; i < event_count; ++i) {
-                               
+
                                pframes_t timestamp;
                                size_t size;
                                uint8_t* buf;
-                               
+
                                port_engine.midi_event_get (timestamp, size, &buf, buffer, i);
-                               
+
                                if (buf[0] == 0xfe) {
                                        /* throw away active sensing */
                                        continue;
@@ -122,9 +122,9 @@ MidiPort::get_midi_buffer (pframes_t nframes)
                                        buf[0] = 0x80 | (buf[0] & 0x0F);  /* note off */
                                        buf[2] = 0x40;  /* default velocity */
                                }
-                               
+
                                /* check that the event is in the acceptable time range */
-                               
+
                                if ((timestamp >= (_global_port_buffer_offset + _port_buffer_offset)) &&
                                    (timestamp < (_global_port_buffer_offset + _port_buffer_offset + nframes))) {
                                        _buffer->push_back (timestamp, size, buf);
@@ -192,14 +192,14 @@ MidiPort::flush_buffers (pframes_t nframes)
        if (sends_output ()) {
 
                void* port_buffer = 0;
-               
+
                if (_resolve_required) {
                        port_buffer = port_engine.get_buffer (_port_handle, nframes);
                        /* resolve all notes at the start of the buffer */
                        resolve_notes (port_buffer, 0);
                        _resolve_required = false;
                }
-               
+
                if (_buffer->empty()) {
                        return;
                }
@@ -216,12 +216,12 @@ MidiPort::flush_buffers (pframes_t nframes)
 
                        if (sends_output() && _trace_on) {
                                uint8_t const * const buf = ev.buffer();
-                               const framepos_t now = AudioEngine::instance()->sample_time_at_cycle_start();                           
+                               const framepos_t now = AudioEngine::instance()->sample_time_at_cycle_start();
 
                                _self_parser.set_timestamp (now + ev.time());
-                               
+
                                uint32_t limit = ev.size();
-                               
+
                                for (size_t n = 0; n < limit; ++n) {
                                        _self_parser.scanner (buf[n]);
                                }
index 7c72718b697b78d1e89a4b7cbf3a410f8fa925ee..9258b2f7dc7861a66ceba62f920bfb55cbe46fd6 100644 (file)
@@ -212,7 +212,7 @@ MidiRingBuffer<T>::flush (framepos_t /*start*/, framepos_t end)
                assert (success);
 
                ev_time = *(reinterpret_cast<T*>((uintptr_t)peekbuf));
-               
+
                if (ev_time >= end) {
                        break;
                }
index 91f2dd4d7cfc7f56b8133d7a6e8f6f89b33a227b..ed0729b0710ec282ffad5da28fb8136874f7ec85 100644 (file)
@@ -77,7 +77,7 @@ MIDISceneChange::get_bank_lsb_message (uint8_t* buf, size_t size) const
 
        buf[0] = 0xB0 | (_channel & 0xf);
        buf[1] = 0x20;
-       buf[2] = _bank & 0x7f;  
+       buf[2] = _bank & 0x7f;
 
        return 3;
 }
index da6fe88331797836f406f41a3d750ed003699d04..f586206ba742d06289a61642d3321bc770e25284 100644 (file)
@@ -41,7 +41,7 @@ MIDISceneChanger::MIDISceneChanger (Session& s)
        , last_program_message_time (-1)
        , last_delivered_program (-1)
        , last_delivered_bank (-1)
-       
+
 {
        /* catch any add/remove/clear etc. for all Locations */
        _session.locations()->changed.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this));
@@ -86,7 +86,7 @@ MIDISceneChanger::gather (const Locations::LocationList& locations)
                                if (msc->bank() >= 0) {
                                        have_seen_bank_changes = true;
                                }
-                       
+
                                scenes.insert (std::make_pair ((*l)->start(), msc));
                        }
                }
@@ -164,7 +164,7 @@ MIDISceneChanger::run (framepos_t start, framepos_t end)
        }
 
        Glib::Threads::RWLock::ReaderLock lm (scene_lock, Glib::Threads::TRY_LOCK);
-       
+
        if (!lm.locked()) {
                return;
        }
@@ -179,9 +179,9 @@ MIDISceneChanger::run (framepos_t start, framepos_t end)
                if (i->first >= end) {
                        break;
                }
-       
+
                rt_deliver (mbuf, i->first - start, i->second);
-               
+
                ++i;
        }
 }
@@ -197,9 +197,9 @@ MIDISceneChanger::locate (framepos_t pos)
                if (scenes.empty()) {
                        return;
                }
-               
+
                Scenes::const_iterator i = scenes.lower_bound (pos);
-               
+
                if (i != scenes.end()) {
 
                        if (i->first != pos) {
@@ -223,7 +223,7 @@ MIDISceneChanger::locate (framepos_t pos)
        if (msc->program() != last_delivered_program || msc->bank() != last_delivered_bank) {
                non_rt_deliver (msc);
        }
-}              
+}
 
 void
 MIDISceneChanger::set_input_port (MIDI::Port* mp)
@@ -231,9 +231,9 @@ MIDISceneChanger::set_input_port (MIDI::Port* mp)
        input_port = mp;
 
        incoming_connections.drop_connections();
-       
+
        if (input_port) {
-               
+
                /* midi port is asynchronous. MIDI parsing will be carried out
                 * by the MIDI UI thread which will emit the relevant signals
                 * and thus invoke our callbacks as necessary.
@@ -303,14 +303,14 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
 
        if (!loc) {
                /* create a new marker at the desired position */
-               
+
                std::string new_name;
 
                if (!locations->next_available_name (new_name, _("Scene "))) {
                        std::cerr << "No new marker name available\n";
                        return;
                }
-               
+
                loc = new Location (_session, time, time, new_name, Location::IsMark);
                new_mark = true;
        }
@@ -336,7 +336,7 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
        }
 
        loc->set_scene_change (boost::shared_ptr<MIDISceneChange> (msc));
-       
+
        /* this will generate a "changed" signal to be emitted by locations,
           and we will call ::gather() to update our list of MIDI events.
        */
index 3a801901cb41efd50dc576439117b56bde1d44b8..0403461c73914102288b7bb2afc5c7207c215e2a 100644 (file)
@@ -65,7 +65,7 @@ MidiStateTracker::add (uint8_t note, uint8_t chn)
 
 void
 MidiStateTracker::remove (uint8_t note, uint8_t chn)
-{      
+{
        switch (_active_notes[note + 128 * chn]) {
        case 0:
                break;
index e0b2f4e225c319201f47d1a5e3d3c601ab6c566c..f3bc2c4f79880f064d5ad5aa724c1c15eddaa018 100644 (file)
@@ -118,7 +118,7 @@ MidiTrack::set_record_safe (bool yn, void *src)
        if (_step_editing) { /* REQUIRES REVIEW */
                return;
        }
-       
+
        Track::set_record_safe (yn, src);
 }
 
@@ -130,10 +130,10 @@ MidiTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
        */
        boost::shared_ptr<MidiDiskstream> mds = boost::dynamic_pointer_cast<MidiDiskstream> (ds);
        mds->set_note_mode (_note_mode);
-       
+
        Track::set_diskstream (ds);
 
-       mds->reset_tracker ();  
+       mds->reset_tracker ();
 
        _diskstream->set_track (this);
        if (Profile->get_trx()) {
@@ -432,13 +432,13 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame
 
        }
 
-       
+
        /* append immediate messages to the first MIDI buffer (thus sending it to the first output port) */
-       
+
        write_out_of_band_data (bufs, start_frame, end_frame, nframes);
-       
+
        /* final argument: don't waste time with automation if we're not recording or rolling */
-       
+
        process_output_buffers (bufs, start_frame, end_frame, nframes,
                                declick, (!diskstream->record_enabled() && !_session.transport_stopped()));
 
@@ -450,7 +450,7 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame
        }
 
        need_butler = diskstream->commit (playback_distance);
-       
+
        return 0;
 }
 
@@ -930,20 +930,20 @@ MidiTrack::act_on_mute ()
                midi_diskstream()->resolve_tracker(_immediate_events, 0);
        }
 }
-       
+
 void
 MidiTrack::set_monitoring (MonitorChoice mc)
 {
        if (mc != _monitoring) {
 
                Track::set_monitoring (mc);
-               
+
                /* monitoring state changed, so flush out any on notes at the
                 * port level.
                 */
 
                PortSet& ports (_output->ports());
-               
+
                for (PortSet::iterator p = ports.begin(); p != ports.end(); ++p) {
                        boost::shared_ptr<MidiPort> mp = boost::dynamic_pointer_cast<MidiPort> (*p);
                        if (mp) {
@@ -952,7 +952,7 @@ MidiTrack::set_monitoring (MonitorChoice mc)
                }
 
                boost::shared_ptr<MidiDiskstream> md (midi_diskstream());
-               
+
                if (md) {
                        md->reset_tracker ();
                }
index 0f2392108f25fcbe37b97d45ad430c48f60f8da7..59c718ad2b512a8e29348dc009fe3745b1afd2f7 100644 (file)
@@ -104,12 +104,12 @@ MidiControlUI::reset_ports ()
 {
        vector<AsyncMIDIPort*> ports;
        AsyncMIDIPort* p;
-       
+
        if ((p = dynamic_cast<AsyncMIDIPort*> (_session.midi_input_port()))) {
                ports.push_back (p);
        }
-       
-       
+
+
        if ((p = dynamic_cast<AsyncMIDIPort*> (_session.mmc_input_port()))) {
                ports.push_back (p);
        }
@@ -117,11 +117,11 @@ MidiControlUI::reset_ports ()
        if ((p = dynamic_cast<AsyncMIDIPort*> (_session.scene_input_port()))) {
                ports.push_back (p);
        }
-       
+
        if (ports.empty()) {
                return;
        }
-       
+
        for (vector<AsyncMIDIPort*>::const_iterator pi = ports.begin(); pi != ports.end(); ++pi) {
                (*pi)->xthread().set_receive_handler (sigc::bind (sigc::mem_fun (this, &MidiControlUI::midi_input_handler), *pi));
                (*pi)->xthread().attach (_main_loop->get_context());
index fe6a534f24ef35b1fc8e3775d976938506504a17..5460df3824f119fe8ecebcd31f85423335c8f838 100644 (file)
@@ -73,7 +73,7 @@ MidiPortManager::create_ports ()
        if (_midi_in) {
                return;
        }
-       
+
        _midi_in  = AudioEngine::instance()->register_input_port (DataType::MIDI, X_("MIDI control in"), true);
        _midi_out = AudioEngine::instance()->register_output_port (DataType::MIDI, X_("MIDI control out"), true);
 
@@ -143,7 +143,7 @@ MidiPortManager::set_midi_port_states (const XMLNodeList&nodes)
        ports.insert (make_pair (_mmc_output_port->name(), _mmc_out));
        ports.insert (make_pair (_scene_output_port->name(), _scene_out));
        ports.insert (make_pair (_scene_input_port->name(), _scene_in));
-       
+
        for (XMLNodeList::const_iterator n = nodes.begin(); n != nodes.end(); ++n) {
                if ((prop = (*n)->property (X_("name"))) == 0) {
                        continue;
@@ -153,7 +153,7 @@ MidiPortManager::set_midi_port_states (const XMLNodeList&nodes)
                if (p == ports.end()) {
                        continue;
                }
-               
+
                p->second->set_state (**n, version);
        }
 }
index 427e895f134f1ea84463ff2fb286fcb5c3a6225b..92beed547ccd0d3f814bb26f1b573cdb86a88a6b 100644 (file)
@@ -288,7 +288,7 @@ MonitorProcessor::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /
                 /* don't double-scale by both track dim and global dim coefficients */
 
                 gain_t dim_level = (global_dim == GAIN_COEFF_UNITY ? (_channels[chn]->dim ? dim_level_this_time : GAIN_COEFF_UNITY) : GAIN_COEFF_UNITY);
-               
+
                 if (_channels[chn]->soloed) {
                         target_gain = _channels[chn]->polarity * _channels[chn]->cut * dim_level * global_cut * global_dim * solo_boost;
                 } else {
index 92e91f53c1d2068e7574360619103d6c6dd82f8a..247397d4158d41393c766465d4beb9e3fd8ddaf8 100644 (file)
@@ -50,7 +50,7 @@ Pannable::Pannable (Session& s)
        , _responding_to_control_auto_state_change (0)
 {
        //boost_debug_shared_ptr_mark_interesting (this, "pannable");
-       
+
        add_control (pan_azimuth_control);
        add_control (pan_elevation_control);
        add_control (pan_width_control);
index d8d760ba8f72413d77e6b44e7b36b194b4bc613e..72c8fd57d1c3c1a2a4f7fde9d7ab4aacc26ff1a8 100644 (file)
@@ -187,7 +187,7 @@ PannerShell::set_state (const XMLNode& node, int version)
        }
 
        _panner.reset ();
-       
+
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
 
                if ((*niter)->name() == X_("Panner")) {
@@ -406,7 +406,7 @@ PannerShell::set_bypassed (bool yn)
        if (yn == _bypassed) {
                return;
        }
-       
+
        _bypassed = yn;
        _session.set_dirty ();
        Changed (); /* EMIT SIGNAL */
index 3138df3b9d95c4f4ff11e772299f95955a421774..959b4884a347cd9812f8acd8f47ba151fabf5a05 100644 (file)
@@ -557,7 +557,7 @@ Playlist::notify_region_added (boost::shared_ptr<Region> r)
                pending_contents_change = false;
                RegionAdded (boost::weak_ptr<Region> (r)); /* EMIT SIGNAL */
                ContentsChanged (); /* EMIT SIGNAL */
-               
+
        }
 }
 
@@ -603,7 +603,7 @@ Playlist::flush_notifications (bool from_undo)
                remove_dependents (*s);
                RegionRemoved (boost::weak_ptr<Region> (*s)); /* EMIT SIGNAL */
        }
-       
+
        for (s = pending_adds.begin(); s != pending_adds.end(); ++s) {
                crossfade_ranges.push_back ((*s)->range ());
                /* don't emit RegionAdded signal until relayering is done,
@@ -620,25 +620,25 @@ Playlist::flush_notifications (bool from_undo)
                pending_layering = true;
                ContentsChanged (); /* EMIT SIGNAL */
        }
-       
+
        for (s = pending_adds.begin(); s != pending_adds.end(); ++s) {
                (*s)->clear_changes ();
                RegionAdded (boost::weak_ptr<Region> (*s)); /* EMIT SIGNAL */
        }
-       
+
        if ((regions_changed && !in_set_state) || pending_layering) {
                relayer ();
        }
-       
+
        coalesce_and_check_crossfades (crossfade_ranges);
-       
+
        if (!pending_range_moves.empty ()) {
                /* We don't need to check crossfades for these as pending_bounds has
                   already covered it.
                */
                RangesMoved (pending_range_moves, from_undo);
        }
-       
+
        if (!pending_region_extensions.empty ()) {
                RegionsExtended (pending_region_extensions);
        }
@@ -1225,11 +1225,11 @@ Playlist::flush_notifications (bool from_undo)
                         while (itimes--) {
                                 for (RegionList::iterator i = other->regions.begin(); i != other->regions.end(); ++i) {
                                         boost::shared_ptr<Region> copy_of_region = RegionFactory::create (*i, true);
-                                       
+
                                         /* put these new regions on top of all existing ones, but preserve
                                            the ordering they had in the original playlist.
                                         */
-                                       
+
                                         add_region_internal (copy_of_region, (*i)->position() + pos);
                                         set_layer (copy_of_region, copy_of_region->layer() + top);
                                 }
@@ -1523,7 +1523,7 @@ Playlist::core_ripple (framepos_t at, framecnt_t distance, RegionList *exclude)
                        } else if (new_pos >= limit ) {
                                new_pos = limit;
                        }
-                               
+
                        (*i)->set_position (new_pos);
                }
        }
@@ -1783,15 +1783,15 @@ boost::shared_ptr<RegionList>
 Playlist::find_regions_at (framepos_t frame)
 {
        /* Caller must hold lock */
-       
+
        boost::shared_ptr<RegionList> rlist (new RegionList);
-       
+
        for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
                if ((*i)->covers (frame)) {
                        rlist->push_back (*i);
                }
        }
-       
+
        return rlist;
 }
 
@@ -1840,13 +1840,13 @@ boost::shared_ptr<RegionList>
 Playlist::regions_touched_locked (framepos_t start, framepos_t end)
 {
        boost::shared_ptr<RegionList> rlist (new RegionList);
-       
+
        for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
                if ((*i)->coverage (start, end) != Evoral::OverlapNone) {
                        rlist->push_back (*i);
                }
        }
-       
+
        return rlist;
 }
 
@@ -1856,7 +1856,7 @@ Playlist::find_next_transient (framepos_t from, int dir)
        RegionReadLock rlock (this);
        AnalysisFeatureList points;
        AnalysisFeatureList these_points;
-       
+
        for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
                if (dir > 0) {
                        if ((*i)->last_frame() < from) {
@@ -1867,30 +1867,30 @@ Playlist::find_next_transient (framepos_t from, int dir)
                                continue;
                        }
                }
-               
+
                (*i)->get_transients (these_points);
-               
+
                /* add first frame, just, err, because */
-               
+
                these_points.push_back ((*i)->first_frame());
-               
+
                points.insert (points.end(), these_points.begin(), these_points.end());
                these_points.clear ();
        }
-       
+
        if (points.empty()) {
                return -1;
        }
-       
+
        TransientDetector::cleanup_transients (points, _session.frame_rate(), 3.0);
        bool reached = false;
-       
+
        if (dir > 0) {
                for (AnalysisFeatureList::iterator x = points.begin(); x != points.end(); ++x) {
                        if ((*x) >= from) {
                                reached = true;
                        }
-                       
+
                        if (reached && (*x) > from) {
                                return *x;
                        }
@@ -1900,13 +1900,13 @@ Playlist::find_next_transient (framepos_t from, int dir)
                        if ((*x) <= from) {
                                reached = true;
                        }
-                       
+
                        if (reached && (*x) < from) {
                                return *x;
                        }
                }
        }
-       
+
        return -1;
 }
 
@@ -1916,17 +1916,17 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
        RegionReadLock rlock (this);
        boost::shared_ptr<Region> ret;
        framepos_t closest = max_framepos;
-       
+
        bool end_iter = false;
-       
+
        for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
-               
+
                if(end_iter) break;
-               
+
                frameoffset_t distance;
                boost::shared_ptr<Region> r = (*i);
                framepos_t pos = 0;
-               
+
                switch (point) {
                case Start:
                        pos = r->first_frame ();
@@ -1938,10 +1938,10 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
                        pos = r->sync_position ();
                        break;
                }
-               
+
                switch (dir) {
                case 1: /* forwards */
-                       
+
                        if (pos > frame) {
                                if ((distance = pos - frame) < closest) {
                                        closest = distance;
@@ -1949,11 +1949,11 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
                                        end_iter = true;
                                }
                        }
-                       
+
                        break;
-                       
+
                default: /* backwards */
-                       
+
                        if (pos < frame) {
                                if ((distance = frame - pos) < closest) {
                                        closest = distance;
@@ -1962,11 +1962,11 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
                        } else {
                                end_iter = true;
                        }
-                       
+
                        break;
                }
        }
-       
+
        return ret;
 }
 
@@ -2170,7 +2170,7 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
                                 RegionWriteLock rlock (this);
                                 add_region_internal (region, region->position());
                         }
-                       
+
                        region->resume_property_changes ();
 
                }
@@ -2179,7 +2179,7 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
        if (seen_region_nodes && regions.empty()) {
                ret = -1;
        }
-               
+
        thaw ();
        notify_contents_changed ();
 
@@ -2358,7 +2358,7 @@ Playlist::set_layer (boost::shared_ptr<Region> region, double new_layer)
                }
                ++i;
        }
-       
+
        copy.insert (i, region);
 
        setup_layering_indices (copy);
index 5c3d93a0a0f762ed9fc2bf97cecdc1a5f7653576..150ae6c3aca3de9956989042a347dbc7e6aea122 100644 (file)
@@ -46,9 +46,9 @@ PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden, bool unus
                } else if (type->value() == "midi") {
                        pl = boost::shared_ptr<Playlist> (new MidiPlaylist (s, node, hidden));
                }
-               
+
                pl->set_region_ownership ();
-               
+
                if (pl && !hidden) {
                        PlaylistCreated (pl, unused);
                }
@@ -69,11 +69,11 @@ PlaylistFactory::create (DataType type, Session& s, string name, bool hidden)
                        pl = boost::shared_ptr<Playlist> (new AudioPlaylist (s, name, hidden));
                else if (type == DataType::MIDI)
                        pl = boost::shared_ptr<Playlist> (new MidiPlaylist (s, name, hidden));
-               
+
                if (pl && !hidden) {
                        PlaylistCreated (pl, false);
                }
-               
+
                return pl;
        } catch (...) {
                return boost::shared_ptr<Playlist> ();
@@ -86,7 +86,7 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, string name, boo
        boost::shared_ptr<Playlist> pl;
        boost::shared_ptr<const AudioPlaylist> apl;
        boost::shared_ptr<const MidiPlaylist> mpl;
-       
+
        try {
 
                if ((apl = boost::dynamic_pointer_cast<const AudioPlaylist> (old)) != 0) {
@@ -100,12 +100,12 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, string name, boo
                if (pl && !hidden) {
                        PlaylistCreated (pl, false);
                }
-               
+
                return pl;
        } catch (...) {
                return boost::shared_ptr<Playlist> ();
        }
-               
+
 }
 
 boost::shared_ptr<Playlist>
@@ -123,9 +123,9 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, framepos_t start
                        pl = boost::shared_ptr<Playlist> (new MidiPlaylist (mpl, start, cnt, name, hidden));
                        pl->set_region_ownership ();
                }
-               
+
                /* this factory method does NOT notify others */
-               
+
                return pl;
        } catch (...) {
                return boost::shared_ptr<Playlist> ();
index 577b12c1a65ad97eb90c92618835c3d595172938..89f6d24137f862f9f4ddc13cfd0e7f375c409806 100644 (file)
@@ -396,7 +396,7 @@ Plugin::get_state ()
        root->add_property (X_("last-preset-label"), _last_preset.label);
        root->add_property (X_("parameter-changed-since-last-preset"), _parameter_changed_since_last_preset ? X_("yes") : X_("no"));
 
-#ifndef NO_PLUGIN_STATE        
+#ifndef NO_PLUGIN_STATE
        add_state (root);
 #else
        if (!seen_get_state_message) {
index c56843723417893124627672614f4314d26b627a..98ff9ab4f0983040e1fc1eb0d49a42788dfab612 100644 (file)
@@ -167,7 +167,7 @@ PluginInsert::input_streams() const
        }
 
        DEBUG_TRACE (DEBUG::Processors, string_compose ("Plugin insert, input streams = %1, match using %2\n", in, _match.method));
-       
+
        if (_match.method == Split) {
 
                /* we are splitting 1 processor input to multiple plugin inputs,
@@ -188,7 +188,7 @@ PluginInsert::input_streams() const
                return in;
 
        } else {
-               
+
                for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
                        in.set (*t, in.get (*t) * _plugins.size ());
                }
@@ -842,7 +842,7 @@ PluginInsert::private_can_support_io_configuration (ChanCount const & inx, ChanC
           We allow replication only for plugins with either zero or 1 inputs and outputs
           for every valid data type.
        */
-       
+
        uint32_t f             = 0;
        bool     can_replicate = true;
        for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
@@ -910,7 +910,7 @@ PluginInsert::private_can_support_io_configuration (ChanCount const & inx, ChanC
        bool could_hide = false;
        bool cannot_hide = false;
        ChanCount hide_channels;
-       
+
        for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
                if (inputs.get(*t) > in.get(*t)) {
                        /* there is potential to hide, since the plugin has more inputs of type t than the insert */
@@ -1425,7 +1425,7 @@ void
 PluginInsert::add_plugin (boost::shared_ptr<Plugin> plugin)
 {
        plugin->set_insert_id (this->id());
-       
+
        if (_plugins.empty()) {
                 /* first (and probably only) plugin instance - connect to relevant signals
                  */
index 3218550f9999b821d63031ef957c811aa65501e7..d375550d9e40570cc058c560e11923e301be99fb 100644 (file)
@@ -73,7 +73,7 @@ Port::Port (std::string const & n, DataType t, PortFlags f)
                cerr << "Failed to register port \"" << _name << "\", reason is unknown from here\n";
                throw failed_constructor ();
        }
-       
+
        PortDrop.connect_same_thread (drop_connection, boost::bind (&Port::drop, this));
 }
 
@@ -127,10 +127,10 @@ int
 Port::disconnect_all ()
 {
        if (_port_handle) {
-               
+
                port_engine.disconnect_all (_port_handle);
                _connections.clear ();
-               
+
                /* a cheaper, less hacky way to do boost::shared_from_this() ...
                 */
                boost::shared_ptr<Port> pself = port_manager->get_port_by_name (name());
@@ -365,7 +365,7 @@ Port::public_latency_range (bool /*playback*/) const
 
        if (_port_handle) {
                r = port_engine.get_latency_range (_port_handle, sends_output() ? true : false);
-               
+
                DEBUG_TRACE (DEBUG::Latency, string_compose (
                                     "GET PORT %1: %4 PUBLIC latency range %2 .. %3\n",
                                     name(), r.min, r.max,
@@ -520,7 +520,7 @@ Port::get_state () const
        }
 
        vector<string> c;
-       
+
        get_connections (c);
 
        for (vector<string>::const_iterator i = c.begin(); i != c.end(); ++i) {
@@ -554,7 +554,7 @@ Port::set_state (const XMLNode& node, int)
                if ((*c)->name() != X_("Connection")) {
                        continue;
                }
-               
+
                if ((prop = (*c)->property (X_("other"))) == 0) {
                        continue;
                }
index 04796993e4499a0dfec787824889ad697e07b6e2..46d54cd445aece3647e7c6fee65586575bf4dd1d 100644 (file)
@@ -122,7 +122,7 @@ PortInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame,
                         Sample* out = outbuf.data();
 
                         _mtdm->process (nframes, in, out);
-                       
+
                         outbuf.set_written (true);
                 }
 
index b43158ff0fe9fa1ad2200bd55a80183d220a82c4..e4c066944f4b139d20da98d5cb83d9409dd52be5 100644 (file)
@@ -207,7 +207,7 @@ PortManager::port_name_prefix_is_unique (const string& first_part_of_port_name)
 
        boost::shared_ptr<const Ports> pr = ports.reader();
        const string::size_type len = first_part_of_port_name.length();
-       
+
        for (Ports::const_iterator x = pr->begin(); x != pr->end(); ++x) {
 
                string prefix = x->first.substr (0, len);
@@ -262,7 +262,7 @@ PortManager::port_renamed (const std::string& old_relative_name, const std::stri
        RCUWriter<Ports> writer (ports);
        boost::shared_ptr<Ports> p = writer.get_copy();
        Ports::iterator x = p->find (old_relative_name);
-       
+
        if (x != p->end()) {
                boost::shared_ptr<Port> port = x->second;
                p->erase (x);
@@ -515,9 +515,9 @@ PortManager::reconnect_ports ()
 
        if (!Profile->get_trx()) {
                /* re-establish connections */
-               
+
                DEBUG_TRACE (DEBUG::Ports, string_compose ("reconnect %1 ports\n", p->size()));
-               
+
                for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
                        i->second->reconnect ();
                }
@@ -549,7 +549,7 @@ PortManager::connect_callback (const string& a, const string& b, bool conn)
                port_b, b,
                conn
                ); /* EMIT SIGNAL */
-}      
+}
 
 void
 PortManager::registration_callback ()
@@ -603,7 +603,7 @@ PortManager::port_name_size() const
        if (!_backend) {
                return 0;
        }
-       
+
        return _backend->port_name_size ();
 }
 
@@ -613,7 +613,7 @@ PortManager::my_name() const
        if (!_backend) {
                return string();
        }
-       
+
        return _backend->my_name();
 }
 
@@ -709,9 +709,9 @@ void
 PortManager::check_monitoring ()
 {
        for (Ports::iterator i = _cycle_ports->begin(); i != _cycle_ports->end(); ++i) {
-               
+
                bool x;
-               
+
                if (i->second->last_monitor() != (x = i->second->monitoring_input ())) {
                        i->second->set_last_monitor (x);
                        /* XXX I think this is dangerous, due to
@@ -726,14 +726,14 @@ void
 PortManager::fade_out (gain_t base_gain, gain_t gain_step, pframes_t nframes)
 {
        for (Ports::iterator i = _cycle_ports->begin(); i != _cycle_ports->end(); ++i) {
-               
+
                if (i->second->sends_output()) {
-                       
+
                        boost::shared_ptr<AudioPort> ap = boost::dynamic_pointer_cast<AudioPort> (i->second);
                        if (ap) {
                                Sample* s = ap->engine_get_whole_audio_buffer ();
                                gain_t g = base_gain;
-                               
+
                                for (pframes_t n = 0; n < nframes; ++n) {
                                        *s++ *= g;
                                        g -= gain_step;
index 3489ae4e449a9fe43e527828b72b4a4ae7a57509..93fe54ed1c99807336ba609b3a04b8049c5adc80 100644 (file)
@@ -92,7 +92,7 @@ PortSet::add (boost::shared_ptr<Port> port)
 
        sort(v.begin(), v.end(), sort_ports_by_name);
        sort(_all_ports.begin(), _all_ports.end(), sort_ports_by_type_and_name);
-       
+
        _count.set(port->type(), _count.get(port->type()) + 1);
        assert(_count.get(port->type()) == _ports[port->type()].size());
 }
@@ -104,7 +104,7 @@ PortSet::remove (boost::shared_ptr<Port> port)
        if (i != _all_ports.end()) {
                _all_ports.erase(i);
        }
-       
+
        for (std::vector<PortVec>::iterator l = _ports.begin(); l != _ports.end(); ++l) {
                PortVec::iterator i = find(l->begin(), l->end(), port);
                if (i != l->end()) {
index aca9ccaab121a5cea48204cd5e59f4f9bafd4de0..315fb6662e1ac2bcf944f103943ff74b97683354 100644 (file)
@@ -139,15 +139,15 @@ Processor::set_state_2X (const XMLNode & node, int /*version*/)
        XMLProperty const * prop;
 
        XMLNodeList children = node.children ();
-       
+
        for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
 
                if ((*i)->name() == X_("IO")) {
-                       
+
                        if ((prop = (*i)->property ("name")) != 0) {
                                set_name (prop->value ());
                        }
-                       
+
                        set_id (**i);
 
                        //note:  in A2, active state was stored in the Redirect node, not the child IO node
@@ -162,7 +162,7 @@ Processor::set_state_2X (const XMLNode & node, int /*version*/)
                                        }
                                }
                        }*/
-                       
+
                }
        }
 
@@ -188,7 +188,7 @@ Processor::set_state (const XMLNode& node, int version)
                        */
                        Processor::set_name (prop->value());
                }
-               
+
                set_id (node);
        }
 
index cc5b3c53c2c10bb96f4779b342f4e8e27a4bde60..f484a1602a817b6ca3d22855fd44a0df17678a20 100644 (file)
@@ -99,7 +99,7 @@ swing_position (double pos, double grid, double swing, double offset)
        /* now correct for start-of-model offset */
 
        pos += offset;
-                               
+
        if (fabs (pos - swung_pos) > fabs (pos - swung_previous_grid_position)) {
                pos = swung_previous_grid_position;
        } else {
@@ -135,7 +135,7 @@ Quantize::operator () (boost::shared_ptr<MidiModel> model,
                         * these versions of new_start and new_end are
                         * guaranteed to precisely align with the quantize grid(s).
                         */
-                       
+
                        double new_start = round (((*i)->time().to_double() - offset) / _start_grid) * _start_grid;
                        double new_end = round (((*i)->end_time().to_double() - offset) / _end_grid) * _end_grid;
 
@@ -143,7 +143,7 @@ Quantize::operator () (boost::shared_ptr<MidiModel> model,
 
                                new_start = swing_position (new_start, _start_grid, _swing, offset);
                                new_end = swing_position (new_end, _end_grid, _swing, offset);
-                               
+
                        } else {
 
                                /* now correct for start-of-model offset */
@@ -151,10 +151,10 @@ Quantize::operator () (boost::shared_ptr<MidiModel> model,
                                new_start += offset;
                                new_end += offset;
                        }
-                       
+
                        double delta = new_start - (*i)->time().to_double();
 
-                       
+
                        if (fabs (delta) >= _threshold) {
                                if (_snap_start) {
                                        delta *= _strength;
index 813fb93584b7cbcf69b3a2b20a1736c6df097978..bf01238fb4745b9c52c71ba65c0134d6e081b95f 100644 (file)
@@ -599,7 +599,7 @@ Region::set_position_internal (framepos_t pos, bool allow_bbt_recompute)
           e.g. Playlist::notify_region_moved doesn't use an out-of-date last_position.
        */
        _last_position = _position;
-       
+
        if (_position != pos) {
                _position = pos;
 
@@ -1738,4 +1738,4 @@ Region::latest_possible_frame () const
 
        return _position + (minlen - _start) - 1;
 }
-       
+
index 7c9f4fd228200ebb4d7f3e6dc169f4b180872f0c..33c714cd1d80c8d3bb337e9f448cf5a7b528865a 100644 (file)
@@ -83,7 +83,7 @@ RegionFactory::create (boost::shared_ptr<const Region> region, bool announce)
        if (ret) {
                ret->set_name (new_region_name(ret->name()));
                ret->set_position (region->position());
-               
+
                if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
                        ret->set_position_lock_style (MusicTime);
                }
@@ -129,7 +129,7 @@ RegionFactory::create (boost::shared_ptr<Region> region, const PropertyList& pli
                if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
                        ret->set_position_lock_style (MusicTime);
                }
-               
+
                if (announce) {
                        map_add (ret);
                        CheckNewRegion (ret);
@@ -255,7 +255,7 @@ RegionFactory::create (const SourceList& srcs, const PropertyList& plist, bool a
                if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
                        ret->set_position_lock_style (MusicTime);
                }
-               
+
                if (announce) {
                        map_add (ret);
                        CheckNewRegion (ret);
@@ -302,7 +302,7 @@ RegionFactory::create (SourceList& srcs, const XMLNode& node)
                        /* Don't fiddle with position_lock_style here as the region
                           description is coming from XML.
                        */
-                       
+
                        CheckNewRegion (ret);
                }
        }
@@ -342,7 +342,7 @@ RegionFactory::map_remove (boost::weak_ptr<Region> w)
        if (!r) {
                return;
        }
-       
+
        Glib::Threads::Mutex::Lock lm (region_map_lock);
        RegionMap::iterator i = region_map.find (r->id());
 
@@ -449,7 +449,7 @@ RegionFactory::rename_in_region_name_maps (boost::shared_ptr<Region> region)
        update_region_name_number_map (region);
 
        Glib::Threads::Mutex::Lock lm (region_name_maps_mutex);
-       
+
        map<string, PBD::ID>::iterator i = region_name_map.begin();
        while (i != region_name_map.end() && i->second != region->id ()) {
                ++i;
@@ -652,7 +652,7 @@ RegionFactory::remove_regions_using_source (boost::shared_ptr<Source> src)
 
                RegionMap::iterator j = i;
                ++j;
-               
+
                if (i->second->uses_source (src)) {
                        remove_from_region_name_map (i->second->name ());
                        region_map.erase (i);
index 74c00409c7881ecfe76cb041e9b717131db214c0..2cafba5810484f7a4d5392dbee979157a7ff7067 100644 (file)
@@ -501,11 +501,11 @@ Route::process_output_buffers (BufferSet& bufs,
           on a transition between monitoring states we get a de-clicking gain
           change in the _main_outs delivery, if config.get_use_monitor_fades()
           is true.
-       
+
           We override this in the case where we have an internal generator.
        */
        bool silence = _have_internal_generator ? false : (monitoring_state () == MonitoringSilence);
-       
+
        _main_outs->no_outs_cuz_we_no_monitor (silence);
 
        /* -------------------------------------------------------------------------------------------
@@ -1004,28 +1004,28 @@ Route::set_solo_isolated (bool yn, void *src)
                }
        }
 
-       
+
        if (!changed) {
                return;
        }
-       
+
        /* forward propagate solo-isolate status to everything fed by this route, but not those via sends only */
 
        boost::shared_ptr<RouteList> routes = _session.get_routes ();
        for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-               
+
                if ((*i).get() == this || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner()) {
                        continue;
                }
-               
+
                bool sends_only;
                bool does_feed = feeds (*i, &sends_only);
-               
+
                if (does_feed && !sends_only) {
                        (*i)->mod_solo_isolated_by_upstream (yn, src);
                }
        }
-       
+
        /* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
 
        solo_isolated_changed (src);
@@ -1081,7 +1081,7 @@ Route::muted_by_others () const
        //master is never muted by others
        if (is_master())
                return false;
-               
+
        //now check to see if something is soloed (and I am not)
        return (_session.soloing() && !self_soloed() && !solo_isolated());
 }
@@ -1108,7 +1108,7 @@ Route::before_processor_for_placement (Placement p)
        Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
 
        ProcessorList::iterator loc;
-       
+
        if (p == PreFader) {
                /* generic pre-fader: insert immediately before the amp */
                loc = find (_processors.begin(), _processors.end(), _amp);
@@ -1131,14 +1131,14 @@ Route::before_processor_for_index (int index)
        }
 
        Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
-       
+
        ProcessorList::iterator i = _processors.begin ();
        int j = 0;
        while (i != _processors.end() && j < index) {
                if ((*i)->display_to_user()) {
                        ++j;
                }
-               
+
                ++i;
        }
 
@@ -1321,7 +1321,7 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version)
                if (processor->set_state (node, version)) {
                        return false;
                }
-               
+
                //A2 uses the "active" flag in the toplevel redirect node, not in the child plugin/IO
                if (i != children.end()) {
                        if ((prop = (*i)->property (X_("active"))) != 0) {
@@ -1995,12 +1995,12 @@ Route::all_visible_processors_active (bool state)
        if (_processors.empty()) {
                return;
        }
-       
+
        for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
                if (!(*i)->display_to_user() || boost::dynamic_pointer_cast<Amp> (*i)) {
                        continue;
                }
-               
+
                if (state) {
                        (*i)->activate ();
                } else {
@@ -3105,9 +3105,9 @@ Route::remove_aux_or_listen (boost::shared_ptr<Route> route)
 
          again:
                for (ProcessorList::iterator x = _processors.begin(); x != _processors.end(); ++x) {
-                       
+
                        boost::shared_ptr<InternalSend> d = boost::dynamic_pointer_cast<InternalSend>(*x);
-                       
+
                        if (d && d->target_route() == route) {
                                rl.release ();
                                if (remove_processor (*x, &err, false) > 0) {
@@ -3571,9 +3571,9 @@ Route::set_meter_point_unlocked ()
        /* Set up the meter for its new position */
 
        ProcessorList::iterator loc = find (_processors.begin(), _processors.end(), _meter);
-       
+
        ChanCount m_in;
-       
+
        if (loc == _processors.begin()) {
                m_in = _input->n_ports();
        } else {
@@ -3976,7 +3976,7 @@ Route::set_name_in_state (XMLNode& node, string const & name)
 
        XMLNodeList children = node.children();
        for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
-               
+
                if ((*i)->name() == X_("IO")) {
 
                        IO::set_name_in_state (**i, name);
@@ -3987,12 +3987,12 @@ Route::set_name_in_state (XMLNode& node, string const & name)
                        if (role && role->value() == X_("Main")) {
                                (*i)->add_property (X_("name"), name);
                        }
-                       
+
                } else if ((*i)->name() == X_("Diskstream")) {
 
                        (*i)->add_property (X_("playlist"), string_compose ("%1.1", name).c_str());
                        (*i)->add_property (X_("name"), name);
-                       
+
                }
        }
 }
@@ -4278,17 +4278,17 @@ Route::update_port_latencies (PortSet& from, PortSet& to, bool playback, framecn
        } else {
                all_connections.min = ~((pframes_t) 0);
                all_connections.max = 0;
-               
+
                /* iterate over all "from" ports and determine the latency range for all of their
                   connections to the "outside" (outside of this Route).
                */
-               
+
                for (PortSet::iterator p = from.begin(); p != from.end(); ++p) {
-                       
+
                        LatencyRange range;
-                       
+
                        p->get_connected_latency_range (range, playback);
-                       
+
                        all_connections.min = min (all_connections.min, range.min);
                        all_connections.max = max (all_connections.max, range.max);
                }
@@ -4581,7 +4581,7 @@ Route::maybe_note_meter_position ()
        if (_meter_point != MeterCustom) {
                return;
        }
-       
+
        _custom_meter_position_noted = true;
        /* custom meter points range from after trim to before panner/main_outs
         * this is a limitation by the current processor UI
@@ -4650,7 +4650,7 @@ Route::has_external_redirects () const
                /* ignore inactive processors and obviously ignore the main
                 * outs since everything has them and we don't care.
                 */
-               
+
                if ((*i)->active() && (*i) != _main_outs && (*i)->does_routing()) {
                        return true;;
                }
@@ -4696,7 +4696,7 @@ Route::non_realtime_locate (framepos_t pos)
        {
                //Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
                Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
-               
+
                for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
                        (*i)->transport_located (pos);
                }
@@ -4709,7 +4709,7 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pfram
 {
        size_t n_buffers;
        size_t i;
-       
+
        /* MIDI
         *
         * We don't currently mix MIDI input together, so we don't need the
@@ -4722,7 +4722,7 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pfram
 
                boost::shared_ptr<MidiPort> source_port = io->midi (i);
                MidiBuffer& buf (bufs.get_midi (i));
-               
+
                if (source_port) {
                        buf.copy (source_port->get_midi_buffer(nframes));
                } else {
@@ -4740,19 +4740,19 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pfram
        if (n_ports > n_buffers) {
                scaling = ((float) n_buffers) / n_ports;
        }
-       
+
        for (i = 0; i < n_ports; ++i) {
-               
+
                /* if there are more ports than buffers, map them onto buffers
                 * in a round-robin fashion
                 */
 
                boost::shared_ptr<AudioPort> source_port = io->audio (i);
                AudioBuffer& buf (bufs.get_audio (i%n_buffers));
-                       
+
 
                if (i < n_buffers) {
-                       
+
                        /* first time through just copy a channel into
                           the output buffer.
                        */
@@ -4762,9 +4762,9 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pfram
                        if (scaling != 1.0f) {
                                buf.apply_gain (scaling, nframes);
                        }
-                       
+
                } else {
-                       
+
                        /* on subsequent times around, merge data from
                         * the port with what is already there
                         */
index ee02afef2401710aaca5a8987a612d98e1386c06..ab88a0d839c5b45f676531e3216006597fdc43a3 100644 (file)
@@ -70,7 +70,7 @@ GraphEdges::has (GraphVertex from, GraphVertex to, bool* via_sends_only)
        if (i == _from_to_with_sends.end ()) {
                return false;
        }
-       
+
        if (via_sends_only) {
                *via_sends_only = i->second.second;
        }
@@ -86,7 +86,7 @@ GraphEdges::from (GraphVertex r) const
        if (i == _from_to.end ()) {
                return set<GraphVertex> ();
        }
-       
+
        return i->second;
 }
 
@@ -99,7 +99,7 @@ GraphEdges::remove (GraphVertex from, GraphVertex to)
        if (i->second.empty ()) {
                _from_to.erase (i);
        }
-       
+
        EdgeMap::iterator j = _to_from.find (to);
        assert (j != _to_from.end ());
        j->second.erase (from);
@@ -139,7 +139,7 @@ GraphEdges::dump () const
                }
                cout << "\n";
        }
-       
+
        for (EdgeMap::const_iterator i = _to_from.begin(); i != _to_from.end(); ++i) {
                cout << "TO: " << i->first->name() << " ";
                for (set<GraphVertex>::const_iterator j = i->second.begin(); j != i->second.end(); ++j) {
@@ -197,7 +197,7 @@ ARDOUR::topological_sort (
        )
 {
        boost::shared_ptr<RouteList> sorted_routes (new RouteList);
-       
+
        /* queue of routes to process */
        RouteList queue;
 
@@ -217,7 +217,7 @@ ARDOUR::topological_sort (
        /* Do the sort: algorithm is Kahn's from Wikipedia.
           `Topological sorting of large networks', Communications of the ACM 5(11):558-562.
        */
-       
+
        while (!queue.empty ()) {
                GraphVertex r = queue.front ();
                queue.pop_front ();
index 42909ee49753c782707eeb5b02acedb7fd5851c4..032c85f6cea105540259f46f7a06375a30dc8836 100644 (file)
@@ -136,7 +136,7 @@ RouteGroup::add (boost::shared_ptr<Route> r)
        if (r->route_group()) {
                r->route_group()->remove (r);
        }
-       
+
        routes->push_back (r);
 
        r->set_route_group (this);
@@ -190,7 +190,7 @@ RouteGroup::get_min_factor (gain_t factor)
 
                factor = 0.0000003f / g - 1.0f;
        }
-       
+
        return factor;
 }
 
index 1089a3cd8230bbc28c4196c64118e9cb58cee046..50ecac613eb80c9756541c74730851f34bebc03f 100644 (file)
@@ -64,7 +64,7 @@ control_protocol_search_path ()
        Searchpath spath(user_config_directory ());
        spath += ardour_dll_directory ();
        spath.add_subdirectory_to_paths (surfaces_dir_name);
-       
+
        spath += Searchpath(Glib::getenv(surfaces_env_variable_name));
        return spath;
 }
index 3036c0b41e56902a552f49a8323ea6aa8dcbefe1..ec86686bef47d0e050ee31dfb5019b027475fe4f 100644 (file)
@@ -68,7 +68,7 @@ Send::name_and_id_new_send (Session& s, Role r, uint32_t& bitslot, bool ignore_b
                abort(); /*NOTREACHED*/
                return string();
        }
-       
+
 }
 
 Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, Role r, bool ignore_bitslot)
@@ -239,7 +239,7 @@ Send::set_state (const XMLNode& node, int version)
                /* don't try to reset bitslot if there is a node for it already: this can cause
                   issues with the session's accounting of send ID's
                */
-               
+
                if ((prop = node.property ("bitslot")) == 0) {
                        if (_role == Delivery::Aux) {
                                _bitslot = _session.next_aux_send_id ();
@@ -264,7 +264,7 @@ Send::set_state (const XMLNode& node, int version)
                        }
                }
        }
-       
+
        XMLNodeList nlist = node.children();
        for (XMLNodeIterator i = nlist.begin(); i != nlist.end(); ++i) {
                if ((*i)->name() == X_("Processor")) {
@@ -401,4 +401,4 @@ Send::value_as_string (boost::shared_ptr<AutomationControl> ac) const
        return _amp->value_as_string (ac);
 }
 
-       
+
index eb333f8e0de33499dd722e29f4f63f0e69c142a0..879bd7653960b4c799a4c95b65cf5db880bed412 100644 (file)
@@ -211,7 +211,7 @@ Session::Session (AudioEngine &eng,
        , loop_changing (false)
        , last_loopend (0)
        , _session_dir (new SessionDirectory (fullpath))
-       , _current_snapshot_name (snapshot_name)        
+       , _current_snapshot_name (snapshot_name)
        , state_tree (0)
        , state_was_pending (false)
        , _state_of_the_state (StateOfTheState(CannotSave|InitialConnecting|Loading))
@@ -304,12 +304,12 @@ Session::Session (AudioEngine &eng,
        pthread_cond_init (&_rt_emit_cond, 0);
 
        pre_engine_init (fullpath);
-       
+
        if (_is_new) {
 
                Stateful::loading_state_version = CURRENT_SESSION_FILE_VERSION;
 
-#ifdef USE_TRACKS_CODE_FEATURES                
+#ifdef USE_TRACKS_CODE_FEATURES
                sr = EngineStateController::instance()->get_current_sample_rate();
 #endif
                if (ensure_engine (sr)) {
@@ -348,7 +348,7 @@ Session::Session (AudioEngine &eng,
                if (load_state (_current_snapshot_name)) {
                        throw SessionException (_("Failed to load state"));
                }
-       
+
                /* try to get sample rate from XML state so that we
                 * can influence the SR if we set up the audio
                 * engine.
@@ -356,7 +356,7 @@ Session::Session (AudioEngine &eng,
 
                if (state_tree) {
                        const XMLProperty* prop;
-                       if ((prop = state_tree->root()->property (X_("sample-rate"))) != 0) {           
+                       if ((prop = state_tree->root()->property (X_("sample-rate"))) != 0) {
                                sr = atoi (prop->value());
                        }
                }
@@ -398,25 +398,25 @@ Session::Session (AudioEngine &eng,
        _engine.reset_timebase ();
 
 #ifdef USE_TRACKS_CODE_FEATURES
-       
+
        EngineStateController::instance()->set_session(this);
-       
+
        if (_is_new ) {
                if ( ARDOUR::Profile->get_trx () ) {
 
                        /* Waves Tracks: fill session with tracks basing on the amount of inputs.
                         * each available input must have corresponding track when session starts.
                         */
-                       
+
                        uint32_t how_many (0);
-                       
+
                        std::vector<std::string> inputs;
                        EngineStateController::instance()->get_physical_audio_inputs(inputs);
-                       
+
                        how_many = inputs.size();
-                       
+
                        list<boost::shared_ptr<AudioTrack> > tracks;
-                       
+
                        // Track names after driver
                        if (Config->get_tracks_auto_naming() == NameAfterDriver) {
                                string track_name = "";
@@ -424,14 +424,14 @@ Session::Session (AudioEngine &eng,
                                        string track_name;
                                        track_name = inputs[i];
                                        replace_all (track_name, "system:capture", "");
-                                       
+
                                        list<boost::shared_ptr<AudioTrack> > single_track = new_audio_track (1, 1, Normal, 0, 1, track_name);
                                        tracks.insert(tracks.begin(), single_track.front());
                                }
                        } else { // Default track names
                                tracks = new_audio_track (1, 1, Normal, 0, how_many, string());
                        }
-                       
+
                        if (tracks.size() != how_many) {
                                destroy ();
                                throw failed_constructor ();
@@ -439,7 +439,7 @@ Session::Session (AudioEngine &eng,
                }
        }
 #endif
-       
+
        _is_new = false;
        session_loaded ();
 
@@ -448,9 +448,9 @@ Session::Session (AudioEngine &eng,
 
 Session::~Session ()
 {
-#ifdef PT_TIMING       
+#ifdef PT_TIMING
        ST.dump ("ST.dump");
-#endif 
+#endif
        destroy ();
 }
 
@@ -493,7 +493,7 @@ Session::immediately_post_engine ()
         * know that the engine is running, but before we either create a
         * session or set state for an existing one.
         */
-       
+
        if (how_many_dsp_threads () > 1) {
                /* For now, only create the graph if we are using >1 DSP threads, as
                   it is a bit slower than the old code with 1 thread.
@@ -553,9 +553,9 @@ Session::destroy ()
        /* shutdown control surface protocols while we still have ports
           and the engine to move data to any devices.
        */
-       
+
        ControlProtocolManager::instance().drop_protocols ();
-       
+
        _engine.remove_session ();
 
 #ifdef USE_TRACKS_CODE_FEATURES
@@ -586,7 +586,7 @@ Session::destroy ()
        _butler->drop_references ();
        delete _butler;
        _butler = 0;
-       
+
        delete _all_route_group;
 
        DEBUG_TRACE (DEBUG::Destruction, "delete route groups\n");
@@ -675,7 +675,7 @@ Session::destroy ()
        delete _locations; _locations = 0;
 
        delete _tempo_map;
-       
+
        DEBUG_TRACE (DEBUG::Destruction, "Session::destroy() done\n");
 
 #ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
@@ -687,10 +687,10 @@ void
 Session::setup_ltc ()
 {
        XMLNode* child = 0;
-       
+
        _ltc_input.reset (new IO (*this, X_("LTC In"), IO::Input));
        _ltc_output.reset (new IO (*this, X_("LTC Out"), IO::Output));
-       
+
        if (state_tree && (child = find_named_node (*state_tree->root(), X_("LTC In"))) != 0) {
                _ltc_input->set_state (*(child->children().front()), Stateful::loading_state_version);
        } else {
@@ -700,7 +700,7 @@ Session::setup_ltc ()
                }
                reconnect_ltc_input ();
        }
-       
+
        if (state_tree && (child = find_named_node (*state_tree->root(), X_("LTC Out"))) != 0) {
                _ltc_output->set_state (*(child->children().front()), Stateful::loading_state_version);
        } else {
@@ -710,11 +710,11 @@ Session::setup_ltc ()
                }
                reconnect_ltc_output ();
        }
-       
+
        /* fix up names of LTC ports because we don't want the normal
         * IO style of NAME/TYPE-{in,out}N
         */
-       
+
        _ltc_input->nth (0)->set_name (X_("LTC-in"));
        _ltc_output->nth (0)->set_name (X_("LTC-out"));
 }
@@ -735,11 +735,11 @@ Session::setup_click ()
 
 void
 Session::setup_click_state (const XMLNode* node)
-{      
+{
        const XMLNode* child = 0;
-       
+
        if (node && (child = find_named_node (*node, "Click")) != 0) {
-               
+
                /* existing state for Click */
                int c = 0;
 
@@ -755,7 +755,7 @@ Session::setup_click_state (const XMLNode* node)
                                }
                        }
                }
-                       
+
                if (c == 0) {
                        _clicking = Config->get_clicking ();
 
@@ -929,7 +929,7 @@ Session::auto_connect_master_bus ()
        if (!_master_out || !Config->get_auto_connect_standard_busses() || _monitor_out) {
                return;
        }
-       
+
        // Waves Tracks: Do not connect master bas for Tracks if AutoConnectMaster option is not set
        // In this case it means "Multi Out" output mode
        if (ARDOUR::Profile->get_trx() && !(Config->get_output_auto_connect() & AutoConnectMaster) ) {
@@ -938,21 +938,21 @@ Session::auto_connect_master_bus ()
 
        /* if requested auto-connect the outputs to the first N physical ports.
         */
-       
+
        uint32_t limit = _master_out->n_outputs().n_total();
        vector<string> outputs[DataType::num_types];
-       
+
        for (uint32_t i = 0; i < DataType::num_types; ++i) {
                _engine.get_physical_outputs (DataType (DataType::Symbol (i)), outputs[i]);
        }
-       
+
        for (uint32_t n = 0; n < limit; ++n) {
                boost::shared_ptr<Port> p = _master_out->output()->nth (n);
                string connect_to;
                if (outputs[p->type()].size() > n) {
                        connect_to = outputs[p->type()][n];
                }
-               
+
                if (!connect_to.empty() && p->connected_to (connect_to) == false) {
                        if (_master_out->output()->connect (p, connect_to, this)) {
                                error << string_compose (_("cannot connect master output %1 to %2"), n, connect_to)
@@ -983,20 +983,20 @@ Session::remove_monitor_section ()
                /* Hold process lock while doing this so that we don't hear bits and
                 * pieces of audio as we work on each route.
                 */
-               
+
                Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-               
+
                /* Connect tracks to monitor section. Note that in an
                   existing session, the internal sends will already exist, but we want the
                   routes to notice that they connect to the control out specifically.
                */
-               
-               
+
+
                boost::shared_ptr<RouteList> r = routes.reader ();
                PBD::Unwinder<bool> uw (ignore_route_processor_changes, true);
-               
+
                for (RouteList::iterator x = r->begin(); x != r->end(); ++x) {
-                       
+
                        if ((*x)->is_monitor()) {
                                /* relax */
                        } else if ((*x)->is_master()) {
@@ -1044,17 +1044,17 @@ Session::add_monitor_section ()
 
        rl.push_back (r);
        add_routes (rl, false, false, false);
-       
+
        assert (_monitor_out);
 
        /* AUDIO ONLY as of june 29th 2009, because listen semantics for anything else
           are undefined, at best.
        */
-       
+
        uint32_t limit = _monitor_out->n_inputs().n_audio();
-       
+
        if (_master_out) {
-               
+
                /* connect the inputs to the master bus outputs. this
                 * represents a separate data feed from the internal sends from
                 * each route. as of jan 2011, it allows the monitor section to
@@ -1068,7 +1068,7 @@ Session::add_monitor_section ()
                for (uint32_t n = 0; n < limit; ++n) {
                        boost::shared_ptr<AudioPort> p = _monitor_out->input()->ports().nth_audio_port (n);
                        boost::shared_ptr<AudioPort> o = _master_out->output()->ports().nth_audio_port (n);
-                       
+
                        if (o) {
                                string connect_to = o->name();
                                if (_monitor_out->input()->connect (p, connect_to, this)) {
@@ -1079,16 +1079,16 @@ Session::add_monitor_section ()
                        }
                }
        }
-       
+
        /* if monitor section is not connected, connect it to physical outs
         */
-       
+
        if (Config->get_auto_connect_standard_busses() && !_monitor_out->output()->connected ()) {
-               
+
                if (!Config->get_monitor_bus_preferred_bundle().empty()) {
-                       
+
                        boost::shared_ptr<Bundle> b = bundle_by_name (Config->get_monitor_bus_preferred_bundle());
-                       
+
                        if (b) {
                                _monitor_out->output()->connect_ports_to_bundle (b, true, this);
                        } else {
@@ -1096,9 +1096,9 @@ Session::add_monitor_section ()
                                                           Config->get_monitor_bus_preferred_bundle())
                                        << endmsg;
                        }
-                       
+
                } else {
-                       
+
                        /* Monitor bus is audio only */
 
                        vector<string> outputs[DataType::num_types];
@@ -1109,17 +1109,17 @@ Session::add_monitor_section ()
 
                        uint32_t mod = outputs[DataType::AUDIO].size();
                        uint32_t limit = _monitor_out->n_outputs().get (DataType::AUDIO);
-                       
+
                        if (mod != 0) {
-                               
+
                                for (uint32_t n = 0; n < limit; ++n) {
-                                       
+
                                        boost::shared_ptr<Port> p = _monitor_out->output()->ports().port(DataType::AUDIO, n);
                                        string connect_to;
                                        if (outputs[DataType::AUDIO].size() > (n % mod)) {
                                                connect_to = outputs[DataType::AUDIO][n % mod];
                                        }
-                                       
+
                                        if (!connect_to.empty()) {
                                                if (_monitor_out->output()->connect (p, connect_to, this)) {
                                                        error << string_compose (
@@ -1137,7 +1137,7 @@ Session::add_monitor_section ()
        /* Hold process lock while doing this so that we don't hear bits and
         * pieces of audio as we work on each route.
         */
-       
+
        Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
 
        /* Connect tracks to monitor section. Note that in an
@@ -1151,7 +1151,7 @@ Session::add_monitor_section ()
        PBD::Unwinder<bool> uw (ignore_route_processor_changes, true);
 
        for (RouteList::iterator x = rls->begin(); x != rls->end(); ++x) {
-               
+
                if ((*x)->is_monitor()) {
                        /* relax */
                } else if ((*x)->is_master()) {
@@ -1482,7 +1482,7 @@ Session::auto_loop_changed (Location* location)
                }
        }
 
-       
+
        last_loopend = location->end();
        set_dirty ();
 }
@@ -1532,14 +1532,14 @@ Session::set_session_extents (framepos_t start, framepos_t end)
                //if there is no existing session, we need to make a new session location  (should never happen)
                existing = new Location (*this, 0, 0, _("session"), Location::IsSessionRange);
        }
-       
+
        if (end <= start) {
                error << _("Session: you can't use that location for session start/end)") << endmsg;
                return;
        }
 
        existing->set( start, end );
-       
+
        set_dirty();
 }
 
@@ -1613,7 +1613,7 @@ Session::update_skips (Location* loc, bool consolidate)
        if (_ignore_skips_updates) {
                return;
        }
-       
+
        Locations::LocationList skips;
 
         if (consolidate) {
@@ -1683,9 +1683,9 @@ Session::_sync_locations_to_skips ()
        Locations::LocationList const & locs (_locations->list());
 
        for (Locations::LocationList::const_iterator i = locs.begin(); i != locs.end(); ++i) {
-               
+
                Location* location = *i;
-               
+
                if (location->is_skip() && location->is_skipping()) {
                        SessionEvent* ev = new SessionEvent (SessionEvent::Skip, SessionEvent::Add, location->start(), location->end(), 1.0);
                        queue_event (ev);
@@ -1774,14 +1774,14 @@ Session::_locations_changed (const Locations::LocationList& locations)
            We might be re-adding a location here but it doesn't actually matter
            for all the locations that the Session takes an interest in.
         */
-       
+
        {
                PBD::Unwinder<bool> protect_ignore_skip_updates (_ignore_skips_updates, true);
                for (Locations::LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) {
                        location_added (*i);
                }
        }
-       
+
        update_skips (NULL, false);
 }
 
@@ -1799,7 +1799,7 @@ Session::enable_record ()
                if (rs == Recording) {
                        break;
                }
-               
+
                if (g_atomic_int_compare_and_exchange (&_record_status, rs, Recording)) {
 
                        _last_record_location = _transport_frame;
@@ -1961,7 +1961,7 @@ Session::set_frame_rate (framecnt_t frames_per_second)
 
        clear_clicks ();
        reset_write_sources (false);
-       
+
        // XXX we need some equivalent to this, somehow
        // SndFileSource::setup_standard_crossfades (frames_per_second);
 
@@ -1978,7 +1978,7 @@ Session::set_block_size (pframes_t nframes)
           ::process(). It is therefore fine to do things that block
           here.
        */
-       
+
        {
                current_block_size = nframes;
 
@@ -2101,7 +2101,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
        /* We are going to build a directed graph of our routes;
           this is where the edges of that graph are put.
        */
-       
+
        GraphEdges edges;
 
        /* Go through all routes doing two things:
@@ -2114,7 +2114,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
         *    routes directly or indirectly feed them.  This information
         *    is used by the solo code.
         */
-       
+
        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
 
                /* Clear out the route's list of direct or indirect feeds */
@@ -2138,7 +2138,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
 
        /* Attempt a topological sort of the route graph */
        boost::shared_ptr<RouteList> sorted_routes = topological_sort (r, edges);
-       
+
        if (sorted_routes) {
                /* We got a satisfactory topological sort, so there is no feedback;
                   use this new graph.
@@ -2149,7 +2149,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
                if (_process_graph) {
                        _process_graph->rechain (sorted_routes, edges);
                }
-               
+
                _current_route_graph = edges;
 
                /* Complete the building of the routes' lists of what directly
@@ -2180,7 +2180,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
                   so the solo code will think that everything is still connected
                   as it was before.
                */
-               
+
                FeedbackDetected (); /* EMIT SIGNAL */
        }
 
@@ -2205,7 +2205,7 @@ Session::find_route_name (string const & base, uint32_t& id, string& name, bool
           routes, but hidden objects like the click track. So check port names
           before anything else.
        */
-       
+
        for (vector<string>::const_iterator reserved = reserved_io_names.begin(); reserved != reserved_io_names.end(); ++reserved) {
                if (base == *reserved) {
                        definitely_add_number = true;
@@ -2215,7 +2215,7 @@ Session::find_route_name (string const & base, uint32_t& id, string& name, bool
                        break;
                }
        }
-       
+
        if (!definitely_add_number && route_by_name (base) == 0) {
                /* juse use the base */
                name = base;
@@ -2230,7 +2230,7 @@ Session::find_route_name (string const & base, uint32_t& id, string& name, bool
                }
 
                ++id;
-               
+
        } while (id < (UINT_MAX-1));
 
        return false;
@@ -2313,7 +2313,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, boost:
                        {
                                Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
                                if (track->input()->ensure_io (input, false, this)) {
-                                       error << "cannot configure " << input << " out configuration for new midi track" << endmsg;     
+                                       error << "cannot configure " << input << " out configuration for new midi track" << endmsg;
                                        goto failed;
                                }
 
@@ -2369,7 +2369,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, boost:
                                PluginPtr plugin = instrument->load (*this);
                                boost::shared_ptr<Processor> p (new PluginInsert (*this, plugin));
                                (*r)->add_processor (p, PreFader);
-                               
+
                        }
                }
        }
@@ -2751,24 +2751,24 @@ Session::reconnect_mtc_ports ()
        }
 
        mtc_in_ptr->disconnect_all ();
-       
+
        std::vector<EngineStateController::MidiPortState> midi_port_states;
        EngineStateController::instance()->get_physical_midi_input_states (midi_port_states);
-       
+
        std::vector<EngineStateController::MidiPortState>::iterator state_iter = midi_port_states.begin();
-       
+
        for (; state_iter != midi_port_states.end(); ++state_iter) {
                if (state_iter->available && state_iter->mtc_in) {
                        mtc_in_ptr->connect (state_iter->name);
                }
        }
-       
+
        if (!_midi_ports->mtc_input_port ()->connected () &&
            config.get_external_sync () &&
            (Config->get_sync_source () == MTC) ) {
                config.set_external_sync (false);
        }
-       
+
        if ( ARDOUR::Profile->get_trx () ) {
                // Tracks need this signal to update timecode_source_dropdown
                MtcOrLtcInputPortChanged (); //emit signal
@@ -2827,7 +2827,7 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod
 
        const string name_pattern = default_track_name_pattern (DataType::AUDIO);
        bool const use_number = (how_many != 1) || name_template.empty () || (name_template == name_pattern);
-       
+
        while (how_many) {
 
                if (!find_route_name (name_template.empty() ? _(name_pattern.c_str()) : name_template, ++track_id, track_name, use_number)) {
@@ -2939,7 +2939,7 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
        RouteList ret;
 
        bool const use_number = (how_many != 1) || name_template.empty () || name_template == _("Bus");
-       
+
        while (how_many) {
                if (!find_route_name (name_template.empty () ? _("Bus") : name_template, ++bus_id, bus_name, use_number)) {
                        error << "cannot find name for new audio bus" << endmsg;
@@ -2985,7 +2985,7 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
                        bus->add_internal_return ();
 
                        ret.push_back (bus);
-                       
+
                        RouteAddedOrRemoved (true); /* EMIT SIGNAL */
 
                        ARDOUR::GUIIdle ();
@@ -3064,7 +3064,7 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
                        } else {
 
                                string const route_name  = node_copy.property(X_("name"))->value ();
-                       
+
                                /* generate a new name by adding a number to the end of the template name */
                                if (!find_route_name (route_name.c_str(), ++number, name, true)) {
                                        fatal << _("Session: UINT_MAX routes? impossible!") << endmsg;
@@ -3085,7 +3085,7 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
                                        }
                                }
                        }
-                       
+
                        boost::shared_ptr<Route> route (XMLRouteFactory (node_copy, 3000));
 
                        if (route == 0) {
@@ -3158,13 +3158,13 @@ Session::add_routes (RouteList& new_routes, bool input_auto_connect, bool output
 
        update_latency (true);
        update_latency (false);
-               
+
        set_dirty();
-       
+
        if (save) {
                save_state (_current_snapshot_name);
        }
-       
+
        reassign_track_numbers();
 
        update_route_record_state ();
@@ -3260,8 +3260,8 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
        }
 
        if (_monitor_out && IO::connecting_legal) {
-               Glib::Threads::Mutex::Lock lm (_engine.process_lock());         
-               
+               Glib::Threads::Mutex::Lock lm (_engine.process_lock());
+
                for (RouteList::iterator x = new_routes.begin(); x != new_routes.end(); ++x) {
                        if ((*x)->is_monitor()) {
                                /* relax */
@@ -3579,7 +3579,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
        bool leave_group_alone = (rg && rg->is_active() && rg->is_solo());
 
        if (delta == 1 && Config->get_exclusive_solo()) {
-               
+
                /* new solo: disable all other solos, but not the group if its solo-enabled */
 
                for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
@@ -3609,7 +3609,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
                in_signal_flow = false;
 
                DEBUG_TRACE (DEBUG::Solo, string_compose ("check feed from %1\n", (*i)->name()));
-               
+
                if ((*i)->feeds (route, &via_sends_only)) {
                        DEBUG_TRACE (DEBUG::Solo, string_compose ("\tthere is a feed from %1\n", (*i)->name()));
                        if (!via_sends_only) {
@@ -3623,7 +3623,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
                } else {
                        DEBUG_TRACE (DEBUG::Solo, string_compose ("\tno feed from %1\n", (*i)->name()));
                }
-               
+
                DEBUG_TRACE (DEBUG::Solo, string_compose ("check feed to %1\n", (*i)->name()));
 
                if (route->feeds (*i, &via_sends_only)) {
@@ -3747,7 +3747,7 @@ Session::io_name_is_legal (const std::string& name)
                        return false;
                }
        }
-       
+
        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                if ((*i)->name() == name) {
                        return false;
@@ -3782,19 +3782,19 @@ Session::set_exclusive_input_active (boost::shared_ptr<RouteList> rl, bool onoff
        for (RouteList::iterator rt = rl->begin(); rt != rl->end(); ++rt) {
 
                PortSet& ps ((*rt)->input()->ports());
-               
+
                for (PortSet::iterator p = ps.begin(); p != ps.end(); ++p) {
                        p->get_connections (connections);
                }
-               
+
                for (vector<string>::iterator s = connections.begin(); s != connections.end(); ++s) {
                        routes_using_input_from (*s, rl2);
                }
-               
+
                /* scan all relevant routes to see if others are on or off */
-               
+
                bool others_are_already_on = false;
-               
+
                for (RouteList::iterator r = rl2.begin(); r != rl2.end(); ++r) {
 
                        boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (*r);
@@ -3812,11 +3812,11 @@ Session::set_exclusive_input_active (boost::shared_ptr<RouteList> rl, bool onoff
                                mt->set_input_active (onoff);
                        }
                }
-               
+
                if (flip_others) {
 
                        /* globally reverse other routes */
-                       
+
                        for (RouteList::iterator r = rl2.begin(); r != rl2.end(); ++r) {
                                if ((*r) != (*rt)) {
                                        boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (*r);
@@ -4136,13 +4136,13 @@ Session::add_source (boost::shared_ptr<Source> source)
                /* yay, new source */
 
                boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (source);
-               
+
                if (fs) {
                        if (!fs->within_session()) {
                                ensure_search_path_includes (Glib::path_get_dirname (fs->path()), fs->type());
                        }
                }
-               
+
                set_dirty();
 
                boost::shared_ptr<AudioFileSource> afs;
@@ -4238,7 +4238,7 @@ Session::midi_source_by_path (const std::string& path) const
                        = boost::dynamic_pointer_cast<MidiSource>(s->second);
                boost::shared_ptr<FileSource> fs
                        = boost::dynamic_pointer_cast<FileSource>(s->second);
-               
+
                if (ms && fs && fs->path() == path) {
                        return ms;
                }
@@ -4286,9 +4286,9 @@ Session::construct_peak_filepath (const string& filepath, const bool in_session,
 
                string session_path;
                bool in_another_session = true;
-               
+
                if (filepath.find (interchange_dir_string) != string::npos) {
-               
+
                        session_path = Glib::path_get_dirname (filepath); /* now ends in audiofiles */
                        session_path = Glib::path_get_dirname (session_path); /* now ends in session name */
                        session_path = Glib::path_get_dirname (session_path); /* now ends in interchange */
@@ -4305,7 +4305,7 @@ Session::construct_peak_filepath (const string& filepath, const bool in_session,
                } else {
                        in_another_session = false;
                }
-               
+
 
                if (in_another_session) {
                        SessionDirectory sd (session_path);
@@ -4326,7 +4326,7 @@ Session::construct_peak_filepath (const string& filepath, const bool in_session,
        if (!in_session) {
                path = Glib::path_get_dirname (filepath);
        }
-       
+
        return peak_file_helper (_session_dir->peak_path(), path, Glib::path_get_basename (filepath), !old_peak_name);
 }
 
@@ -4360,7 +4360,7 @@ Session::new_audio_source_path_for_embedded (const std::string& path)
        SessionDirectory sdir (get_best_session_directory_for_new_audio());
        string base = Glib::path_get_basename (path);
        string newpath = Glib::build_filename (sdir.sound_path(), base);
-       
+
        if (Glib::file_test (newpath, Glib::FILE_TEST_EXISTS)) {
 
                MD5 md5;
@@ -4368,14 +4368,14 @@ Session::new_audio_source_path_for_embedded (const std::string& path)
                md5.digestString (path.c_str());
                md5.writeToString ();
                base = md5.digestChars;
-               
+
                string ext = get_suffix (path);
 
                if (!ext.empty()) {
                        base += '.';
                        base += ext;
                }
-               
+
                newpath = Glib::build_filename (sdir.sound_path(), base);
 
                /* if this collides, we're screwed */
@@ -4409,7 +4409,7 @@ Session::audio_source_name_is_unique (const string& name)
        uint32_t existing = 0;
 
        for (vector<string>::const_iterator i = sdirs.begin(); i != sdirs.end(); ++i) {
-               
+
                /* note that we search *without* the extension so that
                   we don't end up both "Audio 1-1.wav" and "Audio 1-1.caf"
                   in the event that this new name is required for
@@ -4417,12 +4417,12 @@ Session::audio_source_name_is_unique (const string& name)
                */
 
                const string spath = *i;
-               
+
                if (matching_unsuffixed_filename_exists_in (spath, name)) {
                        existing++;
                        break;
                }
-               
+
                /* it is possible that we have the path already
                 * assigned to a source that has not yet been written
                 * (ie. the write source for a diskstream). we have to
@@ -4431,8 +4431,8 @@ Session::audio_source_name_is_unique (const string& name)
                 * two Sources point to the same file with different
                 * notions of their removability.
                 */
-               
-               
+
+
                string possible_path = Glib::build_filename (spath, name);
 
                if (audio_source_by_path_and_channel (possible_path, 0)) {
@@ -4449,20 +4449,20 @@ Session::format_audio_source_name (const string& legalized_base, uint32_t nchan,
 {
        ostringstream sstr;
        const string ext = native_header_format_extension (config.get_native_file_header_format(), DataType::AUDIO);
-       
+
        if (Profile->get_trx() && destructive) {
                sstr << 'T';
                sstr << setfill ('0') << setw (4) << cnt;
                sstr << legalized_base;
        } else {
                sstr << legalized_base;
-               
+
                if (take_required || related_exists) {
                        sstr << '-';
                        sstr << cnt;
                }
        }
-       
+
        if (nchan == 2) {
                if (chan == 0) {
                        sstr << "%L";
@@ -4479,7 +4479,7 @@ Session::format_audio_source_name (const string& legalized_base, uint32_t nchan,
                        sstr << chan+1;
                }
        }
-       
+
        sstr << ext;
 
        return sstr.str();
@@ -4502,11 +4502,11 @@ Session::new_audio_source_path (const string& base, uint32_t nchan, uint32_t cha
        for (cnt = (destructive ? ++destructive_index : 1); cnt <= limit; ++cnt) {
 
                possible_name = format_audio_source_name (legalized, nchan, chan, destructive, take_required, cnt, some_related_source_name_exists);
-               
+
                if (audio_source_name_is_unique (possible_name)) {
                        break;
                }
-               
+
                some_related_source_name_exists = true;
 
                if (cnt > limit) {
@@ -4561,14 +4561,14 @@ Session::new_midi_source_path (const string& base)
 
                vector<space_and_path>::iterator i;
                uint32_t existing = 0;
-               
+
                for (vector<string>::const_iterator i = sdirs.begin(); i != sdirs.end(); ++i) {
 
                        snprintf (buf, sizeof(buf), "%s-%u.mid", legalized.c_str(), cnt);
                        possible_name = buf;
 
                        possible_path = Glib::build_filename (*i, possible_name);
-                       
+
                        if (Glib::file_test (possible_path, Glib::FILE_TEST_EXISTS)) {
                                existing++;
                        }
@@ -4618,7 +4618,7 @@ boost::shared_ptr<MidiSource>
 Session::create_midi_source_for_session (string const & basic_name)
 {
        const string path = new_midi_source_path (basic_name);
-       
+
        if (!path.empty()) {
                return boost::dynamic_pointer_cast<SMFSource> (
                        SourceFactory::createWritable (
@@ -4634,23 +4634,23 @@ Session::create_midi_source_by_stealing_name (boost::shared_ptr<Track> track)
 {
        /* the caller passes in the track the source will be used in,
           so that we can keep the numbering sane.
-       
+
           Rationale: a track with the name "Foo" that has had N
           captures carried out so far will ALREADY have a write source
           named "Foo-N+1.mid" waiting to be used for the next capture.
-       
+
           If we call new_midi_source_name() we will get "Foo-N+2". But
           there is no region corresponding to "Foo-N+1", so when
           "Foo-N+2" appears in the track, the gap presents the user
           with odd behaviour - why did it skip past Foo-N+1?
-       
+
           We could explain this to the user in some odd way, but
           instead we rename "Foo-N+1.mid" as "Foo-N+2.mid", and then
           use "Foo-N+1" here.
-       
+
           If that attempted rename fails, we get "Foo-N+2.mid" anyway.
        */
-       
+
        boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (track);
        assert (mt);
        std::string name = track->steal_write_source_name ();
@@ -4816,7 +4816,7 @@ Session::available_capture_duration ()
        if (_total_free_4k_blocks_uncertain) {
                return boost::optional<framecnt_t> ();
        }
-       
+
        float sample_bytes_on_disk = 4.0; // keep gcc happy
 
        switch (config.get_native_file_data_format()) {
@@ -5228,7 +5228,7 @@ Session::write_one_track (Track& track, framepos_t start, framepos_t end,
                string path = ((track.data_type() == DataType::AUDIO)
                               ? new_audio_source_path (legal_playlist_name, diskstream_channels.n_audio(), chan_n, false, true)
                               : new_midi_source_path (legal_playlist_name));
-               
+
                if (path.empty()) {
                        goto out;
                }
@@ -5535,7 +5535,7 @@ Session::update_route_record_state ()
        if (record_status() == Recording && record_arm_state_changed ) {
                RecordArmStateChanged ();
        }
-       
+
 }
 
 void
@@ -6049,7 +6049,7 @@ Session::update_latency_compensation (bool force_whole_graph)
                                                     (some_track_latency_changed ? "yes" : "no")));
 
        DEBUG_TRACE(DEBUG::Latency, "---------------------------- DONE update latency compensation\n\n");
-       
+
        if (some_track_latency_changed || force_whole_graph)  {
                _engine.update_latencies ();
        }
@@ -6122,7 +6122,7 @@ Session::notify_remote_id_change ()
                 */
                reconnect_existing_routes(true, true);
 #endif
-               
+
 }
 
 void
@@ -6233,5 +6233,5 @@ Session::clear_object_selection ()
        _object_selection = Evoral::Range<framepos_t> (-1,-1);
 #ifdef USE_TRACKS_CODE_FEATURES
        follow_playhead_priority ();
-#endif 
+#endif
 }
index e6e8749aec8c4c34367ec17f8555576e54d27b34..62e13e8fc230fabd251ce8633d2a255fe423ac0d 100644 (file)
@@ -119,9 +119,9 @@ Session::click (framepos_t start, framecnt_t nframes)
                }
 
                copy = min (clk->duration - clk->offset, nframes - internal_offset);
-               
+
                memcpy (buf + internal_offset, &clk->data[clk->offset], copy * sizeof (Sample));
-               
+
                clk->offset += copy;
 
                if (clk->offset >= clk->duration) {
index baea980a658a4556cfb66d05815ea4b4d53e44df..9d11cb0b9194859c9bebbb3fffc954f120339cb6 100644 (file)
@@ -79,7 +79,7 @@ SessionEvent::operator new (size_t)
        SessionEvent* ev = static_cast<SessionEvent*> (p->alloc ());
        DEBUG_TRACE (DEBUG::SessionEvents, string_compose ("%1 Allocating SessionEvent from %2 ev @ %3 pool size %4 free %5 used %6\n", pthread_name(), p->name(), ev,
                                                           p->total(), p->available(), p->used()));
-       
+
        ev->own_pool = p;
        return ev;
 }
index ecfcb98b5c468c7301336028385a701776d74dd9..ea4a07dd1f66cd883a0aa4a4ba1f87d9d1cc92eb 100644 (file)
@@ -89,7 +89,7 @@ Session::pre_export ()
        _exporting = true;
        export_status->running = true;
        export_status->Finished.connect_same_thread (*this, boost::bind (&Session::finalize_audio_export, this));
-       
+
        /* disable MMC output early */
 
        _pre_export_mmc_enabled = _mmc->send_enabled ();
@@ -111,7 +111,7 @@ Session::start_audio_export (framepos_t position)
           up otherwise it could be doing do_refill in its thread while we are doing
           it here.
        */
-       
+
        _butler->wait_until_finished ();
 
        /* get everyone to the right position */
@@ -198,7 +198,7 @@ Session::process_export_fw (pframes_t nframes)
                post_transport ();
                return 0;
        }
-       
+
         _engine.main_thread()->get_buffers ();
        process_export (nframes);
         _engine.main_thread()->drop_buffers ();
@@ -235,7 +235,7 @@ Session::finalize_audio_export ()
        _engine.freewheel (false);
 
        export_freewheel_connection.disconnect();
-       
+
        _mmc->enable_send (_pre_export_mmc_enabled);
 
        /* maybe write CUE/TOC */
index 017f8b95e589dab5527b6a8afba057c7c47636dc..0620f1200586ea0b92714489429486e34582e33f 100644 (file)
@@ -86,7 +86,7 @@ SessionMetadata::SessionMetadata ()
        //map.insert (Property ("album_artist_sort", ""));
        //map.insert (Property ("artist_sort", ""));
        //map.insert (Property ("title_sort", ""));
-       
+
        /*** Globals ***/
        user_map.insert (Property ("user_name", ""));
        user_map.insert (Property ("user_email", ""));
index df2152192cfdc174ad2893aae4e3172f2e9f9165..f1faf5e8e14f51c79eccb48b33277f014fca6de8 100644 (file)
@@ -136,7 +136,7 @@ Session::mmc_record_strobe (MIDI::MachineControl &/*mmc*/)
                   treat RecordStrobe like RecordPause. This violates the MMC
                   specification.
                */
-               
+
                if (Config->get_mmc_control()) {
                        maybe_enable_record();
                }
@@ -438,7 +438,7 @@ Session::send_full_time_code (framepos_t const t, MIDI::pframes_t nframes)
        msg[8] = timecode.frames;
 
        // Send message at offset 0, sent time is for the start of this cycle
-       
+
        MidiBuffer& mb (_midi_ports->mtc_output_port()->get_midi_buffer (nframes));
        mb.push_back (Port::port_offset(), sizeof (msg), msg);
 
@@ -576,7 +576,7 @@ Session::send_immediate_mmc (MachineControlCommand c)
        } else {
                _mmc->send (c, 0);
        }
-               
+
 }
 
 bool
index b586ab196ebd318d65f09d9951fe86fa815664ac..8fdafad09dfd95d9e56fda7828cdb830b3bfe9ee 100644 (file)
@@ -465,7 +465,7 @@ SessionPlaylists::playlists_for_track (boost::shared_ptr<Track> tr) const
 {
        vector<boost::shared_ptr<Playlist> > pl;
        get (pl);
-       
+
        vector<boost::shared_ptr<Playlist> > pl_tr;
 
        for (vector<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
index f372b8694bf8ee7aa3bd61a3b472ceddef719611..6f4ae531bb825c9757a35f82adcc8430d73f1e76 100644 (file)
@@ -130,7 +130,7 @@ int
 Session::no_roll (pframes_t nframes)
 {
        PT_TIMING_CHECK (4);
-       
+
        framepos_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ??
        int ret = 0;
        int declick = (config.get_use_transport_fades() ? get_transport_declick_required() : false);
@@ -179,7 +179,7 @@ Session::process_routes (pframes_t nframes, bool& need_butler)
 
        const framepos_t start_frame = _transport_frame;
        const framepos_t end_frame = _transport_frame + floor (nframes * _transport_speed);
-       
+
        if (_process_graph) {
                DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/process-routes\n");
                if (_process_graph->process_routes (nframes, start_frame, end_frame, declick, need_butler) < 0) {
@@ -284,7 +284,7 @@ void
 Session::process_with_events (pframes_t nframes)
 {
        PT_TIMING_CHECK (3);
-       
+
        SessionEvent*  ev;
        pframes_t      this_nframes;
        framepos_t     end_frame;
@@ -1221,7 +1221,7 @@ Session::compute_stop_limit () const
                return max_framepos;
        }
 
-       
+
        bool const punching_in = (config.get_punch_in () && _locations->auto_punch_location());
        bool const punching_out = (config.get_punch_out () && _locations->auto_punch_location());
 
index db334932f13216dde01590bd7013df454c880956..745212abb4151dee946ed9f1a8f5f2ea69879c09 100644 (file)
@@ -248,14 +248,14 @@ Session::rt_set_record_safe (boost::shared_ptr<RouteList> rl, bool yn, bool grou
                if ((*i)->is_auditioner ()) { // REQUIRES REVIEW Can audiotioner be in Record Safe mode?
                        continue;
                }
-       
+
                boost::shared_ptr<Track> t;
-       
+
                if ((t = boost::dynamic_pointer_cast<Track>(*i)) != 0) {
                        t->set_record_safe (yn, (group_override ? (void*) t->route_group () : (void *) this));
                }
        }
-       
+
        set_dirty ();
 }
 
index 0c5e3cbff512a4ca03c5a692939ade6744c37ba9..e2d64dd2edd877e4983f9cfb55bfdda1b2c6ab78 100644 (file)
@@ -257,11 +257,11 @@ Session::realtime_stop (bool abort, bool clear_state)
        for (RouteList::iterator i = r->begin (); i != r->end(); ++i) {
                (*i)->realtime_handle_transport_stopped ();
        }
-       
+
        DEBUG_TRACE (DEBUG::Transport, string_compose ("stop complete, auto-return scheduled for return to %1\n", _requested_return_frame));
 
        /* the duration change is not guaranteed to have happened, but is likely */
-       
+
        todo = PostTransportWork (todo | PostTransportDuration);
 
        if (abort) {
@@ -286,7 +286,7 @@ Session::realtime_stop (bool abort, bool clear_state)
        if (clear_state && !Config->get_loop_is_mode()) {
                unset_play_loop ();
        }
-       
+
        reset_slave_state ();
 
        _transport_speed = 0;
@@ -321,7 +321,7 @@ Session::butler_transport_work ()
        PostTransportWork ptw;
        boost::shared_ptr<RouteList> r = routes.reader ();
        uint64_t before;
-       
+
        int on_entry = g_atomic_int_get (&_butler->should_do_transport_work);
        finished = true;
        ptw = post_transport_work();
@@ -334,7 +334,7 @@ Session::butler_transport_work ()
                if (get_play_loop() && !Config->get_seamless_loop()) {
 
                        DEBUG_TRACE (DEBUG::Butler, "flush loop recording fragment to disk\n");
-                       
+
                        /* this locate might be happening while we are
                         * loop recording.
                         *
@@ -517,13 +517,13 @@ Session::non_realtime_locate ()
                } else if (loc) {
                        set_track_loop (false);
                }
-               
+
        } else {
 
                /* no more looping .. should have been noticed elsewhere */
        }
 
-       
+
        boost::shared_ptr<RouteList> rl = routes.reader();
        for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
                (*i)->non_realtime_locate (_transport_frame);
@@ -555,7 +555,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
                // Next stop will put us where we need to be.
                return false;
        }
-       
+
        /* Note that the order of checking each AutoReturnTarget flag defines
           the priority each flag.
 
@@ -569,7 +569,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
                           Region Selection
                           Last Locate
        */
-       
+
        if (autoreturn & RangeSelectionStart) {
                if (!_range_selection.empty()) {
                        jump_to = _range_selection.from;
@@ -583,13 +583,13 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
                        }
                }
        }
-       
+
        if (jump_to < 0 && (autoreturn & Loop) && get_play_loop()) {
                /* don't try to handle loop play when synced to JACK */
-               
+
                if (!synced_to_engine()) {
                        Location *location = _locations->auto_loop_location();
-                       
+
                        if (location) {
                                jump_to = location->start();
 
@@ -600,7 +600,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
                        }
                }
        }
-       
+
        if (jump_to < 0 && (autoreturn & RegionSelectionStart)) {
                if (!_object_selection.empty()) {
                        jump_to = _object_selection.from;
@@ -610,7 +610,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
        if (jump_to < 0 && (autoreturn & LastLocate)) {
                jump_to = _last_roll_location;
        }
-       
+
        return jump_to >= 0;
 }
 #else
@@ -804,14 +804,14 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
        if (_engine.connected() && !_engine.freewheeling()) {
                // need to queue this in the next RT cycle
                _send_timecode_update = true;
-               
+
                if (!dynamic_cast<MTC_Slave*>(_slave)) {
                        send_immediate_mmc (MIDI::MachineControlCommand (MIDI::MachineControl::cmdStop));
 
                        /* This (::non_realtime_stop()) gets called by main
                           process thread, which will lead to confusion
                           when calling AsyncMIDIPort::write().
-                       
+
                           Something must be done. XXX
                        */
                        send_mmc_locate (_transport_frame);
@@ -904,8 +904,8 @@ Session::unset_play_loop ()
                clear_events (SessionEvent::AutoLoop);
                clear_events (SessionEvent::AutoLoopDeclick);
                set_track_loop (false);
-               
-       
+
+
                if (Config->get_seamless_loop()) {
                        /* likely need to flush track buffers: this will locate us to wherever we are */
                        add_post_transport_work (PostTransportLocate);
@@ -957,7 +957,7 @@ Session::set_play_loop (bool yn, double speed)
 
                play_loop = true;
                have_looped = false;
-               
+
                if (loc) {
 
                        unset_play_range ();
@@ -1094,7 +1094,7 @@ void
 Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool for_loop_enabled, bool force, bool with_mmc)
 {
        bool need_butler = false;
-       
+
        /* Locates for seamless looping are fairly different from other
         * locates. They assume that the diskstream buffers for each track
         * already have the correct data in them, and thus there is no need to
@@ -1105,7 +1105,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
 
        DEBUG_TRACE (DEBUG::Transport, string_compose ("rt-locate to %1, roll %2 flush %3 loop-enabled %4 force %5 mmc %6\n",
                                                       target_frame, with_roll, with_flush, for_loop_enabled, force, with_mmc));
-       
+
        if (!force && _transport_frame == target_frame && !loop_changing && !for_loop_enabled) {
 
                /* already at the desired position. Not forced to locate,
@@ -1155,7 +1155,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
         */
 
        bool transport_was_stopped = !transport_rolling();
-       
+
        if (!transport_was_stopped && (!auto_play_legal || !config.get_auto_play()) && !with_roll && !(synced_to_engine() && play_loop) &&
            (!Profile->get_trx() || !(config.get_external_sync() && !synced_to_engine()))) {
                realtime_stop (false, true); // XXX paul - check if the 2nd arg is really correct
@@ -1175,7 +1175,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
 
                add_post_transport_work (todo);
                need_butler = true;
-               
+
        } else {
 
                /* this is functionally what clear_clicks() does but with a tentative lock */
@@ -1215,7 +1215,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
                                // located outside the loop: cancel looping directly, this is called from event handling context
 
                                have_looped = false;
-                               
+
                                if (!Config->get_loop_is_mode()) {
                                        set_play_loop (false, _transport_speed);
                                } else {
@@ -1246,10 +1246,10 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
                                }
 
                                boost::shared_ptr<RouteList> rl = routes.reader();
-                               
+
                                for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
                                        boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
-                                       
+
                                        if (tr && tr->record_enabled ()) {
                                                // tell it we've looped, so it can deal with the record state
                                                tr->transport_looped (_transport_frame);
@@ -1321,7 +1321,7 @@ Session::set_transport_speed (double speed, framepos_t destination_frame, bool a
                if (Config->get_monitoring_model() == HardwareMonitoring) {
                        set_track_monitor_input_status (true);
                }
-               
+
                if (synced_to_engine ()) {
                        if (clear_state) {
                                /* do this here because our response to the slave won't
@@ -1348,7 +1348,7 @@ Session::set_transport_speed (double speed, framepos_t destination_frame, bool a
                if (Config->get_loop_is_mode() && play_loop) {
 
                        Location *location = _locations->auto_loop_location();
-                       
+
                        if (location != 0) {
                                if (_transport_frame != location->start()) {
 
@@ -1468,7 +1468,7 @@ Session::stop_transport (bool abort, bool clear_state)
        }
 
        DEBUG_TRACE (DEBUG::Transport, string_compose ("stop_transport, declick required? %1\n", get_transport_declick_required()));
-       
+
        if (!get_transport_declick_required()) {
 
                /* stop has not yet been scheduled */
@@ -1484,10 +1484,10 @@ Session::stop_transport (bool abort, bool clear_state)
                }
 
                SubState new_bits;
-               
+
                if (actively_recording() &&                           /* we are recording */
                    worst_input_latency() > current_block_size) {     /* input latency exceeds block size, so simple 1 cycle delay before stop is not enough */
-                       
+
                        /* we need to capture the audio that is still somewhere in the pipeline between
                           wherever it was generated and the process callback. This means that even though
                           the user (or something else)  has asked us to stop, we have to roll
@@ -1497,16 +1497,16 @@ Session::stop_transport (bool abort, bool clear_state)
                           we still need playback to "stop" now, however, which is why we schedule
                           a declick below.
                        */
-                       
+
                        DEBUG_TRACE (DEBUG::Transport, string_compose ("stop transport requested @ %1, scheduled for + %2 = %3, abort = %4\n",
                                                                       _transport_frame, _worst_input_latency,
                                                                       _transport_frame + _worst_input_latency,
                                                                       abort));
-                       
+
                        SessionEvent *ev = new SessionEvent (SessionEvent::StopOnce, SessionEvent::Replace,
                                                             _transport_frame + _worst_input_latency,
                                                             0, 0, abort);
-                       
+
                        merge_event (ev);
 
                        /* request a declick at the start of the next process cycle() so that playback ceases.
@@ -1515,15 +1515,15 @@ Session::stop_transport (bool abort, bool clear_state)
                           does not stop the transport too early.
                         */
                        new_bits = SubState (PendingDeclickOut|StopPendingCapture);
-                       
+
                } else {
-                       
+
                        /* Not recording, schedule a declick in the next process() cycle and then stop at its end */
-                       
+
                        new_bits = PendingDeclickOut;
                        DEBUG_TRACE (DEBUG::Transport, string_compose ("stop scheduled for next process cycle @ %1\n", _transport_frame));
                }
-               
+
                /* we'll be called again after the declick */
                transport_sub_state = SubState (transport_sub_state|new_bits);
                pending_abort = abort;
@@ -1533,9 +1533,9 @@ Session::stop_transport (bool abort, bool clear_state)
        } else {
 
                DEBUG_TRACE (DEBUG::Transport, "time to actually stop\n");
-               
+
                /* declick was scheduled, but we've been called again, which means it is really time to stop
-               
+
                   XXX: we should probably split this off into its own method and call it explicitly.
                */
 
@@ -1709,7 +1709,7 @@ Session::use_sync_source (Slave* new_slave)
        }
 
        DEBUG_TRACE (DEBUG::Slave, string_compose ("set new slave to %1\n", _slave));
-       
+
        // need to queue this for next process() cycle
        _send_timecode_update = true;
 
index fe78e1fbc7186270c9c563f6a46e008099586077..33765c3d0ac5f5e0eaa0f9e340d2d4eab13e7c35 100644 (file)
@@ -370,7 +370,7 @@ SMFSource::write_unlocked (const Lock&                 lock,
                        break;
                }
                time -= position;
-                       
+
                ev.set(buf, size, time);
                ev.set_event_type(midi_parameter_type(ev.buffer()[0]));
                ev.set_id(Evoral::next_event_id());
@@ -577,7 +577,7 @@ SMFSource::safe_midi_file_extension (const string& file)
        static bool compile = true;
        const int nmatches = 2;
        regmatch_t matches[nmatches];
-       
+
        if (Glib::file_test (file, Glib::FILE_TEST_EXISTS)) {
                if (!Glib::file_test (file, Glib::FILE_TEST_IS_REGULAR)) {
                        /* exists but is not a regular file */
@@ -590,7 +590,7 @@ SMFSource::safe_midi_file_extension (const string& file)
        } else {
                compile = false;
        }
-       
+
        if (regexec (&compiled_pattern, file.c_str(), nmatches, matches, 0)) {
                return false;
        }
@@ -787,5 +787,5 @@ SMFSource::prevent_deletion ()
 
        _flags = Flag (_flags & ~(Removable|RemovableIfEmpty|RemoveAtDestroy));
 }
-               
-       
+
+
index 769ee0d1d5ca60ac9c1211168c3109e2d70c5499..8a8e1172310211c401769d07b888f4ced036c4a1 100644 (file)
@@ -168,7 +168,7 @@ SndFileSource::SndFileSource (Session& s, const string& path, const string& orig
                fmt = SF_FORMAT_RF64;
                _flags = Flag (_flags & ~Broadcast);
                break;
-               
+
        default:
                fatal << string_compose (_("programming error: %1"), X_("unsupported audio header format requested")) << endmsg;
                abort(); /*NOTREACHED*/
@@ -325,7 +325,7 @@ SndFileSource::open ()
                }
        }
 #endif
-       
+
        if (!_broadcast_info) {
                _broadcast_info = new BroadcastInfo;
        }
@@ -353,7 +353,7 @@ SndFileSource::open ()
        /* Set the broadcast flag if the BWF info is already there. We need
         * this when recovering or using existing files.
         */
-       
+
        if (bwf_info_exists) {
                _flags = Flag (_flags | Broadcast);
        }
@@ -380,7 +380,7 @@ SndFileSource::open ()
                         }
                 }
         }
-       
+
        return 0;
 }
 
@@ -401,7 +401,7 @@ framecnt_t
 SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const
 {
        assert (cnt >= 0);
-       
+
        framecnt_t nread;
        float *ptr;
        framecnt_t real_cnt;
index c7bd4605df018536254f8d5b6138ce53f461eff0..8c090be03de576f512c1e74628b670d976bde583 100644 (file)
@@ -344,7 +344,7 @@ SoundcloudUploader::setcUrlOptions()
        curl_easy_setopt(curl_handle, CURLOPT_ERRORBUFFER, errorBuffer);
        // Allow redirection
        curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1);
-       
+
        // Allow connections to time out (without using signals)
        curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
        curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, 30);
index ef0538b4d79e7cd061c83360199709eb7cb631ab..b9ea6ee78a912f5ac75e020509fd94faf3d76c59 100644 (file)
@@ -149,7 +149,7 @@ Source::set_state (const XMLNode& node, int version)
                error << string_compose (_("%1: this session uses destructive tracks, which are not supported"), PROGRAM_NAME) << endmsg;
                return -1;
        }
-       
+
        if (version < 3000) {
                /* a source with an XML node must necessarily already exist,
                   and therefore cannot be removable/writable etc. etc.; 2.X
index 6640a2493ecd63303610e16d0df58687f36020cc..76975354cbc9dded29d0de2df11f9f70158c4f5e 100644 (file)
@@ -164,7 +164,7 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
 
                        try {
                                boost::shared_ptr<AudioPlaylistSource> ap (new AudioPlaylistSource (s, node));
-                               
+
                                if (setup_peakfile (ap, true)) {
                                        return boost::shared_ptr<Source>();
                                }
@@ -239,7 +239,7 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path,
                               int chn, Source::Flag flags, bool announce, bool defer_peaks)
 {
        if (type == DataType::AUDIO) {
-               
+
                if (!(flags & Destructive)) {
 
                        try {
index 218f3f5e91d7c606999186e903de91acef878aad..19bca8041c89c7a43da8d84e4272769a038e8067 100644 (file)
@@ -34,7 +34,7 @@ x86_sse_avx_find_peaks(const float* buf, uint32_t nframes, float *min, float *ma
 
        // Work input until "buf" reaches 16 byte alignment
        while ( ((intptr_t)buf) % 32 != 0 && nframes > 0) {
-               
+
                // Load the next float into the work buffer
                work = _mm256_set1_ps(*buf);
 
index 70fffba680dcce87503f2738b71f5c09850c1dec..7797440f0e0a1720e52108e221196ccbcf313422 100644 (file)
@@ -57,7 +57,7 @@ template_filter (const string &str, void* /*arg*/)
        if (!Glib::file_test (str, Glib::FILE_TEST_IS_DIR)) {
                return false;
        }
-       
+
        return true;
 }
 
@@ -67,7 +67,7 @@ route_template_filter (const string &str, void* /*arg*/)
        if (str.find (template_suffix) == str.length() - strlen (template_suffix)) {
                return true;
        }
-       
+
        return false;
 }
 
index df7c1ac2e3cbf2a5f9257487a3d732877cbce7be..b3207e15a5e2c741251eb253f5e074fa82827aa6 100644 (file)
@@ -173,14 +173,14 @@ TempoSection::update_bbt_time_from_bar_offset (const Meter& meter)
        }
 
        new_start.bars = start().bars;
-       
+
        double ticks = BBT_Time::ticks_per_beat * meter.divisions_per_bar() * _bar_offset;
        new_start.beats = (uint32_t) floor (ticks/BBT_Time::ticks_per_beat);
        new_start.ticks = 0; /* (uint32_t) fmod (ticks, BBT_Time::ticks_per_beat); */
 
        /* remember the 1-based counting properties of beats */
        new_start.beats += 1;
-                                       
+
        DEBUG_TRACE (DEBUG::TempoMath, string_compose ("from bar offset %1 and dpb %2, ticks = %3->%4 beats = %5\n",
                                                       _bar_offset, meter.divisions_per_bar(), ticks, new_start.ticks, new_start.beats));
 
@@ -336,8 +336,8 @@ TempoMap::remove_tempo_locked (const TempoSection& tempo)
        }
 
        return false;
-}      
-       
+}
+
 void
 TempoMap::remove_meter (const MeterSection& tempo, bool complete_operation)
 {
@@ -361,7 +361,7 @@ bool
 TempoMap::remove_meter_locked (const MeterSection& tempo)
 {
        Metrics::iterator i;
-       
+
        for (i = metrics.begin(); i != metrics.end(); ++i) {
                if (dynamic_cast<MeterSection*> (*i) != 0) {
                        if (tempo.frame() == (*i)->frame()) {
@@ -392,21 +392,21 @@ TempoMap::do_insert (MetricSection* section)
                /* we need to (potentially) update the BBT times of tempo
                   sections based on this new meter.
                */
-               
+
                if ((section->start().beats != 1) || (section->start().ticks != 0)) {
-                       
+
                        BBT_Time corrected = section->start();
                        corrected.beats = 1;
                        corrected.ticks = 0;
-                       
+
                        warning << string_compose (_("Meter changes can only be positioned on the first beat of a bar. Moving from %1 to %2"),
                                                   section->start(), corrected) << endmsg;
-                       
+
                        section->set_start (corrected);
                }
        }
 
-       
+
 
        /* Look for any existing MetricSection that is of the same type and
           in the same bar as the new one, and remove it before adding
@@ -428,12 +428,12 @@ TempoMap::do_insert (MetricSection* section)
                            (*i)->start().beats == section->start().beats) {
 
                                if (!(*i)->movable()) {
-                                       
+
                                        /* can't (re)move this section, so overwrite
                                         * its data content (but not its properties as
                                         * a section).
                                         */
-                                       
+
                                        *(dynamic_cast<Tempo*>(*i)) = *(dynamic_cast<Tempo*>(section));
                                        need_add = false;
                                } else {
@@ -449,17 +449,17 @@ TempoMap::do_insert (MetricSection* section)
                        if ((*i)->start().bars == section->start().bars) {
 
                                if (!(*i)->movable()) {
-                                       
+
                                        /* can't (re)move this section, so overwrite
                                         * its data content (but not its properties as
                                         * a section
                                         */
-                                       
+
                                        *(dynamic_cast<Meter*>(*i)) = *(dynamic_cast<Meter*>(section));
                                        need_add = false;
                                } else {
                                        metrics.erase (i);
-                                       
+
                                }
 
                                break;
@@ -482,7 +482,7 @@ TempoMap::do_insert (MetricSection* section)
                                break;
                        }
                }
-               
+
                metrics.insert (i, section);
        }
 }
@@ -493,7 +493,7 @@ TempoMap::replace_tempo (const TempoSection& ts, const Tempo& tempo, const BBT_T
        {
                Glib::Threads::RWLock::WriterLock lm (lock);
                TempoSection& first (first_tempo());
-               
+
                if (ts.start() != first.start()) {
                        remove_tempo_locked (ts);
                        add_tempo_locked (tempo, where, true);
@@ -526,45 +526,45 @@ TempoMap::add_tempo_locked (const Tempo& tempo, BBT_Time where, bool recompute)
 {
        /* new tempos always start on a beat */
        where.ticks = 0;
-       
+
        TempoSection* ts = new TempoSection (where, tempo.beats_per_minute(), tempo.note_type());
-       
+
        /* find the meter to use to set the bar offset of this
         * tempo section.
         */
-       
+
        const Meter* meter = &first_meter();
-       
+
        /* as we start, we are *guaranteed* to have m.meter and m.tempo pointing
           at something, because we insert the default tempo and meter during
           TempoMap construction.
-       
+
           now see if we can find better candidates.
        */
-       
+
        for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
-               
+
                const MeterSection* m;
-               
+
                if (where < (*i)->start()) {
                        break;
                }
-               
+
                if ((m = dynamic_cast<const MeterSection*>(*i)) != 0) {
                        meter = m;
                }
        }
-       
+
        ts->update_bar_offset_from_bbt (*meter);
-       
+
        /* and insert it */
-       
+
        do_insert (ts);
 
        if (recompute) {
                recompute_map (false);
        }
-}      
+}
 
 void
 TempoMap::replace_meter (const MeterSection& ms, const Meter& meter, const BBT_Time& where)
@@ -572,7 +572,7 @@ TempoMap::replace_meter (const MeterSection& ms, const Meter& meter, const BBT_T
        {
                Glib::Threads::RWLock::WriterLock lm (lock);
                MeterSection& first (first_meter());
-               
+
                if (ms.start() != first.start()) {
                        remove_meter_locked (ms);
                        add_meter_locked (meter, where, true);
@@ -594,7 +594,7 @@ TempoMap::add_meter (const Meter& meter, BBT_Time where)
                add_meter_locked (meter, where, true);
        }
 
-       
+
 #ifndef NDEBUG
        if (DEBUG_ENABLED(DEBUG::TempoMap)) {
                dump (std::cerr);
@@ -611,23 +611,23 @@ TempoMap::add_meter_locked (const Meter& meter, BBT_Time where, bool recompute)
           round the start time appropriately. remember that
           `where' is based on the existing tempo map, not
           the result after we insert the new meter.
-       
+
        */
-       
+
        if (where.beats != 1) {
                where.beats = 1;
                where.bars++;
        }
-       
+
        /* new meters *always* start on a beat. */
        where.ticks = 0;
-       
+
        do_insert (new MeterSection (where, meter.divisions_per_bar(), meter.note_divisor()));
 
        if (recompute) {
                recompute_map (true);
        }
-               
+
 }
 
 void
@@ -738,7 +738,7 @@ TempoMap::first_tempo () const
        const TempoSection *t = 0;
 
        /* CALLER MUST HOLD LOCK */
-       
+
        for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
                if ((t = dynamic_cast<const TempoSection *> (*i)) != 0) {
                        return *t;
@@ -787,7 +787,7 @@ TempoMap::require_map_to (const BBT_Time& bbt)
         */
 
        int additional_minutes = 1;
-       
+
        while (1) {
                if (!_map.empty() && _map.back().bar >= (bbt.bars + 1)) {
                        break;
@@ -867,7 +867,7 @@ TempoMap::recompute_map (bool reassign_tempo_bbt, framepos_t end)
 
                        TempoSection* ts;
                        MeterSection* ms;
-       
+
                        if ((ts = dynamic_cast<TempoSection*>(*i)) != 0) {
 
                                /* reassign the BBT time of this tempo section
@@ -915,7 +915,7 @@ TempoMap::extend_map (framepos_t end)
                return;
        }
 
-       BBTPointList::const_iterator i = _map.end();    
+       BBTPointList::const_iterator i = _map.end();
        Metrics::iterator next_metric;
 
        --i;
@@ -1011,12 +1011,12 @@ TempoMap::_extend_map (TempoSection* tempo, MeterSection* meter,
                                         */
 
                                        if (tempo->start().ticks != 0) {
-                                               
-                                               double next_beat_frames = tempo->frames_per_beat (_frame_rate);                                 
-                                               
+
+                                               double next_beat_frames = tempo->frames_per_beat (_frame_rate);
+
                                                DEBUG_TRACE (DEBUG::TempoMath, string_compose ("bumped into non-beat-aligned tempo metric at %1 = %2, adjust next beat using %3\n",
                                                                                               tempo->start(), current_frame, tempo->bar_offset()));
-                                               
+
                                                /* back up to previous beat */
                                                current_frame_exact -= beat_frames;
                                                current_frame = llrint(current_frame_exact);
@@ -1027,7 +1027,7 @@ TempoMap::_extend_map (TempoSection* tempo, MeterSection* meter,
                                                 */
                                                tempo->set_frame (bar_start_frame +
                                                                  llrint ((ts->bar_offset() * meter->divisions_per_bar() * beat_frames)));
-                                               
+
                                                /* advance to the location of
                                                 * the new (adjusted) beat. do
                                                 * this by figuring out the
@@ -1048,35 +1048,35 @@ TempoMap::_extend_map (TempoSection* tempo, MeterSection* meter,
                                                 * merit a reloop ...
                                                 */
                                                DEBUG_TRACE (DEBUG::TempoMath, string_compose ("Adjusted last beat to %1\n", current_frame));
-                                               
+
                                        } else {
-                                               
+
                                                DEBUG_TRACE (DEBUG::TempoMath, string_compose ("bumped into beat-aligned tempo metric at %1 = %2\n",
                                                                                               tempo->start(), current_frame));
                                                tempo->set_frame (current_frame);
                                        }
 
                                } else if ((ms = dynamic_cast<MeterSection*>(*next_metric)) != 0) {
-                                       
+
                                        meter = ms;
 
                                        /* new meter section: always defines the
                                         * start of a bar.
                                         */
-                                       
+
                                        DEBUG_TRACE (DEBUG::TempoMath, string_compose ("bumped into meter section at %1 vs %2 (%3)\n",
                                                                                       meter->start(), current, current_frame));
-                                       
+
                                        assert (current.beats == 1);
 
                                        meter->set_frame (current_frame);
                                }
-                               
+
                                beat_frames = meter->frames_per_grid (*tempo, _frame_rate);
-                               
+
                                DEBUG_TRACE (DEBUG::TempoMath, string_compose ("New metric with beat frames = %1 dpb %2 meter %3 tempo %4\n",
                                                                               beat_frames, meter->divisions_per_bar(), *((Meter*)meter), *((Tempo*)tempo)));
-                       
+
                                ++next_metric;
 
                                if (next_metric != metrics.end() && ((*next_metric)->start() == current)) {
@@ -1133,7 +1133,7 @@ TempoMap::metric_at (framepos_t frame, Metrics::const_iterator* last) const
                        *last = i;
                }
        }
-       
+
        return m;
 }
 
@@ -1190,7 +1190,7 @@ TempoMap::bbt_time_rt (framepos_t frame, BBT_Time& bbt)
        if (!lm.locked()) {
                throw std::logic_error ("TempoMap::bbt_time_rt() could not lock tempo map");
        }
-       
+
        if (_map.empty() || _map.back().frame < frame) {
                throw std::logic_error (string_compose ("map not long enough to reach %1", frame));
        }
@@ -1221,7 +1221,7 @@ TempoMap::frame_time (const BBT_Time& bbt)
                warning << string_compose (_("tempo map asked for frame time at bar < 1  (%1)\n"), bbt) << endmsg;
                return 0;
        }
-       
+
        if (bbt.beats < 1) {
                throw std::logic_error ("beats are counted from one");
        }
@@ -1246,7 +1246,7 @@ TempoMap::bbt_duration_at (framepos_t pos, const BBT_Time& bbt, int dir)
 {
        BBT_Time when;
        bbt_time (pos, when);
-       
+
        Glib::Threads::RWLock::ReaderLock lm (lock);
        return bbt_duration_at_unlocked (when, bbt, dir);
 }
@@ -1376,9 +1376,9 @@ TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, RoundMode dir)
                double rem;
 
                /* compute the distance to the previous and next subdivision */
-               
+
                if ((rem = fmod ((double) the_beat.ticks, (double) ticks_one_subdivisions_worth)) > ticks_one_subdivisions_worth/2.0) {
-                       
+
                        /* closer to the next subdivision, so shift forward */
 
                        the_beat.ticks = lrint (the_beat.ticks + (ticks_one_subdivisions_worth - rem));
@@ -1394,7 +1394,7 @@ TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, RoundMode dir)
                        }
 
                } else if (rem > 0) {
-                       
+
                        /* closer to previous subdivision, so shift backward */
 
                        if (rem > the_beat.ticks) {
@@ -1437,7 +1437,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
 
        DEBUG_TRACE (DEBUG::SnapBBT, string_compose ("round from %1 (%3|%4 @ %5) to %6 in direction %2\n", frame, dir, (*fi).bar, (*fi).beat, (*fi).frame,
                                                     (type == Bar ? "bar" : "beat")));
-               
+
        switch (type) {
        case Bar:
                if (dir < 0) {
@@ -1488,7 +1488,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
                        return (*fi).frame;
 
                } else {
-                       
+
                        /* true rounding: find nearest bar */
 
                        BBTPointList::const_iterator prev = fi;
@@ -1514,7 +1514,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
                        } else {
                                return (*next).frame;
                        }
-                       
+
                }
 
                break;
@@ -1555,7 +1555,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
                           the beat before frame.
                        */
                        ++next;
-                       
+
                        if ((next == _map.end()) || (frame - (*prev).frame) < ((*next).frame - frame)) {
                                return (*prev).frame;
                        } else {
@@ -1684,7 +1684,7 @@ TempoMap::set_state (const XMLNode& node, int /*version*/)
                metrics.clear();
 
                nlist = node.children();
-               
+
                for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                        XMLNode* child = *niter;
 
@@ -1830,23 +1830,23 @@ TempoMap::insert_time (framepos_t where, framecnt_t amount)
                const TempoSection* tempo;
                MeterSection *m;
                TempoSection *t;
-               
+
                meter = &first_meter ();
                tempo = &first_tempo ();
-               
+
                BBT_Time start;
                BBT_Time end;
-               
+
                // cerr << "\n###################### TIMESTAMP via AUDIO ##############\n" << endl;
-               
+
                bool first = true;
                MetricSection* prev = 0;
-               
+
                for (i = metrics.begin(); i != metrics.end(); ++i) {
-                       
+
                        BBT_Time bbt;
                        TempoMetric metric (*meter, *tempo);
-                       
+
                        if (prev) {
                                metric.set_start (prev->start());
                                metric.set_frame (prev->frame());
@@ -1854,34 +1854,34 @@ TempoMap::insert_time (framepos_t where, framecnt_t amount)
                                // metric will be at frames=0 bbt=1|1|0 by default
                                // which is correct for our purpose
                        }
-                       
+
                        BBTPointList::const_iterator bi = bbt_before_or_at ((*i)->frame());
                        bbt_time ((*i)->frame(), bbt, bi);
-                       
+
                        // cerr << "timestamp @ " << (*i)->frame() << " with " << bbt.bars << "|" << bbt.beats << "|" << bbt.ticks << " => ";
-                       
+
                        if (first) {
                                first = false;
                        } else {
-                               
+
                                if (bbt.ticks > BBT_Time::ticks_per_beat/2) {
                                        /* round up to next beat */
                                        bbt.beats += 1;
                                }
-                               
+
                                bbt.ticks = 0;
-                               
+
                                if (bbt.beats != 1) {
                                        /* round up to next bar */
                                        bbt.bars += 1;
                                        bbt.beats = 1;
                                }
                        }
-                       
+
                        // cerr << bbt << endl;
-                       
+
                        (*i)->set_start (bbt);
-                       
+
                        if ((t = dynamic_cast<TempoSection*>(*i)) != 0) {
                                tempo = t;
                                // cerr << "NEW TEMPO, frame = " << (*i)->frame() << " start = " << (*i)->start() <<endl;
@@ -1892,10 +1892,10 @@ TempoMap::insert_time (framepos_t where, framecnt_t amount)
                                fatal << _("programming error: unhandled MetricSection type") << endmsg;
                                abort(); /*NOTREACHED*/
                        }
-                       
+
                        prev = (*i);
                }
-               
+
                recompute_map (true);
        }
 
@@ -1908,7 +1908,7 @@ TempoMap::remove_time (framepos_t where, framecnt_t amount)
        bool moved = false;
 
        std::list<MetricSection*> metric_kill_list;
-       
+
        TempoSection* last_tempo = NULL;
        MeterSection* last_meter = NULL;
        bool tempo_after = false; // is there a tempo marker at the first sample after the removed range?
@@ -1958,7 +1958,7 @@ TempoMap::remove_time (framepos_t where, framecnt_t amount)
                if (moved) {
                        recompute_map (true);
                }
-       }       
+       }
        PropertyChanged (PropertyChange ());
        return moved;
 }
@@ -1991,11 +1991,11 @@ TempoMap::framepos_plus_beats (framepos_t pos, Evoral::Beats beats) const
                        if (pos < 0 && f == 0) {
                                f = pos;
                        }
-                       
+
                        if (f > pos) {
                                break;
                        }
-                       
+
                        tempo = t;
                }
        }
@@ -2046,7 +2046,7 @@ TempoMap::framepos_plus_beats (framepos_t pos, Evoral::Beats beats) const
                        while (next_tempo != metrics.end ()) {
 
                                ++next_tempo;
-                               
+
                                if (next_tempo != metrics.end() && dynamic_cast<const TempoSection*>(*next_tempo)) {
                                        break;
                                }
@@ -2091,7 +2091,7 @@ TempoMap::framepos_minus_beats (framepos_t pos, Evoral::Beats beats) const
                           keep going to get the previous tempo (or
                           metrics.rend())
                        */
-                       
+
                        if (f <= pos) {
                                if (tempo == 0) {
                                        /* first tempo with position at or
@@ -2121,7 +2121,7 @@ TempoMap::framepos_minus_beats (framepos_t pos, Evoral::Beats beats) const
        */
 
        while (!!beats) {
-               
+
                /* Distance to the start of this section in frames */
                framecnt_t distance_frames = (pos - tempo->frame());
 
@@ -2236,7 +2236,7 @@ TempoMap::framepos_plus_bbt (framepos_t pos, BBT_Time op) const
                                 * traversed before we change the
                                 * frames_per_beat value.
                                 */
-                               
+
                                pos += llrint (frames_per_beat * (bars * meter->divisions_per_bar()));
                                bars = 0;
 
@@ -2343,7 +2343,7 @@ TempoMap::framewalk_to_beats (framepos_t pos, framecnt_t distance) const
        DEBUG_TRACE (DEBUG::TempoMath,
                     string_compose ("frame %1 walk by %2 frames, start with tempo = %3 @ %4\n",
                                     pos, distance, *((const Tempo*)tempo), tempo->frame()));
-       
+
        Evoral::Beats beats = Evoral::Beats();
 
        while (distance) {
@@ -2391,7 +2391,7 @@ TempoMap::framewalk_to_beats (framepos_t pos, framecnt_t distance) const
                        while (next_tempo != metrics.end ()) {
 
                                ++next_tempo;
-                               
+
                                if (next_tempo != metrics.end() && dynamic_cast<const TempoSection*>(*next_tempo)) {
                                        break;
                                }
index 6a8e3600f1534f6946a9e503a07381bac7ea7ff3..c7ae50afd54437fcab4414494fa0b530a222c31d 100644 (file)
@@ -31,7 +31,7 @@ void
 AudioRegionReadTest::readTest ()
 {
        int const N = 1024;
-       
+
        Sample buf[N];
        Sample mbuf[N];
        float gbuf[N];
@@ -70,7 +70,7 @@ AudioRegionReadTest::readTest ()
        for (int i = 64; i < P; ++i) {
                CPPUNIT_ASSERT_EQUAL (i, int (buf[i]));
        }
-       
+
        /* Offset read: 256 frames from 128 frames into the region, with fades
           (though the fade should not affect it, as it is finished before the read starts)
        */
@@ -78,7 +78,7 @@ AudioRegionReadTest::readTest ()
        for (int i = 0; i < N; ++i) {
                buf[i] = 0;
        }
-       
+
        _ar[0]->read_at (buf, mbuf, gbuf, P + 128, 256, 0);
        check_staircase (buf, 128, 256);
 }
index deb0d2e46a8d4cb16f22ade6315b46e1a0b0013c..aae25e2f5d92206fdb620828b3b21ddbb431cd85 100644 (file)
@@ -49,14 +49,14 @@ AudioRegionTest::setUp ()
        assert (s);
 
        int const signal_length = 4096;
-       
+
        Sample staircase[signal_length];
        for (int i = 0; i < signal_length; ++i) {
                staircase[i] = i;
        }
 
        s->write (staircase, signal_length);
-       
+
        PropertyList plist;
        plist.add (Properties::start, 0);
        plist.add (Properties::length, 100);
@@ -81,4 +81,4 @@ AudioRegionTest::tearDown ()
        TestNeedingSession::tearDown ();
 }
 
-       
+
index 7206ee8220a5cda12dee65cd38aff473c6e458fe..e17ad4f151ce4a6659bcfaa6748537f030b276dd 100644 (file)
@@ -58,7 +58,7 @@ AutomationListPropertyTest::basicTest ()
 
        /* No change since we just cleared them */
        CPPUNIT_ASSERT_EQUAL (false, property.changed());
-       
+
        property->add (1, 2, false, false);
        property->add (3, 4, false, false);
 
index 86dd38940969b1d429f2fe10a0b380919a07a120..416d02ba1416a9a5a0208c623555f6b661fea9d4 100644 (file)
@@ -17,7 +17,7 @@ BBTTest::addTest ()
        Meter    meter(4.0, 4.0);
 
        map.add_meter (meter, BBT_Time(1, 1, 0));
-       
+
        /* add some good stuff here */
 }
 
index 0202fe8873ce65b23c5d6ba8cb15b0cc9310c66e..5eee1d47d0966c244a9005e7b6092f2907504831 100644 (file)
@@ -55,12 +55,12 @@ CombineRegionsTest::check_crossfade1 ()
 
        _ar[1]->fade_in()->curve().get_vector (0, 128, fade_in, 128);
        _ar[1]->inverse_fade_in()->curve().get_vector (0, 128, fade_out, 128);
-       
+
        /* Crossfading _r[0] to _r[1] using _r[1]'s fade in and inverse fade in.
           _r[0] also has a standard region fade out to add to the fun.
        */
        for (int i = 128; i < 256; ++i) {
-               
+
                float region_fade_out = 1;
                if (i >= 192) {
                        /* Ardour fades out from 1 to VERY_SMALL_SIGNAL, which is 0.0000001,
@@ -74,7 +74,7 @@ CombineRegionsTest::check_crossfade1 ()
                */
                float r0 = i * region_fade_out;
                r0 *= fade_out[i - 128];
-               
+
                float const r1 = (i - 128) * fade_in[i - 128];
                CPPUNIT_ASSERT_DOUBLES_EQUAL (r0 + r1, buf[i], 1e-16);
        }
@@ -102,7 +102,7 @@ CombineRegionsTest::crossfadeTest1 ()
        _ar[0]->set_default_fade_in ();
        _ar[0]->set_default_fade_out ();
        _ar[1]->set_default_fade_out ();
-       
+
        _playlist->add_region (_r[0], 0);
        _r[0]->set_length (256);
 
@@ -165,7 +165,7 @@ CombineRegionsTest::check_crossfade2 ()
 
        _ar[0]->inverse_fade_out()->curve().get_vector (0, 128, fade_in, 128);
        _ar[0]->fade_out()->curve().get_vector (0, 128, fade_out, 128);
-       
+
        /* Crossfading _r[0] to _r[1] using _r[0]'s fade out and inverse fade out.
           _r[1] also has a standard region fade in to add to the fun.
        */
@@ -179,7 +179,7 @@ CombineRegionsTest::check_crossfade2 ()
                float r0 = i * fade_out[i - 128];
                float r1 = (i - 128) * region_fade_in;
                r1 *= fade_in[i - 128];
-               
+
                CPPUNIT_ASSERT_DOUBLES_EQUAL (r0 + r1, buf[i], 1e-16);
        }
 
@@ -206,7 +206,7 @@ CombineRegionsTest::crossfadeTest2 ()
        _ar[0]->set_default_fade_in ();
        _ar[0]->set_default_fade_out ();
        _ar[1]->set_default_fade_out ();
-       
+
        _playlist->add_region (_r[0], 0);
        _r[0]->set_length (256);
 
index 63c5e33c6f0be60fc708e6998063d5e91e931675..82b965345591076a4c389faff237ddeddb5e51d9 100644 (file)
@@ -32,7 +32,7 @@ void
 ControlSurfacesTest::instantiateAndTeardownTest ()
 {
        _session->new_audio_track (1, 2, Normal, 0, 1, "Test");
-       
+
        ControlProtocolManager& m = ControlProtocolManager::instance ();
        for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
                m.activate (**i);
index a96fec653192054b6db1f6b43c53ff7014ed0afc..12f020e2d793cde457287e798b41cba6d3926b4d 100644 (file)
@@ -17,7 +17,7 @@ FrameposMinusBeatsTest::singleTempoTest ()
        int const bpm = 120;
 
        double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
-       
+
        TempoMap map (sampling_rate);
        Tempo tempo (bpm);
        Meter meter (4, 4);
@@ -46,14 +46,14 @@ FrameposMinusBeatsTest::doubleTempoTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 4
-       
+
          120bpm = 24e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-       
+
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
@@ -98,14 +98,14 @@ FrameposMinusBeatsTest::doubleTempoWithMeterTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 4
-       
+
          120bpm = 24e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-       
+
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
index 7069c541156b71e488ce1b2756b1130c03f92293..69fd9a597d6b6de426cbd5759d134d63afd9cbfd 100644 (file)
@@ -16,7 +16,7 @@ FrameposPlusBeatsTest::singleTempoTest ()
        int const bpm = 120;
 
        double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
-       
+
        TempoMap map (sampling_rate);
        Tempo tempo (bpm);
        Meter meter (4, 4);
@@ -45,14 +45,14 @@ FrameposPlusBeatsTest::doubleTempoTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 4
-       
+
          120bpm = 24e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-       
+
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
@@ -97,14 +97,14 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 4
-       
+
          120bpm = 24e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-       
+
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
index 501eca894e691ce9f21b2297e0785c998ffe26b8..8b7748cfa45d106e4025682755554c9cec63a7a7 100644 (file)
@@ -15,7 +15,7 @@ FramewalkToBeatsTest::singleTempoTest ()
        int const bpm = 120;
 
        double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
-       
+
        TempoMap map (sampling_rate);
        Tempo tempo (bpm);
        Meter meter (4, 4);
@@ -51,14 +51,14 @@ FramewalkToBeatsTest::doubleTempoTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 4
-       
+
          120bpm = 24e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-       
+
          120bpm                                          240bpm
          0 beats                                         12 beats
          0 frames                                        288e3 frames
@@ -107,15 +107,15 @@ FramewalkToBeatsTest::tripleTempoTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 2, 160bpm at bar 3
-       
+
          120bpm = 24e3 samples per beat
          160bpm = 18e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-       
+
          120bpm            240bpm            160bpm
          0 beats           4 beats           8 beats
          0 frames          96e3 frames       144e3 frames
index 7645df6ff3e7b3b6e8bebce3bce9f12da0ea0491..d8a21ceb49e3fa4018519263ad614d9b151e637b 100644 (file)
@@ -273,7 +273,7 @@ JackUtilsTest::test_config ()
        std::string command_line;
 
        CPPUNIT_ASSERT (get_default_jack_command_line (command_line));
-       
+
        CPPUNIT_ASSERT (write_jack_config_file (config_path, command_line));
 }
 
index f2a2a6922e4e76fb884ff0aff6af1ab62e0ebc95..41dc48ef2fe2260712729f41058073975317e61c 100644 (file)
@@ -21,7 +21,7 @@ int main (int argc, char* argv[])
        ARDOUR::init (false, true, localedir);
 
        Session* s = 0;
-       
+
        try {
                s = load_session (argv[1], argv[2]);
        } catch (failed_constructor& e) {
index dd046fb8a8b6b8dbf20287fbc555fd801d3c0490..0899eed6cecedba60f0efd989417b23d3da44a60 100644 (file)
@@ -83,7 +83,7 @@ class MIDIClock_SlaveTest : public CppUnit::TestFixture, ARDOUR::MIDIClock_Slave
 
     public:
        MIDIClock_SlaveTest () : MIDIClock_Slave (new TestSlaveSessionProxy) {}
-               
+
         void setUp() {
         }
 
index 43a653824204d53e6cd5e1068bd65fbcd4a8f860..f3265b2ccda4a6baf02ddc8088dba5544a6f788b 100644 (file)
@@ -22,7 +22,7 @@ MTDMTest::basicTest ()
                mtdm->process (256, in, out);
                memcpy (in, out, 256 * sizeof (float));
        }
-       
+
        for (int i = 0; i < 64; ++i) {
                mtdm->process (256, in, out);
                memcpy (in, out, 256 * sizeof (float));
index 12853d39dd4f5fd7126fefe4ed47550a9ca45a36..eb34eaf5bca0b05511f0b1bbb6572e0c1d3ca3c3 100644 (file)
@@ -30,7 +30,7 @@ void
 PlaylistEquivalentRegionsTest::setUp ()
 {
        AudioRegionTest::setUp ();
-       
+
        _playlist_b = PlaylistFactory::create (DataType::AUDIO, *_session, "testB");
 }
 
index 78b2e4eadd3d7b476c5700365687fc731991a52a..e87179fac6d856c0516c8c44ee7dd85c32a4a3a5 100644 (file)
@@ -67,14 +67,14 @@ PlaylistReadTest::singleReadTest ()
        CPPUNIT_ASSERT_EQUAL (double (64), _ar[0]->_fade_out->back()->when);
        _ar[0]->set_length (1024);
        _audio_playlist->read (_buf, _mbuf, _gbuf, 0, 256, 0);
-       
+
        for (int i = 0; i < 64; ++i) {
                /* Note: this specific float casting is necessary so that the rounding
                   is done here the same as it is done in AudioPlaylist.
                */
                CPPUNIT_ASSERT_DOUBLES_EQUAL (float (i * float (i / 63.0)), _buf[i], 1e-16);
        }
-       
+
        for (int i = 64; i < 256; ++i) {
                CPPUNIT_ASSERT_EQUAL (i, int (_buf[i]));
        }
@@ -101,7 +101,7 @@ PlaylistReadTest::overlappingReadTest ()
        CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_in_is_xfade());
        CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_out_is_xfade());
 #endif
-       
+
        _audio_playlist->add_region (_ar[1], 128);
        _ar[1]->set_default_fade_in ();
        _ar[1]->set_default_fade_out ();
@@ -111,10 +111,10 @@ PlaylistReadTest::overlappingReadTest ()
        CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_in_is_xfade());
        CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_out_is_xfade());
 #endif
-       
+
        CPPUNIT_ASSERT_EQUAL (double (64), _ar[1]->_fade_in->back()->when);
        CPPUNIT_ASSERT_EQUAL (double (64), _ar[1]->_fade_out->back()->when);
-       
+
        _ar[1]->set_length (1024);
        _audio_playlist->read (_buf, _mbuf, _gbuf, 0, 256, 0);
 
@@ -151,7 +151,7 @@ PlaylistReadTest::transparentReadTest ()
        CPPUNIT_ASSERT_EQUAL (double (64), _ar[0]->_fade_in->back()->when);
        CPPUNIT_ASSERT_EQUAL (double (64), _ar[0]->_fade_out->back()->when);
        _ar[0]->set_length (1024);
-       
+
        _audio_playlist->add_region (_ar[1], 0);
        _ar[1]->set_default_fade_in ();
        _ar[1]->set_default_fade_out ();
@@ -237,7 +237,7 @@ PlaylistReadTest::enclosedTransparentReadTest ()
        _ar[0]->set_fade_in_length (0);
        _ar[0]->set_fade_out_length (0);
        _ar[0]->set_length (256);
-       
+
        _audio_playlist->add_region (_ar[1], 0);
        /* These calls will result in a 64-sample fade */
        _ar[1]->set_fade_in_length (0);
@@ -266,7 +266,7 @@ PlaylistReadTest::enclosedTransparentReadTest ()
        for (int i = (256 + 64); i < (256 + 64 + 128); ++i) {
                CPPUNIT_ASSERT_DOUBLES_EQUAL (i + i - (256 + 64) + 64, _buf[i], 1e-16);
        }
-       
+
        /* Then _ar[1] + _ar[0] (faded out) for 64 samples */
        for (int i = (256 + 64 + 128); i < 512; ++i) {
                float const ar0_without_fade = i - 256;
index 97a1eb9eabb72665a7a4ff512d27ba8318111c41..51618634099555b706be268071ede9d10772e449 100644 (file)
@@ -32,7 +32,7 @@ class PlaylistReadTest : public AudioRegionTest
 public:
        void setUp ();
        void tearDown ();
-       
+
        void singleReadTest ();
        void overlappingReadTest ();
        void transparentReadTest ();
@@ -44,6 +44,6 @@ private:
        ARDOUR::Sample* _buf;
        ARDOUR::Sample* _mbuf;
        float* _gbuf;
-       
+
        void check_staircase (ARDOUR::Sample *, int, int);
 };
index f2a2a6922e4e76fb884ff0aff6af1ab62e0ebc95..41dc48ef2fe2260712729f41058073975317e61c 100644 (file)
@@ -21,7 +21,7 @@ int main (int argc, char* argv[])
        ARDOUR::init (false, true, localedir);
 
        Session* s = 0;
-       
+
        try {
                s = load_session (argv[1], argv[2]);
        } catch (failed_constructor& e) {
index 2cac1fa8728c6d647118e8499ffdb9e50409746e..4905259351e3aec9d42fe4e1f43d6a6ffdbcdf1f 100644 (file)
@@ -18,14 +18,14 @@ TempoTest::recomputeMapTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 4
-       
+
          120bpm = 24e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-       
+
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
index 7be501d1004a9801a815d7921ec0e6d76df7cc3c..522020346526117b595221f22a80af8e6a47cee4 100644 (file)
@@ -68,7 +68,7 @@ check_nodes (XMLNode const * p, XMLNode const * q, list<string> const & ignore_p
        CPPUNIT_ASSERT_EQUAL (qc.size(), pc.size());
        XMLNodeList::const_iterator k = pc.begin ();
        XMLNodeList::const_iterator l = qc.begin ();
-       
+
        while (k != pc.end ()) {
                check_nodes (*k, *l, ignore_properties);
                ++k;
index 2d9a8fc39e54383d06a1644b5d22de4bf640b72b..ddb320e02b9058e60abd8bbc77f2f9e7b7b1f25d 100644 (file)
@@ -54,23 +54,23 @@ main(int argc, char* argv[])
        TestUI* test_ui = new TestUI();
 
        CppUnit::TestResult testresult;
-       
+
        CppUnit::TestResultCollector collectedresults;
        testresult.addListener (&collectedresults);
-       
+
        CppUnit::BriefTestProgressListener progress;
        testresult.addListener (&progress);
-       
+
        CppUnit::TestRunner testrunner;
        testrunner.addTest (CppUnit::TestFactoryRegistry::getRegistry ().makeTest ());
        testrunner.run (testresult);
-       
+
        CppUnit::CompilerOutputter compileroutputter (&collectedresults, std::cerr);
        compileroutputter.write ();
 
        delete test_ui;
 
        ARDOUR::cleanup ();
-       
+
        return collectedresults.wasSuccessful () ? 0 : 1;
 }
index 3fe6e66b81ceb2f97676181989ae3c50ab81a8ce..e02143e401f1764b8be388e4109e579df11e313e 100644 (file)
@@ -49,10 +49,10 @@ public:
     bool sync (Session* s) {
 
            bool changed = false;
-       
+
            double     sp = s->transport_speed();
            framecnt_t fr = s->transport_frame();
-       
+
            if (speed != sp) {
                    speed = sp;
                    changed = true;
@@ -120,7 +120,7 @@ void
 MidiClockTicker::set_session (Session* s)
 {
        SessionHandlePtr::set_session (s);
-       
+
         if (_session) {
                 _session->TransportStateChange.connect_same_thread (_session_connections, boost::bind (&MidiClockTicker::transport_state_changed, this));
                 _session->TransportLooped.connect_same_thread (_session_connections, boost::bind (&MidiClockTicker::transport_looped, this));
@@ -230,7 +230,7 @@ MidiClockTicker::tick (const framepos_t& /* transport_frame */, pframes_t nframe
                        send_position_event (llrint (_pos->midi_beats), 0, nframes);
                } else if (_pos->speed == 1.0f) {
                        send_stop_event (0, nframes);
-                       
+
                        if (_pos->frame == 0) {
                                send_start_event (0, nframes);
                        } else {
@@ -249,21 +249,21 @@ MidiClockTicker::tick (const framepos_t& /* transport_frame */, pframes_t nframe
                if (_pos->speed == 1.0f) {
                        if (_session->get_play_loop()) {
                                assert(_session->locations()->auto_loop_location());
-                               
+
                                if (_pos->frame == _session->locations()->auto_loop_location()->start()) {
                                        send_start_event (0, nframes);
                                } else {
                                        send_continue_event (0, nframes);
                                }
-                               
+
                        } else if (_pos->frame == 0) {
                                send_start_event (0, nframes);
                        } else {
                                send_continue_event (0, nframes);
                        }
-                       
+
                        // send_midi_clock_event (0);
-                       
+
                } else if (_pos->speed == 0.0f) {
                        send_stop_event (0, nframes);
                        send_position_event (llrint (_pos->midi_beats), 0, nframes);
index 2c9e71ca466091ca7e92a12c6cd91d947b93d1e4..e99d07f0475f139f46828899bf09b3108f78869f 100644 (file)
@@ -100,9 +100,9 @@ Track::state (bool full)
        root.add_property (X_("saved-meter-point"), enum_2_string (_saved_meter_point));
        root.add_child_nocopy (_rec_enable_control->get_state());
        root.add_child_nocopy (_diskstream->get_state ());
-       
+
        return root;
-}      
+}
 
 int
 Track::set_state (const XMLNode& node, int version)
@@ -140,7 +140,7 @@ Track::set_state (const XMLNode& node, int version)
                        }
                }
        }
-       
+
        const XMLProperty* prop;
 
        if ((prop = node.property (X_("monitoring"))) != 0) {
@@ -196,7 +196,7 @@ Track::RecEnableControl::set_value (double val)
        if (!t) {
                return;
        }
-       
+
        t->set_record_enabled (val >= 0.5 ? true : false, this);
 }
 
@@ -207,7 +207,7 @@ Track::RecEnableControl::get_value () const
        if (!t) {
                return 0;
        }
-       
+
        return (t->record_enabled() ? 1.0 : 0.0);
 }
 
@@ -235,7 +235,7 @@ Track::prep_record_enabled (bool yn, void *src)
        if (yn && record_safe ()) {
            return;
        }
-       
+
        if (!_session.writable()) {
                return;
        }
@@ -255,7 +255,7 @@ Track::prep_record_enabled (bool yn, void *src)
        }
 
        bool will_follow;
-       
+
        if (yn) {
                will_follow = _diskstream->prep_record_enable ();
        } else {
@@ -279,7 +279,7 @@ Track::set_record_enabled (bool yn, void *src)
        if (_diskstream->record_safe ()) {
            return;
        }
-       
+
        if (!_session.writable()) {
                return;
        }
@@ -310,16 +310,16 @@ Track::set_record_safe (bool yn, void *src)
        if (!_session.writable()) { /* REQUIRES REVIEW */
                return;
        }
-       
+
        if (_freeze_record.state == Frozen) { /* REQUIRES REVIEW */
                return;
        }
-       
+
        if (_route_group && src != _route_group && _route_group->is_active() && _route_group->is_recenable()) {
                _route_group->apply (&Track::set_record_safe, yn, _route_group);
                return;
        }
-       
+
        _diskstream->set_record_safe (yn);
 }
 
@@ -474,12 +474,12 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                be_silent = false;
                break;
        }
-       
+
        //if we have an internal generator, let it play regardless of monitoring state
        if (_have_internal_generator) {
                be_silent = false;
        }
-       
+
        _amp->apply_gain_automation (false);
 
        /* if have_internal_generator, or .. */
@@ -528,7 +528,7 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
        } else {
 
                BufferSet& bufs = _session.get_route_buffers (n_process_buffers());
-               
+
                fill_buffers_with_input (bufs, _input, nframes);
 
                if (_meter_point == MeterInput) {
@@ -942,11 +942,11 @@ MonitorState
 Track::monitoring_state () const
 {
        /* Explicit requests */
-       
+
        if (_monitoring & MonitorInput) {
                return MonitoringInput;
        }
-               
+
        if (_monitoring & MonitorDisk) {
                return MonitoringDisk;
        }
@@ -954,16 +954,16 @@ Track::monitoring_state () const
        /* This is an implementation of the truth table in doc/monitor_modes.pdf;
           I don't think it's ever going to be too pretty too look at.
        */
-       
+
        // GZ: NOT USED IN TRACKS
        //bool const auto_input = _session.config.get_auto_input ();
        //bool const software_monitor = Config->get_monitoring_model() == SoftwareMonitoring;
        //bool const tape_machine_mode = Config->get_tape_machine_mode ();
-       
+
        bool const roll = _session.transport_rolling ();
        bool const track_rec = _diskstream->record_enabled ();
        bool session_rec = _session.actively_recording ();
-       
+
        if (track_rec) {
 
                if (!session_rec && roll) {
@@ -993,11 +993,11 @@ MonitorState
 Track::monitoring_state () const
 {
        /* Explicit requests */
-       
+
        if (_monitoring & MonitorInput) {
                return MonitoringInput;
        }
-               
+
        if (_monitoring & MonitorDisk) {
                return MonitoringDisk;
        }
@@ -1046,7 +1046,7 @@ Track::monitoring_state () const
                        } else {
                                return MonitoringDisk;
                        }
-                       
+
                }
        }
 
index eb4db99d87fc6f45ec17780d47b1849de767ef9e..211b9c29f27f39c057bce0b9bd19599de6b93c27 100644 (file)
@@ -139,7 +139,7 @@ ARDOUR::legalize_for_path_2X (const string& str)
        string::size_type pos;
        string legal_chars = "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_+=: ";
         Glib::ustring legal;
-       
+
        /* this is the one place in Ardour where we need to iterate across
         * potential multibyte characters, and thus we need Glib::ustring
         */
index 823b96cffe2afb690ab40cde7da592d06ceadbf2..abca61155e7a0fe6f525aa798c5cdfddf6866795 100644 (file)
@@ -50,7 +50,7 @@ WindowsVSTPlugin::WindowsVSTPlugin (const WindowsVSTPlugin &other)
                throw failed_constructor();
        }
        Session::vst_current_loading_id = 0;
-       
+
        _plugin = _state->plugin;
 }
 
index dd776d17afd7c9bc63d86daefe287f60ecf8c276..82641e6c00db108d649d52cd949f079f3ed79405 100644 (file)
@@ -33,7 +33,7 @@
 namespace AudioGrapher
 {
 
-class SndfileHandle;   
+class SndfileHandle;
 
 class LIBAUDIOGRAPHER_API BroadcastInfo
 {
index a8c63e85b622bbb898bc7b0595f7f9068bf6fe6e..410567d51b7cb74537fee9113af13b7dd2430742 100644 (file)
@@ -34,7 +34,7 @@ struct LIBAUDIOGRAPHER_API DebugUtils
 #endif
                return typeid(obj).name();
        }
-       
+
        /// Returns name of ProcessContext::Flag
        static std::string process_context_flag_name (FlagField::Flag flag);
 };
index 7ff6a79ed16239d053f560e1a8a70d1a30bc045e..f5d4fbf6ed5ed6eec222cc736b1af3b9014855ff 100644 (file)
@@ -26,14 +26,14 @@ class /*LIBAUDIOGRAPHER_API*/ FlagDebuggable : public Debuggable<L>
        {
                flags.set (flag);
        }
-       
+
        /// Prints debug output if \a context contains flags that are not supported by this class
        template<typename SelfType, typename ContextType>
        void check_flags (SelfType & self, ProcessContext<ContextType> context)
        {
                if (!Debuggable<L>::debug_level (DebugFlags)) { return; }
                FlagField unsupported = flags.unsupported_flags_of (context.flags());
-               
+
                for (FlagField::iterator it = unsupported.begin(); it != unsupported.end(); ++it) {
                        Debuggable<L>::debug_stream() << boost::str (boost::format
                                ("%1% does not support flag %2%")
index 34ab5efdd6152e9d60a7ca354298be896698e852..989478f808b077e441419756ef28b3bd09fc1a30 100644 (file)
@@ -20,10 +20,10 @@ class LIBAUDIOGRAPHER_API FlagField
   , boost::equality_comparable<FlagField>
 {
   public:
-       
+
        typedef uint8_t  Flag;
        typedef uint32_t storage_type;
-       
+
        /// Bi-directional iterator for flag set. Iterates over flags that are set in this field.
        class iterator
          : public std::iterator<std::bidirectional_iterator_tag, Flag>
@@ -34,10 +34,10 @@ class LIBAUDIOGRAPHER_API FlagField
          public:
                iterator (FlagField const & parent, Flag position) : parent (parent), position (position) {}
                iterator (iterator const & other) : parent (other.parent), position (other.position) {}
-               
+
                value_type operator*() const { return position; }
                value_type const * operator->() const { return &position; }
-               
+
                iterator & operator++()
                {
                        do {
@@ -46,7 +46,7 @@ class LIBAUDIOGRAPHER_API FlagField
                        return *this;
                }
                iterator operator++(int) { iterator copy (*this); ++(*this); return copy; }
-               
+
                iterator & operator--()
                {
                        do {
@@ -55,19 +55,19 @@ class LIBAUDIOGRAPHER_API FlagField
                        return *this;
                }
                iterator   operator--(int) { iterator copy (*this); --(*this); return copy; }
-               
+
                bool operator< (iterator const & other) const { return position < other.position; }
-               
+
          private:
                FlagField const & parent;
                Flag              position;
        };
-       
+
   public:
-       
+
        FlagField() : _flags (0) {}
        FlagField(FlagField const & other) : _flags (other._flags) {}
-       
+
        inline bool has (Flag flag)    const { return _flags & (1 << flag); }
        inline storage_type flags ()   const { return _flags; }
        inline operator bool()         const { return _flags; }
@@ -77,10 +77,10 @@ class LIBAUDIOGRAPHER_API FlagField
 
        /// Returns the flags in \a other that are not set in this field
        inline FlagField unsupported_flags_of (FlagField const & other) const { return ~(_flags | ~other._flags); }
-       
+
        /// Set all flags that are set in \a other
        inline FlagField & operator+= (FlagField const & other) { _flags |= other._flags; return *this; }
-       
+
        /** Checks whether this field has all the flags set that are set in \a other
          * NOTE: Can NOT be used for strict weak ordering!
          * \return \a true if \a other has flags set that this field does not
@@ -99,7 +99,7 @@ class LIBAUDIOGRAPHER_API FlagField
   private:
        FlagField(storage_type flags) : _flags (flags) {}
        static Flag max() { return CHAR_BIT * sizeof (storage_type) + 1; }
-       
+
        storage_type _flags;
 };
 
index d61c68dee459cda749d2383d88fa14d557ced460..466a33365517404b02c669d026a18636c049b050 100644 (file)
@@ -28,12 +28,12 @@ class /*LIBAUDIOGRAPHER_API*/ Chunker
                buffer = new T[chunk_size];
                add_supported_flag (ProcessContext<T>::EndOfInput);
        }
-       
+
        ~Chunker()
        {
                delete [] buffer;
        }
-       
+
        /** Outputs data in \a context in chunks with the size specified in the constructor.
          * Note that some calls might not produce any output, while others may produce several.
          * \n RT safe
@@ -41,15 +41,15 @@ class /*LIBAUDIOGRAPHER_API*/ Chunker
        void process (ProcessContext<T> const & context)
        {
                check_flags (*this, context);
-               
+
                framecnt_t frames_left = context.frames();
                framecnt_t input_position = 0;
-               
+
                while (position + frames_left >= chunk_size) {
                        // Copy from context to buffer
                        framecnt_t const frames_to_copy = chunk_size - position;
                        TypeUtils<T>::copy (&context.data()[input_position], &buffer[position], frames_to_copy);
-                       
+
                        // Update counters
                        position = 0;
                        input_position += frames_to_copy;
@@ -60,25 +60,25 @@ class /*LIBAUDIOGRAPHER_API*/ Chunker
                        if (frames_left) { c_out.remove_flag(ProcessContext<T>::EndOfInput); }
                        ListedSource<T>::output (c_out);
                }
-               
+
                if (frames_left) {
                        // Copy the rest of the data
                        TypeUtils<T>::copy (&context.data()[input_position], &buffer[position], frames_left);
                        position += frames_left;
                }
-               
+
                if (context.has_flag (ProcessContext<T>::EndOfInput) && position > 0) {
                        ProcessContext<T> c_out (context, buffer, position);
                        ListedSource<T>::output (c_out);
                }
        }
        using Sink<T>::process;
-       
+
   private:
        framecnt_t chunk_size;
        framecnt_t position;
        T * buffer;
-       
+
 };
 
 } // namespace
index fac38912d773245e17ee1ba3271d0e64f3431394..63b6c955895fd3bde9a95889bf33268485285bff 100644 (file)
@@ -21,7 +21,7 @@ class /*LIBAUDIOGRAPHER_API*/ DeInterleaver
 {
   private:
        typedef boost::shared_ptr<IdentityVertex<T> > OutputPtr;
-       
+
   public:
        /// Constructor. \n RT safe
        DeInterleaver()
@@ -29,11 +29,11 @@ class /*LIBAUDIOGRAPHER_API*/ DeInterleaver
          , max_frames (0)
          , buffer (0)
        {}
-       
+
        ~DeInterleaver() { reset(); }
-       
+
        typedef boost::shared_ptr<Source<T> > SourcePtr;
-       
+
        /// Inits the deinterleaver. Must be called before using. \n Not RT safe
        void init (unsigned int num_channels, framecnt_t max_frames_per_channel)
        {
@@ -41,53 +41,53 @@ class /*LIBAUDIOGRAPHER_API*/ DeInterleaver
                channels = num_channels;
                max_frames = max_frames_per_channel;
                buffer = new T[max_frames];
-               
+
                for (unsigned int i = 0; i < channels; ++i) {
                        outputs.push_back (OutputPtr (new IdentityVertex<T>));
                }
        }
-       
+
        /// Returns an output indexed by \a channel \n RT safe
        SourcePtr output (unsigned int channel)
        {
                if (throw_level (ThrowObject) && channel >= channels) {
                        throw Exception (*this, "channel out of range");
                }
-               
+
                return outputs[channel];
        }
-       
+
        /// Deinterleaves data and outputs it to the outputs. \n RT safe
        void process (ProcessContext<T> const & c)
        {
                framecnt_t frames = c.frames();
                T const * data = c.data();
-               
+
                framecnt_t const  frames_per_channel = frames / channels;
-               
+
                if (throw_level (ThrowProcess) && c.channels() != channels) {
                        throw Exception (*this, "wrong amount of channels given to process()");
                }
-               
+
                if (throw_level (ThrowProcess) && frames_per_channel > max_frames) {
                        throw Exception (*this, "too many frames given to process()");
                }
-               
+
                unsigned int channel = 0;
                for (typename std::vector<OutputPtr>::iterator it = outputs.begin(); it != outputs.end(); ++it, ++channel) {
                        if (!*it) { continue; }
-                       
+
                        for (unsigned int i = 0; i < frames_per_channel; ++i) {
                                buffer[i] = data[channel + (channels * i)];
                        }
-                       
+
                        ProcessContext<T> c_out (c, buffer, frames_per_channel, 1);
                        (*it)->process (c_out);
                }
        }
-       
+
        using Sink<T>::process;
-       
+
   private:
 
        void reset ()
@@ -98,7 +98,7 @@ class /*LIBAUDIOGRAPHER_API*/ DeInterleaver
                channels = 0;
                max_frames = 0;
        }
-       
+
        std::vector<OutputPtr> outputs;
        unsigned int channels;
        framecnt_t max_frames;
index 2bc62e5443245c8acb4711136f43b49b9c8c7f52..c1b5e92cfeaa718803a56840aac325d192d1e08c 100644 (file)
@@ -21,30 +21,30 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver
   , public Throwing<>
 {
   public:
-       
+
        /// Constructs an interleaver \n RT safe
        Interleaver()
          : channels (0)
          , max_frames (0)
          , buffer (0)
        {}
-       
+
        ~Interleaver() { reset(); }
-       
+
        /// Inits the interleaver. Must be called before using. \n Not RT safe
        void init (unsigned int num_channels, framecnt_t max_frames_per_channel)
        {
                reset();
                channels = num_channels;
                max_frames = max_frames_per_channel;
-               
+
                buffer = new T[channels * max_frames];
-               
+
                for (unsigned int i = 0; i < channels; ++i) {
                        inputs.push_back (InputPtr (new Input (*this, i)));
                }
        }
-       
+
        /** Returns the input indexed by \a channel \n RT safe
          * \n The \a process function of returned Sinks are also RT Safe
          */
@@ -53,10 +53,10 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver
                if (throw_level (ThrowObject) && channel >= channels) {
                        throw Exception (*this, "Channel out of range");
                }
-               
+
                return boost::static_pointer_cast<Sink<T> > (inputs[channel]);
        }
-       
+
   private:
 
        class Input : public Sink<T>
@@ -64,7 +64,7 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver
          public:
                Input (Interleaver & parent, unsigned int channel)
                  : frames_written (0), parent (parent), channel (channel) {}
-               
+
                void process (ProcessContext<T> const & c)
                {
                        if (parent.throw_level (ThrowProcess) && c.channels() > 1) {
@@ -76,18 +76,18 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver
                        frames_written = c.frames();
                        parent.write_channel (c, channel);
                }
-               
+
                using Sink<T>::process;
-               
+
                framecnt_t frames() { return frames_written; }
                void reset() { frames_written = 0; }
-               
+
          private:
                framecnt_t frames_written;
                Interleaver & parent;
                unsigned int channel;
        };
-       
+
        void reset ()
        {
                inputs.clear();
@@ -96,7 +96,7 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver
                channels = 0;
                max_frames = 0;
        }
-       
+
        void reset_channels ()
        {
                for (unsigned int i = 0; i < channels; ++i) {
@@ -104,18 +104,18 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver
                }
 
        }
-       
+
        void write_channel (ProcessContext<T> const & c, unsigned int channel)
        {
                if (throw_level (ThrowProcess) && c.frames() > max_frames) {
                        reset_channels();
                        throw Exception (*this, "Too many frames given to an input");
                }
-               
+
                for (unsigned int i = 0; i < c.frames(); ++i) {
                        buffer[channel + (channels * i)] = c.data()[i];
                }
-               
+
                framecnt_t const ready_frames = ready_to_output();
                if (ready_frames) {
                        ProcessContext<T> c_out (c, buffer, ready_frames, channels);
@@ -142,7 +142,7 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver
 
        typedef boost::shared_ptr<Input> InputPtr;
        std::vector<InputPtr> inputs;
-       
+
        unsigned int channels;
        framecnt_t max_frames;
        T * buffer;
index e95f0e385229429abfec02d417de244bc7d1e181..025131022e207ef8363c558d3699d70c56ef4a1a 100644 (file)
@@ -32,7 +32,7 @@ public:
 
        /// Process a const ProcessContext \see alloc_buffer() \n RT safe
        void process (ProcessContext<float> const & c);
-       
+
        /// Process a non-const ProcsesContext in-place \n RT safe
        void process (ProcessContext<float> & c);
 
@@ -40,7 +40,7 @@ private:
        bool      enabled;
        float     target;
        float     gain;
-       
+
        float *   buffer;
        framecnt_t buffer_size;
 };
index dd5d65491c46824b6a889db90a4222a3b4fad4c3..8bf0faa79261cf783f48927973f0dedffa07ccc7 100644 (file)
@@ -15,10 +15,10 @@ class /*LIBAUDIOGRAPHER_API*/ PeakReader : public ListedSource<float>, public Si
   public:
        /// Constructor \n RT safe
        PeakReader() : peak (0.0) {}
-       
+
        /// Returns the highest absolute of the values found so far. \n RT safe
        float get_peak() { return peak; }
-       
+
        /// Resets the peak to 0 \n RT safe
        void  reset() { peak = 0.0; }
 
@@ -28,9 +28,9 @@ class /*LIBAUDIOGRAPHER_API*/ PeakReader : public ListedSource<float>, public Si
                peak = Routines::compute_peak (c.data(), c.frames(), peak);
                ListedSource<float>::output(c);
        }
-       
+
        using Sink<float>::process;
-       
+
   private:
        float peak;
 };
index af30ac160558bd4afd2e0a7daae34aff6f272867..96dd6aa72a1b1e08d6d23067b9e6529c557b8140 100644 (file)
@@ -17,7 +17,7 @@ enum /*LIBAUDIOGRAPHER_API*/ DitherType
        D_Tri    = GDitherTri,    ///< Triangular dithering
        D_Shaped = GDitherShaped  ///< Actually noise shaping, only works for 46kHzish signals
 };
-       
+
 /** Sample format converter that does dithering.
   * This class can only convert floats to either \a float, \a int32_t, \a int16_t, or \a uint8_t
   */
@@ -33,7 +33,7 @@ class LIBAUDIOGRAPHER_API SampleFormatConverter
          */
        SampleFormatConverter (ChannelCount channels);
        ~SampleFormatConverter ();
-       
+
        /** Initialize and allocate buffers for processing.
          * \param max_frames maximum number of frames that is allowed to be used in calls to \a process()
          * \param type dither type from \a DitherType
@@ -45,10 +45,10 @@ class LIBAUDIOGRAPHER_API SampleFormatConverter
 
        /// Set whether or not clipping to [-1.0, 1.0] should occur when TOut = float. Clipping is off by default
        void set_clip_floats (bool yn) { clip_floats = yn; }
-       
+
        /// Processes data without modifying it
        void process (ProcessContext<float> const & c_in);
-       
+
        /// This version is only different in the case when \a TOut = float, and float clipping is on.
        void process (ProcessContext<float> & c_in);
 
index a715feb0c89685266477c29215ccdf917f74a740..7e8d3c485c6e47867ab0a2e14ef9970cb9c8912f 100644 (file)
@@ -47,14 +47,14 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                        throw Exception (*this,
                          "Silence trimmer constructor and reset() must be called with a non-zero parameter!");
                }
-               
+
                if (silence_buffer_size != silence_buffer_size_) {
                        silence_buffer_size = silence_buffer_size_;
                        delete [] silence_buffer;
                        silence_buffer = new T[silence_buffer_size];
                        TypeUtils<T>::zero_fill (silence_buffer, silence_buffer_size);
                }
-               
+
                in_beginning = true;
                in_end = false;
                trim_beginning = false;
@@ -64,7 +64,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                add_to_beginning = 0;
                add_to_end = 0;
        }
-       
+
        /** Tells that \a frames_per_channel frames of silence per channel should be added to beginning
          * Needs to be called before starting processing.
          * \n RT safe
@@ -76,7 +76,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                }
                add_to_beginning = frames_per_channel;
        }
-       
+
        /** Tells that \a frames_per_channel frames of silence per channel should be added to end
          * Needs to be called before end is reached.
          * \n RT safe
@@ -88,7 +88,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                }
                add_to_end = frames_per_channel;
        }
-       
+
        /** Tells whether ot nor silence should be trimmed from the beginning
          * Has to be called before starting processing.
          * \n RT safe
@@ -100,7 +100,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                }
                trim_beginning = yn;
        }
-       
+
        /** Tells whether ot nor silence should be trimmed from the end
          * Has to be called before the is reached.
          * \n RT safe
@@ -124,9 +124,9 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                        debug_stream () << DebugUtils::demangled_name (*this) <<
                                "::process()" << std::endl;
                }
-               
+
                check_flags (*this, c);
-               
+
                if (throw_level (ThrowStrict) && in_end) {
                        throw Exception(*this, "process() after reaching end of input");
                }
@@ -134,27 +134,27 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
 
                // If adding to end, delay end of input propagation
                if (add_to_end) { c.remove_flag(ProcessContext<T>::EndOfInput); }
-               
+
                framecnt_t frame_index = 0;
-               
+
                if (in_beginning) {
-                       
+
                        bool has_data = true;
-                       
+
                        // only check silence if doing either of these
                        // This will set both has_data and frame_index
                        if (add_to_beginning || trim_beginning) {
                                has_data = find_first_non_zero_sample (c, frame_index);
                        }
-                       
+
                        // Added silence if there is silence to add
                        if (add_to_beginning) {
-                               
+
                                if (debug_level (DebugVerbose)) {
                                        debug_stream () << DebugUtils::demangled_name (*this) <<
                                                " adding to beginning" << std::endl;
                                }
-                               
+
                                ConstProcessContext<T> c_copy (c);
                                if (has_data) { // There will be more output, so remove flag
                                        c_copy().remove_flag (ProcessContext<T>::EndOfInput);
@@ -162,54 +162,54 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                                add_to_beginning *= c.channels();
                                output_silence_frames (c_copy, add_to_beginning);
                        }
-                       
+
                        // If we are not trimming the beginning, output everything
                        // Then has_data = true and frame_index = 0
                        // Otherwise these reflect the silence state
                        if (has_data) {
-                               
+
                                if (debug_level (DebugVerbose)) {
                                        debug_stream () << DebugUtils::demangled_name (*this) <<
                                                " outputting whole frame to beginning" << std::endl;
                                }
-                               
+
                                in_beginning = false;
                                ConstProcessContext<T> c_out (c, &c.data()[frame_index], c.frames() - frame_index);
                                ListedSource<T>::output (c_out);
                        }
-                       
+
                } else if (trim_end) { // Only check zero samples if trimming end
-                       
+
                        if (find_first_non_zero_sample (c, frame_index)) {
-                               
+
                                if (debug_level (DebugVerbose)) {
                                        debug_stream () << DebugUtils::demangled_name (*this) <<
                                                " flushing intermediate silence and outputting frame" << std::endl;
                                }
-                               
+
                                // context contains non-zero data
                                output_silence_frames (c, silence_frames); // flush intermediate silence
                                ListedSource<T>::output (c); // output rest of data
                        } else { // whole context is zero
-                               
+
                                if (debug_level (DebugVerbose)) {
                                        debug_stream () << DebugUtils::demangled_name (*this) <<
                                                " no, output, adding frames to silence count" << std::endl;
                                }
-                               
+
                                silence_frames += c.frames();
                        }
-                       
+
                } else { // no need to do anything special
-                       
+
                        if (debug_level (DebugVerbose)) {
                                debug_stream () << DebugUtils::demangled_name (*this) <<
                                        " outputting whole frame in middle" << std::endl;
                        }
-                       
+
                        ListedSource<T>::output (c);
                }
-               
+
                // Finally, if in end, add silence to end
                if (in_end && add_to_end) {
                        c.set_flag (ProcessContext<T>::EndOfInput);
@@ -218,7 +218,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                                debug_stream () << DebugUtils::demangled_name (*this) <<
                                        " adding to end" << std::endl;
                        }
-                       
+
                        add_to_end *= c.channels();
                        output_silence_frames (c, add_to_end, true);
                }
@@ -240,22 +240,22 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                }
                return false;
        }
-       
+
        void output_silence_frames (ProcessContext<T> const & c, framecnt_t & total_frames, bool adding_to_end = false)
        {
                bool end_of_input = c.has_flag (ProcessContext<T>::EndOfInput);
                c.remove_flag (ProcessContext<T>::EndOfInput);
-               
+
                while (total_frames > 0) {
                        framecnt_t frames = std::min (silence_buffer_size, total_frames);
                        if (max_output_frames) {
                                frames = std::min (frames, max_output_frames);
                        }
                        frames -= frames % c.channels();
-                       
+
                        total_frames -= frames;
                        ConstProcessContext<T> c_out (c, silence_buffer, frames);
-                       
+
                        // boolean commentation :)
                        bool const no_more_silence_will_be_added = adding_to_end || (add_to_end == 0);
                        bool const is_last_frame_output_in_this_function = (total_frames == 0);
@@ -272,16 +272,16 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
 
        bool       in_beginning;
        bool       in_end;
-       
+
        bool       trim_beginning;
        bool       trim_end;
-       
+
        framecnt_t silence_frames;
        framecnt_t max_output_frames;
-       
+
        framecnt_t add_to_beginning;
        framecnt_t add_to_end;
-       
+
        framecnt_t silence_buffer_size;
        T *        silence_buffer;
 };
index 0cbe3bd294888e0c34cc5b54fc0baff0345a6c47..a2e94d9bc06793cb012b75824cba7ab4da7a3a9b 100644 (file)
@@ -27,10 +27,10 @@ class LIBAUDIOGRAPHER_API SampleRateConverter
 
        /// Init converter \n Not RT safe
        void init (framecnt_t in_rate, framecnt_t out_rate, int quality = 0);
-       
+
        /// Returns max amount of frames that will be output \n RT safe
        framecnt_t allocate_buffers (framecnt_t max_frames);
-       
+
        /** Does sample rate conversion.
          * Note that outpt size may vary a lot.
          * May or may not output several contexts of data.
@@ -48,7 +48,7 @@ class LIBAUDIOGRAPHER_API SampleRateConverter
        bool           active;
        uint32_t       channels;
        framecnt_t     max_frames_in;
-       
+
        float *        leftover_data;
        framecnt_t     leftover_frames;
        framecnt_t     max_leftover_frames;
index e9a953ce44cdef60c532ecf7014e664a4ad231d4..2ef4099efe709e9ec5c200c446d39c58be8269e1 100644 (file)
@@ -39,7 +39,7 @@ class /*LIBAUDIOGRAPHER_API*/ Threader : public Source<T>, public Sink<T>
        typedef std::vector<typename Source<T>::SinkPtr> OutputVec;
 
   public:
-       
+
        /** Constructor
          * \n RT safe
          * \param thread_pool a thread pool from which all tasks are scheduled
@@ -50,39 +50,39 @@ class /*LIBAUDIOGRAPHER_API*/ Threader : public Source<T>, public Sink<T>
          , readers (0)
          , wait_timeout (wait_timeout_milliseconds)
        { }
-       
+
        virtual ~Threader () {}
-       
+
        /// Adds output \n RT safe
        void add_output (typename Source<T>::SinkPtr output) { outputs.push_back (output); }
-       
+
        /// Clears outputs \n RT safe
        void clear_outputs () { outputs.clear (); }
-       
+
        /// Removes a specific output \n RT safe
        void remove_output (typename Source<T>::SinkPtr output) {
                typename OutputVec::iterator new_end = std::remove(outputs.begin(), outputs.end(), output);
                outputs.erase (new_end, outputs.end());
        }
-       
+
        /// Processes context concurrently by scheduling each output separately to the given thread pool
        void process (ProcessContext<T> const & c)
        {
                wait_mutex.lock();
-               
+
                exception.reset();
-               
+
                unsigned int outs = outputs.size();
                g_atomic_int_add (&readers, outs);
                for (unsigned int i = 0; i < outs; ++i) {
                        thread_pool.push (sigc::bind (sigc::mem_fun (this, &Threader::process_output), c, i));
                }
-               
+
                wait();
        }
-       
+
        using Sink<T>::process;
-       
+
   private:
 
        void wait()
@@ -93,12 +93,12 @@ class /*LIBAUDIOGRAPHER_API*/ Threader : public Source<T>, public Sink<T>
                }
 
                wait_mutex.unlock();
-               
+
                if (exception) {
                        throw *exception;
                }
        }
-       
+
        void process_output(ProcessContext<T> const & c, unsigned int output)
        {
                try {
@@ -109,7 +109,7 @@ class /*LIBAUDIOGRAPHER_API*/ Threader : public Source<T>, public Sink<T>
                        if(!exception) { exception.reset (new ThreaderException (*this, e)); }
                        exception_mutex.unlock();
                }
-               
+
                if (g_atomic_int_dec_and_test (&readers)) {
                        wait_cond.signal();
                }
@@ -122,7 +122,7 @@ class /*LIBAUDIOGRAPHER_API*/ Threader : public Source<T>, public Sink<T>
         Glib::Threads::Cond  wait_cond;
        gint        readers;
        long        wait_timeout;
-       
+
         Glib::Threads::Mutex exception_mutex;
        boost::shared_ptr<ThreaderException> exception;
 
index 36abd4fba0ddd477728912efeeb9f31f872cd288..16e637b85c4bf6df32e33313488f7b9da2453d9c 100644 (file)
@@ -45,30 +45,30 @@ public:
        ProcessContext (T * data, framecnt_t frames, ChannelCount channels)
                : _data (data), _frames (frames), _channels (channels)
        { validate_data(); }
-       
+
        /// Normal copy constructor
        ProcessContext (ProcessContext<T> const & other)
                : Throwing<throwLevel>(), _data (other._data), _frames (other._frames), _channels (other._channels), _flags (other._flags)
        { /* No need to validate data */ }
-       
+
        /// "Copy constructor" with unique data, frame and channel count, but copies flags
        template<typename Y>
        ProcessContext (ProcessContext<Y> const & other, T * data, framecnt_t frames, ChannelCount channels)
                : Throwing<throwLevel>(), _data (data), _frames (frames), _channels (channels), _flags (other.flags())
        { validate_data(); }
-       
+
        /// "Copy constructor" with unique data and frame count, but copies channel count and flags
        template<typename Y>
        ProcessContext (ProcessContext<Y> const & other, T * data, framecnt_t frames)
                : Throwing<throwLevel>(), _data (data), _frames (frames), _channels (other.channels()), _flags (other.flags())
        { validate_data(); }
-       
+
        /// "Copy constructor" with unique data, but copies frame and channel count + flags
        template<typename Y>
        ProcessContext (ProcessContext<Y> const & other, T * data)
                : Throwing<throwLevel>(), _data (data), _frames (other.frames()), _channels (other.channels()), _flags (other.flags())
        { /* No need to validate data */ }
-       
+
        /// Make new Context out of the beginning of this context
        ProcessContext beginning (framecnt_t frames)
        {
@@ -78,39 +78,39 @@ public:
                                % DebugUtils::demangled_name (*this) % frames % _frames));
                }
                validate_data ();
-               
+
                return ProcessContext (*this, _data, frames);
        }
-       
+
        virtual ~ProcessContext () {}
-       
+
        /// \a data points to the array of data to process
        inline T const *            data()     const { return _data; }
        inline T *                  data()           { return _data; }
-       
+
        /// \a frames tells how many frames the array pointed by data contains
        inline framecnt_t const &    frames()   const { return _frames; }
-       
+
        /** \a channels tells how many interleaved channels \a data contains
          * If \a channels is greater than 1, each channel contains \a frames / \a channels frames of data
          */
        inline ChannelCount const & channels() const { return _channels; }
-       
+
        /// Returns the amount of frames per channel
        inline framecnt_t            frames_per_channel() const { return _frames / _channels; }
 
        /* Flags */
-       
+
        inline bool has_flag (Flag flag)    const { return _flags.has (flag); }
        inline void set_flag (Flag flag)    const { _flags.set (flag); }
        inline void remove_flag (Flag flag) const { _flags.remove (flag); }
        inline FlagField const & flags ()   const { return _flags; }
-       
+
 protected:
        T * const              _data;
        framecnt_t              _frames;
        ChannelCount           _channels;
-       
+
        mutable FlagField      _flags;
 
   private:
@@ -132,32 +132,32 @@ public:
        /// Allocates uninitialized memory
        AllocatingProcessContext (framecnt_t frames, ChannelCount channels)
                : ProcessContext<T> (new T[frames], frames, channels) {}
-       
+
        /// Allocates and copies data from raw buffer
        AllocatingProcessContext (T const * data, framecnt_t frames, ChannelCount channels)
                : ProcessContext<T> (new T[frames], frames, channels)
        { TypeUtils<float>::copy (data, ProcessContext<T>::_data, frames); }
-       
+
        /// Copy constructor, copies data from other ProcessContext
        AllocatingProcessContext (ProcessContext<T> const & other)
                : ProcessContext<T> (other, new T[other._frames])
        { TypeUtils<float>::copy (ProcessContext<T>::_data, other._data, other._frames); }
-       
+
        /// "Copy constructor" with uninitialized data, unique frame and channel count, but copies flags
        template<typename Y>
        AllocatingProcessContext (ProcessContext<Y> const & other, framecnt_t frames, ChannelCount channels)
                : ProcessContext<T> (other, new T[frames], frames, channels) {}
-       
+
        /// "Copy constructor" with uninitialized data, unique frame count, but copies channel count and flags
        template<typename Y>
        AllocatingProcessContext (ProcessContext<Y> const & other, framecnt_t frames)
                : ProcessContext<T> (other, new T[frames], frames, other.channels()) {}
-       
+
        /// "Copy constructor" uninitialized data, that copies frame and channel count + flags
        template<typename Y>
        AllocatingProcessContext (ProcessContext<Y> const & other)
                : ProcessContext<T> (other, new T[other._frames]) {}
-       
+
        ~AllocatingProcessContext () { delete [] ProcessContext<T>::_data; }
 };
 
@@ -169,21 +169,21 @@ class /*LIBAUDIOGRAPHER_API*/ ConstProcessContext
        /// Basic constructor with data, frame and channel count
        ConstProcessContext (T const * data, framecnt_t frames, ChannelCount channels)
          : context (const_cast<T *>(data), frames, channels) {}
-       
+
        /// Copy constructor from const ProcessContext
        ConstProcessContext (ProcessContext<T> const & other)
          : context (const_cast<ProcessContext<T> &> (other)) {}
-       
+
        /// "Copy constructor", with unique data, frame and channel count, but copies flags
        template<typename ProcessContext>
        ConstProcessContext (ProcessContext const & other, T const * data, framecnt_t frames, ChannelCount channels)
                : context (other, const_cast<T *>(data), frames, channels) {}
-       
+
        /// "Copy constructor", with unique data and frame count, but copies channel count and flags
        template<typename ProcessContext>
        ConstProcessContext (ProcessContext const & other, T const * data, framecnt_t frames)
                : context (other, const_cast<T *>(data), frames) {}
-       
+
        /// "Copy constructor", with unique data, but copies frame and channel count + flags
        template<typename ProcessContext>
        ConstProcessContext (ProcessContext const & other, T const * data)
index 4ab3bc5fb52d63a27b0829ec04a762a774d625eb..d78fa602b6954ac996f9de898816a1297cd64573 100644 (file)
@@ -15,13 +15,13 @@ class LIBAUDIOGRAPHER_API Routines
 {
   public:
        typedef uint32_t uint_type;
-       
+
        typedef float (*compute_peak_t)          (float const *, uint_type, float);
        typedef void  (*apply_gain_to_buffer_t)  (float *, uint_type, float);
-       
+
        static void override_compute_peak         (compute_peak_t func)         { _compute_peak = func; }
        static void override_apply_gain_to_buffer (apply_gain_to_buffer_t func) { _apply_gain_to_buffer = func; }
-       
+
        /** Computes peak in float buffer
          * \n RT safe
          * \param data buffer from which the peak is computed
@@ -61,7 +61,7 @@ class LIBAUDIOGRAPHER_API Routines
                        data[i] *= gain;
                }
        }
-       
+
        static compute_peak_t          _compute_peak;
        static apply_gain_to_buffer_t  _apply_gain_to_buffer;
 };
index b1e5605206d98f40e5e89841447db85889ddfa88..da9e7350eed125c6fd470c2f455291edb473d8f4 100644 (file)
@@ -17,13 +17,13 @@ template <typename T>
 class /*LIBAUDIOGRAPHER_API*/ Sink  {
   public:
        virtual ~Sink () {}
-       
+
        /** Process given data.
          * The data can not be modified, so in-place processing is not allowed.
          * At least this function must be implemented by deriving classes
          */
        virtual void process (ProcessContext<T> const & context) = 0;
-       
+
        /** Process given data
          * Data may be modified, so in place processing is allowed.
          * The default implementation calls the non-modifying version,
index 939e5f8a2ce9298850a29a03a4edf44dc650b148..c48a0331ab5a25e2b1ced986d3509b1dcd71b009 100644 (file)
@@ -14,15 +14,15 @@ template<typename T = DefaultSampleType>
 class Sndfile : public SndfileWriter<T>, public SndfileReader<T>
 {
   public:
-       
+
        Sndfile (std::string const & filename, SndfileBase::Mode mode = SndfileBase::ReadWrite, int format = 0,
                 ChannelCount channels = 0, framecnt_t samplerate = 0)
          : SndfileHandle (filename, mode, format, channels, samplerate)
        {}
-       
+
        Sndfile (Sndfile const & other) : SndfileHandle (other) {}
        using SndfileHandle::operator=;
-       
+
 };
 
 } // namespace
index 02d5a7f6ea17f76f5751c0c5eb09abc764f61a0e..67a34d484e3fe9ab4d486c83b873fc3b40a77fef 100644 (file)
@@ -18,7 +18,7 @@ class SndfileBase : public virtual AudioGrapher::SndfileHandle
                Write = SFM_WRITE,
                ReadWrite = SFM_RDWR
        };
-       
+
   protected:
        SndfileBase () {}
 };
index aa3c0cc89920115738e0306b65c8ab89e4e5ccb0..ea27470d7725eaf39cd78acc2bf9f474cbf12d99 100644 (file)
@@ -18,13 +18,13 @@ class SndfileReader
   , public Throwing<>
 {
   public:
-       
+
        SndfileReader (std::string const & path) : SndfileHandle (path) {}
        virtual ~SndfileReader () {}
 
        SndfileReader (SndfileReader const & other) : SndfileHandle (other) {}
        using SndfileHandle::operator=;
-       
+
        /** Read data into buffer in \a context, only the data is modified (not frame count)
         *  Note that the data read is output to the outputs, as well as read into the context
         *  \return number of frames read
@@ -36,17 +36,17 @@ class SndfileReader
                                ("Wrong number of channels given to process(), %1% instead of %2%")
                                % context.channels() % channels()));
                }
-               
+
                framecnt_t const frames_read = SndfileHandle::read (context.data(), context.frames());
                ProcessContext<T> c_out = context.beginning (frames_read);
-               
+
                if (frames_read < context.frames()) {
                        c_out.set_flag (ProcessContext<T>::EndOfInput);
                }
                this->output (c_out);
                return frames_read;
        }
-       
+
   protected:
        /// SndfileHandle has to be constructed directly by deriving classes
        SndfileReader () {}
index 984ec01d4126bfa180b83bfc3e4779241d2e7d81..57ad968dc5f20b1037a6be0f90bf49de988b13db 100644 (file)
@@ -37,9 +37,9 @@ class SndfileWriter
                        broadcast_info->write_to_file (this);
                }
        }
-       
+
        virtual ~SndfileWriter () {}
-       
+
        SndfileWriter (SndfileWriter const & other)
                : SndfileHandle (other)
        {
@@ -50,18 +50,18 @@ class SndfileWriter
 
        framecnt_t get_frames_written() const { return frames_written; }
        void       reset_frames_written_count() { frames_written = 0; }
-       
+
        /// Writes data to file
        void process (ProcessContext<T> const & c)
        {
                check_flags (*this, c);
-               
+
                if (throw_level (ThrowStrict) && c.channels() != channels()) {
                        throw Exception (*this, boost::str (boost::format
                                ("Wrong number of channels given to process(), %1% instead of %2%")
                                % c.channels() % channels()));
                }
-               
+
                framecnt_t const written = write (c.data(), c.frames());
                frames_written += written;
 
@@ -76,9 +76,9 @@ class SndfileWriter
                        FileWritten (path);
                }
        }
-       
+
        using Sink<T>::process;
-       
+
        PBD::Signal1<void, std::string> FileWritten;
 
   protected:
index 945cb13298d404419a9c1eff61e16bcab479ce96..2d80345b9bf924a1e5c660a403fc9c337c36a552 100644 (file)
@@ -19,15 +19,15 @@ class /*LIBAUDIOGRAPHER_API*/ Source
 {
   public:
        virtual ~Source () { }
-       
+
        typedef boost::shared_ptr<Sink<T> > SinkPtr;
-       
+
        /// Adds an output to this source. All data generated is forwarded to \a output
        virtual void add_output (SinkPtr output) = 0;
-       
+
        /// Removes all outputs added
        virtual void clear_outputs () = 0;
-       
+
        /// Removes a specific output from this source
        virtual void remove_output (SinkPtr output) = 0;
 };
index e86fbcc28284e5a5ba7f865b3c87f077f03a25f9..4e12937165ed44064214668d85b0ee641a401210 100644 (file)
@@ -17,7 +17,7 @@ namespace AudioGrapher
 class LIBAUDIOGRAPHER_API TypeUtilsBase
 {
   protected:
-       
+
        template<typename T, bool b>
        static void do_zero_fill(T * buffer, framecnt_t frames, const boost::integral_constant<bool, b>&)
                { std::uninitialized_fill_n (buffer, frames, T()); }
@@ -32,7 +32,7 @@ template<typename T = DefaultSampleType>
 class /*LIBAUDIOGRAPHER_API*/ TypeUtils : private TypeUtilsBase
 {
        BOOST_STATIC_ASSERT (boost::has_trivial_destructor<T>::value);
-       
+
        typedef boost::integral_constant<bool,
                        boost::is_floating_point<T>::value ||
                        boost::is_signed<T>::value> zero_fillable;
@@ -44,14 +44,14 @@ class /*LIBAUDIOGRAPHER_API*/ TypeUtils : private TypeUtilsBase
          */
        inline static void zero_fill (T * buffer, framecnt_t frames)
                { do_zero_fill(buffer, frames, zero_fillable()); }
-       
+
        /** Copies \a frames frames of data from \a source to \a destination
          * The source and destination may NOT overlap.
          * \n RT safe
          */
        inline static void copy (T const * source, T * destination, framecnt_t frames)
                { std::uninitialized_copy (source, &source[frames], destination); }
-       
+
        /** Moves \a frames frames of data from \a source to \a destination
          * The source and destination may overlap in any way.
          * \n RT safe
index 4288dce0c6ad4f654af1edf5de02cc9d86383f42..1ecf6360a0a05d3db498cf3e25a54c50c20015b6 100644 (file)
@@ -7,9 +7,9 @@
 
 namespace AudioGrapher {
 
-/* XXX: copied from libardour */       
+/* XXX: copied from libardour */
 typedef int64_t framecnt_t;
-       
+
 typedef uint8_t ChannelCount;
 
 typedef float DefaultSampleType;
index b9bfbc65f887497acd63a14cd4850799f32191b1..7069f13c725066a356fe0c495d0d76d647f6a96a 100644 (file)
@@ -19,11 +19,11 @@ class /*LIBAUDIOGRAPHER_API*/ ListedSource : public Source<T>
        void add_output (typename Source<T>::SinkPtr output) { outputs.push_back(output); }
        void clear_outputs () { outputs.clear(); }
        void remove_output (typename Source<T>::SinkPtr output) { outputs.remove(output); }
-       
+
   protected:
-       
+
        typedef std::list<typename Source<T>::SinkPtr> SinkList;
-       
+
        /// Helper for derived classes
        void output (ProcessContext<T> const & c)
        {
index c243164f58420d5f301e50e1caa326b05ba00b9b..4113ad784176ea1ce8bc63ddbd048913b4cdd33f 100644 (file)
@@ -30,7 +30,7 @@ std::string
 DebugUtils::process_context_flag_name (FlagField::Flag flag)
 {
        std::ostringstream ret;
-       
+
        switch (flag) {
                case ProcessContext<>::EndOfInput:
                        ret << "EndOfInput";
@@ -39,7 +39,7 @@ DebugUtils::process_context_flag_name (FlagField::Flag flag)
                        ret << flag;
                        break;
        }
-       
+
        return ret.str();
 }
 
index 5497c2ab14c817ad93cc970662f43c5d67dcbd87..d241d71892db5cf95e06b12c051e96021e1962c8 100644 (file)
@@ -30,7 +30,7 @@ Normalizer::Normalizer (float target_dB)
 {
        target = pow (10.0f, target_dB * 0.05f);
 }
-       
+
 Normalizer::~Normalizer()
 {
        delete [] buffer;
@@ -66,12 +66,12 @@ void Normalizer::process (ProcessContext<float> const & c)
        if (throw_level (ThrowProcess) && c.frames() > buffer_size) {
                throw Exception (*this, "Too many frames given to process()");
        }
-       
+
        if (enabled) {
                memcpy (buffer, c.data(), c.frames() * sizeof(float));
                Routines::apply_gain_to_buffer (buffer, c.frames(), gain);
        }
-       
+
        ProcessContext<float> c_out (c, buffer);
        ListedSource<float>::output (c_out);
 }
index a04ebfc25c97d7af2952360adee8cd73ad16ec44..1f79818a8bfc804549a3402ae737f67f2afbb25e 100644 (file)
@@ -120,11 +120,11 @@ SampleFormatConverter<TOut>::reset()
                gdither_free (dither);
                dither = 0;
        }
-       
+
        delete[] data_out;
        data_out_size = 0;
        data_out = 0;
-       
+
        clip_floats = false;
 }
 
@@ -134,7 +134,7 @@ void
 SampleFormatConverter<TOut>::process (ProcessContext<float> const & c_in)
 {
        float const * const data = c_in.data();
-       
+
        check_frame_and_channel_count (c_in.frames (), c_in.channels ());
 
        /* Do conversion */
@@ -164,7 +164,7 @@ SampleFormatConverter<float>::process (ProcessContext<float> & c_in)
 {
        framecnt_t frames = c_in.frames();
        float * data = c_in.data();
-       
+
        if (clip_floats) {
                for (framecnt_t x = 0; x < frames; ++x) {
                        if (data[x] > 1.0f) {
@@ -186,7 +186,7 @@ SampleFormatConverter<float>::process (ProcessContext<float> const & c_in)
        // Make copy of data and pass it to non-const version
        check_frame_and_channel_count (c_in.frames(), c_in.channels());
        TypeUtils<float>::copy (c_in.data(), data_out, c_in.frames());
-       
+
        ProcessContext<float> c (c_in, data_out);
        process (c);
 }
@@ -200,7 +200,7 @@ SampleFormatConverter<TOut>::check_frame_and_channel_count (framecnt_t frames, C
                        ("Wrong channel count given to process(), %1% instead of %2%")
                        % channels_ % channels));
        }
-       
+
        if (throw_level (ThrowProcess) && frames  > data_out_size) {
                throw Exception (*this, boost::str (boost::format
                        ("Too many frames given to process(), %1% instad of %2%")
index 512e57a7438633f254fa5a172950178c565a08cb..90de3e58d76d2ee2e02923f3795e64b35e0f5cb2 100644 (file)
@@ -49,7 +49,7 @@ void
 SampleRateConverter::init (framecnt_t in_rate, framecnt_t out_rate, int quality)
 {
        reset();
-       
+
        if (in_rate == out_rate) {
                src_data.src_ratio = 1;
                return;
@@ -76,7 +76,7 @@ framecnt_t
 SampleRateConverter::allocate_buffers (framecnt_t max_frames)
 {
        if (!active) { return max_frames; }
-       
+
        framecnt_t max_frames_out = (framecnt_t) ceil (max_frames * src_data.src_ratio);
        if (data_out_size < max_frames_out) {
 
@@ -93,7 +93,7 @@ SampleRateConverter::allocate_buffers (framecnt_t max_frames)
                max_frames_in = max_frames;
                data_out_size = max_frames_out;
        }
-       
+
        return max_frames_out;
 }
 
@@ -101,7 +101,7 @@ void
 SampleRateConverter::process (ProcessContext<float> const & c)
 {
        check_flags (*this, c);
-       
+
        if (!active) {
                output (c);
                return;
@@ -158,7 +158,7 @@ SampleRateConverter::process (ProcessContext<float> const & c)
                                ", data_out: " << src_data.data_out <<
                                ", output_frames: " << src_data.output_frames << std::endl;
                }
-               
+
                err = src_process (src_state, &src_data);
                if (throw_level (ThrowProcess) && err) {
                        throw Exception (*this, str (format
@@ -193,9 +193,9 @@ SampleRateConverter::process (ProcessContext<float> const & c)
                                ("No output frames genereated with %1% leftover frames")
                                % leftover_frames));
                }
-               
+
        } while (leftover_frames > frames);
-       
+
        // src_data.end_of_input has to be checked to prevent infinite recursion
        if (!src_data.end_of_input && c.has_flag(ProcessContext<float>::EndOfInput)) {
                set_end_of_input (c);
@@ -205,10 +205,10 @@ SampleRateConverter::process (ProcessContext<float> const & c)
 void SampleRateConverter::set_end_of_input (ProcessContext<float> const & c)
 {
        src_data.end_of_input = true;
-       
+
        float f;
        ProcessContext<float> const dummy (c, &f, 0, channels);
-       
+
        /* No idea why this has to be done twice for all data to be written,
         * but that just seems to be the way it is...
         */
@@ -224,17 +224,17 @@ void SampleRateConverter::reset ()
        active = false;
        max_frames_in = 0;
        src_data.end_of_input = false;
-       
+
        if (src_state) {
                src_delete (src_state);
        }
-       
+
        leftover_frames = 0;
        max_leftover_frames = 0;
        if (leftover_data) {
                free (leftover_data);
        }
-       
+
        data_out_size = 0;
        delete [] data_out;
        data_out = 0;
index d3adab36918296f1314e9d40f7e5f89bb2289a0a..12b5da5dbc1efdece9c5250956f0a51539f36850 100644 (file)
@@ -35,52 +35,52 @@ class ChunkerTest : public CppUnit::TestFixture
        {
                chunker->add_output (sink);
                framecnt_t frames_output = 0;
-               
+
                ProcessContext<float> const context (random_data, frames, 1);
-               
+
                chunker->process (context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
-               
+
                chunker->process (context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (2 * frames, frames_output);
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[frames], frames));
-               
+
                sink->reset();
-               
+
                chunker->process (context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
-               
+
                chunker->process (context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (2 * frames, frames_output);
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[frames], frames));
        }
-       
+
        void testAsynchronousProcess()
        {
                assert (frames % 2 == 0);
-               
+
                chunker->add_output (sink);
                framecnt_t frames_output = 0;
-               
+
                ProcessContext<float> const half_context (random_data, frames / 2, 1);
                ProcessContext<float> const context (random_data, frames, 1);
-               
+
                // 0.5
                chunker->process (half_context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
-               
+
                // 1.5
                chunker->process (context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
-               
+
                // 2.5
                chunker->process (context);
                frames_output = sink->get_data().size();
@@ -88,14 +88,14 @@ class ChunkerTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink->get_array(), frames / 2));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[frames / 2], frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[ 3 * frames / 2], frames / 2));
-               
+
                sink->reset();
-               
+
                // 3.5
                chunker->process (context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_output);
-               
+
                // 4.0
                chunker->process (half_context);
                frames_output = sink->get_data().size();
@@ -104,30 +104,30 @@ class ChunkerTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[frames / 2], frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, &sink->get_array()[ 3 * frames / 2], frames / 2));
        }
-       
+
        void testChoppingProcess()
        {
                sink.reset (new AppendingVectorSink<float>());
-               
+
                assert (frames % 2 == 0);
                chunker.reset (new Chunker<float>(frames / 4));
-               
+
                chunker->add_output (sink);
                framecnt_t frames_output = 0;
-               
+
                ProcessContext<float> const half_context (random_data, frames / 2, 1);
                ProcessContext<float> const context (random_data, frames, 1);
-               
+
                // 0.5
                chunker->process (half_context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL ((framecnt_t) frames / 2, frames_output);
-               
+
                // 1.5
                chunker->process (context);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL ((framecnt_t) frames / 2 * 3, frames_output);
-               
+
                // 2.5
                chunker->process (context);
                frames_output = sink->get_data().size();
@@ -140,15 +140,15 @@ class ChunkerTest : public CppUnit::TestFixture
        void testEndOfInputFlagHandling()
        {
                boost::shared_ptr<ProcessContextGrabber<float> > grabber(new ProcessContextGrabber<float>());
-               
+
                assert (frames % 2 == 0);
                chunker.reset (new Chunker<float>(frames));
                chunker->add_output (grabber);
-               
+
                ProcessContext<float> const half_context (random_data, frames / 2, 1);
                ProcessContext<float> const context (random_data, frames, 1);
                context.set_flag(ProcessContext<>::EndOfInput);
-               
+
                // Process 0.5 then 1.0
                chunker->process (half_context);
                chunker->process (context);
index 3260045b110e7ec46be771f7953009b554f18dae..f7e15459b3521a5634d90bbc57a50ffc4a44e043 100644 (file)
@@ -48,15 +48,15 @@ class DeInterleaverTest : public CppUnit::TestFixture
        void testInvalidInputSize()
        {
                deinterleaver->init (channels, frames_per_channel);
-               
+
                ProcessContext<float> c (random_data, 2 * total_frames, channels);
-               
+
                // Too many, frames % channels == 0
                CPPUNIT_ASSERT_THROW (deinterleaver->process (c.beginning (total_frames + channels)), Exception);
-               
+
                // Too many, frames % channels != 0
                CPPUNIT_ASSERT_THROW (deinterleaver->process (c.beginning (total_frames + 1)), Exception);
-               
+
                // Too few, frames % channels != 0
                CPPUNIT_ASSERT_THROW (deinterleaver->process (c.beginning (total_frames - 1)), Exception);
        }
@@ -64,13 +64,13 @@ class DeInterleaverTest : public CppUnit::TestFixture
        void assert_outputs (framecnt_t expected_frames)
        {
                framecnt_t generated_frames = 0;
-               
+
                generated_frames = sink_a->get_data().size();
                CPPUNIT_ASSERT_EQUAL (expected_frames, generated_frames);
-               
+
                generated_frames = sink_b->get_data().size();
                CPPUNIT_ASSERT_EQUAL (expected_frames, generated_frames);
-               
+
                generated_frames = sink_c->get_data().size();
                CPPUNIT_ASSERT_EQUAL (expected_frames, generated_frames);
        }
@@ -78,34 +78,34 @@ class DeInterleaverTest : public CppUnit::TestFixture
        void testOutputSize()
        {
                deinterleaver->init (channels, frames_per_channel);
-               
+
                deinterleaver->output (0)->add_output (sink_a);
                deinterleaver->output (1)->add_output (sink_b);
                deinterleaver->output (2)->add_output (sink_c);
-               
+
                // Test maximum frame input
                ProcessContext<float> c (random_data, total_frames, channels);
                deinterleaver->process (c);
                assert_outputs (frames_per_channel);
-               
+
                // Now with less frames
                framecnt_t const less_frames = frames_per_channel / 4;
                deinterleaver->process (c.beginning (less_frames * channels));
                assert_outputs (less_frames);
        }
-       
+
        void testZeroInput()
        {
                deinterleaver->init (channels, frames_per_channel);
-               
+
                deinterleaver->output (0)->add_output (sink_a);
                deinterleaver->output (1)->add_output (sink_b);
                deinterleaver->output (2)->add_output (sink_c);
-               
+
                // Input zero frames
                ProcessContext<float> c (random_data, total_frames, channels);
                deinterleaver->process (c.beginning (0));
-               
+
                // ...and now test regular input
                deinterleaver->process (c);
                assert_outputs (frames_per_channel);
index da042b949478c8805108f9ae56b75dcf668f7207..4f46a834929b3760ebc0b3d78cbaeeae40f0f8a1 100644 (file)
@@ -18,14 +18,14 @@ class InterleaverDeInterleaverTest : public CppUnit::TestFixture
                channels = 3;
                frames_per_channel = 128;
                total_frames = channels * frames_per_channel;
-               
+
                random_data_a = TestUtils::init_random_data (total_frames, 1.0);
                random_data_b = TestUtils::init_random_data (frames_per_channel, 1.0);
                random_data_c = TestUtils::init_random_data (frames_per_channel, 1.0);
 
                deinterleaver.reset (new DeInterleaver<float>());
                interleaver.reset (new Interleaver<float>());
-               
+
                sink_a.reset (new VectorSink<float>());
                sink_b.reset (new VectorSink<float>());
                sink_c.reset (new VectorSink<float>());
@@ -42,64 +42,64 @@ class InterleaverDeInterleaverTest : public CppUnit::TestFixture
        {
                deinterleaver->init (channels, frames_per_channel);
                interleaver->init (channels, frames_per_channel);
-               
+
                deinterleaver->output (0)->add_output (interleaver->input (0));
                deinterleaver->output (1)->add_output (interleaver->input (1));
                deinterleaver->output (2)->add_output (interleaver->input (2));
-               
+
                interleaver->add_output (sink_a);
-               
+
                // Process and assert
                ProcessContext<float> c (random_data_a, total_frames, channels);
                deinterleaver->process (c);
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data_a, sink_a->get_array(), total_frames));
-               
+
                // And a second round...
                framecnt_t less_frames = (frames_per_channel / 10) * channels;
                deinterleaver->process (c.beginning (less_frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data_a, sink_a->get_array(), less_frames));
        }
-       
+
        void testDeInterleavedInput()
        {
                deinterleaver->init (channels, frames_per_channel);
                interleaver->init (channels, frames_per_channel);
-               
+
                interleaver->add_output (deinterleaver);
-               
+
                deinterleaver->output (0)->add_output (sink_a);
                deinterleaver->output (1)->add_output (sink_b);
                deinterleaver->output (2)->add_output (sink_c);
-               
+
                ProcessContext<float> c_a (random_data_a, frames_per_channel, 1);
                ProcessContext<float> c_b (random_data_b, frames_per_channel, 1);
                ProcessContext<float> c_c (random_data_c, frames_per_channel, 1);
-               
+
                // Process and assert
                interleaver->input (0)->process (c_a);
                interleaver->input (1)->process (c_b);
                interleaver->input (2)->process (c_c);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data_a, sink_a->get_array(), frames_per_channel));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data_b, sink_b->get_array(), frames_per_channel));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data_c, sink_c->get_array(), frames_per_channel));
-               
+
                // And a second round...
                framecnt_t less_frames = frames_per_channel / 5;
                interleaver->input (0)->process (c_a.beginning (less_frames));
                interleaver->input (1)->process (c_b.beginning (less_frames));
                interleaver->input (2)->process (c_c.beginning (less_frames));
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data_a, sink_a->get_array(), less_frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data_b, sink_b->get_array(), less_frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data_c, sink_c->get_array(), less_frames));
-               
+
        }
 
   private:
        boost::shared_ptr<Interleaver<float> > interleaver;
        boost::shared_ptr<DeInterleaver<float> > deinterleaver;
-       
+
        boost::shared_ptr<VectorSink<float> > sink_a;
        boost::shared_ptr<VectorSink<float> > sink_b;
        boost::shared_ptr<VectorSink<float> > sink_c;
@@ -107,7 +107,7 @@ class InterleaverDeInterleaverTest : public CppUnit::TestFixture
        float * random_data_a;
        float * random_data_b;
        float * random_data_c;
-       
+
        framecnt_t frames_per_channel;
        framecnt_t total_frames;
        unsigned int channels;
index b82aac74bb5b6a822cd9aae9d428f9197441204e..0b8f8b6952b874c302c4ef63dd39c85704ed3d5c 100644 (file)
@@ -24,7 +24,7 @@ class InterleaverTest : public CppUnit::TestFixture
 
                interleaver.reset (new Interleaver<float>());
                sink.reset (new VectorSink<float>());
-               
+
                interleaver->init (channels, frames);
        }
 
@@ -50,7 +50,7 @@ class InterleaverTest : public CppUnit::TestFixture
        {
                ProcessContext<float> c (random_data, frames + 1, 1);
                CPPUNIT_ASSERT_THROW (interleaver->input (0)->process (c), Exception);
-               
+
                interleaver->input (0)->process (c.beginning (frames));
                interleaver->input (1)->process (c.beginning (frames));
                CPPUNIT_ASSERT_THROW (interleaver->input (2)->process (c.beginning (frames - 1)), Exception);
@@ -92,9 +92,9 @@ class InterleaverTest : public CppUnit::TestFixture
                interleaver->input (0)->process (c.beginning (0));
                interleaver->input (1)->process (c.beginning (0));
                interleaver->input (2)->process (c.beginning (0));
-               
+
                // NOTE zero input is allowed to be a NOP
-               
+
                // ...now test regular input
                interleaver->input (0)->process (c);
                interleaver->input (1)->process (c);
@@ -110,7 +110,7 @@ class InterleaverTest : public CppUnit::TestFixture
                interleaver->add_output (sink);
                ProcessContext<float> c (random_data, frames, 1);
                interleaver->input (0)->process (c);
-               CPPUNIT_ASSERT_THROW (interleaver->input (0)->process (c), Exception);          
+               CPPUNIT_ASSERT_THROW (interleaver->input (0)->process (c), Exception);
        }
 
 
index be236802022fd2b6801ebf2e5329f0b81b04560c..fb8cd617c254a4ab89889a178aa84a2ce6ec0dd8 100644 (file)
@@ -26,24 +26,24 @@ class NormalizerTest : public CppUnit::TestFixture
        {
                float target = 0.0;
                random_data = TestUtils::init_random_data(frames, 0.5);
-               
+
                normalizer.reset (new Normalizer(target));
                peak_reader.reset (new PeakReader());
                sink.reset (new VectorSink<float>());
-               
+
                ProcessContext<float> const c (random_data, frames, 1);
                peak_reader->process (c);
-               
+
                float peak = peak_reader->get_peak();
                normalizer->alloc_buffer (frames);
                normalizer->set_peak (peak);
                normalizer->add_output (sink);
                normalizer->process (c);
-               
+
                peak_reader->reset();
                ConstProcessContext<float> normalized (sink->get_array(), frames, 1);
                peak_reader->process (normalized);
-               
+
                peak = peak_reader->get_peak();
                CPPUNIT_ASSERT (-FLT_EPSILON <= (peak - 1.0) && (peak - 1.0) <= 0.0);
        }
index 6b60598a2ee67e96118cf2d74c8aa03383757a6c..a93d28a9549e7beb99be2e5243449fef3d331e11 100644 (file)
@@ -26,17 +26,17 @@ class PeakReaderTest : public CppUnit::TestFixture
        {
                reader.reset (new PeakReader());
                ProcessContext<float> c (random_data, frames, 1);
-               
+
                float peak = 1.5;
                random_data[10] = peak;
                reader->process (c);
                CPPUNIT_ASSERT_EQUAL(peak, reader->get_peak());
-               
+
                peak = 2.0;
                random_data[10] = peak;
                reader->process (c);
                CPPUNIT_ASSERT_EQUAL(peak, reader->get_peak());
-               
+
                peak = -2.1;
                random_data[10] = peak;
                reader->process (c);
index 977e2b390a9d034c38c2a5228bd94f63b70d00c8..734389a427a40dc677619101b930fee907187e2a 100644 (file)
@@ -63,25 +63,25 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
        {
                boost::shared_ptr<SampleFormatConverter<int32_t> > converter (new SampleFormatConverter<int32_t>(1));
                boost::shared_ptr<VectorSink<int32_t> > sink (new VectorSink<int32_t>());
-               
+
                converter->init (frames, D_Tri, 32);
                converter->add_output (sink);
                framecnt_t frames_output = 0;
-               
+
                {
                ProcessContext<float> pc(random_data, frames / 2, 1);
                converter->process (pc);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames / 2, frames_output);
                }
-               
+
                {
                ProcessContext<float> pc(random_data, frames, 1);
                converter->process (pc);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
                }
-               
+
                {
                ProcessContext<float> pc(random_data, frames + 1, 1);
                CPPUNIT_ASSERT_THROW(converter->process (pc), Exception);
@@ -93,27 +93,27 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
                boost::shared_ptr<SampleFormatConverter<float> > converter (new SampleFormatConverter<float>(1));
                boost::shared_ptr<VectorSink<float> > sink (new VectorSink<float>());
                framecnt_t frames_output = 0;
-               
+
                converter->init(frames, D_Tri, 32);
                converter->add_output (sink);
-               
+
                converter->set_clip_floats (false);
                ProcessContext<float> const pc(random_data, frames, 1);
                converter->process (pc);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
                CPPUNIT_ASSERT (TestUtils::array_equals(sink->get_array(), random_data, frames));
-               
+
                // Make sure a few samples are < -1.0 and > 1.0
                random_data[10] = -1.5;
                random_data[20] = 1.5;
-               
+
                converter->set_clip_floats (true);
                converter->process (pc);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
                CPPUNIT_ASSERT (TestUtils::array_filled(sink->get_array(), frames));
-               
+
                for (framecnt_t i = 0; i < frames; ++i) {
                        // fp comparison needs a bit of tolerance, 1.01 << 1.5
                        CPPUNIT_ASSERT(sink->get_data()[i] < 1.01);
@@ -126,77 +126,77 @@ class SampleFormatConverterTest : public CppUnit::TestFixture
                boost::shared_ptr<SampleFormatConverter<int32_t> > converter (new SampleFormatConverter<int32_t>(1));
                boost::shared_ptr<VectorSink<int32_t> > sink (new VectorSink<int32_t>());
                framecnt_t frames_output = 0;
-               
+
                converter->init(frames, D_Tri, 32);
                converter->add_output (sink);
-               
+
                ProcessContext<float> pc(random_data, frames, 1);
                converter->process (pc);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
                CPPUNIT_ASSERT (TestUtils::array_filled(sink->get_array(), frames));
        }
-       
+
        void testInt24()
        {
                boost::shared_ptr<SampleFormatConverter<int32_t> > converter (new SampleFormatConverter<int32_t>(1));
                boost::shared_ptr<VectorSink<int32_t> > sink (new VectorSink<int32_t>());
                framecnt_t frames_output = 0;
-               
+
                converter->init(frames, D_Tri, 24);
                converter->add_output (sink);
-               
+
                ProcessContext<float> pc(random_data, frames, 1);
                converter->process (pc);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
                CPPUNIT_ASSERT (TestUtils::array_filled(sink->get_array(), frames));
        }
-       
+
        void testInt16()
        {
                boost::shared_ptr<SampleFormatConverter<int16_t> > converter (new SampleFormatConverter<int16_t>(1));
                boost::shared_ptr<VectorSink<int16_t> > sink (new VectorSink<int16_t>());
                framecnt_t frames_output = 0;
-               
+
                converter->init(frames, D_Tri, 16);
                converter->add_output (sink);
-               
+
                ProcessContext<float> pc(random_data, frames, 1);
                converter->process (pc);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
                CPPUNIT_ASSERT (TestUtils::array_filled(sink->get_array(), frames));
        }
-       
+
        void testUint8()
        {
                boost::shared_ptr<SampleFormatConverter<uint8_t> > converter (new SampleFormatConverter<uint8_t>(1));
                boost::shared_ptr<VectorSink<uint8_t> > sink (new VectorSink<uint8_t>());
                framecnt_t frames_output = 0;
-               
+
                converter->init(frames, D_Tri, 8);
                converter->add_output (sink);
-               
+
                ProcessContext<float> pc(random_data, frames, 1);
                converter->process (pc);
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
                CPPUNIT_ASSERT (TestUtils::array_filled(sink->get_array(), frames));
        }
-       
+
        void testChannelCount()
        {
                boost::shared_ptr<SampleFormatConverter<int32_t> > converter (new SampleFormatConverter<int32_t>(3));
                boost::shared_ptr<VectorSink<int32_t> > sink (new VectorSink<int32_t>());
                framecnt_t frames_output = 0;
-               
+
                converter->init(frames, D_Tri, 32);
                converter->add_output (sink);
-               
+
                ProcessContext<float> pc(random_data, 4, 1);
                CPPUNIT_ASSERT_THROW (converter->process (pc), Exception);
-               
+
                framecnt_t new_frame_count = frames - (frames % 3);
                converter->process (ProcessContext<float> (pc.data(), new_frame_count, 3));
                frames_output = sink->get_data().size();
index dfcf3c7ca29674fa7194f183722eb77dfcedc433..be53c899787facd83ded57d41e39021d604ff04e 100644 (file)
@@ -18,20 +18,20 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
        void setUp()
        {
                frames = 128;
-               
+
                random_data = TestUtils::init_random_data(frames);
                random_data[0] = 0.5;
                random_data[frames - 1] = 0.5;
-               
+
                zero_data = new float[frames];
                memset(zero_data, 0, frames * sizeof(float));
-               
+
                half_random_data = TestUtils::init_random_data(frames);
                memset(half_random_data, 0, (frames / 2) * sizeof(float));
-               
+
                trimmer.reset (new SilenceTrimmer<float> (frames / 2));
                sink.reset (new AppendingVectorSink<float>());
-               
+
                trimmer->set_trim_beginning (true);
                trimmer->set_trim_end (true);
        }
@@ -46,14 +46,14 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
        void testFullBuffers()
        {
                trimmer->add_output (sink);
-               
+
                {
                ProcessContext<float> c (zero_data, frames, 1);
                trimmer->process (c);
                framecnt_t frames_processed = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL ((framecnt_t) 0, frames_processed);
                }
-               
+
                {
                ProcessContext<float> c (random_data, frames, 1);
                trimmer->process (c);
@@ -61,14 +61,14 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT_EQUAL (frames, frames_processed);
                CPPUNIT_ASSERT (TestUtils::array_equals (sink->get_array(), random_data, frames));
                }
-               
+
                {
                ProcessContext<float> c (zero_data, frames, 1);
                trimmer->process (c);
                framecnt_t frames_processed = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_processed);
                }
-               
+
                {
                ProcessContext<float> c (random_data, frames, 1);
                trimmer->process (c);
@@ -78,7 +78,7 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT (TestUtils::array_equals (&sink->get_array()[frames], zero_data, frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (&sink->get_array()[2 * frames], random_data, frames));
                }
-               
+
                {
                ProcessContext<float> c (zero_data, frames, 1);
                trimmer->process (c);
@@ -86,14 +86,14 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT_EQUAL (3 * frames, frames_processed);
                }
        }
-       
+
        void testPartialBuffers()
        {
                trimmer->add_output (sink);
                trimmer->reset (frames / 4);
                trimmer->set_trim_beginning (true);
                trimmer->set_trim_end (true);
-               
+
                {
                ProcessContext<float> c (half_random_data, frames, 1);
                trimmer->process (c);
@@ -101,14 +101,14 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT_EQUAL (frames / 2, frames_processed);
                CPPUNIT_ASSERT (TestUtils::array_equals (sink->get_array(), &half_random_data[frames / 2], frames / 2));
                }
-               
+
                {
                ProcessContext<float> c (zero_data, frames, 1);
                trimmer->process (c);
                framecnt_t frames_processed = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames / 2, frames_processed);
                }
-               
+
                {
                ProcessContext<float> c (half_random_data, frames, 1);
                trimmer->process (c);
@@ -117,48 +117,48 @@ class SilenceTrimmerTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT (TestUtils::array_equals (&sink->get_array()[frames + frames / 2], half_random_data, frames));
                }
        }
-       
+
        void testExceptions()
        {
                {
                CPPUNIT_ASSERT_THROW (trimmer->reset (0), Exception);
                }
        }
-       
+
        void testAddSilenceBeginning()
        {
                trimmer->add_output (sink);
-               
+
                framecnt_t silence = frames / 2;
                trimmer->add_silence_to_beginning (silence);
-               
+
                {
                ProcessContext<float> c (random_data, frames, 1);
                trimmer->process (c);
                }
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals (sink->get_array(), zero_data, silence));
                CPPUNIT_ASSERT (TestUtils::array_equals (&sink->get_array()[silence], random_data, frames));
        }
-       
+
        void testAddSilenceEnd()
        {
                trimmer->add_output (sink);
-               
+
                framecnt_t silence = frames / 3;
                trimmer->add_silence_to_end (silence);
-               
+
                {
                ProcessContext<float> c (random_data, frames, 1);
                trimmer->process (c);
                }
-               
+
                {
                ProcessContext<float> c (random_data, frames, 1);
                c.set_flag (ProcessContext<float>::EndOfInput);
                trimmer->process (c);
                }
-               
+
                framecnt_t frames_processed = sink->get_data().size();
                framecnt_t total_frames = 2 * frames + silence;
                CPPUNIT_ASSERT_EQUAL (total_frames, frames_processed);
index 75834127f5a5bf272d4b133a0adcf3a9b6cad0f1..4f5afbb62099cc0ec374b8a5e5aa821c2f4f91cb 100644 (file)
@@ -33,19 +33,19 @@ class SampleRateConverterTest : public CppUnit::TestFixture
                assert (frames % 2 == 0);
                framecnt_t const half_frames = frames / 2;
                framecnt_t frames_output = 0;
-               
+
                converter->init (44100, 44100);
                converter->add_output (sink);
-               
+
                ProcessContext<float> c (random_data, half_frames, 1);
                converter->process (c);
                ProcessContext<float> c2 (&random_data[half_frames], half_frames, 1);
                c2.set_flag (ProcessContext<float>::EndOfInput);
                converter->process (c2);
-               
+
                frames_output = sink->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink->get_array(), frames));
        }
 
@@ -54,11 +54,11 @@ class SampleRateConverterTest : public CppUnit::TestFixture
                assert (frames % 2 == 0);
                framecnt_t const half_frames = frames / 2;
                framecnt_t frames_output = 0;
-               
+
                converter->init (44100, 88200);
                converter->allocate_buffers (half_frames);
                converter->add_output (sink);
-               
+
                ProcessContext<float> c (random_data, half_frames, 1);
                converter->process (c);
                ProcessContext<float> c2 (&random_data[half_frames], half_frames, 1);
@@ -75,37 +75,37 @@ class SampleRateConverterTest : public CppUnit::TestFixture
                assert (frames % 2 == 0);
                framecnt_t const half_frames = frames / 2;
                framecnt_t frames_output = 0;
-               
+
                converter->init (88200, 44100);
                converter->allocate_buffers (half_frames);
                converter->add_output (sink);
-               
+
                ProcessContext<float> c (random_data, half_frames, 1);
                converter->process (c);
                ProcessContext<float> c2 (&random_data[half_frames], half_frames, 1);
                c2.set_flag (ProcessContext<float>::EndOfInput);
                converter->process (c2);
-               
+
                frames_output = sink->get_data().size();
                framecnt_t tolerance = 3;
                CPPUNIT_ASSERT (half_frames - tolerance < frames_output && frames_output < half_frames + tolerance);
        }
-       
+
        void testRespectsEndOfInput()
        {
                assert (frames % 2 == 0);
                framecnt_t const half_frames = frames / 2;
-               
+
                converter->init (44100, 48000);
                converter->allocate_buffers (half_frames);
                converter->add_output (grabber);
-               
+
                ProcessContext<float> c (random_data, half_frames, 1);
                converter->process (c);
                ProcessContext<float> c2 (&random_data[half_frames], half_frames / 2, 1);
                c2.set_flag (ProcessContext<float>::EndOfInput);
                converter->process (c2);
-               
+
                for (std::list<ProcessContext<float> >::iterator it = grabber->contexts.begin(); it != grabber->contexts.end(); ++it) {
                        std::list<ProcessContext<float> >::iterator next = it; ++next;
                        if (next == grabber->contexts.end()) {
@@ -115,7 +115,7 @@ class SampleRateConverterTest : public CppUnit::TestFixture
                        }
                }
        }
-       
+
 
   private:
        boost::shared_ptr<SampleRateConverter > converter;
index 1e87c8d34d6841bbd8c776c2fe74b12d16199075..cdb21a375b8badc8af6e8ecd8ef7975e265aad42 100644 (file)
@@ -18,20 +18,20 @@ class ThreaderTest : public CppUnit::TestFixture
        {
                frames = 128;
                random_data = TestUtils::init_random_data (frames, 1.0);
-               
+
                zero_data = new float[frames];
                memset (zero_data, 0, frames * sizeof(float));
-               
+
                thread_pool = new Glib::ThreadPool (3);
                threader.reset (new Threader<float> (*thread_pool));
-               
+
                sink_a.reset (new VectorSink<float>());
                sink_b.reset (new VectorSink<float>());
                sink_c.reset (new VectorSink<float>());
                sink_d.reset (new VectorSink<float>());
                sink_e.reset (new VectorSink<float>());
                sink_f.reset (new VectorSink<float>());
-               
+
                throwing_sink.reset (new ThrowingSink<float>());
        }
 
@@ -39,7 +39,7 @@ class ThreaderTest : public CppUnit::TestFixture
        {
                delete [] random_data;
                delete [] zero_data;
-               
+
                thread_pool->shutdown();
                delete thread_pool;
        }
@@ -52,10 +52,10 @@ class ThreaderTest : public CppUnit::TestFixture
                threader->add_output (sink_d);
                threader->add_output (sink_e);
                threader->add_output (sink_f);
-               
+
                ProcessContext<float> c (random_data, frames, 1);
                threader->process (c);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_a->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_b->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_c->get_array(), frames));
@@ -63,7 +63,7 @@ class ThreaderTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_e->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_f->get_array(), frames));
        }
-       
+
        void testRemoveOutput()
        {
                threader->add_output (sink_a);
@@ -72,18 +72,18 @@ class ThreaderTest : public CppUnit::TestFixture
                threader->add_output (sink_d);
                threader->add_output (sink_e);
                threader->add_output (sink_f);
-               
+
                ProcessContext<float> c (random_data, frames, 1);
                threader->process (c);
-               
+
                // Remove a, b and f
                threader->remove_output (sink_a);
                threader->remove_output (sink_b);
                threader->remove_output (sink_f);
-               
+
                ProcessContext<float> zc (zero_data, frames, 1);
                threader->process (zc);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_a->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_b->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(zero_data, sink_c->get_array(), frames));
@@ -91,7 +91,7 @@ class ThreaderTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT (TestUtils::array_equals(zero_data, sink_e->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_f->get_array(), frames));
        }
-       
+
        void testClearOutputs()
        {
                threader->add_output (sink_a);
@@ -100,14 +100,14 @@ class ThreaderTest : public CppUnit::TestFixture
                threader->add_output (sink_d);
                threader->add_output (sink_e);
                threader->add_output (sink_f);
-               
+
                ProcessContext<float> c (random_data, frames, 1);
                threader->process (c);
-               
+
                threader->clear_outputs();
                ProcessContext<float> zc (zero_data, frames, 1);
                threader->process (zc);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_a->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_b->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_c->get_array(), frames));
@@ -115,7 +115,7 @@ class ThreaderTest : public CppUnit::TestFixture
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_e->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_f->get_array(), frames));
        }
-       
+
        void testExceptions()
        {
                threader->add_output (sink_a);
@@ -124,10 +124,10 @@ class ThreaderTest : public CppUnit::TestFixture
                threader->add_output (throwing_sink);
                threader->add_output (sink_e);
                threader->add_output (throwing_sink);
-               
+
                ProcessContext<float> c (random_data, frames, 1);
                CPPUNIT_ASSERT_THROW (threader->process (c), Exception);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_a->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_b->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals(random_data, sink_c->get_array(), frames));
@@ -136,7 +136,7 @@ class ThreaderTest : public CppUnit::TestFixture
 
   private:
        Glib::ThreadPool * thread_pool;
-       
+
        boost::shared_ptr<Threader<float> > threader;
        boost::shared_ptr<VectorSink<float> > sink_a;
        boost::shared_ptr<VectorSink<float> > sink_b;
@@ -144,7 +144,7 @@ class ThreaderTest : public CppUnit::TestFixture
        boost::shared_ptr<VectorSink<float> > sink_d;
        boost::shared_ptr<VectorSink<float> > sink_e;
        boost::shared_ptr<VectorSink<float> > sink_f;
-       
+
        boost::shared_ptr<ThrowingSink<float> > throwing_sink;
 
        float * random_data;
index 9ce8af7a5c478ed63162f82ee608a87f0fbbe4ed..32e39135ec326c9223121223ae8eacb1ad19071c 100644 (file)
@@ -28,9 +28,9 @@ class TmpFileTest : public CppUnit::TestFixture
                AllocatingProcessContext<float> c (random_data, frames, channels);
                c.set_flag (ProcessContext<float>::EndOfInput);
                file->process (c);
-               
+
                TypeUtils<float>::zero_fill (c.data (), c.frames());
-               
+
                file->seek (0, SEEK_SET);
                file->read (c);
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, c.data(), c.frames()));
index a2b2c96f1186e993043906a611e023a2a73a9ce0..1ae7b28451c08ab765de23fd87203e3da668b174 100644 (file)
@@ -17,12 +17,12 @@ class TypeUtilsTest : public CppUnit::TestFixture
   public:
        void setUp()
        {
-               
+
        }
 
        void tearDown()
        {
-               
+
        }
 
        void testZeroFillPod()
@@ -35,7 +35,7 @@ class TypeUtilsTest : public CppUnit::TestFixture
                        CPPUNIT_ASSERT_EQUAL (zero, buf[i]);
                }
        }
-       
+
        void testZeroFillNonPod()
        {
                 /* does not compile on OS X Lion
@@ -48,26 +48,26 @@ class TypeUtilsTest : public CppUnit::TestFixture
                }
                 */
        }
-       
+
        void testMoveBackward()
        {
                int seq[8] = { 0, 1, 2, 3,
                               4, 5, 6, 7 };
-               
+
                TypeUtils<int>::move (&seq[4], &seq[2], 4);
-               
+
                for (int i = 2; i < 2 + 4; ++i) {
                        CPPUNIT_ASSERT_EQUAL (i + 2, seq[i]);
                }
        }
-       
+
        void testMoveForward()
        {
                int seq[8] = { 0, 1, 2, 3,
                               4, 5, 6, 7 };
-               
+
                TypeUtils<int>::move (&seq[2], &seq[4], 4);
-               
+
                for (int i = 4; i < 4 + 4; ++i) {
                        CPPUNIT_ASSERT_EQUAL (i - 2, seq[i]);
                }
@@ -79,16 +79,16 @@ class TypeUtilsTest : public CppUnit::TestFixture
                int const seq2[4] = { 5, 6, 7, 8 };
                int seq3[8] = { 0, 0, 0, 0,
                                  0, 0, 0, 0 };
-               
+
                TypeUtils<int>::copy (seq1, seq3, 4);
                for (int i = 0; i < 4; ++i) {
                        CPPUNIT_ASSERT_EQUAL (seq1[i], seq3[i]);
                }
-               
+
                for (int i = 4; i < 8; ++i) {
                        CPPUNIT_ASSERT_EQUAL (0, seq3[i]);
                }
-               
+
                TypeUtils<int>::copy (seq2, &seq3[4], 4);
                for (int i = 0; i < 4; ++i) {
                        CPPUNIT_ASSERT_EQUAL (seq1[i], seq3[i]);
@@ -99,14 +99,14 @@ class TypeUtilsTest : public CppUnit::TestFixture
        }
 
   private:
-       
+
        struct NonPodType {
                NonPodType() : data (42) {}
                bool operator== (NonPodType const & other) const
                        { return data == other.data; }
                int data;
        };
-       
+
 
 };
 
index 2955f511022c3d05a69668876a5bc0d1fc469fba..b6b9e0136c803308d05991db4d8a88fd91abde82 100644 (file)
@@ -49,7 +49,7 @@ struct TestUtils
                unsigned int const granularity = 4096;
                float * data = new float[frames];
                srand (std::time (NULL));
-               
+
                for (framecnt_t i = 0; i < frames; ++i) {
                        do {
                                int biased_int = (rand() % granularity) - (granularity / 2);
@@ -127,10 +127,10 @@ class ProcessContextGrabber : public AudioGrapher::Sink<T>
                contexts.push_back (c);
        }
        using AudioGrapher::Sink<T>::process;
-       
+
        typedef std::list<AudioGrapher::ProcessContext<T> > ContextList;
        ContextList contexts;
-       
+
 };
 
 #endif // AUDIOGRAPHER_TESTS_UTILS_H
index 799dcca386fca00d4363fefd08b3de3be0ca0f86..3c0fd71c70dbeaed9aef825a8f857a4b6372f7ea 100644 (file)
@@ -17,7 +17,7 @@ class IdentityVertexTest : public CppUnit::TestFixture
        {
                frames = 128;
                random_data = TestUtils::init_random_data(frames);
-               
+
                zero_data = new float[frames];
                memset (zero_data, 0, frames * sizeof(float));
 
@@ -36,52 +36,52 @@ class IdentityVertexTest : public CppUnit::TestFixture
                vertex.reset (new IdentityVertex<float>());
                vertex->add_output (sink_a);
                vertex->add_output (sink_b);
-               
+
                framecnt_t frames_output = 0;
-               
+
                ProcessContext<float> c (random_data, frames, 1);
                vertex->process (c);
-               
+
                frames_output = sink_a->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
-               
+
                frames_output = sink_b->get_data().size();
                CPPUNIT_ASSERT_EQUAL (frames, frames_output);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink_a->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink_b->get_array(), frames));
        }
-       
+
        void testRemoveOutput()
        {
                vertex.reset (new IdentityVertex<float>());
                vertex->add_output (sink_a);
                vertex->add_output (sink_b);
-               
+
                ProcessContext<float> c (random_data, frames, 1);
                vertex->process (c);
-               
+
                vertex->remove_output (sink_a);
                ProcessContext<float> zc (zero_data, frames, 1);
                vertex->process (zc);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink_a->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (zero_data, sink_b->get_array(), frames));
        }
-       
+
        void testClearOutputs()
        {
                vertex.reset (new IdentityVertex<float>());
                vertex->add_output (sink_a);
                vertex->add_output (sink_b);
-               
+
                ProcessContext<float> c (random_data, frames, 1);
                vertex->process (c);
-               
+
                vertex->clear_outputs ();
                ProcessContext<float> zc (zero_data, frames, 1);
                vertex->process (zc);
-               
+
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink_a->get_array(), frames));
                CPPUNIT_ASSERT (TestUtils::array_equals (random_data, sink_b->get_array(), frames));
        }
index 90df11c2c1f2f5419e573aab3652d09406515468..60b601665a984e83994db566f2178c39a7c8bc92 100644 (file)
@@ -1344,7 +1344,7 @@ ASIOBackend::freewheel_thread ()
                pthread_mutex_lock (&_process_callback_mutex);
 
                /* Freewheelin' */
-               
+
                // clear input buffers
                for (std::vector<ASIOBackendPort*>::const_iterator it = _system_inputs.begin (); it != _system_inputs.end (); ++it) {
                        memset ((*it)->get_buffer (_samples_per_period), 0, _samples_per_period * sizeof (Sample));
index 36fa3d46a5749360aefb7d2c58eec5d9885d1a20..1791ffe3a99cffcea2b34c16b022c2486760c81a 100644 (file)
@@ -1643,7 +1643,7 @@ CoreAudioBackend::freewheel_thread ()
                pthread_mutex_lock (&_process_callback_mutex);
 
                /* Freewheelin' */
-               
+
                // clear input buffers
                for (std::vector<CoreBackendPort*>::const_iterator it = _system_inputs.begin (); it != _system_inputs.end (); ++it) {
                        memset ((*it)->get_buffer (_samples_per_period), 0, _samples_per_period * sizeof (Sample));
index 5de12294e122efbcee5d6365aad9a31106d8d845..b414eda5638dc275b83ae5ecdfbf3e00f64f53c0 100644 (file)
@@ -126,7 +126,7 @@ JACKAudioBackend::enumerate_devices () const
        if (all_devices.find (_target_driver) == all_devices.end()) {
                all_devices.insert (make_pair (_target_driver, std::set<string>()));
        }
-       
+
        /* store every device we've found, by driver name.
         *
         * This is so we do not confuse ALSA, FFADO, netjack etc. devices
@@ -138,7 +138,7 @@ JACKAudioBackend::enumerate_devices () const
        for (vector<string>::const_iterator d = currently_available.begin(); d != currently_available.end(); ++d) {
                all.insert (*d);
        }
-       
+
        for (DeviceList::const_iterator d = all.begin(); d != all.end(); ++d) {
                if (find (currently_available.begin(), currently_available.end(), *d) == currently_available.end()) {
                        statuses.push_back (DeviceStatus (*d, false));
@@ -146,7 +146,7 @@ JACKAudioBackend::enumerate_devices () const
                        statuses.push_back (DeviceStatus (*d, false));
                }
        }
-       
+
        return statuses;
 }
 
@@ -154,7 +154,7 @@ vector<float>
 JACKAudioBackend::available_sample_rates (const string& device) const
 {
        vector<float> f;
-       
+
        if (device == _target_device && available()) {
                f.push_back (sample_rate());
                return f;
@@ -174,7 +174,7 @@ JACKAudioBackend::available_sample_rates (const string& device) const
        f.push_back (96000.0);
        f.push_back (192000.0);
        f.push_back (384000.0);
-       
+
        return f;
 }
 
@@ -182,7 +182,7 @@ vector<uint32_t>
 JACKAudioBackend::available_buffer_sizes (const string& device) const
 {
        vector<uint32_t> s;
-               
+
        if (device == _target_device && available()) {
                s.push_back (buffer_size());
                return s;
@@ -286,7 +286,7 @@ JACKAudioBackend::set_input_channels (uint32_t cnt)
        }
 
        _target_input_channels = cnt;
-       
+
        return 0;
 }
 
@@ -473,7 +473,7 @@ JACKAudioBackend::setup_jack_startup_command (bool for_latency_measurement)
        }
        options.realtime = true;
        options.ports_max = 2048;
-       
+
        ARDOUR::set_midi_option (options, _target_midi_option);
 
        /* this must always be true for any server instance we start ourselves
@@ -514,14 +514,14 @@ JACKAudioBackend::_start (bool for_latency_measurement)
                        return -1;
                }
        }
-       
+
        GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1);
 
        /* get the buffer size and sample rates established */
 
        jack_sample_rate_callback (jack_get_sample_rate (_priv_jack));
        jack_bufsize_callback (jack_get_buffer_size (_priv_jack));
-       
+
        /* Now that we have buffer size and sample rate established, the engine
           can go ahead and do its stuff
        */
@@ -534,9 +534,9 @@ JACKAudioBackend::_start (bool for_latency_measurement)
        if (!jack_port_type_get_buffer_size) {
                warning << _("This version of JACK is old - you should upgrade to a newer version that supports jack_port_type_get_buffer_size()") << endmsg;
        }
-       
+
        set_jack_callbacks ();
-       
+
        if (jack_activate (_priv_jack) == 0) {
                _running = true;
        } else {
@@ -553,7 +553,7 @@ JACKAudioBackend::stop ()
 {
        _running = false; // no 'engine halted message'.
        GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1);
-       
+
        _jack_connection->close ();
 
        _current_buffer_size = 0;
@@ -571,7 +571,7 @@ JACKAudioBackend::freewheel (bool onoff)
 
        if (onoff == _freewheeling) {
                /* already doing what has been asked for */
-               
+
                return 0;
        }
 
@@ -930,7 +930,7 @@ JACKAudioBackend::process_thread ()
                 GET_PRIVATE_JACK_POINTER_RET(_priv_jack,0);
 
                 pframes_t nframes = jack_cycle_wait (_priv_jack);
-               
+
                 if (engine.process_callback (nframes)) {
                         return 0;
                 }
@@ -1050,7 +1050,7 @@ JACKAudioBackend::n_physical (unsigned long flags) const
                                }
                        }
                }
-               
+
                jack_free (ports);
        }
 
@@ -1084,9 +1084,9 @@ JACKAudioBackend::control_app_name () const
                if (_target_driver.empty() || _target_device.empty()) {
                        return appname;
                }
-               
+
                if (_target_driver == "ALSA") {
-                       
+
                        if (_target_device == "Hammerfall DSP") {
                                appname = "hdspconf";
                        } else if (_target_device == "M Audio Delta 1010") {
index 7e860df3b8de1a25520e54f0fcb89f9a76741d6c..530e3fdfd7f0342b2bc7896448e3f6c4bc2859ed 100644 (file)
@@ -237,7 +237,7 @@ class JACKAudioBackend : public AudioBackend {
        JACKAudioBackend* engine;
        boost::function<void()> f;
        size_t stacksize;
-       
+
        ThreadData (JACKAudioBackend* e, boost::function<void()> fp, size_t stacksz)
                : engine (e) , f (fp) , stacksize (stacksz) {}
     };
index acc32c4400be41ebc7d01d4da1eaaa17c3a84dd5..2747832ec004911d4e3aecf107cf533c3f2a84d7 100644 (file)
@@ -145,7 +145,7 @@ JackConnection::close ()
 {
        GET_PRIVATE_JACK_POINTER_RET (_jack, -1);
 
-       if (_priv_jack) {       
+       if (_priv_jack) {
                int ret = jack_client_close (_priv_jack);
                _jack = 0;
 
index 257feb2bf2c3f749306eb6c210019dc92b01b4f3..10b2efed6b39949abaaeb2a61b9f9acf6f9a252a 100644 (file)
@@ -41,7 +41,7 @@ static uint32_t
 ardour_port_flags_to_jack_flags (PortFlags flags)
 {
        uint32_t jack_flags = 0;
-       
+
        if (flags & IsInput) {
                jack_flags |= JackPortIsInput;
        }
@@ -242,7 +242,7 @@ JACKAudioBackend::physically_connected (PortHandle p, bool process_callback_safe
        jack_port_t* port = (jack_port_t*) p;
 
        const char** ports;
-       
+
        if (process_callback_safe) {
                ports = jack_port_get_connections ((jack_port_t*)port);
        } else {
@@ -328,7 +328,7 @@ JACKAudioBackend::get_ports (const string& port_name_pattern, DataType type, Por
        }
 
        jack_free (ports);
-       
+
        return s.size();
 }
 
@@ -442,7 +442,7 @@ int
 JACKAudioBackend::connect (const std::string& src, const std::string& dst)
 {
        GET_PRIVATE_JACK_POINTER_RET (_priv_jack, -1);
-       
+
        int r = jack_connect (_priv_jack, src.c_str(), dst.c_str());
        return r;
 }
@@ -505,7 +505,7 @@ void
 JACKAudioBackend::set_latency_range (PortHandle port, bool for_playback, LatencyRange r)
 {
        jack_latency_range_t range;
-       
+
        range.min = r.min;
        range.max = r.max;
 
@@ -517,7 +517,7 @@ JACKAudioBackend::get_latency_range (PortHandle port, bool for_playback)
 {
        jack_latency_range_t range;
        LatencyRange ret;
-       
+
        jack_port_get_latency_range ((jack_port_t*) port, for_playback ? JackPlaybackLatency : JackCaptureLatency, &range);
 
        ret.min = range.min;
index 8495a5971fbaa4110ba1a17aa7d9db304cfbc596..1e9d9568761a88b4a0a14f6a740d22d4f290345e 100644 (file)
@@ -94,7 +94,7 @@ JACKSession::session_event (jack_session_event_t* event)
        */
 
        jack_client_t* jack_client = (jack_client_t*) AudioEngine::instance()->port_engine().private_handle();
-       
+
        if (jack_client) {
                jack_session_reply (jack_client, event);
        }
@@ -119,23 +119,23 @@ JACKSession::timebase_callback (jack_transport_state_t /*state*/,
        /* BBT info */
 
        TempoMetric metric (tempo_map.metric_at (tf));
-       
+
        try {
                tempo_map.bbt_time_rt (tf, bbt);
-               
+
                pos->bar = bbt.bars;
                pos->beat = bbt.beats;
                pos->tick = bbt.ticks;
-               
+
                // XXX still need to set bar_start_tick
-               
+
                pos->beats_per_bar = metric.meter().divisions_per_bar();
                pos->beat_type = metric.meter().note_divisor();
                pos->ticks_per_beat = Timecode::BBT_Time::ticks_per_beat;
                pos->beats_per_minute = metric.tempo().beats_per_minute();
-               
+
                pos->valid = jack_position_bits_t (pos->valid | JackPositionBBT);
-               
+
        } catch (...) {
                /* no message */
        }
index 511c3c652e22eb2fc83b49b095c9f5aa95458255..d709ff5c8f23f17f5877f5d47b5f4a224387bf65 100644 (file)
@@ -746,7 +746,7 @@ static void FAR PASCAL winmm_in_callback(
             MMRESULT rslt;
             lpMidiHdr->dwBytesRecorded = 0;
             lpMidiHdr->dwFlags = 0;
-                       
+
             /* note: no error checking -- can this actually fail? */
             rslt = midiInPrepareHeader(hMidiIn, lpMidiHdr, sizeof(MIDIHDR));
             assert(rslt == MMSYSERR_NOERROR);
index d7467c315e2f36fee4b09bf4c2e7741180d7bd69..2c6824e4b290b18b4ff8a50a790ce26dd930445a 100644 (file)
@@ -752,7 +752,7 @@ WavesAudioBackend::_audio_device_callback (const float* input_buffer,
 
     if ( !engine.thread_initialised_for_audio_processing () ) {
            std::cerr << "\tWavesAudioBackend::_audio_device_callback (): It's an attempt to call process callback from the thread which didn't initialize it " << std::endl;
-       
+
            AudioEngine::thread_init_callback (this);
     }
 
@@ -803,7 +803,7 @@ WavesAudioBackend::stop ()
        _midi_device_manager.stop ();
     _unregister_system_audio_ports ();
     _unregister_system_midi_ports ();
-       
+
     return retVal;
 }
 
index 47f69da794acf7d313b5455ea20d2203ffd01a1c..e9f0065abf702d364a57dad70b37f0ca182cafab 100644 (file)
@@ -47,11 +47,11 @@ WavesMidiDevice::WavesMidiDevice (const std::string& device_name)
 {
        _pm_input_id = _pm_output_id = pmNoDevice;
        int count = Pm_CountDevices ();
-       
+
        for (int i = 0; i < count; i++) {
-               
+
                const PmDeviceInfo* pm_device_info = Pm_GetDeviceInfo (i);
-               
+
                if (pm_device_info == NULL) {
                        continue;
                }
@@ -79,7 +79,7 @@ WavesMidiDevice::open (PmTimeProcPtr time_proc, void* time_info)
 
     if (is_input () ) {
                // COMMENTED DBG LOGS */ std::cout << "WavesMidiDevice::open (): INPUT" << _pm_input_id << "-[" << name () <<  "]" << std::endl;
-                       
+
                if (!_input_pm_stream) {
                        // create queue
                        if (!_input_queue) {
@@ -181,7 +181,7 @@ WavesMidiDevice::close ()
                _input_queue = NULL;
        }
 
-        // output      
+        // output
        if ( output_pm_stream ) {
                // close stream
                PmError err = Pm_Close (output_pm_stream);
index cbb3e48e3304adae4a9840577d071b7ceb429984..571a2341be50f156ded82ebffe57a02f5204116e 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef __WCFourCC_h__
        #define __WCFourCC_h__
-       
+
 /* Copy to include
 #include "BasicTypes/WCFourCC.h"
 */
@@ -206,7 +206,7 @@ inline bool operator!=(const WCFourCC in_left, const WCFourCC in_right)
 #define kDefaultFourCC WCFourCC::kDefaultFourCC_prv()
 
 static const WCFourCC kZeroFourCC(0, wvNS::wvBO::compiler_byte_order);
-       
+
 #endif //#if !defined(__WCFourCC_h__)
 
 
index 8b5c73578fc4e2846e5a4508a662344f61d7dd15..c217fa7a1cc36bd91dbf25df1b6e1520da5bfa71 100644 (file)
@@ -75,7 +75,7 @@
 #endif
 
 namespace wvNS {
-       
+
 namespace wvBO // namespace Waves::ByteOrder
 {
     typedef int                byte_order_type;   // we use int rather than enum because some compilers cannot resolve enum constants at compile-time. There are only two options anyway :-)
index b66f720a34bcd1673338248e8b95393a3efe392b..e8e633d927fc31b2be4021d80d2d65029f1efed6 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef __WUComPtr_h__
 #define __WUComPtr_h__
-       
+
 /* Copy to include
 #include "BasicTypes/WUComPtr.h"
 */
@@ -36,7 +36,7 @@ typedef int32_t wvComPtr[2];
 //================================================================================
 inline uint32_t vfpConvertDPtr(const void* InPointer, void* pData)
 //================================================================================
-{      
+{
     uint64_t *pL = (uint64_t *)pData;
     *pL = (uint64_t)InPointer;
     return (uint32_t)sizeof(uint64_t);
@@ -64,7 +64,7 @@ inline wvComPtr PackToComPtr(const intptr_t in_PtrToPack)
        // #ifdef for x32 - intptr_t is 32 bit
 //     retVal.LSW = int32_t(in_PtrToPack);
 //     retVal.MSW = 0;
-       
+
        return retVal;
 }
 
@@ -73,7 +73,7 @@ inline intptr_t UnpackComPtr( const wvComPtr in_ComPtrToUnpack)
 // and unpack it to intptr_t type
 {
        intptr_t retVal;
-       
+
        // This unpacking is xPlatform coding for x32 and x64
        // #ifdef for x64 - intptr_t is 64 bit so use intptr_t instead of int64_t
        int64_t PtrAt64 = static_cast<int64_t>(in_ComPtrToUnpack.MSW);
index e918b78c715a33fed6a9240bf82dde7fc564392d..6ee16c2ad6b01b9d06001a52e32212abccf5769f 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef __WUMathConsts_h__
        #define __WUMathConsts_h__
-       
+
 /* Copy to include:
 #include "BasicTypes/WUMathConsts.h"
 */
index e1d073db7f564cfe8ea6162f1e423d88ea2e0c0b..8c6ac71cfc2ead8b8bbd24b362af8a213f22a23c 100644 (file)
@@ -84,7 +84,7 @@ public: enum Type
 //********************************************************************************
 //    Files
 
-//! file (and resource container) opening permissions                  
+//! file (and resource container) opening permissions
 // Note: When opening with eFMWriteOnly on existing file, writing to the file will append, not overwrite, Shai, 9/8/2007.
 enum   WEPermitions{ eFMReadOnly, eFMWriteOnly, eFMReadWrite};
 
@@ -133,7 +133,7 @@ enum WESystemFolders{
 
        eWavesPreferencesFolder2, // Mac: "/Users/username/Library/Preferences/Waves Audio"
                               // Win: "C:\Users\username\AppData\Roaming\Waves Audio\Preferences"
-               
+
        eNumberOfSystemFolders
 };
 
index d8e31d4f1f6729f1864c2835b7562e9f9e4f75f9..4260f680a527687ded489c595761155a7dd6e17b 100644 (file)
 template<class T> inline T WUMin(const T &a, const T &b) {return (a < b) ? a : b;} // requires only < to be defined for T
 template<class T> inline T WUMax(const T &a,const T &b) {return (a < b) ? b : a;} // requires only < to be defined for T
 template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T &Val)  // requires only < to be defined for T
-{      
+{
        return ((Val < Smallest) ? Smallest : ((Biggest < Val) ? Biggest : Val));
 }
-/*     
+/*
 // Min and Max
        template<class T> inline T WUMin(T a,T b) {return (a < b) ? a : b;} // requires only < to be defined for T
        template<class T> inline T WUMax(T a,T b) {return (a < b) ? b : a;} // requires only < to be defined for T
@@ -51,7 +51,7 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
        {
                return ((X < SMALLEST) ? SMALLEST : ((BIGGEST < X) ? BIGGEST : X));
        }
- */    
+ */
 // Absolute value
 
 #ifdef PLATFORM_WINDOWS
index fb31d24a7872c3a91c5270130f9727dfc9f3aa80..c51d1910b010d4512689edbc8091213b1ead431c 100644 (file)
@@ -53,7 +53,7 @@ void UMicrosecondsAccumulator::Start()
 void UMicrosecondsAccumulator::Stop()
 {
        UMicroseconds stop_time;
-       
+
        m_accumulator += stop_time.GetNativeTime() - m_start_time.GetNativeTime();
 }
 
@@ -73,5 +73,5 @@ UMicrosecondsAccumulator& UMicrosecondsAccumulator::operator+=(const UMicrosecon
        m_accumulator += inaccum_to_add.GetAccumulatedTime();
        return *this;
 }
-       
+
 } // namespace wvNS {
index 508ff12acbe8047d00287854158796d63983ad7c..af1eb8e37f76bb17bcb54631bbda19283503b1db 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef __UMicroseconds_h__
        #define __UMicroseconds_h__
-       
+
 /* Copy to include
 #include "UMicroseconds.h"
 */
@@ -87,15 +87,15 @@ class UMicrosecondsAccumulator
 {
 public:
        UMicrosecondsAccumulator() : m_start_time(0), m_accumulator(0) {}
-       
+
        void Start();
        void Stop();
        void Clear();
-       
+
        UMicroseconds GetAccumulatedTime() const;
-       
+
        UMicrosecondsAccumulator& operator+=(const UMicrosecondsAccumulator&);
-       
+
 protected:
        UMicroseconds m_start_time;
        UMicroseconds m_accumulator;
@@ -119,6 +119,6 @@ inline void MicrosecondDelay(double amt)
                now.ReadTime();
        }       while ((now.MicroSeconds() - than.MicroSeconds()) < amt);
 }
-       
+
 } // namespace wvNS {
 #endif //#ifndef __UMicroseconds_h__
index 5d2cc88beb25f618baf14f1db25258e4ab8e0ef5..d127e0116a0e9a5efbb4c7e56d8ec5a0d25ea97c 100644 (file)
@@ -58,7 +58,7 @@ public:
     typedef intptr_t spos_t; // signed position, defined to intptr_t because Windows does not have ssize_t
        static const pos_t npos = UINTPTR_MAX; // Same as size_max
 
-       WCFixedStringBase(char* const in_begin, const size_t in_MaxFixedStringLength) : 
+       WCFixedStringBase(char* const in_begin, const size_t in_MaxFixedStringLength) :
                m_begin(in_begin),
                m_MaxFixedStringLength(in_MaxFixedStringLength),
                m_end(in_begin)
@@ -280,10 +280,10 @@ public:
        #endif
        #ifdef __APPLE__
                std::snprintf(buf, tempBufSize, "%.*f", in_precision, in_double);
-       #endif          
-       #ifdef __linux__        
+       #endif
+       #ifdef __linux__
                snprintf(buf, tempBufSize, "%.*f", in_precision, in_double);
-       #endif          
+       #endif
 
                operator<<(buf);
        }
@@ -383,17 +383,17 @@ public:
 //     WCFixedStringBase& operator<<(const unsigned char in_uint) {
 //             return operator<<(static_cast<const unsigned long long>(in_uint));
 //             }
-//             
+//
 //     WCFixedStringBase& operator<<(const size_t in_uint) {
 //             return operator<<(static_cast<const uint64_t>(in_uint));
 //             }
-//             
+//
 #if defined(__APPLE__) || defined(PLATFORM_WINDOWS) || defined(__linux__) // both 32 & 64 bit
        WCFixedStringBase& operator<<(const unsigned int in_uint) {
                return operator<<(static_cast<uint64_t>(in_uint));
        }
 #endif
-//             
+//
 #if defined(PLATFORM_WINDOWS) || defined(__linux__) // both 32 & 64 bit
        WCFixedStringBase& operator<<(const unsigned long in_uint) {
                return operator<<(static_cast<uint64_t>(in_uint));
@@ -473,7 +473,7 @@ public:
 
        ptrdiff_t compare(const WCFixedStringBase& in_to_compare) const
        {
-               ptrdiff_t retVal = compare(in_to_compare.c_str());              
+               ptrdiff_t retVal = compare(in_to_compare.c_str());
                return retVal;
        }
 
@@ -496,7 +496,7 @@ public:
 
        ptrdiff_t case_insensitive_compare(const WCFixedStringBase& in_to_compare) const
        {
-               ptrdiff_t retVal = case_insensitive_compare(in_to_compare.c_str());             
+               ptrdiff_t retVal = case_insensitive_compare(in_to_compare.c_str());
                return retVal;
        }
 
@@ -690,7 +690,7 @@ public:
         bool retVal = (0 == where) || (0 == ::strlen(in_begin_text));
         return retVal;
     }
-       
+
     // return true if in_end_text is found at th end OR if in_end_text is empty
        bool ends_with(const char* in_end_text) const
     {
@@ -775,7 +775,7 @@ public:
         }
     }
 
-protected:     
+protected:
        ~WCFixedStringBase() {}
 
        char* const m_begin;
@@ -853,12 +853,12 @@ public:
                return retVal;
        }
 
-protected:     
+protected:
 
        char m_fixedString[kMaxFixedStringLength + 1]; // the "+ 1" is so that *m_end is always valid, and we can put the '\0' there};
 };
 
-inline bool operator==(const WCFixedStringBase& in_left, const WCFixedStringBase& in_right)    
+inline bool operator==(const WCFixedStringBase& in_left, const WCFixedStringBase& in_right)
 {
        return 0 == in_left.compare(in_right.c_str());
 }
@@ -868,7 +868,7 @@ inline bool operator==(const WCFixedStringBase& in_left, const char* const in_ri
        return 0 == in_left.compare(in_right);
 }
 
-inline bool operator!=(const WCFixedStringBase& in_left, const WCFixedStringBase& in_right)    
+inline bool operator!=(const WCFixedStringBase& in_left, const WCFixedStringBase& in_right)
 {
        return 0 != in_left.compare(in_right.c_str());
 }
@@ -893,11 +893,11 @@ template<size_t kSizeOfFirst, size_t kSizeOfSecond>
        class WCFixedStringPair : public std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >
 {
 public:
-       WCFixedStringPair(const char* const in_firstStr = 0, const char* const in_secondStr = 0) :      
+       WCFixedStringPair(const char* const in_firstStr = 0, const char* const in_secondStr = 0) :
        std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >(in_firstStr, in_secondStr) {}
-       WCFixedStringPair(const WCFixedStringBase& in_firstStr, const char* const in_secondStr = 0) :   
+       WCFixedStringPair(const WCFixedStringBase& in_firstStr, const char* const in_secondStr = 0) :
        std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >(in_firstStr, in_secondStr) {}
-       WCFixedStringPair(const WCFixedStringBase& in_firstStr, const WCFixedStringBase& in_secondStr) :        
+       WCFixedStringPair(const WCFixedStringBase& in_firstStr, const WCFixedStringBase& in_secondStr) :
        std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >(in_firstStr, in_secondStr) {}
 };
 
index 294ef0905fa60bb29c1bbad516ebcaa757215ad1..007d32f433cdc825e0cf05409bd4e43061fcac9c 100644 (file)
@@ -280,34 +280,34 @@ const WTErr eIPC_ParseArgsFailed               = -14207;
 const WTErr eIPC_OpenPipeFailed                = -14208;
 const WTErr eIPC_SendMsgFailed                 = -14209;
 const WTErr eIPC_SendCommandInvalid            = -14210;
-const WTErr eIPC_QtTestMode                                   = -14211;        
-const WTErr eIPC_ChangePermissionOnPipe           = -14212;    
-const WTErr eIPC_ConnectionLost                   = -14213;    
+const WTErr eIPC_QtTestMode                                   = -14211;
+const WTErr eIPC_ChangePermissionOnPipe           = -14212;
+const WTErr eIPC_ConnectionLost                   = -14213;
 
-const WTErr eIPC_InvalidRole                      = -14213;    
+const WTErr eIPC_InvalidRole                      = -14213;
 const WTErr eIPC_CreateNamedPipeM2SFailed      = -14214;
 const WTErr eIPC_CreateNamedPipeS2MFailed      = -14215;
-const WTErr eIPC_ChangePermissionOnPipeM2S     = -14216;       
-const WTErr eIPC_ChangePermissionOnPipeS2M     = -14217;       
-const WTErr eIPC_OpenReadPipeFailed            = -14218;       
-const WTErr eIPC_OpenReadPipeDIsableSigPipe    = -14219;       
-const WTErr eIPC_OpenWritePipeFailed           = -14220;       
-const WTErr eIPC_WritePipeFailed               = -14221;       
-const WTErr eIPC_WritePipeNotOpen              = -14222;       
-const WTErr eIPC_WriteBufferResizeFailed       = -14223;       
-const WTErr eIPC_NotConnectedSendMsgFailed     = -14224;       
-const WTErr eIPC_OpenWritePipeWorkerStoping    = -14225;       
-const WTErr eIPC_SoketSendFailed               = -14226;       
-const WTErr eIPC_PtonFailed                    = -14227;       
-const WTErr eIPC_SocketFailed                  = -14228;       
-const WTErr eIPC_BindFailed                    = -14229;       
-const WTErr eIPC_ListenFailed                  = -14230;       
-const WTErr eIPC_ConnectFailed                 = -14231;       
+const WTErr eIPC_ChangePermissionOnPipeM2S     = -14216;
+const WTErr eIPC_ChangePermissionOnPipeS2M     = -14217;
+const WTErr eIPC_OpenReadPipeFailed            = -14218;
+const WTErr eIPC_OpenReadPipeDIsableSigPipe    = -14219;
+const WTErr eIPC_OpenWritePipeFailed           = -14220;
+const WTErr eIPC_WritePipeFailed               = -14221;
+const WTErr eIPC_WritePipeNotOpen              = -14222;
+const WTErr eIPC_WriteBufferResizeFailed       = -14223;
+const WTErr eIPC_NotConnectedSendMsgFailed     = -14224;
+const WTErr eIPC_OpenWritePipeWorkerStoping    = -14225;
+const WTErr eIPC_SoketSendFailed               = -14226;
+const WTErr eIPC_PtonFailed                    = -14227;
+const WTErr eIPC_SocketFailed                  = -14228;
+const WTErr eIPC_BindFailed                    = -14229;
+const WTErr eIPC_ListenFailed                  = -14230;
+const WTErr eIPC_ConnectFailed                 = -14231;
 const WTErr eIPC_WsaStartupFailed              = -14232;
 const WTErr eIPC_UdpSocketCreateFailed         = -14233;
 const WTErr eIPC_UdpSocketConnectFailed        = -14234;
 const WTErr eIPC_UdpSocketBinFailed            = -14235;
-const WTErr eIPC_SetBufferPreambleFailed       = -14226;       
+const WTErr eIPC_SetBufferPreambleFailed       = -14226;
 
 // Database errors
 const WTErr eDB_BatchRollback = -15501;
index 830ac436e81987712dacac76a77ea1f9f978e9b4..0537d1591b495779d82b6aecdbe4f85800beeaa5 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef __safe_delete_h__
        #define __safe_delete_h__
-       
+
 
 /* Copy to include:
 #include "safe_delete.h"
index 4a24eab05d7adc65663d94695fa78211bfa3fbf3..eb8d91c6969b4ed315b1b38fe51d6ada583ec5b0 100644 (file)
@@ -191,7 +191,7 @@ namespace wvThread
                void obtain();
                bool tryobtain();
                void release();
-       
+
        private:
                ThreadMutexInited(const ThreadMutexInited&);            // cannot be copied
                ThreadMutexInited& operator=(const ThreadMutexInited&); // cannot be copied
@@ -224,7 +224,7 @@ namespace wvThread
        public:
                ThreadMutex() {init();}
        };
-       
+
        //--------------------------------------------------------
        class DllExport ThreadConditionSignal : public noncopyableobject
        {
index 71ef9bfe9284fdb9ec46a71c5a5991d11ee94ea8..46869c40ae99751c6d923193bcab7fbd7f40a762 100644 (file)
@@ -33,7 +33,7 @@
        #if ! defined(__STDC_LIMIT_MACROS)
                #define __STDC_LIMIT_MACROS
        #endif
-       
+
        #include <stddef.h>
        #include </usr/include/stdint.h>
 #endif
index 45d29955c7075cfc82c54ba12abab97224935134..33808ede8d51b3fb17ebd59ea14ac89c58b13835 100644 (file)
@@ -21,7 +21,7 @@ namespace Akupara
                null_type(const null_type *) {} // this allows 0 to be implicitly converted to null_type
        };
        inline null_type null() { return null_type(); }
-       
+
 
        // This is a byte, guaranteed to be unsigned regardless of your compiler's char signedness
        typedef uint8_t byte_type;
index 9c146dcebf62710f614b7fa4d48b303baaacab12..14c5f96523611081eb78ff5dab025513cdf5af86 100644 (file)
@@ -147,7 +147,7 @@ namespace Akupara
         AKUPARA_SIGNED_UNSIGNED_INTEGER_PAIR(1, char     )
             AKUPARA_SIGNED_UNSIGNED_INTEGER_PAIR(2, short    )
             AKUPARA_SIGNED_UNSIGNED_INTEGER_PAIR(3, int      )
-                       
+
                        //AKUPARA_SIGNED_UNSIGNED_INTEGER_PAIR(4, int32_t     )// 64BitConversion
                        template<>
                        struct
index b5010eaff901f8707bc26b4261f371a0789711c5..2111026d0bddfba71d177c4cbdb8bfd4b73e5367 100644 (file)
@@ -378,7 +378,7 @@ _byte_count :
             public:
                 pad_to_cache_line() {}
                 template<typename _arg_type> pad_to_cache_line(_arg_type arg) : base_type(arg) {}
-            }; 
+            };
             //---------------------------------------------------------------------
 
         } // namespace atomic
index 148c297552833a328bc12bf3383a9132a3de45ea..74d73106f8986f99aab2e04fbe4849aa55ca6b21 100644 (file)
@@ -19,7 +19,7 @@ namespace Akupara
                        namespace machine
                        {
                                const unsigned int k_bytes_per_cache_line = 64;  // this is true for P4 & K8
-       
+
 
                                // Flags for operations supported by this machine
                                //-------------------------------------
@@ -30,7 +30,7 @@ namespace Akupara
                                template<> struct implements_add          <4> : public true_type {};
                                template<> struct implements_fetch_and_add<4> : public true_type {};
                                //-------------------------------------
-               
+
 
 
                                // CAS
@@ -162,10 +162,10 @@ namespace Akupara
                                        return fetch_and_add(operand_address, -subtrahend);
                                }
                                //--------------------------------------------------------------------------------
-               
 
 
-                       
+
+
                                // Memory barriers
                                //--------------------------------------------------------------------------------
                                inline void memory_barrier_readwrite()
index 481aa2d860103d1c36cf5d4a6e0a1134e0f62dbc..7c4a3e996285ffc7f11b599994ba81f807c78b57 100644 (file)
@@ -77,7 +77,7 @@ WCMRAudioDevice::~WCMRAudioDevice ()
 const std::string& WCMRAudioDevice::DeviceName () const
 {
        return (m_DeviceName);
-       
+
 }
 
 
@@ -95,7 +95,7 @@ const std::string& WCMRAudioDevice::DeviceName () const
 const std::vector<std::string>& WCMRAudioDevice::InputChannels ()
 {
        return (m_InputChannels);
-       
+
 }
 
 
@@ -263,7 +263,7 @@ WTErr WCMRAudioDevice::SetCurrentBufferSize (int newSize)
 WCMRAudioDevice::ConnectionStates WCMRAudioDevice::ConnectionStatus ()
 {
        return (m_ConnectionStatus);
-       
+
 }
 
 
@@ -282,7 +282,7 @@ WCMRAudioDevice::ConnectionStates WCMRAudioDevice::ConnectionStatus ()
 bool WCMRAudioDevice::Active ()
 {
        return (m_IsActive);
-       
+
 }
 
 
@@ -344,7 +344,7 @@ WTErr WCMRAudioDevice::SetStreaming (bool newState)
        if (newState) {
                m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::DeviceStartsStreaming);
        }
-       
+
        //This will most likely be overridden, the base class simply
        //changes the member.
        m_IsStreaming = newState;
@@ -359,7 +359,7 @@ WTErr WCMRAudioDevice::ResetDevice ()
        bool wasActive = Active();
 
        WTErr err = SetStreaming(false);
-       
+
        if (err == eNoErr)
                err = SetActive(false);
 
@@ -461,11 +461,11 @@ void WCMRAudioDevice::GetMonitorInfo (int *pLeftChannel, int *pRightChannel, flo
 {
        if (pLeftChannel)
                *pLeftChannel = m_LeftMonitorChannel;
-       if (pRightChannel)      
+       if (pRightChannel)
                *pRightChannel = m_RightMonitorChannel;
-       if (pGain)      
+       if (pGain)
                *pGain = m_MonitorGain;
-       return; 
+       return;
 }
 
 
@@ -688,5 +688,5 @@ void WCMRAudioDeviceManager::NotifyClient (WCMRAudioDeviceManagerClient::Notific
 {
        if (m_pTheClient)
                m_pTheClient->AudioDeviceManagerNotification (forReason, pParam);
-       return; 
+       return;
 }
index 4dae8abab638e5fa095fc018435ac0ca623fccad..b22e35263d8805b63fe845b435a70172598eac2d 100644 (file)
@@ -166,24 +166,24 @@ public:
 
        virtual bool Active();///<Active status - mainly significant for ASIO, as certain ops can only be performed on active devices!
        virtual WTErr SetActive (bool newState);///<Prepare/Activate device.
-       
+
        virtual bool Streaming();///<Streaming Status?
        virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
 
        virtual WTErr ResetDevice ();
 
     virtual bool IsProcessActive();
-       
+
        virtual WTErr DoIdle();///<Do Idle Processing
-       
+
        virtual const std::vector<float>& InputLevels();///<Retrieve Input Levels (for VU display)?
-       
+
        virtual const std::vector<float>& OutputLevels();///<Retrieve Output Levels (for VU display)?
 
        void GetMonitorInfo (int *pLeftChannel = NULL, int *pRightChannel = NULL, float *pGain = NULL);///<Retrieve current monitor channel pair and gain - optional, will not be available with AG
        virtual WTErr SetMonitorChannels (int leftChannel, int rightChannel);///<Set monitor channels. - optional, will not be available with AG
        virtual WTErr SetMonitorGain (float newGain);///<Set monitor gain. - optional, will not be available with AG
-       
+
        virtual WTErr ShowConfigPanel (void *pParam);///< Show Control Panel - in case of ASIO this will work only with Active device!
        virtual WTErr SendCustomCommand (int customCommand, void *pCommandParam); ///< Send a custom command to the audiodevice...
 
@@ -193,13 +193,13 @@ public:
 
 protected:
        WCMRAudioDeviceManager *m_pMyManager; ///< The manager who's managing this device, can be used for sending notifications!
-       
+
        std::string m_DeviceName; ///< Name of the device.
        std::vector<std::string> m_InputChannels; ///< List of input channel names.
        std::vector<std::string> m_OutputChannels; ///< List of output channel names.
        std::vector<int> m_SamplingRates; ///< List of available sampling rates.
        std::vector<int> m_BufferSizes; ///< List of available buffer sizes.
-       
+
        int m_CurrentSamplingRate; ///< Currently selected sampling rate.
        int m_CurrentBufferSize; ///< Currently selected buffer size.
 
@@ -208,7 +208,7 @@ protected:
        bool m_IsStreaming; ///< Flag for streaming status.
        std::vector<float> m_InputLevels; ///< List of input levels.
        std::vector<float> m_OutputLevels; ///< List of output levels.
-       
+
        int m_LeftMonitorChannel; ///< The device channel to use for monitoring left channel data.
        int m_RightMonitorChannel; ///< The device channel to use for monitoring right channel data.
        float m_MonitorGain; ///< Amount of gain to apply for monitoring signal.
@@ -251,7 +251,7 @@ protected:
 
     mutable wvNS::wvThread::ThreadMutex         m_AudioDeviceInfoVecMutex; // mutex to lock device info list
        DeviceInfoVec                               m_DeviceInfoVec;
-       
+
     eAudioDeviceFilter                          m_eAudioDeviceFilter;
        WCMRAudioDevice*                            m_CurrentDevice;
 
index e630a7d1a9e7cb81e6369fb341635fd3152523d6..0d92493b5139d114ea879025dd315911fd10c9dc 100644 (file)
@@ -81,14 +81,14 @@ public:
        virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
 
        virtual WTErr DoIdle();///<Do Idle Processing
-       
+
        virtual WTErr SetMonitorChannels (int leftChannel, int rightChannel);///<Set monitor channels. - optional, will not be available with AG
        virtual WTErr SetMonitorGain (float newGain);///<Set monitor gain. - optional, will not be available with AG
-       
+
        virtual WTErr ShowConfigPanel (void *pParam);///< Show Control Panel - in case of ASIO this will work only with Active device!
 
        virtual int AudioCallback (float *pOutputBuffer, unsigned long framesPerBuffer, int64_t inSampleTime, uint64_t inCycleStartTime);
-       
+
        AudioDeviceID DeviceID () {return m_DeviceID;}
 
     virtual uint32_t GetLatency (bool isInput); ///< Get latency.
@@ -110,7 +110,7 @@ protected:
 //     int m_CurrentIOCycle; ///< The location in m_IOCyclesTymesTaken array, where the next cycle's value will go.
 //     int m_CyclesToAccumulate; ///< The number of cycles to accumulate the values for - maximum for last one second.
 //     unsigned int m_CyclePeriod; ///< The number of host time units for a cycle period - determined by buffer size and sampling rate
-       
+
 
        AudioUnit m_AUHALAudioUnit;///< The AUHAL AudioUnit
 
@@ -136,7 +136,7 @@ protected:
        uint32_t m_ToneDataSamples;
        uint32_t m_NextSampleToUse;
 #endif //WV_USE_TONE_GEN
-       
+
        WTErr UpdateDeviceInfo ();
     WTErr UpdateDeviceId ();
        WTErr UpdateDeviceName();
@@ -157,14 +157,14 @@ protected:
 #if WV_USE_TONE_GEN
        void SetupToneGenerator ();
 #endif //WV_USE_TONE_GEN
-       
+
        static OSStatus StaticAudioIOProc(void *inRefCon, AudioUnitRenderActionFlags *  ioActionFlags,
                const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
                AudioBufferList *ioData);
        OSStatus AudioIOProc(AudioUnitRenderActionFlags *       ioActionFlags,
                const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
                AudioBufferList *ioData);
-               
+
        static OSStatus StaticPropertyChangeProc (AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput,
        AudioDevicePropertyID inPropertyID, void *inClientData);
        void PropertyChangeProc (AudioDevicePropertyID inPropertyID);
@@ -196,7 +196,7 @@ protected:
 
        bool m_UseMultithreading; ///< Flag indicates whether to use multi-threading for audio processing.
     bool m_bNoCopyAudioBuffer;
-       
+
 private:
     // helper functions for this class only
     WTErr getDeviceAvailableSampleRates(DeviceID deviceId, std::vector<int>& sampleRates);
index 0bce97423caf997e7c97da1ff90f23ac0f1a7ac9..bf5e4fbb90e430095f5a4d88ecdb11a2b81f73ee 100644 (file)
@@ -106,7 +106,7 @@ WTErr WCMRNativeAudioNoneDevice::SetCurrentBufferSize (int newSize)
        //same size, nothing to do.
        if (oldSize == newSize)
                return eNoErr;
-       
+
        //see if this is one of our supported rates...
        std::vector<int>::iterator intIter = find(m_BufferSizes.begin(), m_BufferSizes.end(), newSize);
        if (intIter == m_BufferSizes.end())
@@ -114,14 +114,14 @@ WTErr WCMRNativeAudioNoneDevice::SetCurrentBufferSize (int newSize)
                //Can't change, perhaps use an "invalid param" type of error
                return eCommandLineParameter;
        }
-       
+
        if (Streaming())
        {
                //Can't change, perhaps use an "in use" type of error
                return eGenericErr;
        }
 
-       
+
        return WCMRAudioDevice::SetCurrentBufferSize(newSize);
 }
 
@@ -211,15 +211,15 @@ void WCMRNativeAudioNoneDevice::_SilenceThread()
 
     // VERY ROUGH IMPLEMENTATION:
     while(Streaming()) {
-       
+
         uint64_t cycleEndTimeNanos = audioCallbackData.acdCycleStartTimeNanos + cyclePeriodNanos;
 
                m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::AudioCallback, (void *)&audioCallbackData);
-               
+
         audioCallbackData.acdSampleTime += buffer_size;
-               
+
                int64_t timeToSleepUsecs = ((int64_t)cycleEndTimeNanos - (int64_t)__get_time_nanos())/1000;
-               
+
         if (timeToSleepUsecs > 0) {
             _usleep (timeToSleepUsecs);
         }
index c039b49c0b23c2eecb555fb7725dea9a2d73db6a..8e63887d37b50d5ae8dbfcd5b8afd171f4c8daf6 100644 (file)
@@ -38,7 +38,7 @@ static const int gAllBufferSizes[] =
        {
                32, 64, 96, 128, 192, 256, 512, 1024, 2048
        };
-       
+
 
 ///< The default SR.
 static const int DEFAULT_SR = 44100;
@@ -50,7 +50,7 @@ static const int NONE_DEVICE_ID = -1;
 ///< Number of stalls to wait before notifying user...
 static const int NUM_STALLS_FOR_NOTIFICATION = 100; // 100 corresponds to 100 x 42 ms idle timer - about 4 seconds.
 static const int CHANGE_CHECK_COUNTER_PERIOD = 100; // 120 corresponds to 120 x 42 ms idle timer - about 4 seconds.
-       
+
 #define HUNDRED_NANO_TO_MILLI_CONSTANT 10000
 #define CONSUMPTION_CALCULATION_INTERVAL 500 // Milli Seconds
 
@@ -165,7 +165,7 @@ void WCMRPortAudioDevice::initDevice()
                }
                else
                        std::cout << "API::Device " << m_DeviceName << " Device does not support any sample rate of ours" << std::endl;
-       
+
                //should use a valid current buffer size
                if (m_BufferSizes.size())
                {
@@ -177,7 +177,7 @@ void WCMRPortAudioDevice::initDevice()
                                m_CurrentBufferSize = m_BufferSizes[0];
                        }
                }
-       
+
                //build our input/output level lists
                for (unsigned int currentChannel = 0; currentChannel < m_InputChannels.size(); currentChannel++)
                {
@@ -215,7 +215,7 @@ void WCMRPortAudioDevice::terminateDevice()
        {
                stopStreaming();
        }
-               
+
        //If device is active (meaning stream is open) we need to close it.
        if (Active())
        {
@@ -285,7 +285,7 @@ WCMRPortAudioDevice::~WCMRPortAudioDevice ()
 WTErr WCMRPortAudioDevice::UpdateDeviceInfo ()
 {
        std::cout << "API::Device (ID:)" << m_DeviceID << " Updating device info" << std::endl;
-       
+
        SignalObjectAndWait(m_hUpdateDeviceInfoRequestedEvent, m_hUpdateDeviceInfoDone, INFINITE, false);
 
        return eNoErr;
@@ -307,7 +307,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
 
        //get device info
        const PaDeviceInfo *pDeviceInfo = Pa_GetDeviceInfo(m_DeviceID);
-       
+
        //update name.
        m_DeviceName = pDeviceInfo->name;
 
@@ -336,7 +336,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
        ////////////////////////////////////////////////////////////////////////////////////
        //update list of supported SRs...
        m_SamplingRates.clear();
-               
+
        // now iterate through our standard SRs and check if they are supported by device
        // store them for this device
        for(int sr=0; gAllSampleRates[sr] > 0; sr++)
@@ -356,11 +356,11 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
        // In ASIO Windows, the buffer size is set from the sound device manufacturer's control panel
        long minSize, maxSize, preferredSize, granularity;
        PaError err = PaAsio_GetAvailableBufferSizes(m_DeviceID, &minSize, &maxSize, &preferredSize, &granularity);
-       
+
        if (err == paNoError)
        {
                std::cout << "API::Device " << m_DeviceName << " Buffers: " << minSize << " " << maxSize << " " << preferredSize << std::endl;
-                       
+
                m_BufferSizes.push_back (preferredSize);
                useDefaultBuffers = false;
        }
@@ -368,7 +368,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
        {
                std::cout << "API::Device" << m_DeviceName << " Preffered buffer size is not supported" << std::endl;
        }
-       
+
        if (useDefaultBuffers)
        {
                std::cout << "API::Device" << m_DeviceName << " Using default buffer sizes " <<std::endl;
@@ -404,17 +404,17 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
 
                        m_InputChannels.push_back (chNameStream.str());
                }
-       
-       
+
+
                //Update output channels
                m_OutputChannels.clear();
                for (int channel = 0; channel < maxOutputChannels; channel++)
                {
                        const char* channelName[32]; // 32 is max leth declared by PortAudio for this operation
                        std::stringstream chNameStream;
-                       
+
                        PaError error = PaAsio_GetOutputChannelName(m_DeviceID, channel, channelName);
-                       
+
                        chNameStream << (channel+1) << " - ";
 
                        if (error == paNoError)
@@ -425,7 +425,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
                        {
                                chNameStream << "Output " << (channel+1);
                        }
-                       
+
                        m_OutputChannels.push_back (chNameStream.str());
                }
        }
@@ -467,13 +467,13 @@ PaError WCMRPortAudioDevice::testStateValidness(int sampleRate, int bufferSize)
                pOutS = &outputParameters;
 
        PaStream *portAudioStream = NULL;
-               
+
        //sometimes devices change buffer size if sample rate changes
        //it updates buffer size during stream opening
        //we need to find out how device would behave with current sample rate
        //try opening test stream to load device driver for current sample rate and buffer size
        paErr = Pa_OpenStream (&portAudioStream, pInS, pOutS, sampleRate, bufferSize, paDitherOff, NULL, NULL);
-       
+
        if (portAudioStream)
        {
                // close test stream
@@ -500,7 +500,7 @@ int WCMRPortAudioDevice::CurrentSamplingRate ()
 {
     AUTO_FUNC_DEBUG;
        //ToDo: Perhaps for ASIO devices that are active, we should retrive the SR from the device...
-       
+
        return (m_CurrentSamplingRate);
 }
 
@@ -548,7 +548,7 @@ WTErr WCMRPortAudioDevice::SetStreaming (bool newState)
 WTErr WCMRPortAudioDevice::ResetDevice()
 {
        std::cout << "API::Device: " << m_DeviceName << " Reseting device" << std::endl;
-       
+
        SignalObjectAndWait(m_hResetRequestedEvent, m_hResetDone, INFINITE, false);
 
        if (ConnectionStatus() == DeviceErrors)
@@ -579,7 +579,7 @@ WTErr WCMRPortAudioDevice::SetCurrentSamplingRate (int newRate)
        //changes the status.
        int oldRate = CurrentSamplingRate();
        bool oldActive = Active();
-       
+
        //no change, nothing to do
        if (oldRate == newRate)
                return (retVal);
@@ -593,14 +593,14 @@ WTErr WCMRPortAudioDevice::SetCurrentSamplingRate (int newRate)
                retVal = eCommandLineParameter;
                return (retVal);
        }
-       
+
        if (Streaming())
        {
                //Can't change, perhaps use an "in use" type of error
                retVal = eGenericErr;
                return (retVal);
        }
-       
+
        //make the change...
        m_CurrentSamplingRate = newRate;
        PaError paErr = PaAsio_SetStreamSampleRate (m_PortAudioStream, m_CurrentSamplingRate);
@@ -614,7 +614,7 @@ WTErr WCMRPortAudioDevice::SetCurrentSamplingRate (int newRate)
 
                retVal = eWrongObjectState;
        }
-       
+
        return (retVal);
 }
 
@@ -693,7 +693,7 @@ WCMRPortAudioDevice::ConnectionStates WCMRPortAudioDevice::ConnectionStatus ()
     AUTO_FUNC_DEBUG;
        //ToDo: May want to do something more to extract the actual status!
        return (m_ConnectionStatus);
-       
+
 }
 
 
@@ -710,7 +710,7 @@ void WCMRPortAudioDevice::activateDevice (bool callerIsWaiting/*=false*/)
        AUTO_FUNC_DEBUG;
 
        PaError paErr = paNoError;
-       
+
        // if device is not active activate it
        if (!Active() )
        {
@@ -748,11 +748,11 @@ void WCMRPortAudioDevice::activateDevice (bool callerIsWaiting/*=false*/)
                                                                paDitherOff,
                                                                WCMRPortAudioDevice::TheCallback,
                                                                this);
-                       
+
                if(paErr != paNoError)
                {
                        std::cout << "Cannot open streamm with buffer: "<< m_CurrentBufferSize << " Error: " << Pa_GetErrorText (paErr) << std::endl;
-                       
+
                        if (paErr ==  paUnanticipatedHostError)
                                std::cout << "Error details: "<< Pa_GetLastHostErrorInfo ()->errorText << "; code: " << Pa_GetLastHostErrorInfo ()->errorCode << std::endl;
                }
@@ -803,7 +803,7 @@ void WCMRPortAudioDevice::activateDevice (bool callerIsWaiting/*=false*/)
                        m_lastErr = eAsioFailed;
                }
 
-       
+
        }
 
        std::cout << "Activation is DONE "<< std::endl;
@@ -825,14 +825,14 @@ void WCMRPortAudioDevice::deactivateDevice (bool callerIsWaiting/*=false*/)
     AUTO_FUNC_DEBUG;
 
        PaError paErr = paNoError;
-       
+
        if (Active() )
        {
                if (Streaming())
                {
                        stopStreaming ();
                }
-               
+
                if (m_PortAudioStream)
                {
                        //close the stream first
@@ -892,13 +892,13 @@ void WCMRPortAudioDevice::startStreaming (bool callerIsWaiting/*=false*/)
                m_SampleCounter = 0;
 
                std::cout << "API::Device" << m_DeviceName << " Starting device stream" << std::endl;
-               
+
                //get device info
                const PaDeviceInfo *pDeviceInfo = Pa_GetDeviceInfo(m_DeviceID);
-       
+
                unsigned int inChannelCount = pDeviceInfo->maxInputChannels;
                unsigned int outChannelCount = pDeviceInfo->maxOutputChannels;
-               
+
                // Prepare for streaming - tell Engine to do the initialization for process callback
                m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::DeviceStartsStreaming);
 
@@ -917,7 +917,7 @@ void WCMRPortAudioDevice::startStreaming (bool callerIsWaiting/*=false*/)
                        m_lastErr = eGenericErr;
                }
        }
-               
+
        if (callerIsWaiting)
                SetEvent(m_hStartStreamingDone);
 }
@@ -995,7 +995,7 @@ void WCMRPortAudioDevice::resetDevice (bool callerIsWaiting /*=false*/ )
                // Reinitialize PA
                Pa_Terminate();
                Pa_Initialize();
-                       
+
                std::cout << "Updating device state... " << std::endl;
                // update device info
                updateDeviceInfo();
@@ -1145,7 +1145,7 @@ WTErr WCMRPortAudioDevice::DoIdle ()
        };
 
        const size_t hEventsSize = sizeof(hEvents)/sizeof(hEvents[0]);
-       
+
        initDevice();
 
        for(;;)
@@ -1255,7 +1255,7 @@ WTErr WCMRPortAudioDevice::SetMonitorGain (float newGain)
     AUTO_FUNC_DEBUG;
        //This will most likely be overridden, the base class simply
        //changes the member.
-       
+
        m_MonitorGain = newGain;
        return (eNoErr);
 }
@@ -1278,7 +1278,7 @@ WTErr WCMRPortAudioDevice::ShowConfigPanel (void *pParam)
 {
     AUTO_FUNC_DEBUG;
        WTErr retVal = eNoErr;
-       
+
        if (Active() && !m_ResetRequested )
        {
 #ifdef PLATFORM_WINDOWS
@@ -1291,7 +1291,7 @@ WTErr WCMRPortAudioDevice::ShowConfigPanel (void *pParam)
                        // show control panel for the device
                        if (PaAsio_ShowControlPanel (m_DeviceID, pParam) != paNoError)
                                retVal = eGenericErr;
-                       
+
                        // restore previous state for the device
                        SetActive(true);
                        if (wasStreaming)
@@ -1305,9 +1305,9 @@ WTErr WCMRPortAudioDevice::ShowConfigPanel (void *pParam)
                }
 #else
        pParam = pParam;
-#endif //_windows              
+#endif //_windows
        }
-       
+
        return (retVal);
 }
 
@@ -1336,7 +1336,7 @@ int WCMRPortAudioDevice::TheCallback (const void *pInputBuffer, void *pOutputBuf
                        (statusFlags & (paInputOverflow | paOutputUnderflow)) != 0);
        else
                return (true);
-                       
+
 }
 
 
@@ -1388,7 +1388,7 @@ int WCMRPortAudioDevice::AudioCallback( const float *pInputBuffer, float *pOutpu
        //Don't try to  access after this call returns!
        m_pInputData = NULL;
 
-       m_SampleCounter += framesPerBuffer;     
+       m_SampleCounter += framesPerBuffer;
 
        return m_StopRequested;
 }
@@ -1417,7 +1417,7 @@ WCMRPortAudioDeviceManager::WCMRPortAudioDeviceManager (WCMRAudioDeviceManagerCl
 {
     AUTO_FUNC_DEBUG;
        std::cout << "API::PortAudioDeviceManager::PA Device manager constructor" << std::endl;
-       
+
        //Always create the None device first...
        m_NoneDevice = new WCMRNativeAudioNoneDevice(this);
 
@@ -1443,7 +1443,7 @@ WCMRPortAudioDeviceManager::WCMRPortAudioDeviceManager (WCMRAudioDeviceManagerCl
 WCMRPortAudioDeviceManager::~WCMRPortAudioDeviceManager()
 {
     AUTO_FUNC_DEBUG;
-       
+
        std::cout << "API::Destroying PortAudioDeviceManager " << std::endl;
 
        try
@@ -1480,7 +1480,7 @@ WCMRAudioDevice* WCMRPortAudioDeviceManager::initNewCurrentDeviceImpl(const std:
                {
                        std::cout << "API::PortAudioDeviceManager::Creating PA device: " << devInfo.m_DeviceId << ", Device Name: " << devInfo.m_DeviceName << std::endl;
                        TRACE_MSG ("API::PortAudioDeviceManager::Creating PA device: " << devInfo.m_DeviceId << ", Device Name: " << devInfo.m_DeviceName);
-               
+
                        m_CurrentDevice = new WCMRPortAudioDevice (this, devInfo.m_DeviceId, m_UseMultithreading, m_bNoCopyAudioBuffer);
                }
                catch (...)
@@ -1548,7 +1548,7 @@ WTErr WCMRPortAudioDeviceManager::getDeviceAvailableSampleRates(DeviceID deviceI
 WTErr WCMRPortAudioDeviceManager::getDeviceAvailableBufferSizes(DeviceID deviceId, std::vector<int>& buffers)
 {
        WTErr retVal = eNoErr;
-       
+
        buffers.clear();
 
        //make PA request to get actual device buffer sizes
@@ -1574,7 +1574,7 @@ WTErr WCMRPortAudioDeviceManager::getDeviceAvailableBufferSizes(DeviceID deviceI
 WTErr WCMRPortAudioDeviceManager::generateDeviceListImpl()
 {
        std::cout << "API::PortAudioDeviceManager::Generating device list" << std::endl;
-       
+
        WTErr retVal = eNoErr;
 
        //Initialize PortAudio and ASIO first
@@ -1605,7 +1605,7 @@ WTErr WCMRPortAudioDeviceManager::generateDeviceListImpl()
        {
                //if it's of the required type...
                const PaDeviceInfo *pPaDeviceInfo = Pa_GetDeviceInfo(thisDeviceID);
-               
+
                if (Pa_GetHostApiInfo(pPaDeviceInfo->hostApi)->type == paASIO)
                {
                        //build a device object...
@@ -1749,7 +1749,7 @@ WTErr WCMRPortAudioDeviceManager::getDeviceSampleRatesImpl(const std::string & d
 WTErr WCMRPortAudioDeviceManager::getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& buffers) const
 {
        WTErr retVal = eNoErr;
-       
+
        buffers.clear();
 
        //first check if the request has been made for None device
@@ -1758,7 +1758,7 @@ WTErr WCMRPortAudioDeviceManager::getDeviceBufferSizesImpl(const std::string & d
                buffers=m_NoneDevice->BufferSizes();
                return retVal;
        }
-       
+
        if (m_CurrentDevice && deviceName == m_CurrentDevice->DeviceName() )
        {
                buffers=m_CurrentDevice->BufferSizes();
index 7579bfd2ffe4b987736ea4aacfed113e8643efb4..c028d0951118bc000881638452dce05c6990d381 100644 (file)
@@ -53,12 +53,12 @@ public:
        virtual ConnectionStates ConnectionStatus();///< Connection Status - device available, gone, disconnected
 
        virtual WTErr SetActive (bool newState);///<Prepare/Activate device.
-       
+
        virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
 
        virtual WTErr SetMonitorChannels (int leftChannel, int rightChannel);///<Set monitor channels. - optional, will not be available with AG
        virtual WTErr SetMonitorGain (float newGain);///<Set monitor gain. - optional, will not be available with AG
-       
+
        virtual WTErr ShowConfigPanel (void *pParam);///< Show Control Panel - in case of ASIO this will work only with Active device!
 
        virtual int AudioCallback (const float *pInputBuffer, float *pOutputBuffer, unsigned long framesPerBuffe, bool dropsDetectedr);
@@ -71,7 +71,7 @@ public:
        static long StaticASIOMessageHook (void *pRefCon, long selector, long value, void* message, double* opt);
        long ASIOMessageHook (long selector, long value, void* message, double* opt);
 #endif //PLATFORM_WINDOWS
-       
+
 protected:
        static DWORD WINAPI __DoIdle__(LPVOID lpThreadParameter);
 
@@ -88,7 +88,7 @@ protected:
 
        PaError testStateValidness(int sampleRate, int bufferSize);
        ///////////////////////////////////////////////////////////
-       
+
        static int TheCallback (const void *pInputBuffer, void *pOutputBuffer, unsigned long framesPerBuffer,
                                                        const PaStreamCallbackTimeInfo* /*pTimeInfo*/, PaStreamCallbackFlags /*statusFlags*/, void *pUserData );
 
@@ -154,7 +154,7 @@ class WCMRPortAudioDeviceManager : public WCMRAudioDeviceManager
 public:
        WCMRPortAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter,
                                                                bool useMultithreading = true, bool bNocopy = false); ///< constructor
-       
+
        virtual ~WCMRPortAudioDeviceManager(void); ///< destructor
 
 protected:
index 8b462414f805ab97a2d791e5e007c724c74300e9..49b3f63f0acfef6419d7eb6f2e3f8ecc20da641c 100644 (file)
@@ -55,7 +55,7 @@ Arc::compute_bounding_box () const
        /* this could be smaller in the case of small _arc values
           but I can't be bothered to optimize it.
        */
-       
+
        bbox.x0 = _center.x - _radius;
        bbox.y0 = _center.y - _radius;
        bbox.x1 = _center.x + _radius;
@@ -73,7 +73,7 @@ Arc::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) const
        if (_radius <= 0.0 || _arc_degrees <= 0.0) {
                return;
        }
-       
+
        Duple c = item_to_window (Duple (_center.x, _center.y));
 
        context->arc (c.x, c.y, _radius, _start_degrees * (M_PI/180.0), _arc_degrees * (M_PI/180.0));
@@ -98,35 +98,35 @@ void
 Arc::set_radius (Coord r)
 {
        begin_change ();
-       
+
        _radius = r;
 
        _bounding_box_dirty = true;
        end_change ();
-}      
+}
 
 void
 Arc::set_arc (double deg)
 {
        begin_change ();
-       
+
        _arc_degrees = deg;
 
        _bounding_box_dirty = true;
        end_change ();
-}      
+}
 
 
 void
 Arc::set_start (double deg)
 {
        begin_change ();
-       
+
        _start_degrees = deg;
-       
+
        _bounding_box_dirty = true;
        end_change ();
-}      
+}
 
 bool
 Arc::covers (Duple const & point) const
@@ -135,7 +135,7 @@ Arc::covers (Duple const & point) const
 
        double angle_degs = atan (p.y/p.x) * 2.0 * M_PI;
        double radius = sqrt (p.x * p.x + p.y * p.y);
-       
+
        return (angle_degs >= _start_degrees) &&
                (angle_degs <= (_start_degrees + _arc_degrees)) &&
                (radius < _radius);
index d78b04ef5804ceb867c48bfb380900c24d1a5da3..1f8f5b44ec19ea2a66e36f6abd68121e8baa775d 100644 (file)
@@ -58,7 +58,7 @@ Arrow::setup ()
                setup_polygon (i);
                CANVAS_DEBUG_NAME (_heads[i].polygon, string_compose ("arrow head %1", i));
        }
-       
+
        _line = new Line (this);
        CANVAS_DEBUG_NAME (_line, "arrow line");
 }
@@ -90,9 +90,9 @@ void
 Arrow::set_show_head (int which, bool show)
 {
        assert (which == 0 || which == 1);
-       
+
        begin_change ();
-       
+
        if (!show) {
                delete _heads[which].polygon;
                _heads[which].polygon = 0;
@@ -114,7 +114,7 @@ void
 Arrow::set_head_outward (int which, bool outward)
 {
        assert (which == 0 || which == 1);
-       
+
        begin_change ();
 
        _heads[which].outward = outward;
@@ -132,9 +132,9 @@ void
 Arrow::set_head_height (int which, Distance height)
 {
        assert (which == 0 || which == 1);
-       
+
        begin_change ();
-       
+
        _heads[which].height = height;
 
        setup_polygon (which);
@@ -150,9 +150,9 @@ void
 Arrow::set_head_width (int which, Distance width)
 {
        assert (which == 0 || which == 1);
-       
+
        begin_change ();
-       
+
        _heads[which].width = width;
 
        setup_polygon (which);
@@ -239,7 +239,7 @@ void
 Arrow::setup_polygon (int which)
 {
        assert (which == 0 || which == 1);
-       
+
        Points points;
 
        if ((which == 0 && _heads[which].outward) || (which == 1 && !_heads[which].outward)) {
index df6fd0ea890310bb959fc2ba349775b3ab37fd31..86ed6653c1c7f3412ac2eaac2edc68c4c85b299c 100644 (file)
@@ -16,7 +16,7 @@ public:
 
        void set_iterations (int);
        double run ();
-       
+
        virtual void do_run (ArdourCanvas::ImageCanvas &) = 0;
        virtual void finish (ArdourCanvas::ImageCanvas &) {}
 
index db0c5343b2ece9371ce17267718e4689014e0dbe..268447ed69ef8e00c1c926eae8aa10cf27e95f80 100644 (file)
@@ -12,7 +12,7 @@ static void
 test (int items_per_cell)
 {
        Group::default_items_per_cell = items_per_cell;
-       
+
        int const n_rectangles = 10000;
        int const n_tests = 1000;
        double const rough_size = 1000;
@@ -42,7 +42,7 @@ int main ()
        for (unsigned int i = 0; i < sizeof (tests) / sizeof (int); ++i) {
                timeval start;
                timeval stop;
-               
+
                gettimeofday (&start, 0);
                test (tests[i]);
                gettimeofday (&stop, 0);
@@ -59,4 +59,4 @@ int main ()
                cout << "Test " << tests[i] << ": " << seconds << "\n";
        }
 }
-       
+
index cd064d3e33f9efa7e0692990a359f0bd2f3969ef..0a2af8b7bcb609e97d08cfa8fa68f31b5f0016fd 100644 (file)
@@ -20,14 +20,14 @@ public:
        {
                _items_per_cell = items;
        }
-       
+
        void do_run (ImageCanvas& canvas)
        {
                Group::default_items_per_cell = _items_per_cell;
                canvas.set_log_renders (false);
 
                list<Rect> const & renders = canvas.renders ();
-               
+
                for (list<Rect>::const_iterator i = renders.begin(); i != renders.end(); ++i) {
                        canvas.render_to_image (*i);
                }
@@ -59,4 +59,4 @@ int main (int argc, char* argv[])
        return 0;
 }
 
-       
+
index 14988ab5c6dd5a8449e6ac370cb45ce23be8358a..f5444817ca736a058b30cb406c87aec2efe3826f 100644 (file)
@@ -20,11 +20,11 @@ public:
        {
                _items_per_cell = items;
        }
-       
+
        void do_run (ImageCanvas& canvas)
        {
                Group::default_items_per_cell = _items_per_cell;
-       
+
                for (int i = 0; i < 1e4; i += 50) {
                        canvas.render_to_image (Rect (i, 0, i + 50, 1024));
                }
@@ -55,4 +55,4 @@ int main (int argc, char* argv[])
        return 0;
 }
 
-       
+
index 7f5b348e62cc907c7d82e6aef8248cea24e275c1..cf4749c3e0eb771fb4eea95c467269db6cbecf8d 100644 (file)
@@ -39,8 +39,8 @@ int main (int argc, char* argv[])
        if (argc > 2) {
                render_whole.set_iterations (atoi (argv[2]));
        }
-       
+
        cout << render_whole.run () << "\n";
-       
+
        return 0;
 }
index 2d88eef5cec3b15bce7d201b8cc209a8c366e328..c6c4aed20c77638455d74c89b6c9160fec15d994 100644 (file)
@@ -104,7 +104,7 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
 #endif
 
        render_count = 0;
-       
+
        boost::optional<Rect> root_bbox = _root.bounding_box();
        if (!root_bbox) {
                /* the root has no bounding box, so there's nothing to render */
@@ -113,7 +113,7 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
 
        boost::optional<Rect> draw = root_bbox->intersection (area);
        if (draw) {
-               
+
                /* there's a common area between the root and the requested
                   area, so render it.
                */
@@ -171,7 +171,7 @@ Canvas::dump (ostream& o) const
 {
        dump_depth = 0;
        _root.dump (o);
-}      
+}
 
 /** Called when an item has been shown or hidden.
  *  @param item Item that has been shown or hidden.
@@ -210,7 +210,7 @@ Canvas::item_visual_property_changed (Item* item)
 void
 Canvas::item_changed (Item* item, boost::optional<Rect> pre_change_bounding_box)
 {
-       
+
        Rect window_bbox = visible_area ();
 
        if (pre_change_bounding_box) {
@@ -223,7 +223,7 @@ Canvas::item_changed (Item* item, boost::optional<Rect> pre_change_bounding_box)
 
        boost::optional<Rect> post_change_bounding_box = item->bounding_box ();
        if (post_change_bounding_box) {
-               
+
                if (item->item_to_window (*post_change_bounding_box).intersection (window_bbox)) {
                        /* request a redraw of the item's new bounding box */
                        queue_draw_item_area (item, post_change_bounding_box.get ());
@@ -406,7 +406,7 @@ GtkCanvas::pick_current_item (int state)
         * added or removed, so we have no coordinates to work from as is the
         * case with a motion event. Find out where the mouse is and use that.
         */
-       
+
        Glib::RefPtr<const Gdk::Window> pointer_window = Gdk::Display::get_default()->get_window_at_pointer (x, y);
 
        if (pointer_window != get_window()) {
@@ -453,7 +453,7 @@ GtkCanvas::pick_current_item (Duple const & point, int state)
           top, but we're going to reverse that for within_items so that its
           first item is the upper-most item that can be chosen as _current_item.
        */
-       
+
        vector<Item const *>::const_iterator i;
        list<Item const *> within_items;
 
@@ -483,7 +483,7 @@ GtkCanvas::pick_current_item (Duple const & point, int state)
                        DEBUG_TRACE (PBD::DEBUG::CanvasEnterLeave, string_compose ("CURRENT ITEM %1/%2\n", _new_current_item->whatami(), _current_item->name));
                        return;
                }
-       
+
                _new_current_item = const_cast<Item*> (within_items.front());
        }
 
@@ -525,7 +525,7 @@ GtkCanvas::deliver_enter_leave (Duple const & point, int state)
        /* Events delivered to canvas items are expected to be in canvas
         * coordinates but @param point is in window coordinates.
         */
-       
+
        Duple c = window_to_canvas (point);
        enter_event.x = c.x;
        enter_event.y = c.y;
@@ -574,7 +574,7 @@ GtkCanvas::deliver_enter_leave (Duple const & point, int state)
                 * Deliver "virtual" leave notifications to all items in the
                 * heirarchy between current and new_current.
                 */
-               
+
                for (i = _current_item->parent(); i && i != _new_current_item; i = i->parent()) {
                        items_to_leave_virtual.push_back (i);
                }
@@ -620,7 +620,7 @@ GtkCanvas::deliver_enter_leave (Duple const & point, int state)
                enter_detail = GDK_NOTIFY_NONLINEAR;
                leave_detail = GDK_NOTIFY_NONLINEAR;
        }
-       
+
 
        if (_current_item && !_current_item->ignore_events ()) {
                leave_event.detail = leave_detail;
@@ -685,7 +685,7 @@ GtkCanvas::deliver_event (GdkEvent* event)
        /* run through the items from child to parent, until one claims the event */
 
        Item* item = const_cast<Item*> (event_item);
-       
+
        while (item) {
 
                Item* parent = item->parent ();
@@ -697,10 +697,10 @@ GtkCanvas::deliver_event (GdkEvent* event)
                                PBD::DEBUG::CanvasEvents,
                                string_compose ("canvas event handled by %1 %2\n", item->whatami(), item->name.empty() ? "[unknown]" : item->name)
                                );
-                       
+
                        return true;
                }
-               
+
                DEBUG_TRACE (PBD::DEBUG::CanvasEvents, string_compose ("canvas event %3 left unhandled by %1 %2\n", item->whatami(), item->name.empty() ? "[unknown]" : item->name, event_type_string (event->type)));
 
                if ((item = parent) == 0) {
@@ -722,7 +722,7 @@ GtkCanvas::item_going_away (Item* item, boost::optional<Rect> bounding_box)
        if (bounding_box) {
                queue_draw_item_area (item, bounding_box.get ());
        }
-       
+
        if (_new_current_item == item) {
                _new_current_item = 0;
        }
@@ -751,7 +751,7 @@ GtkCanvas::item_going_away (Item* item, boost::optional<Rect> bounding_box)
                _current_item = 0;
                pick_current_item (0); // no mouse state
        }
-       
+
 }
 
 void
@@ -810,13 +810,13 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
 
         /* render canvas */
                if ( _single_exposure ) {
-       
+
                        render (Rect (ev->area.x, ev->area.y, ev->area.x + ev->area.width, ev->area.y + ev->area.height), draw_context);
 
                } else {
                        GdkRectangle* rects;
                        gint nrects;
-                       
+
                        gdk_region_get_rectangles (ev->region, &rects, &nrects);
                        for (gint n = 0; n < nrects; ++n) {
                                draw_context->set_identity_matrix();  //reset the cairo matrix, just in case someone left it transformed after drawing ( cough )
@@ -824,7 +824,7 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
                        }
                        g_free (rects);
                }
-               
+
 #ifdef OPTIONAL_CAIRO_IMAGE_SURFACE
        if (getenv("ARDOUR_IMAGE_SURFACE")) {
 #endif
@@ -856,12 +856,12 @@ GtkCanvas::on_scroll_event (GdkEventScroll* ev)
        GdkEvent copy = *((GdkEvent*)ev);
        Duple winpos = Duple (ev->x, ev->y);
        Duple where = window_to_canvas (winpos);
-       
+
        pick_current_item (winpos, ev->state);
 
        copy.button.x = where.x;
        copy.button.y = where.y;
-       
+
        /* Coordinates in the event will be canvas coordinates, correctly adjusted
           for scroll if this GtkCanvas is in a GtkCanvasViewport.
        */
@@ -904,12 +904,12 @@ GtkCanvas::on_button_press_event (GdkEventButton* ev)
        GdkEvent copy = *((GdkEvent*)ev);
        Duple winpos = Duple (ev->x, ev->y);
        Duple where = window_to_canvas (winpos);
-       
+
        pick_current_item (winpos, ev->state);
 
        copy.button.x = where.x;
        copy.button.y = where.y;
-       
+
        /* Coordinates in the event will be canvas coordinates, correctly adjusted
           for scroll if this GtkCanvas is in a GtkCanvasViewport.
        */
@@ -924,13 +924,13 @@ GtkCanvas::on_button_press_event (GdkEventButton* ev)
  */
 bool
 GtkCanvas::on_button_release_event (GdkEventButton* ev)
-{      
+{
        /* translate event coordinates from window to canvas */
 
        GdkEvent copy = *((GdkEvent*)ev);
        Duple winpos = Duple (ev->x, ev->y);
        Duple where = window_to_canvas (winpos);
-       
+
        pick_current_item (winpos, ev->state);
 
        copy.button.x = where.x;
@@ -1200,12 +1200,12 @@ GtkCanvas::show_tooltip ()
        (void) toplevel->get_window()->get_pointer (pointer_x, pointer_y, mask);
 
        Duple tooltip_window_origin (pointer_x, pointer_y);
-       
+
        /* convert to root window coordinates */
 
        int win_x, win_y;
        dynamic_cast<Gtk::Window*>(toplevel)->get_position (win_x, win_y);
-       
+
        tooltip_window_origin = tooltip_window_origin.translate (Duple (win_x, win_y));
 
        /* we don't want the pointer to be inside the window when it is
@@ -1227,7 +1227,7 @@ GtkCanvas::show_tooltip ()
        /* ready to show */
 
        tooltip_window->present ();
-       
+
        /* called from a timeout handler, don't call it again */
 
        return false;
index 95bd157cbf664072cae0927c5618815246c9685f..76342c3985a311368546db60bf5bb4838987faba 100644 (file)
@@ -63,7 +63,7 @@ private:
         double _arc_degrees;
         double _start_degrees;
 };
-       
+
 }
 
 #endif
index 6617e13bd281686f5e21ed477f934d745b568fd1..ba74fa90e74040a38f1f905772216ecd35e87be1 100644 (file)
@@ -44,7 +44,7 @@ class Polygon;
  *  @todo Draws vertical lines only; could be generalised
  *  to draw lines at any angle.
  */
-       
+
 class LIBCANVAS_API Arrow : public Container
 {
 public:
@@ -66,7 +66,7 @@ public:
        void set_x (Coord);
        void set_y0 (Coord);
        void set_y1 (Coord);
-       
+
         bool covers (Duple const &) const;
 
 private:
index c812f8a869bd5cb4dcb5a0bada3749dab742ef22..87e580e0465d251b1f071cbea0bdf2acd38e3b9e 100644 (file)
@@ -59,7 +59,7 @@ class ScrollGroup;
  *  of screen pixels, with an origin of (0, 0) at the top left.  x increases
  *  rightwards and y increases downwards.
  */
-       
+
 class LIBCANVAS_API Canvas
 {
 public:
@@ -153,7 +153,7 @@ public:
        /** Set the timeout used to display tooltips, in milliseconds
         */
        static void set_tooltip_timeout (uint32_t msecs);
-       
+
 protected:
        Root  _root;
         Color _bg_color;
@@ -205,7 +205,7 @@ protected:
        bool on_motion_notify_event (GdkEventMotion *);
         bool on_enter_notify_event (GdkEventCrossing*);
         bool on_leave_notify_event (GdkEventCrossing*);
-       
+
        bool button_handler (GdkEventButton *);
        bool motion_notify_handler (GdkEventMotion *);
         bool deliver_event (GdkEvent *);
@@ -228,7 +228,7 @@ private:
        Item * _grabbed_item;
         /** the item that currently has key focus or 0 */
        Item * _focused_item;
-       
+
        bool _single_exposure;
 
        sigc::connection tooltip_timeout_connection;
index c84e3aceec6adb91ff6eac0e95655541fc5f92ca..64ce2ea62db17ad88c7337709a9b465666b0fe1c 100644 (file)
@@ -31,7 +31,7 @@ class LIBCANVAS_API Circle : public Arc
        Circle (Canvas*);
        Circle (Item*);
 };
-       
+
 }
 
 #endif
index 331010e6390544e5c3eea45222d4bdbf1c6d1586..2a3cbb206099a8824e61996d8521418ed62b8e6f 100644 (file)
@@ -59,11 +59,11 @@ class LIBCANVAS_API SVAModifier
        double s() const { return _s; }
        double v() const { return _v; }
        double a() const { return _a; }
-       
+
        HSV operator () (HSV& hsv) const;
        std::string to_string () const;
        void from_string (std::string const &);
-       
+
   private:
        Type type;
        double _s;
@@ -77,7 +77,7 @@ struct LIBCANVAS_API HSV
        HSV (double h, double s, double v, double a = 1.0);
        HSV (Color);
        HSV (const std::string&);
-       
+
        double h;
        double s;
        double v;
@@ -85,12 +85,12 @@ struct LIBCANVAS_API HSV
 
        std::string to_string() const;
        bool is_gray() const;
-       
+
        Color color() const { return hsva_to_color (h,s, v, a); }
        operator Color() const { return color(); }
 
        HSV mod (SVAModifier const & svam);
-       
+
        HSV operator+ (const HSV&) const;
        HSV operator- (const HSV&) const;
 
index 9eddeec6b606984e990048cc4776f561fae695b2..42160a61907bbe09a803fff5062a9a4bef9e64cb 100644 (file)
@@ -50,7 +50,7 @@ public:
        }
 
         typedef std::vector<std::pair<double,Color> > StopList;
-       
+
         void set_gradient (StopList const & stops, bool is_vertical);
 
         void set_pattern (Cairo::RefPtr<Cairo::Pattern>);
index 82f257b7d23bf9ab5fe0dfd37a6e515ed8c595fb..ed7bc7cacba9346e1651b3dd4394aec9f65c4a0b 100644 (file)
@@ -41,7 +41,7 @@ public:
        void set_font_description (Pango::FontDescription);
 
         bool covers (Duple const &) const;
-       
+
 private:
        void setup (Distance height, Duple position);
 
@@ -52,5 +52,5 @@ private:
        Rectangle* _rectangle;
        bool _invert;
 };
-       
+
 }
index 098816cd4a06ddefbd76fa9d88ab7aea4fa961cf..e92fc7fb4b1ae5daa0e7e2321e8df51e0b06c9dc 100644 (file)
@@ -36,7 +36,7 @@
 
 namespace ArdourCanvas
 {
-struct Rect;   
+struct Rect;
 
 class Canvas;
 class ScrollGroup;
@@ -51,7 +51,7 @@ class ScrollGroup;
  *  Any item that is being displayed on a canvas has a pointer to that canvas,
  *  and all except the `root group' have a pointer to their parent group.
  */
-       
+
 class LIBCANVAS_API Item : public Fill, public Outline
 {
 public:
@@ -97,7 +97,7 @@ public:
 
        void grab ();
        void ungrab ();
-       
+
        void unparent ();
        void reparent (Item *);
 
@@ -176,7 +176,7 @@ public:
        }
 
        bool visible () const;
-       
+
        /** @return Our canvas, or 0 if we are not attached to one */
        Canvas* canvas () const {
                return _canvas;
@@ -204,7 +204,7 @@ public:
 
        static int default_items_per_cell;
 
-       
+
        /* This is a sigc++ signal because it is solely
           concerned with GUI stuff and is thus single-threaded
        */
@@ -223,23 +223,23 @@ public:
                        return false;
                }
        };
-       
+
         sigc::signal1<bool, GdkEvent*, EventAccumulator<bool> > Event;
 
 #ifdef CANVAS_DEBUG
        std::string name;
 #endif
-       
+
 #ifdef CANVAS_COMPATIBILITY
        void grab_focus ();
-#endif 
+#endif
 
        const std::string& tooltip () const { return _tooltip; }
        void set_tooltip (const std::string&);
 
        void start_tooltip_timeout ();
        void stop_tooltip_timeout ();
-       
+
         virtual void dump (std::ostream&) const;
         std::string whatami() const;
 
index b178554c849762c04c83635e4c08acde5b7afd5f..bd588876042438e24a077270347cc2afd0a35a9b 100644 (file)
@@ -60,7 +60,7 @@ class LIBCANVAS_API Line : public Item
 private:
        Duple _points[2];
 };
-       
+
 }
 
 #endif
index fad100fdf9dd58521978418e6dbf184be8e90b33..c305cceab52bb52a99e53fee05d48d381757b945 100644 (file)
@@ -51,7 +51,7 @@ public:
 
        struct Line {
                Line (Coord p, Distance width_, Color color_) : pos (p), width (width_), color (color_) {}
-               
+
                Coord pos;
                Distance width;
                Color color;
index cf526335244f2e483593e53d895f191e872dda4b..2877f7a727b194121231a5d075a5bb55bf74bc35 100644 (file)
@@ -43,7 +43,7 @@ public:
     virtual bool has_item_at_point (Duple const & point) const = 0;
 
 protected:
-       
+
     Item const & _item;
 };
 
index 474501c8c78c1a38711a388abb0069ffa6d96cda..38f8eb2e32ca00f046f2d00085028d3e264ec08a 100644 (file)
@@ -46,7 +46,7 @@ public:
        Distance outline_width () const {
                return _outline_width;
        }
-       
+
        virtual void set_outline_width (Distance);
 
        bool outline () const {
index 732adb14b30a030ebe967380c69d123216cb0241..bdb7c20b1a4d3b2ff0a14fb5021d03eece26fa84 100644 (file)
@@ -45,7 +45,7 @@ protected:
 
        Points _points;
 };
-       
+
 }
 
 #endif
index 04b05f5df1f33b2b7fede5a787e2bb29bf5874db..fce013dfd6e11b032fd71203d138fe63d30597d2 100644 (file)
@@ -31,11 +31,11 @@ class LIBCANVAS_API PolyLine : public PolyItem
   public:
        PolyLine (Canvas*);
        PolyLine (Item*);
-       
+
        void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
 
        virtual void set_steps (Points const &, bool stepped);
-       
+
         bool covers (Duple const &) const;
        /**
         * Set the distance at which a point will be considered to be covered
@@ -47,7 +47,7 @@ class LIBCANVAS_API PolyLine : public PolyItem
   private:
        double _threshold;
 };
-       
+
 }
 
 #endif
index e0e6b1a1f7e3169bfc14b14531c4aa4f55939662..65fcdde9812fdfdc4c1090583ab816e4a3ab2ffe 100644 (file)
@@ -45,7 +45,7 @@ public:
 
     void cache_shape_computation () const;
 };
-       
+
 }
 
 #endif
index c40d3fccb0e300b6131a78a05c605553ec004070..8b65940454fc56848066d01778997a8d215e98fa 100644 (file)
@@ -34,7 +34,7 @@ public:
        Rectangle (Canvas*, Rect const &);
        Rectangle (Item*);
        Rectangle (Item*, Rect const &);
-       
+
        void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
        void compute_bounding_box () const;
 
index 1763fc11df445a3c7d5fe502bd0f85566e81b2ae..1d2c516b8b11bf875abc07af213ba40128f0588f 100644 (file)
@@ -29,7 +29,7 @@ class LIBCANVAS_API Root : public Container
 {
 private:
        friend class Canvas;
-       
+
        Root (Canvas *);
 
        void compute_bounding_box () const;
index 0a6a13e078bedd5a9c51e28d6c511a97b44d223c..0a2e43587e99821d92ca83b424ab119f0c34a87a 100644 (file)
@@ -28,7 +28,7 @@
 
 namespace ArdourCanvas
 {
-       
+
 class LIBCANVAS_API Ruler : public Rectangle
 {
 public:
@@ -42,7 +42,7 @@ public:
                double position;
                Style  style;
        };
-       
+
        struct Metric {
                Metric () : units_per_pixel (0) {}
                virtual ~Metric() {}
@@ -51,15 +51,15 @@ public:
 
                /* lower and upper and sample positions, which are also canvas coordinates
                 */
-               
+
                virtual void get_marks (std::vector<Mark>&, double lower, double upper, int maxchars) const = 0;
        };
-       
+
        Ruler (Canvas*, const Metric& m);
        Ruler (Canvas*, const Metric& m, Rect const&);
        Ruler (Item*, const Metric& m);
        Ruler (Item*, const Metric& m, Rect const&);
-       
+
        void set_range (double lower, double upper);
        void set_font_description (Pango::FontDescription);
        void set_metric (const Metric&);
index fd9b2388d4e2da44135626d3b5c59964d8e32781..03176620062fa26e07e0d3543ce7ca3e5213b924 100644 (file)
@@ -34,7 +34,7 @@ class LIBCANVAS_API ScrollGroup : public Container
                ScrollsVertically = 0x1,
                ScrollsHorizontally = 0x2
        };
-       
+
        ScrollGroup (Canvas*, ScrollSensitivity);
        ScrollGroup (Item*, ScrollSensitivity);
 
index 901e5c2925faa9b8068141d2182ab2e09b7e5d5b..744e5370fb22b806b92537c186deeed93dc16ad0 100644 (file)
@@ -29,7 +29,7 @@ class LIBCANVAS_API TrackingText : public Text
   public:
        TrackingText (Canvas*);
        TrackingText (Item*);
-       
+
        void show_and_track (bool track_x, bool track_y);
        void set_offset (Duple const &);
        void set_x_offset (double);
index c43be9bbddfde5d37090a514d1ac503876efa210..a92d637925a93365e981714d574d5a7b98f71385 100644 (file)
@@ -60,12 +60,12 @@ struct LIBCANVAS_API Duple
                : x (0)
                , y (0)
        {}
-       
+
        Duple (Coord x_, Coord y_)
                : x (x_)
                , y (y_)
        {}
-               
+
        Coord x;
        Coord y;
 
@@ -104,14 +104,14 @@ struct LIBCANVAS_API Rect
                , x1 (0)
                , y1 (0)
        {}
-       
+
        Rect (Coord x0_, Coord y0_, Coord x1_, Coord y1_)
                : x0 (x0_)
                , y0 (y0_)
                , x1 (x1_)
                , y1 (y1_)
        {}
-               
+
        Coord x0;
        Coord y0;
        Coord x1;
@@ -120,14 +120,14 @@ struct LIBCANVAS_API Rect
        boost::optional<Rect> intersection (Rect const & o) const throw () {
                Rect i (std::max (x0, o.x0), std::max (y0, o.y0),
                        std::min (x1, o.x1), std::min (y1, o.y1));
-               
+
                if (i.x0 > i.x1 || i.y0 > i.y1) {
                        return boost::optional<Rect> ();
                }
-               
+
                return boost::optional<Rect> (i);
        }
-               
+
        Rect extend (Rect const & o) const throw () {
                return Rect (std::min (x0, o.x0), std::min (y0, o.y0),
                             std::max (x1, o.x1), std::max (y1, o.y1));
@@ -150,7 +150,7 @@ struct LIBCANVAS_API Rect
                return Rect (canvas_safe_add (x0, amount), canvas_safe_add (y0, amount),
                             x1 - amount, y1 - amount);
        }
-               
+
        bool contains (Duple const & point) const throw () {
                return point.x >= x0 && point.x < x1 && point.y >= y0 && point.y < y1;
        }
@@ -158,7 +158,7 @@ struct LIBCANVAS_API Rect
                return Rect (std::min (x0, x1), std::min (y0, y1),
                             std::max (x0, x1), std::max (y0, y1));
        }
-               
+
        bool empty() const throw () { return (x0 == x1 && y0 == y1); }
 
        Distance width () const  throw () {
@@ -181,5 +181,5 @@ extern LIBCANVAS_API std::ostream & operator<< (std::ostream &, Rect const &);
 typedef std::vector<Duple> Points;
 
 }
-       
+
 #endif
index 20c3ad5cce2c6825da78a03c2397adfb57cea346..8dfd988b6b4df4bba4d5d0f51b8261b22375ef68 100644 (file)
@@ -42,7 +42,7 @@ namespace Gdk {
 }
 
 class WaveViewTest;
-       
+
 namespace ArdourCanvas {
 
 struct LIBCANVAS_API WaveViewThreadRequest
@@ -55,10 +55,10 @@ struct LIBCANVAS_API WaveViewThreadRequest
         };
 
        WaveViewThreadRequest  () : stop (0) {}
-       
+
        bool should_stop () const { return (bool) g_atomic_int_get (const_cast<gint*>(&stop)); }
        void cancel() { g_atomic_int_set (&stop, 1); }
-       
+
        RequestType type;
        framepos_t start;
        framepos_t end;
@@ -71,9 +71,9 @@ struct LIBCANVAS_API WaveViewThreadRequest
        boost::weak_ptr<const ARDOUR::Region> region;
 
        /* resulting image, after request has been satisfied */
-       
+
        Cairo::RefPtr<Cairo::ImageSurface> image;
-       
+
   private:
        gint stop; /* intended for atomic access */
 };
@@ -85,7 +85,7 @@ class LIBCANVAS_API WaveViewCache
   public:
        WaveViewCache();
        ~WaveViewCache();
-       
+
        struct Entry {
 
                /* these properties define the cache entry as unique.
@@ -111,7 +111,7 @@ class LIBCANVAS_API WaveViewCache
 
                /* last time the cache entry was used */
                uint64_t timestamp;
-               
+
                Entry (int chan, Coord hght, float amp, Color fcl, double spp, framepos_t strt, framepos_t ed,
                       Cairo::RefPtr<Cairo::ImageSurface> img)
                        : channel (chan)
@@ -127,10 +127,10 @@ class LIBCANVAS_API WaveViewCache
        uint64_t image_cache_threshold () const { return _image_cache_threshold; }
        void set_image_cache_threshold (uint64_t);
        void clear_cache ();
-       
+
        void add (boost::shared_ptr<ARDOUR::AudioSource>, boost::shared_ptr<Entry>);
        void use (boost::shared_ptr<ARDOUR::AudioSource>, boost::shared_ptr<Entry>);
-       
+
         void consolidate_image_cache (boost::shared_ptr<ARDOUR::AudioSource>,
                                       int channel,
                                       Coord height,
@@ -196,18 +196,18 @@ public:
 
        Cairo::RefPtr<Cairo::ImageSurface> _image;
        PBD::Signal0<void> ImageReady;
-       
+
        /* Displays a single channel of waveform data for the given Region.
 
           x = 0 in the waveview corresponds to the first waveform datum taken
           from region->start() samples into the source data.
-       
+
           x = N in the waveview corresponds to the (N * spp)'th sample
           measured from region->start() into the source data.
-       
+
           when drawing, we will map the zeroth-pixel of the waveview
           into a window.
-       
+
           The waveview itself contains a set of pre-rendered Cairo::ImageSurfaces
           that cache sections of the display. This is filled on-demand and
           never cleared until something explicitly marks the cache invalid
@@ -235,10 +235,10 @@ public:
         * want this behaviour.
         */
        void set_start_shift (double pixels);
-       
+
         void set_fill_color (Color);
         void set_outline_color (Color);
-       
+
        void region_resized ();
         void gain_changed ();
 
@@ -277,8 +277,8 @@ public:
        static void stop_drawing_thread ();
 
        static void set_image_cache_size (uint64_t);
-       
-#ifdef CANVAS_COMPATIBILITY    
+
+#ifdef CANVAS_COMPATIBILITY
        void*& property_gain_src () {
                return _foo_void;
        }
@@ -312,7 +312,7 @@ public:
         double _amplitude_above_axis;
        float  _region_amplitude;
        double _start_shift;
-       
+
        /** The `start' value to use for the region; we can't use the region's
         *  value as the crossfade editor needs to alter it.
         */
@@ -340,14 +340,14 @@ public:
           keep updating (e.g. while recording)
        */
        bool always_get_image_in_thread;
-       
+
        /** Set to true by render(). Used so that we know if the wave view
         * has actually been displayed on screen. ::set_height() when this
         * is true does not use get_image_in_thread, because it implies
         * that the height is being set BEFORE the waveview is drawn.
         */
        mutable bool rendered;
-       
+
         PBD::ScopedConnectionList invalidation_connection;
         PBD::ScopedConnection     image_ready_connection;
 
@@ -364,14 +364,14 @@ public:
 
         boost::shared_ptr<WaveViewCache::Entry> get_image (framepos_t start, framepos_t end, bool& full_image) const;
         boost::shared_ptr<WaveViewCache::Entry> get_image_from_cache (framepos_t start, framepos_t end, bool& full_image) const;
-       
+
         struct LineTips {
                double top;
                double bot;
                double spread;
                bool clip_max;
                bool clip_min;
-       
+
                LineTips() : top (0.0), bot (0.0), clip_max (false), clip_min (false) {}
         };
 
@@ -382,7 +382,7 @@ public:
 
         void draw_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int n_peaks, boost::shared_ptr<WaveViewThreadRequest>) const;
        void draw_absent_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int) const;
-       
+
         void cancel_my_render_request () const;
 
         void queue_get_image (boost::shared_ptr<const ARDOUR::Region> region, framepos_t start, framepos_t end) const;
@@ -394,7 +394,7 @@ public:
         mutable boost::shared_ptr<WaveViewCache::Entry> _current_image;
 
        mutable boost::shared_ptr<WaveViewThreadRequest> current_request;
-       
+
        static WaveViewCache* images;
 
        static void drawing_thread ();
index 590bb3af7d503b939dd337e96cd9c6d30303d69d..127862037c9fb27c71038364f8d0bc3347bcdbd4 100644 (file)
@@ -33,7 +33,7 @@ class LIBCANVAS_API Widget : public Item
 public:
        Widget (Canvas*, CairoWidget&);
        Widget (Item*, CairoWidget&);
-       
+
        void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
        void compute_bounding_box () const;
 
index 03bfd8d4ce16df07e3268a703adc49c2ef9a608c..19c522664297276a6940e815f0b79469c157f56b 100644 (file)
@@ -55,9 +55,9 @@ ArdourCanvas::color_to_hsva (Color color, double& h, double& s, double& v, doubl
        double cmax;
        double cmin;
        double delta;
-       
+
        color_to_rgba (color, r, g, b, a);
-       
+
        if (r > g) {
                cmax = max (r, b);
        } else {
@@ -81,7 +81,7 @@ ArdourCanvas::color_to_hsva (Color color, double& h, double& s, double& v, doubl
                return;
        }
 
-       if (delta != 0.0) {     
+       if (delta != 0.0) {
                if (cmax == r) {
                        h = fmod ((g - b)/delta, 6.0);
                } else if (cmax == g) {
@@ -89,9 +89,9 @@ ArdourCanvas::color_to_hsva (Color color, double& h, double& s, double& v, doubl
                } else {
                        h = ((r - g)/delta) + 4;
                }
-               
+
                h *= 60.0;
-               
+
                if (h < 0.0) {
                        /* negative values are legal but confusing, because
                           they alias positive values.
@@ -341,7 +341,7 @@ HSV
 HSV::shade (double factor) const
 {
        HSV hsv (*this);
-       
+
        /* algorithm derived from a google palette website
           and analysis of their color palettes.
 
@@ -423,10 +423,10 @@ HSV::distance (const HSV& other) const
                   perceptual distance of sqrt ((360^2) + 1 + 1) = 360. The 450
                   are not evenly spread (Webers Law), so lets use 360 as an
                   approximation of the number of distinct achromatics.
-               
+
                   So, scale up the achromatic difference to give about
                   a maximal distance between v = 1.0 and v = 0.0 of 360.
-               
+
                   A difference of about 0.0055 will generate a return value of
                   2, which is roughly the limit of human perceptual
                   discrimination for chromatics.
@@ -467,7 +467,7 @@ HSV::distance (const HSV& other) const
        const double xDE = sqrt (((sL - oL) * (sL - oL))
                                 + ((sA - oA) * (sA - oA))
                                 + ((sB - oB) * (sB - oB)));
-       
+
        double xDH;
 
        if (sqrt (xDE) > (sqrt (abs (xDL)) + sqrt (abs (xDC)))) {
@@ -482,7 +482,7 @@ HSV::distance (const HSV& other) const
        xDL /= whtL;
        xDC /= whtC * xSC;
        xDH /= whtH * xSH;
-       
+
        return sqrt ((xDL * xDL) + (xDC * xDC) + (xDH * xDH));
 }
 
@@ -630,7 +630,7 @@ HSV
 SVAModifier::operator () (HSV& hsv)  const
 {
        HSV r (hsv);
-       
+
        switch (type) {
        case Add:
                r.s += _s;
index f4480e7dc09741174268338b8a2bf1ccb370c115..50cbac8fb1bc124f99550112f4f99aa27b984c66 100644 (file)
@@ -373,16 +373,16 @@ void Rgb2Hsv(double *H, double *S, double *V, double R, double G, double B)
        double Max = MAX3(R, G, B);
        double Min = MIN3(R, G, B);
        double C = Max - Min;
-       
-       
+
+
        *V = Max;
-       
+
        if(C > 0)
        {
                if(Max == R)
                {
                        *H = (G - B) / C;
-                       
+
                        if(G < B)
                                *H += 6;
                }
@@ -390,7 +390,7 @@ void Rgb2Hsv(double *H, double *S, double *V, double R, double G, double B)
                        *H = 2 + (B - R) / C;
                else
                        *H = 4 + (R - G) / C;
-               
+
                *H *= 60;
                *S = C / Max;
        }
@@ -419,12 +419,12 @@ void Hsv2Rgb(double *R, double *G, double *B, double H, double S, double V)
        double C = S * V;
        double Min = V - C;
        double X;
-       
-       
+
+
        H -= 360*floor(H/360);
        H /= 60;
        X = C*(1 - fabs(H - 2*floor(H/2) - 1));
-       
+
        switch((int)H)
        {
        case 0:
@@ -485,16 +485,16 @@ void Rgb2Hsl(double *H, double *S, double *L, double R, double G, double B)
        double Max = MAX3(R, G, B);
        double Min = MIN3(R, G, B);
        double C = Max - Min;
-       
-       
+
+
        *L = (Max + Min)/2;
-       
+
        if(C > 0)
        {
                if(Max == R)
                {
                        *H = (G - B) / C;
-                       
+
                        if(G < B)
                                *H += 6;
                }
@@ -502,7 +502,7 @@ void Rgb2Hsl(double *H, double *S, double *L, double R, double G, double B)
                        *H = 2 + (B - R) / C;
                else
                        *H = 4 + (R - G) / C;
-               
+
                *H *= 60;
                *S = (*L <= 0.5) ? (C/(2*(*L))) : (C/(2 - 2*(*L)));
        }
@@ -531,12 +531,12 @@ void Hsl2Rgb(double *R, double *G, double *B, double H, double S, double L)
        double C = (L <= 0.5) ? (2*L*S) : ((2 - 2*L)*S);
        double Min = L - 0.5*C;
        double X;
-       
-       
+
+
        H -= 360*floor(H/360);
        H /= 60;
        X = C*(1 - fabs(H - 2*floor(H/2) - 1));
-       
+
        switch((int)H)
        {
        case 0:
@@ -594,15 +594,15 @@ void Rgb2Hsi(double *H, double *S, double *I, double R, double G, double B)
 {
        double alpha = 0.5*(2*R - G - B);
        double beta = 0.866025403784439*(G - B);
-       
-       
+
+
        *I = (R + G + B)/3;
-       
+
        if(*I > 0)
        {
                *S = 1 - MIN3(R,G,B) / *I;
                *H = atan2(beta, alpha)*(180/M_PI);
-               
+
                if(*H < 0)
                        *H += 360;
        }
@@ -629,7 +629,7 @@ void Rgb2Hsi(double *H, double *S, double *I, double R, double G, double B)
 void Hsi2Rgb(double *R, double *G, double *B, double H, double S, double I)
 {
        H -= 360*floor(H/360);
-       
+
        if(H < 120)
        {
                *B = I*(1 - S);
@@ -695,16 +695,16 @@ void Rgb2Xyz(double *X, double *Y, double *Z, double R, double G, double B)
  * Wikipedia: http://en.wikipedia.org/wiki/CIE_1931_color_space
  */
 void Xyz2Rgb(double *R, double *G, double *B, double X, double Y, double Z)
-{      
+{
        double R1, B1, G1, Min;
-       
-       
+
+
        R1 = (double)( 3.2406*X - 1.5372*Y - 0.4986*Z);
        G1 = (double)(-0.9689*X + 1.8758*Y + 0.0415*Z);
        B1 = (double)( 0.0557*X - 0.2040*Y + 1.0570*Z);
-       
+
        Min = MIN3(R1, G1, B1);
-       
+
        /* Force nonnegative values so that gamma correction is well-defined. */
        if(Min < 0)
        {
@@ -770,9 +770,9 @@ void Lab2Xyz(double *X, double *Y, double *Z, double L, double a, double b)
  * Wikipedia: http://en.wikipedia.org/wiki/CIELUV_color_space
  */
 void Xyz2Luv(double *L, double *u, double *v, double X, double Y, double Z)
-{      
+{
        double u1, v1, Denom;
-       
+
 
        if((Denom = X + 15*Y + 3*Z) > 0)
        {
@@ -802,13 +802,13 @@ void Luv2Xyz(double *X, double *Y, double *Z, double L, double u, double v)
 {
        *Y = (L + 16)/116;
        *Y = WHITEPOINT_Y*LABINVF(*Y);
-       
+
        if(L != 0)
        {
                u /= L;
                v /= L;
        }
-       
+
        u = u/13 + WHITEPOINT_U;
        v = v/13 + WHITEPOINT_V;
        *X = (*Y) * ((9*u)/(4*v));
@@ -829,12 +829,12 @@ void Luv2Xyz(double *X, double *Y, double *Z, double L, double u, double v)
 void Xyz2Lch(double *L, double *C, double *H, double X, double Y, double Z)
 {
        double a, b;
-       
-       
+
+
        Xyz2Lab(L, &a, &b, X, Y, Z);
        *C = sqrt(a*a + b*b);
        *H = atan2(b, a)*180.0/M_PI;
-       
+
        if(*H < 0)
                *H += 360;
 }
@@ -849,8 +849,8 @@ void Lch2Xyz(double *X, double *Y, double *Z, double L, double C, double H)
 {
        double a = C * cos(H*(M_PI/180.0));
        double b = C * sin(H*(M_PI/180.0));
-       
-       
+
+
        Lab2Xyz(X, Y, Z, L, a, b);
 }
 
index 78d47f07e94e3f2dd3dbaa37a6511e8a6bc02dde..280a3e3aaaf7688a04d41f0339ddf848bb3caca3 100644 (file)
@@ -101,7 +101,7 @@ Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
         * section of the curve. For now we rely on cairo clipping to help
         * with this.
         */
-       
+
 
        setup_outline_context (context);
 
@@ -165,7 +165,7 @@ Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
                draw = draw.expand (4.0);
 
                /* now clip it to the actual points in the curve */
-               
+
                if (draw.x0 < w1.x) {
                        draw.x0 = w1.x;
                }
index be5b3a033dc714e075334428f33d481d3cbbef6a..086c69b7a7aa50b0cd280fb58feb087b035f9b07 100644 (file)
@@ -55,7 +55,7 @@ ArdourCanvas::checkpoint (string group, string message)
                now.tv_usec += 1e6;
                --now.tv_sec;
        }
-               
+
        map<string, struct timeval>::iterator last = last_time.find (group);
 
        if (last != last_time.end ()) {
index bf72c678aabad34dad5ad232d1af642dc1103eac..42fe1556846857959c05c67efcf18c006bfeb182 100644 (file)
@@ -84,19 +84,19 @@ void
 Fill::setup_gradient_context (Cairo::RefPtr<Cairo::Context> context, Rect const & self, Duple const & draw_origin) const
 {
        Cairo::RefPtr<Cairo::LinearGradient> _gradient;
-       
+
        if (_vertical_gradient) {
                _gradient = Cairo::LinearGradient::create (draw_origin.x, self.y0, draw_origin.x, self.y1);
        } else {
                _gradient = Cairo::LinearGradient::create (self.x0, draw_origin.y, self.x1, draw_origin.y);
        }
-       
+
        for (StopList::const_iterator s = _stops.begin(); s != _stops.end(); ++s) {
                double r, g, b, a;
                color_to_rgba (s->second, r, g, b, a);
                _gradient->add_color_stop_rgba (s->first, r, g, b, a);
        }
-       
+
        context->set_source (_gradient);
 }
 
index e3e9e409a2029ef7f5eb20dfe13ee3a110d430ee..2d0bdb28305bb764a6215a60977c5627da8eff92 100644 (file)
@@ -77,7 +77,7 @@ Flag::set_text (string const & text)
        assert (bbox);
 
        Duple flag_size (bbox.get().width() + 10, bbox.get().height() + 4);
-       
+
        if (_invert) {
                const Distance h = fabs(_line->y1() - _line->y0());
                _text->set_position (Duple (5, h - flag_size.y + 2));
index d6c42d28ef9856b8eeafc3b0523891d5bcf28c15..b42c7053a88267e586c445ca6dbc62ef73a4b2d6 100644 (file)
@@ -53,7 +53,7 @@ Image::render (Rect const& area, Cairo::RefPtr<Cairo::Context> context) const
                                                        _pending->stride);
                _current = _pending;
        }
-       
+
        Rect self = item_to_window (Rect (0, 0, _width, _height));
        boost::optional<Rect> draw = self.intersection (area);
 
@@ -103,5 +103,5 @@ Image::accept_data ()
        begin_change ();
        _need_render = true;
        end_change (); // notify canvas that we need redrawing
-}      
+}
 
index ab68ea2e9512b50666612af13d196e1a18676db8..47eb77d7a3086d4bf3456f366855bfe8bd54d7e0 100644 (file)
@@ -46,7 +46,7 @@ Item::Item (Canvas* canvas)
        , _ignore_events (false)
 {
        DEBUG_TRACE (DEBUG::CanvasItems, string_compose ("new canvas item %1\n", this));
-}      
+}
 
 Item::Item (Item* parent)
        : Fill (*this)
@@ -66,7 +66,7 @@ Item::Item (Item* parent)
        }
 
        find_scroll_parent ();
-}      
+}
 
 Item::Item (Item* parent, Duple const& p)
        : Fill (*this)
@@ -88,7 +88,7 @@ Item::Item (Item* parent, Duple const& p)
 
        find_scroll_parent ();
 
-}      
+}
 
 Item::~Item ()
 {
@@ -196,7 +196,7 @@ void
 Item::item_to_canvas (Coord& x, Coord& y) const
 {
        Duple d = item_to_canvas (Duple (x, y));
-               
+
        x = d.x;
        y = d.y;
 }
@@ -268,16 +268,16 @@ Item::set_position (Duple p)
                 */
                pre_change_parent_bounding_box = item_to_parent (bbox.get());
        }
-       
+
        _position = p;
 
        /* only update canvas and parent if visible. Otherwise, this
           will be done when ::show() is called.
        */
-       
+
        if (visible()) {
                _canvas->item_moved (this, pre_change_parent_bounding_box);
-               
+
 
                if (_parent) {
                        _parent->child_changed ();
@@ -347,7 +347,7 @@ Item::hide ()
                        }
                }
 
-               
+
                propagate_show_hide ();
        }
 }
@@ -376,11 +376,11 @@ void
 Item::propagate_show_hide ()
 {
        /* bounding box may have changed while we were hidden */
-       
+
        if (_parent) {
                _parent->child_changed ();
        }
-       
+
        _canvas->item_shown_or_hidden (this);
 }
 
@@ -450,7 +450,7 @@ Item::find_scroll_parent ()
                }
                i = i->parent();
        }
-       
+
        _scroll_parent = const_cast<ScrollGroup*> (last_scroll_group);
 }
 
@@ -461,7 +461,7 @@ Item::common_ancestor_within (uint32_t limit, const Item& other) const
        uint32_t d2 = other.depth();
        const Item* i1 = this;
        const Item* i2 = &other;
-       
+
        /* move towards root until we are at the same level
           for both items
        */
@@ -502,7 +502,7 @@ Item::common_ancestor_within (uint32_t limit, const Item& other) const
                        return false;
                }
        }
-       
+
        return true;
 }
 
@@ -544,7 +544,7 @@ Item::closest_ancestor_with (const Item& other) const
                        i2 = i2->parent ();
                }
        }
-       
+
        return i1;
 }
 
@@ -611,7 +611,7 @@ Item::redraw () const
        if (visible() && _bounding_box && _canvas) {
                _canvas->request_redraw (item_to_window (_bounding_box.get()));
        }
-}      
+}
 
 void
 Item::begin_change ()
@@ -624,7 +624,7 @@ Item::end_change ()
 {
        if (visible()) {
                _canvas->item_changed (this, _pre_change_bounding_box);
-               
+
                if (_parent) {
                        _parent->child_changed ();
                }
@@ -677,7 +677,7 @@ Item::get_data (string const & key) const
        if (i == _data.end ()) {
                return 0;
        }
-       
+
        return i->second;
 }
 
@@ -745,7 +745,7 @@ Item::render_children (Rect const & area, Cairo::RefPtr<Cairo::Context> context)
 #endif
 
        ++render_depth;
-               
+
        for (std::vector<Item*>::const_iterator i = items.begin(); i != items.end(); ++i) {
 
                if (!(*i)->visible ()) {
@@ -756,7 +756,7 @@ Item::render_children (Rect const & area, Cairo::RefPtr<Cairo::Context> context)
 #endif
                        continue;
                }
-               
+
                boost::optional<Rect> item_bbox = (*i)->bounding_box ();
 
                if (!item_bbox) {
@@ -767,10 +767,10 @@ Item::render_children (Rect const & area, Cairo::RefPtr<Cairo::Context> context)
 #endif
                        continue;
                }
-               
+
                Rect item = (*i)->item_to_window (item_bbox.get(), false);
                boost::optional<Rect> d = item.intersection (area);
-               
+
                if (d) {
                        Rect draw = d.get();
                        if (draw.width() && draw.height()) {
@@ -891,7 +891,7 @@ Item::remove (Item* i)
        _items.remove (i);
        invalidate_lut ();
        _bounding_box_dirty = true;
-       
+
        end_change ();
 }
 
@@ -925,7 +925,7 @@ Item::clear_items (bool with_delete)
 
                _items.erase (i);
                item->unparent ();
-               
+
                if (with_delete) {
                        delete item;
                }
@@ -1069,7 +1069,7 @@ Item::dump (ostream& o) const
 
        o << _canvas->indent() << whatami() << ' ' << this << " self-Visible ? " << self_visible() << " visible ? " << visible();
        o << " @ " << position();
-       
+
 #ifdef CANVAS_DEBUG
        if (!name.empty()) {
                o << ' ' << name;
@@ -1093,25 +1093,25 @@ Item::dump (ostream& o) const
                o << " Items: " << _items.size();
                o << " Self-Visible ? " << self_visible();
                o << " Visible ? " << visible();
-               
+
                boost::optional<Rect> bb = bounding_box();
-               
+
                if (bb) {
                        o << endl << _canvas->indent() << "  bbox: " << bb.get();
                        o << endl << _canvas->indent() << "  CANVAS bbox: " << item_to_canvas (bb.get());
                } else {
                        o << "  bbox unset";
                }
-               
+
                o << endl;
 #endif
-               
+
                ArdourCanvas::dump_depth++;
-               
+
                for (list<Item*>::const_iterator i = _items.begin(); i != _items.end(); ++i) {
                        o << **i;
                }
-               
+
                ArdourCanvas::dump_depth--;
        }
 }
index 8bd26b90678dfc49626169acbb7cab5b3fa44ea7..49d2987e3d6b1c4a9adb5a59198ffcc25cd1e1a0 100644 (file)
@@ -43,7 +43,7 @@ void
 Line::compute_bounding_box () const
 {
        Rect bbox;
-       
+
        bbox.x0 = min (_points[0].x, _points[1].x);
        bbox.y0 = min (_points[0].y, _points[1].y);
        bbox.x1 = max (_points[0].x, _points[1].x);
@@ -66,7 +66,7 @@ Line::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) cons
        if (_outline_width <= 1.0) {
                /* See Cairo FAQ on single pixel lines to understand why we add 0.5
                 */
-               
+
                const Duple half_a_pixel (0.5, 0.5);
                p0 = p0.translate (half_a_pixel);
                p1 = p1.translate (half_a_pixel);
@@ -82,10 +82,10 @@ Line::set (Duple a, Duple b)
 {
        if (a != _points[0] || b != _points[1]) {
                begin_change ();
-               
+
                _points[0] = a;
                _points[1] = b;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
@@ -96,23 +96,23 @@ Line::set_x (Coord x0, Coord x1)
 {
        if (x0 != _points[0].x || x1 != _points[1].x) {
                begin_change ();
-               
+
                _points[0].x = x0;
                _points[1].x = x1;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
-}      
+}
 
 void
 Line::set_x0 (Coord x0)
 {
        if (x0 != _points[0].x) {
                begin_change ();
-               
+
                _points[0].x = x0;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
@@ -123,9 +123,9 @@ Line::set_y0 (Coord y0)
 {
        if (y0 != _points[0].y) {
                begin_change ();
-               
+
                _points[0].y = y0;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
@@ -138,9 +138,9 @@ Line::set_x1 (Coord x1)
 {
        if (x1 != _points[1].x) {
                begin_change ();
-               
+
                _points[1].x = x1;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
@@ -151,9 +151,9 @@ Line::set_y1 (Coord y1)
 {
        if (y1 != _points[1].y) {
                begin_change ();
-               
+
                _points[1].y = y1;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
index 54fe980b1c03ffbb55aa6616e5bbb1a253f1986b..03f2f0abf1a50b89d29d70208b12b36defbc464a 100644 (file)
@@ -54,7 +54,7 @@ LineSet::compute_bounding_box () const
        } else {
 
                if (_orientation == Horizontal) {
-                       
+
                        _bounding_box = Rect (0, /* x0 */
                                              _lines.front().pos - (_lines.front().width/2.0), /* y0 */
                                              _extent, /* x1 */
@@ -62,7 +62,7 @@ LineSet::compute_bounding_box () const
                                );
 
                } else {
-                       
+
                        _bounding_box = Rect (_lines.front().pos - _lines.front().width/2.0, /* x0 */
                                              0, /* y0 */
                                              _lines.back().pos + _lines.back().width/2.0, /* x1 */
@@ -101,9 +101,9 @@ LineSet::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
                }
 
                boost::optional<Rect> isect = self.intersection (area);
-                       
+
                if (!isect) {
-                       continue;       
+                       continue;
                }
 
                Rect intersection (isect.get());
@@ -134,7 +134,7 @@ void
 LineSet::add (Coord y, Distance width, Color color)
 {
        begin_change ();
-       
+
        _lines.push_back (Line (y, width, color));
        sort (_lines.begin(), _lines.end(), LineSorter());
 
index c50f010dc8b3b5bc4971cfd07bea560249bde618..3836ccd18a9af305a5b7b3b066a0eeb5a3338869 100644 (file)
@@ -92,11 +92,11 @@ DumbLookupTable::has_item_at_point (Duple const & point) const
                if (!(*i)->visible()) {
                        continue;
                }
-               
+
                if ((*i)->covers (point)) {
                        // std::cerr << "\t\t" << (*i)->whatami() << '/' << (*i)->name << " covers " << point << std::endl;
                        return true;
-                       
+
                }
        }
 
@@ -235,7 +235,7 @@ OptimizingLookupTable::items_at_point (Duple const & point) const
        if (y >= _dimension) {
                cout << "WARNING: y=" << y << ", dim=" << _dimension << ", py=" << point.y << " cellsize=" << _cell_size << "\n";
        }
-       
+
        /* XXX: hmm */
        x = min (_dimension - 1, x);
        y = min (_dimension - 1, y);
@@ -272,7 +272,7 @@ OptimizingLookupTable::has_item_at_point (Duple const & point) const
        if (y >= _dimension) {
                cout << "WARNING: y=" << y << ", dim=" << _dimension << ", py=" << point.y << " cellsize=" << _cell_size << "\n";
        }
-       
+
        /* XXX: hmm */
        x = min (_dimension - 1, x);
        y = min (_dimension - 1, y);
@@ -294,7 +294,7 @@ OptimizingLookupTable::has_item_at_point (Duple const & point) const
 
        return false;
 }
-       
+
 /** @param area Area in our owning item's coordinates */
 vector<Item*>
 OptimizingLookupTable::get (Rect const & area)
@@ -321,7 +321,7 @@ OptimizingLookupTable::get (Rect const & area)
 
        vector<Item*> vitems;
        copy (items.begin (), items.end (), back_inserter (vitems));
-       
+
        return vitems;
 }
 
index d285c41b10e8ccd850f983d35c4cf113e5730739..5bb9e63d1eca9bf861fa070921b876180e0aa9a3 100644 (file)
@@ -41,7 +41,7 @@ Pixbuf::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) co
        Gdk::Cairo::set_source_pixbuf (context, _pixbuf, 0, 0);
        context->paint ();
 }
-       
+
 void
 Pixbuf::compute_bounding_box () const
 {
@@ -58,7 +58,7 @@ void
 Pixbuf::set (Glib::RefPtr<Gdk::Pixbuf> pixbuf)
 {
        begin_change ();
-       
+
        _pixbuf = pixbuf;
        _bounding_box_dirty = true;
 
index b6c97c3a3b1a92f9d66aa81e735f8363592cccec..855140856eb0f3ccdb60cbcd0d2f93870d67d22c 100644 (file)
@@ -40,12 +40,12 @@ PolyItem::PolyItem (Item* parent)
 void
 PolyItem::compute_bounding_box () const
 {
-       
+
        if (!_points.empty()) {
 
                Rect bbox;
                Points::const_iterator i = _points.begin();
-               
+
                bbox.x0 = bbox.x1 = i->x;
                bbox.y0 = bbox.y1 = i->y;
 
@@ -61,11 +61,11 @@ PolyItem::compute_bounding_box () const
 
                _bounding_box = bbox.expand (_outline_width + 0.5);
 
-               
+
        } else {
                _bounding_box = boost::optional<Rect> ();
        }
-       
+
        _bounding_box_dirty = false;
 }
 
@@ -113,14 +113,14 @@ PolyItem::render_curve (Rect const & area, Cairo::RefPtr<Cairo::Context> context
                Duple c2 = item_to_window (Duple (cp2->x, cp2->y));
 
                c = item_to_window (Duple (p->x, p->y));
-               
+
                context->curve_to (c1.x + pixel_adjust,
                                   c1.y + pixel_adjust,
                                   c2.x + pixel_adjust,
                                   c2.y + pixel_adjust,
                                   c.x + pixel_adjust,
                                   c.y + pixel_adjust);
-               
+
                ++cp1;
                ++cp2;
                ++p;
@@ -133,9 +133,9 @@ PolyItem::set (Points const & points)
        if (_points != points) {
 
                begin_change ();
-               
+
                _points = points;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
index 3150907db6f17aec5fec9f16e362444bac54ff99..5d6abb9814923bab832b47d3595087d70404c192 100644 (file)
@@ -77,7 +77,7 @@ PolyLine::covers (Duple const & point) const
        Duple p = window_to_item (point);
 
        const Points::size_type npoints = _points.size();
-       
+
        if (npoints < 2) {
                return false;
        }
@@ -95,30 +95,30 @@ PolyLine::covers (Duple const & point) const
                double t;
                Duple a (_points[j]);
                Duple b (_points[i]);
-               
+
                /*
                  Clamp the line endpoints to the visible area of the canvas. If we do
                  not do this, we may have a line segment extending to COORD_MAX and our
                  math goes wrong.
                */
-               
+
                a.x = std::min (a.x, visible.x1);
                a.y = std::min (a.y, visible.y1);
                b.x = std::min (b.x, visible.x1);
                b.y = std::min (b.y, visible.y1);
-               
+
                double d = distance_to_segment_squared (p, a, b, t, at);
-               
+
                if (t < 0.0 || t > 1.0) {
                        continue;
                }
-               
+
                if (d < _threshold + _outline_width) {
                        return true;
                }
-               
+
        }
-       
+
        return false;
 }
 
index 5aa58eb6143a49fe7ba2af0ed3b4bd5526278c58..53fea1c5f4f9bdacaa419f0e7270c20d2b95ff1e 100644 (file)
@@ -48,7 +48,7 @@ Polygon::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
 {
        if (_outline || _fill) {
                render_path (area, context);
-               
+
                if (!_points.empty ()) {
                        /* close path */
                        Duple p = item_to_window (Duple (_points.front().x, _points.front().y));
@@ -119,11 +119,11 @@ Polygon::covers (Duple const & point) const
        Points::size_type i;
        Points::size_type j = npoints -1;
        bool oddNodes = false;
-       
+
        if (_bounding_box_dirty) {
                compute_bounding_box ();
        }
-       
+
        for (i = 0; i < npoints; i++) {
                if (((_points[i].y < p.y && _points[j].y >= p.y) || (_points[j].y < p.y && _points[i].y >= p.y))) {
                        oddNodes ^= (p.y * multiple[i] + constant[i] < p.x);
index e6ff6b37d096b62c3fe59d88c5159de1a1e57db8..64cdd3af8acedb78c52ee04cb744d03152bf2071 100644 (file)
@@ -72,7 +72,7 @@ void
 Rectangle::render_self (Rect const & area, Cairo::RefPtr<Cairo::Context> context, Rect self) const
 {
        boost::optional<Rect> r = self.intersection (area);
-       
+
        if (!r) {
                return;
        }
@@ -89,11 +89,11 @@ Rectangle::render_self (Rect const & area, Cairo::RefPtr<Cairo::Context> context
                context->rectangle (draw.x0, draw.y0, draw.width(), draw.height());
                context->fill ();
        }
-       
+
        if (_outline) {
 
                setup_outline_context (context);
-               
+
                /* the goal here is that if the border is 1 pixel
                 * thick, it will precisely align with the corner
                 * coordinates of the rectangle. So if the rectangle
@@ -111,9 +111,9 @@ Rectangle::render_self (Rect const & area, Cairo::RefPtr<Cairo::Context> context
                        const double shift = _outline_width * 0.5;
                        self = self.translate (Duple (shift, shift));
                }
-               
+
                if (_outline_what == What (LEFT|RIGHT|BOTTOM|TOP)) {
-                       
+
                        context->rectangle (self.x0, self.y0, self.width(), self.height());
 
                } else {
@@ -122,7 +122,7 @@ Rectangle::render_self (Rect const & area, Cairo::RefPtr<Cairo::Context> context
                                context->move_to (self.x0, self.y0);
                                context->line_to (self.x0, self.y1);
                        }
-                       
+
                        if (_outline_what & TOP) {
                                context->move_to (self.x0, self.y0);
                                context->line_to (self.x1, self.y0);
@@ -132,13 +132,13 @@ Rectangle::render_self (Rect const & area, Cairo::RefPtr<Cairo::Context> context
                                context->move_to (self.x0, self.y1);
                                context->line_to (self.x1, self.y1);
                        }
-                       
+
                        if (_outline_what & RIGHT) {
                                context->move_to (self.x1, self.y0);
                                context->line_to (self.x1, self.y1);
                        }
                }
-               
+
                context->stroke ();
        }
 }
@@ -195,11 +195,11 @@ Rectangle::set (Rect const & r)
        */
 
        if (r != _rect) {
-               
+
                begin_change ();
-               
+
                _rect = r;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
@@ -210,9 +210,9 @@ Rectangle::set_x0 (Coord x0)
 {
        if (x0 != _rect.x0) {
                begin_change ();
-               
+
                _rect.x0 = x0;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
@@ -223,9 +223,9 @@ Rectangle::set_y0 (Coord y0)
 {
        if (y0 != _rect.y0) {
                begin_change ();
-               
+
                _rect.y0 = y0;
-               
+
                _bounding_box_dirty = true;
                end_change();
        }
@@ -236,9 +236,9 @@ Rectangle::set_x1 (Coord x1)
 {
        if (x1 != _rect.x1) {
                begin_change ();
-               
+
                _rect.x1 = x1;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
@@ -249,9 +249,9 @@ Rectangle::set_y1 (Coord y1)
 {
        if (y1 != _rect.y1) {
                begin_change ();
-               
+
                _rect.y1 = y1;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
index accbcb9b3030775a09945f5f7b0cb28df16f94b1..141cee4f67ef5eb9066d7a5dc2c7f4f4eaf7c32e 100644 (file)
@@ -28,7 +28,7 @@ Root::Root (Canvas* canvas)
 {
 #ifdef CANVAS_DEBUG
        name = "ROOT";
-#endif 
+#endif
 }
 
 void
index b538cbb3147181ef357d79d911da26211c92d081..e3f23fb10c7d4643c4a6312c7add479fc6015ec1 100644 (file)
@@ -137,7 +137,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
        cr->stroke ();
 
        /* draw ticks + text */
-       
+
        Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (cr);
        if (_font_description) {
                layout->set_font_description (*_font_description);
@@ -155,7 +155,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
                } else {
                        cr->move_to (pos.x, pos.y);
                }
-               
+
                switch (m->style) {
                case Mark::Major:
                         if (_divide_height >= 0) {
@@ -180,7 +180,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
 
                        layout->set_text (m->label);
                        logical = layout->get_pixel_logical_extents ();
-                       
+
                         if (_divide_height >= 0) {
                                 cr->move_to (pos.x + 2.0, self.y0 + _divide_height + logical.get_y() + 2.0); /* 2 pixel padding below divider */
                         } else {
index aecea962f6a211be5be17e1eb7fa6f3227a747a6..9e7732b8d232b19a6954cfb0f7b04eb005d7f0a9 100644 (file)
@@ -29,13 +29,13 @@ using namespace ArdourCanvas;
 
 ScrollGroup::ScrollGroup (Canvas* c, ScrollSensitivity s)
        : Container (c)
-       , _scroll_sensitivity (s)       
+       , _scroll_sensitivity (s)
 {
 }
 
 ScrollGroup::ScrollGroup (Item* parent, ScrollSensitivity s)
        : Container (parent)
-       , _scroll_sensitivity (s)       
+       , _scroll_sensitivity (s)
 {
 }
 
@@ -63,7 +63,7 @@ ScrollGroup::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) c
        context->save ();
        context->rectangle (self.x0, self.y0, self.width(), self.height());
        context->clip ();
-       
+
        Container::render (area, context);
 
        context->restore ();
index f5cc76dd039694e1bbaf9b1c51b4760ef5ba8dca..fb0abf44d18a5f138fad1e69768ad993c2b68797 100644 (file)
@@ -46,7 +46,7 @@ StatefulImage::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context)
        Rect self = item_to_window (Rect (0, 0, image->get_width(), image->get_height()));
 
        boost::optional<Rect> draw = self.intersection (area);
-       
+
        if (!draw) {
                return;
        }
@@ -89,14 +89,14 @@ int
 StatefulImage::load_states (const XMLNode& node)
 {
        const XMLNodeList& nodes (node.children());
-       
+
        _states.clear ();
-       
+
        for (XMLNodeList::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
                State s;
                States::size_type id;
                const XMLProperty* prop;
-               
+
                if ((prop = (*i)->property ("id")) == 0) {
                        error << _("no ID for state") << endmsg;
                        continue;
@@ -107,12 +107,12 @@ StatefulImage::load_states (const XMLNode& node)
                        error << _("no image for state") << endmsg;
                        continue;
                }
-               
+
                if ((s.image = find_image (prop->value())) == 0) {
                        error << string_compose (_("image %1 not found for state"), prop->value()) << endmsg;
                        continue;
                }
-               
+
                if (_states.size() < id) {
                        _states.reserve (id);
                }
@@ -139,7 +139,7 @@ StatefulImage::find_image (const std::string& name)
                                         name) << endmsg;
                return ImageHandle();
        }
-       
+
        return Cairo::ImageSurface::create_from_png (path);
 }
 
index 9112b6f52a563aaef047f6227de56df572f3c95c..ab973bcd2ac33a67463bd9370f14c4db508528ea 100644 (file)
@@ -28,7 +28,7 @@ ArrowTest::bounding_box ()
        arrow.set_outline_width (0);
 
        boost::optional<Rect> bbox = arrow.bounding_box ();
-       
+
        CPPUNIT_ASSERT (bbox.is_initialized ());
        CPPUNIT_ASSERT (bbox.get().x0 == -6);
        CPPUNIT_ASSERT (bbox.get().y0 == 0);
index 914b940c5e2d0423aeef47bb3ea370f070b1c606..31b7d13e4951169549c1229f0ee502f8f6bbb082 100644 (file)
@@ -87,7 +87,7 @@ GroupTest::layers ()
        CPPUNIT_ASSERT (*i++ == &d);
 
        /* Check raise by a number of levels */
-       
+
        a.raise (2);
 
        i = canvas.root()->items().begin();
@@ -173,7 +173,7 @@ GroupTest::grandchildren_changing ()
        /* Change the grandchild and check its parent and grandparent */
        a.set (Rect (0, 0, 48, 48));
 
-       bbox = canvas.root()->bounding_box ();  
+       bbox = canvas.root()->bounding_box ();
        CPPUNIT_ASSERT (bbox.is_initialized ());
        CPPUNIT_ASSERT (bbox.get().x0 == 0);
        CPPUNIT_ASSERT (bbox.get().y0 == 0);
@@ -193,7 +193,7 @@ void
 GroupTest::add_items_at_point ()
 {
        ImageCanvas canvas;
-       
+
        Group gA (canvas.root());
        gA.set_position (Duple (128, 64));
 
@@ -274,7 +274,7 @@ GroupTest::torture_add_items_at_point ()
                if (canvas.root()->bounding_box() && canvas.root()->bounding_box().get().contains (test)) {
                        items_B.push_back (canvas.root());
                }
-               
+
                for (list<Item*>::iterator j = rectangles.begin(); j != rectangles.end(); ++j) {
                        boost::optional<Rect> bbox = (*j)->bounding_box ();
                        assert (bbox);
@@ -293,4 +293,4 @@ GroupTest::torture_add_items_at_point ()
                }
        }
 }
-       
+
index 8628c4cfd4817a0e6609fe9ce18d86836813f708..6e20352199feff04402396775959dfd07a991703 100644 (file)
@@ -14,7 +14,7 @@ event (GdkEvent* ev)
 {
        static bool dragging = false;
        static Duple offset;
-       
+
        if (ev->type == GDK_BUTTON_PRESS) {
                GdkEventButton* b = reinterpret_cast<GdkEventButton*> (ev);
                if (b->button == 1) {
@@ -38,7 +38,7 @@ event (GdkEvent* ev)
                        cout << "Move to " << (Duple (m->x, m->y) - offset) << "\n";
                }
        }
-                       
+
        return true;
 }
 
@@ -62,7 +62,7 @@ int main (int argc, char* argv[])
        window.add (viewport);
        canvas->show ();
        window.show_all ();
-       
+
        Gtk::Main::run (window);
        return 0;
 }
index e75ce05ac0dcc0f388cdf162d5f496e45f9302d7..dda35e47145f1b517d7c10918e13ff7fa7533c82 100644 (file)
@@ -20,20 +20,20 @@ int main (int argc, char* argv[])
        double Ns = sqrt (N);
        int max_x = 1024;
        int max_y = 1024;
-       
+
        for (int x = 0; x < Ns; ++x) {
                for (int y = 0; y < Ns; ++y) {
                        Rectangle* r = new Rectangle (canvas.root ());
                        r->set (Rect (x * max_x / Ns, y * max_y / Ns, (x + 1) * max_x / Ns, (y + 1) * max_y / Ns));
                }
        }
-       
+
        Gtk::ScrolledWindow scroller;
        scroller.add (canvas);
        window.add (scroller);
        canvas.show ();
        window.show_all ();
-       
+
        Gtk::Main::run (window);
        return 0;
 }
index 24a517da71a40be4cbc1dea3cb574477dc30382a..aef29eb04ba892d871a5bd736851e640140f4e9c 100644 (file)
@@ -69,7 +69,7 @@ int main (int argc, char* argv[])
        overall_box.pack_start (scroller);
 
        Gtk::HBox button_box;
-       
+
        Gtk::Button bigger ("Bigger");
        bigger.signal_clicked().connect (sigc::ptr_fun (&bigger_clicked));
        button_box.pack_start (bigger);
@@ -85,9 +85,9 @@ int main (int argc, char* argv[])
        Gtk::Button right ("Right");
        right.signal_clicked().connect (sigc::ptr_fun (&right_clicked));
        button_box.pack_start (right);
-       
+
        overall_box.pack_start (button_box, false, false);
-       
+
        window.add (overall_box);
        canvas.show ();
        window.show_all ();
index 95e9b9c299b49ea72c0e19a1117f7cc126ada8ba..8e30361d9447cf13594cb78ebf06b6436ac6a10a 100644 (file)
@@ -26,7 +26,7 @@ int main (int argc, char* argv[])
        Gtk::VBox overall_vbox;
        Gtk::HScrollbar h_scroll;
        Gtk::VScrollbar v_scroll;
-       
+
        GtkCanvasViewport viewport (*h_scroll.get_adjustment(), *v_scroll.get_adjustment());
        GtkCanvas* canvas = viewport.canvas ();
 
@@ -60,7 +60,7 @@ int main (int argc, char* argv[])
        window.add (overall_vbox);
        canvas->show ();
        window.show_all ();
-       
+
        Gtk::Main::run (window);
        return 0;
 }
index 90bf819d868f5d8a060a1f8ba0a20ef972f7d66b..a9c326bc7ad99b7f5ff0b4552ccb00a1faa26057 100644 (file)
@@ -37,7 +37,7 @@ int main (int argc, char* argv[])
        b.set_outline_color (0x00ff00ff);
 
        Gtk::HBox button_box;
-       
+
        Gtk::Button left ("Left");
        left.signal_clicked().connect (sigc::ptr_fun (&left_clicked));
        button_box.pack_start (left);
@@ -48,18 +48,18 @@ int main (int argc, char* argv[])
 
        hadj = new Gtk::Adjustment (0, 0, 1e3);
        vadj = new Gtk::Adjustment (0, 0, 1e3);
-       
+
        Gtk::Viewport viewport (*hadj, *vadj);
        viewport.add (canvas);
 
        Gtk::VBox overall_box;
        overall_box.pack_start (viewport);
        overall_box.pack_start (button_box, false, false);
-       
+
        window.add (overall_box);
        canvas.show ();
        window.show_all ();
-       
+
        Gtk::Main::run (window);
        return 0;
 }
index 8449b26498976f17a81df7503a4a35a3f76ea257..6022ff3797aece2de7a3203ea726762d265e9e82 100644 (file)
@@ -23,7 +23,7 @@ OptimizingLookupTableTest::build_1 ()
        Rectangle d (canvas.root(), Rect (33, 33, 64, 64));
        d.set_outline_width (0);
        OptimizingLookupTable table (*canvas.root(), 1);
-       
+
        CPPUNIT_ASSERT (table._items_per_cell == 1);
        CPPUNIT_ASSERT (table._cell_size.x == 32);
        CPPUNIT_ASSERT (table._cell_size.y == 32);
@@ -65,10 +65,10 @@ OptimizingLookupTableTest::get_small ()
        Rectangle d (canvas.root(), Rect (33, 33, 64, 64));
        d.set_outline_width (0);
        OptimizingLookupTable table (*canvas.root(), 1);
-       
+
        vector<Item*> items = table.get (Rect (16, 16, 48, 48));
        CPPUNIT_ASSERT (items.size() == 4);
-       
+
        items = table.get (Rect (32, 32, 33, 33));
        CPPUNIT_ASSERT (items.size() == 1);
 }
@@ -80,7 +80,7 @@ OptimizingLookupTableTest::get_big ()
 
        double const s = 8;
        int const N = 1024;
-       
+
        for (int x = 0; x < N; ++x) {
                for (int y = 0; y < N; ++y) {
                        Rectangle* r = new Rectangle (canvas.root());
index 96bd7eb1661fd0897a949d168c5ef586f6ef2fc8..043ed83d4154579e99777b5b62501759f282a88c 100644 (file)
@@ -78,7 +78,7 @@ RenderTest::basics ()
        text_group.set_position (Duple (128, 64));
        Text text (&text_group);
        text.set ("Hello world!");
-       
+
        canvas.render_to_image (Rect (0, 0, 256, 256));
        canvas.write_to_png ("render_basics.png");
 
index 69667466de98853671f85b37a9cadf8f6386d9a1..ba6baef149d4b17d6e78ad849e1148350b649293 100644 (file)
@@ -44,7 +44,7 @@ TypesTest::extend ()
                CPPUNIT_ASSERT (c.y1 == 130);
        }
 }
-               
+
 void
 TypesTest::test_safe_add ()
 {
index 3a5c0dac9b43bec0c1ed1e0562e68cecf7b82cfa..833b234579831ac0e2df216eff2e5addf12ca7b9 100644 (file)
@@ -15,4 +15,4 @@ public:
        void test_safe_add ();
 };
 
-       
+
index 9b95930cf1a1fc07a9ad2f16badfc1cce9701b03..de7118b90c27170083a8342a693425457af4b394 100644 (file)
@@ -43,7 +43,7 @@ WaveViewTest::setUp ()
        AudioEngine engine ("test", "");
        MIDI::Manager::create (engine.jack ());
        CPPUNIT_ASSERT (engine.start () == 0);
-       
+
        Session session (engine, "tmp_session", "tmp_session");
        engine.set_session (&session);
 
@@ -70,7 +70,7 @@ void
 WaveViewTest::make_canvas ()
 {
        /* this leaks various things, but hey ho */
-       
+
        _canvas = new ImageCanvas (Duple (256, 256));
        _wave_view = new WaveView (_canvas->root(), _audio_region);
        _wave_view->set_frames_per_pixel ((double) (44100 / 1000) / 64);
@@ -84,7 +84,7 @@ WaveViewTest::all ()
           gets called once; there are various singletons etc. in Ardour which don't
           like being recreated.
        */
-       
+
        render_all_at_once ();
        render_in_pieces ();
        cache ();
@@ -94,7 +94,7 @@ void
 WaveViewTest::render_all_at_once ()
 {
        make_canvas ();
-       
+
        _canvas->render_to_image (Rect (0, 0, 256, 256));
        _canvas->write_to_png ("waveview_1.png");
 
@@ -119,11 +119,11 @@ void
 WaveViewTest::cache ()
 {
        make_canvas ();
-       
+
        /* Whole of the render area needs caching from scratch */
-       
+
        _wave_view->invalidate_whole_cache ();
-       
+
        Rect whole (0, 0, 256, 256);
        _canvas->render_to_image (whole);
 
@@ -132,7 +132,7 @@ WaveViewTest::cache ()
        CPPUNIT_ASSERT (_wave_view->_cache.front()->end() == 256);
 
        _wave_view->invalidate_whole_cache ();
-       
+
        /* Render a bit in the middle */
 
        Rect part1 (128, 0, 196, 256);
@@ -145,11 +145,11 @@ WaveViewTest::cache ()
        /* Now render the whole thing and check that the cache sorts itself out */
 
        _canvas->render_to_image (whole);
-       
+
        CPPUNIT_ASSERT (_wave_view->_cache.size() == 3);
 
        list<WaveView::CacheEntry*>::iterator i = _wave_view->_cache.begin ();
-       
+
        CPPUNIT_ASSERT ((*i)->start() == 0);
        CPPUNIT_ASSERT ((*i)->end() == 128);
        ++i;
index ef6871dc766027cbbb54149eb1a5670f99eea965..5bc5dec2b7f9e34d4520c19d8666cdc0d4ab490d 100644 (file)
@@ -29,7 +29,7 @@ XMLTest::get ()
        g.set_position (Duple (64, 72));
        Line l (&g);
        l.set (Duple (41, 43), Duple (44, 46));
-       
+
        XMLTree* tree = canvas.get_state ();
        tree->write ("test.xml");
 
index fbe606c028ae8abdbd3da51d1bf174f77ce68f07..bf905b94bda66ed3e6bfac43456f3543b328cea5 100644 (file)
@@ -12,6 +12,6 @@ public:
        void get ();
        void set ();
 
-private:       
+private:
        void check (std::string const &);
 };
index fbf7d7943cfb4398ee1b742aa35d39c5060576ad..d1f76eb1a3ff84c6566dafabd913874faa148fd1 100644 (file)
@@ -71,7 +71,7 @@ void
 Text::set (string const & text)
 {
        begin_change ();
-       
+
        _text = text;
 
        _need_redraw = true;
@@ -134,7 +134,7 @@ Text::_redraw () const
 #else
        _image = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, _width, _height);
 #endif
-       
+
        Cairo::RefPtr<Cairo::Context> img_context = Cairo::Context::create (_image);
 
 #ifdef __APPLE__
@@ -142,7 +142,7 @@ Text::_redraw () const
         */
        img_context->scale (2, 2);
 #endif
-       
+
        /* and draw, in the appropriate color of course */
 
        if (_outline) {
@@ -173,7 +173,7 @@ Text::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
 
        Rect self = item_to_window (Rect (0, 0, min (_clamped_width, (double)_image->get_width ()), _image->get_height ()));
        boost::optional<Rect> i = self.intersection (area);
-       
+
        if (!i) {
                return;
        }
@@ -181,7 +181,7 @@ Text::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
        if (_need_redraw) {
                _redraw ();
        }
-       
+
        Rect intersection (i.get());
 
        context->rectangle (intersection.x0, intersection.y0, intersection.width(), intersection.height());
@@ -238,7 +238,7 @@ void
 Text::set_alignment (Pango::Alignment alignment)
 {
        begin_change ();
-       
+
        _alignment = alignment;
        _need_redraw = true;
        _bounding_box_dirty = true;
@@ -249,7 +249,7 @@ void
 Text::set_font_description (Pango::FontDescription font_description)
 {
        begin_change ();
-       
+
        _font_description = new Pango::FontDescription (font_description);
        _need_redraw = true;
         _width_correction = -1.0;
@@ -272,7 +272,7 @@ Text::set_color (Color color)
        end_change ();
 }
 
-               
+
 void
 Text::dump (ostream& o) const
 {
index 7f945dc7ce494598edef80be4c1cd2940b11ed51..1b3004b3b1f5fd4becfbd23e228c8b4233c9dfaa 100644 (file)
@@ -70,7 +70,7 @@ TrackingText::pointer_motion (Duple const & winpos)
        pos = pos.translate (offset);
 
        /* keep inside the window */
-       
+
        Rect r (0, 0, _canvas->width(), _canvas->height());
 
        /* border of 200 pixels on the right, and 50 on all other sides */
@@ -83,7 +83,7 @@ TrackingText::pointer_motion (Duple const & winpos)
        r.y1 = std::max (r.y0, (r.y1 - border));
 
        /* clamp */
-       
+
        if (pos.x < r.x0) {
                pos.x = r.x0;
        } else if (pos.x > r.x1) {
index 7b81cf59519994ff73160fd415f335fc218ff222..2c8905b331a0233c97fc12836a07ae2dd7ad23e3 100644 (file)
@@ -94,7 +94,7 @@ ArdourCanvas::distance_to_segment_squared (Duple const & p, Duple const & p1, Du
        // extending the segment, parameterized as p1 + (t * (p2 - p1)),
        // we find projection of point p onto the line.
        // It falls where t = [(p - p1) . (p2 - p1)] / |p2 - p1|^2
-               
+
        t = ((dp1x * dx) + (dp1y * dy)) / segLenSquared;
 
        if (t < kEpsilon) {
index 7f0aed6dffbac3bd3d1d1073795702077b70ca2f..fce30e7f3820d35d502dae7de49f9ab5fc09e410 100644 (file)
@@ -274,7 +274,7 @@ WaveView::compute_tips (PeakData const & peak, WaveView::LineTips& tips) const
        const double effective_height  = _height;
 
        /* remember: canvas (and cairo) coordinate space puts the origin at the upper left.
-       
+
           So, a sample value of 1.0 (0dbFS) will be computed as:
 
                 (1.0 - 1.0) * 0.5 * effective_height
@@ -317,11 +317,11 @@ WaveView::compute_tips (PeakData const & peak, WaveView::LineTips& tips) const
                tips.top = center - spread;
                tips.bot = center + spread;
        }
-       
+
        tips.top = min (effective_height, max (0.0, tips.top));
        tips.bot = min (effective_height, max (0.0, tips.bot));
 }
-       
+
 
 Coord
 WaveView::y_extent (double s) const
@@ -474,7 +474,7 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
                                } else {
                                        p.min = 0.0;
                                }
-                               
+
                                compute_tips (p, tips[i]);
                                tips[i].spread = tips[i].bot - tips[i].top;
                        }
@@ -498,7 +498,7 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
        if (req->should_stop()) {
                return;
        }
-       
+
        Color alpha_one = rgba_to_color (0, 0, 0, 1.0);
 
        set_source_rgba (wave_context, alpha_one);
@@ -590,7 +590,7 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
                                wave_context->move_to (i, tips[i].top);
                                wave_context->line_to (i, tips[i].bot);
                        }
-                       
+
                        /* draw square waves and other discontiguous points clearly */
                        if (i > 0) {
                                if (tips[i-1].top + 2 < tips[i].top) {
@@ -678,7 +678,7 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
        if (req->should_stop()) {
                return;
        }
-       
+
        Cairo::RefPtr<Cairo::Context> context = Cairo::Context::create (image);
 
        /* Here we set a source colour and use the various components as a mask. */
@@ -722,7 +722,7 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
        if (req->should_stop()) {
                return;
        }
-       
+
        context->mask (images.wave, 0, 0);
        context->fill ();
 
@@ -756,11 +756,11 @@ WaveView::cache_request_result (boost::shared_ptr<WaveViewThreadRequest> req) co
                                                                               req->end,
                                                                               req->image));
        images->add (_region->audio_source (_channel), ret);
-       
+
        /* consolidate cache first (removes fully-contained
         * duplicate images)
         */
-       
+
        images->consolidate_image_cache (_region->audio_source (_channel),
                                         req->channel, req->height, req->amplitude,
                                         req->fill_color, req->samples_per_pixel);
@@ -774,14 +774,14 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
        boost::shared_ptr<WaveViewCache::Entry> ret;
 
        full_image = true;
-       
+
        /* this is called from a ::render() call, when we need an image to
           draw with.
        */
 
        DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1 needs image from %2 .. %3\n", name, start, end));
-       
-       
+
+
        {
                Glib::Threads::Mutex::Lock lmq (request_queue_lock);
 
@@ -793,7 +793,7 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
                 DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1 CR %2 stop? %3 image %4\n", this, current_request,
                                                               (current_request ? current_request->should_stop() : false),
                                                               (current_request ? current_request->image : 0)));
-               
+
                if (current_request && !current_request->should_stop() && current_request->image) {
 
                        /* put the image into the cache so that other
@@ -801,7 +801,7 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
                         */
 
                        if (current_request->start <= start && current_request->end >= end) {
-                               
+
                                ret.reset (new WaveViewCache::Entry (current_request->channel,
                                                                     current_request->height,
                                                                     current_request->amplitude,
@@ -810,7 +810,7 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
                                                                     current_request->start,
                                                                     current_request->end,
                                                                     current_request->image));
-       
+
                                cache_request_result (current_request);
                                DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1: got image from completed request, spans %2..%3\n",
                                                                              name, current_request->start, current_request->end));
@@ -824,21 +824,21 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
        if (!ret) {
 
                /* no current image draw request, so look in the cache */
-               
+
                ret = get_image_from_cache (start, end, full_image);
                DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1: lookup from cache gave %2 (full %3)\n",
                                                              name, ret, full_image));
 
        }
 
-       
-       
+
+
        if (!ret || !full_image) {
 
                if ((rendered && get_image_in_thread) || always_get_image_in_thread) {
 
                        DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1: generating image in caller thread\n", name));
-                       
+
                        boost::shared_ptr<WaveViewThreadRequest> req (new WaveViewThreadRequest);
 
                        req->type = WaveViewThreadRequest::Draw;
@@ -853,7 +853,7 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
                         req->width = desired_image_width ();
 
                        /* draw image in this (the GUI thread) */
-                       
+
                        generate_image (req, false);
 
                        /* cache the result */
@@ -863,7 +863,7 @@ WaveView::get_image (framepos_t start, framepos_t end, bool& full_image) const
                        /* reset this so that future missing images are
                         * generated in a a worker thread.
                         */
-                       
+
                        get_image_in_thread = false;
 
                } else {
@@ -963,34 +963,34 @@ WaveView::generate_image (boost::shared_ptr<WaveViewThreadRequest> req, bool in_
                  * width by using an image sample count of the screen width added
                  * on each side of the desired image center.
                 */
-               
+
                const framepos_t center = req->start + ((req->end - req->start) / 2);
                const framecnt_t image_samples = req->width;
-               
+
                /* we can request data from anywhere in the Source, between 0 and its length
                 */
-               
+
                framepos_t sample_start = max (_region_start, (center - image_samples));
                framepos_t sample_end = min (center + image_samples, region_end());
                const int n_peaks = llrintf ((sample_end - sample_start)/ (req->samples_per_pixel));
-               
+
                boost::scoped_array<ARDOUR::PeakData> peaks (new PeakData[n_peaks]);
 
                /* Note that Region::read_peaks() takes a start position based on an
                   offset into the Region's **SOURCE**, rather than an offset into
                   the Region itself.
                */
-       
+
                framecnt_t peaks_read = _region->read_peaks (peaks.get(), n_peaks,
                                                             sample_start, sample_end - sample_start,
                                                             req->channel,
                                                             req->samples_per_pixel);
-               
+
                req->image = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, n_peaks, req->height);
                /* make sure we record the sample positions that were actually used */
                req->start = sample_start;
                req->end = sample_end;
-               
+
                if (peaks_read > 0) {
 
                        /* region amplitude will have been used to generate the
@@ -998,7 +998,7 @@ WaveView::generate_image (boost::shared_ptr<WaveViewThreadRequest> req, bool in_
                         * amplitude_above_axis. So apply that here before
                         * rendering.
                         */
-                       
+
                        if (_amplitude_above_axis != 1.0) {
                                for (framecnt_t i = 0; i < n_peaks; ++i) {
                                        peaks[i].max *= _amplitude_above_axis;
@@ -1012,8 +1012,8 @@ WaveView::generate_image (boost::shared_ptr<WaveViewThreadRequest> req, bool in_
                }
        } else {
                cerr << "Request stopped before image generation\n";
-       }       
-       
+       }
+
        if (in_render_thread && !req->should_stop()) {
                 DEBUG_TRACE (DEBUG::WaveView, string_compose ("done with request for %1 at %2 CR %3 req %4 range %5 .. %6\n", this, g_get_monotonic_time(), current_request, req, req->start, req->end));
                const_cast<WaveView*>(this)->ImageReady (); /* emit signal */
@@ -1040,7 +1040,7 @@ void
 WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
 {
        assert (_samples_per_pixel != 0);
-       
+
        if (!_region) {
                return;
        }
@@ -1064,11 +1064,11 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
         * window coordinates. It begins at zero (in item coordinates for this
         * waveview, and extends to region_length() / _samples_per_pixel.
         */
-       
+
        Rect self = item_to_window (Rect (0.0, 0.0, region_length() / _samples_per_pixel, _height));
 
        // cerr << name << " RENDER " << area << " self = " << self << endl;
-       
+
        /* Now lets get the intersection with the area we've been asked to draw */
 
        boost::optional<Rect> d = self.intersection (area);
@@ -1082,17 +1082,17 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
        /* "draw" is now a rectangle that defines the rectangle we need to
         * update/render the waveview into, in window coordinate space.
         */
-       
+
        /* window coordinates - pixels where x=0 is the left edge of the canvas
         * window. We round down in case we were asked to
         * draw "between" pixels at the start and/or end.
         */
-       
+
        double draw_start = floor (draw.x0);
        const double draw_end = floor (draw.x1);
 
        // cerr << "Need to draw " << draw_start << " .. " << draw_end << " vs. " << area << " and self = " << self << endl;
-       
+
        /* image coordnates: pixels where x=0 is the start of this waveview,
         * wherever it may be positioned. thus image_start=N means "an image
         * that begins N pixels after the start of region that this waveview is
@@ -1101,18 +1101,18 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
 
        const framepos_t image_start = window_to_image (self.x0, draw_start);
        const framepos_t image_end = window_to_image (self.x0, draw_end);
-       
+
        // cerr << "Image/WV space: " << image_start << " .. " << image_end << endl;
-       
+
        /* sample coordinates - note, these are not subject to rounding error
         *
         * "sample_start = N" means "the first sample we need to represent is N
         * samples after the first sample of the region"
         */
-       
+
        framepos_t sample_start = _region_start + (image_start * _samples_per_pixel);
        framepos_t sample_end   = _region_start + (image_end * _samples_per_pixel);
-       
+
        // cerr << "Sample space: " << sample_start << " .. " << sample_end << " @ " << _samples_per_pixel << " rs = " << _region_start << endl;
 
        /* sample_start and sample_end are bounded by the region
@@ -1121,17 +1121,17 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
         */
 
        sample_end = min (region_end(), sample_end);
-       
+
        // cerr << debug_name() << " will need image spanning " << sample_start << " .. " << sample_end << " region spans " << _region_start << " .. " << region_end() << endl;
 
        double image_origin_in_self_coordinates;
        boost::shared_ptr<WaveViewCache::Entry> image_to_draw;
-       
+
        Glib::Threads::Mutex::Lock lci (current_image_lock);
        if (_current_image) {
 
                /* check it covers the right sample range */
-               
+
                if (_current_image->start > sample_start || _current_image->end < sample_end) {
                        /* doesn't cover the area we need ... reset */
                        _current_image.reset ();
@@ -1150,7 +1150,7 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
                image_to_draw = get_image (sample_start, sample_end, full_image);
 
                DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1 image to draw = %2 (full? %3)\n", name, image_to_draw, full_image));
-               
+
                if (!image_to_draw) {
                        /* image not currently available. A redraw will be scheduled
                           when it is ready.
@@ -1171,7 +1171,7 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
         */
 
        image_origin_in_self_coordinates = (image_to_draw->start - _region_start) / _samples_per_pixel;
-       
+
        if (_start_shift && (sample_start == _region_start) && (self.x0 == draw.x0)) {
                /* we are going to draw the first pixel for this region, but
                   we may not want this to overlap a border around the
@@ -1181,14 +1181,14 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
                //draw_start += _start_shift;
                //image_origin_in_self_coordinates += _start_shift;
        }
-       
+
        /* the image may only be a best-effort ... it may not span the entire
         * range requested, though it is guaranteed to cover the start. So
         * determine how many pixels we can actually draw.
         */
 
        double draw_width;
-       
+
        if (image_to_draw != _current_image) {
                lci.release ();
 
@@ -1230,7 +1230,7 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
         * will appear. So specifying (10,10) will put the upper left corner of
         * the image at (10,10) in user space.
         */
-       
+
        context->set_source (image_to_draw->image, x, y);
        context->fill ();
 
@@ -1262,7 +1262,7 @@ WaveView::set_height (Distance height)
                invalidate_image_cache ();
                _height = height;
                get_image_in_thread = true;
-               
+
                _bounding_box_dirty = true;
                end_change ();
        }
@@ -1468,17 +1468,17 @@ WaveView::cancel_my_render_request () const
        /* try to stop any current rendering of the request, or prevent it from
         * ever starting up.
         */
-       
+
        if (current_request) {
                current_request->cancel ();
        }
-       
+
        Glib::Threads::Mutex::Lock lm (request_queue_lock);
 
        /* now remove it from the queue and reset our request pointer so that
           have no outstanding request (that we know about)
        */
-       
+
        request_queue.erase (this);
        current_request.reset ();
         DEBUG_TRACE (DEBUG::WaveView, string_compose ("%1 now has no request %2\n", this));
@@ -1527,7 +1527,7 @@ WaveView::drawing_thread ()
        while (run) {
 
                /* remember that we hold the lock at this point, no matter what */
-               
+
                if (g_atomic_int_get (&drawing_thread_should_quit)) {
                        break;
                }
@@ -1544,7 +1544,7 @@ WaveView::drawing_thread ()
                /* remove the request from the queue (remember: the "request"
                 * is just a pointer to a WaveView object)
                 */
-               
+
                requestor = *(request_queue.begin());
                request_queue.erase (request_queue.begin());
 
@@ -1602,7 +1602,7 @@ WaveViewCache::lookup_image (boost::shared_ptr<ARDOUR::AudioSource> src,
                              bool& full_coverage)
 {
        ImageCache::iterator x;
-       
+
        if ((x = cache_map.find (src)) == cache_map.end ()) {
                /* nothing in the cache for this audio source at all */
                return boost::shared_ptr<WaveViewCache::Entry> ();
@@ -1611,14 +1611,14 @@ WaveViewCache::lookup_image (boost::shared_ptr<ARDOUR::AudioSource> src,
        CacheLine& caches = x->second;
        boost::shared_ptr<Entry> best_partial;
        framecnt_t max_coverage = 0;
-       
+
        /* Find a suitable ImageSurface, if it exists.
        */
 
        for (CacheLine::iterator c = caches.begin(); c != caches.end(); ++c) {
 
                boost::shared_ptr<Entry> e (*c);
-               
+
                if (channel != e->channel
                    || height != e->height
                    || amplitude != e->amplitude
@@ -1673,7 +1673,7 @@ WaveViewCache::consolidate_image_cache (boost::shared_ptr<ARDOUR::AudioSource> s
        ImageCache::iterator x;
 
        /* MUST BE CALLED FROM (SINGLE) GUI THREAD */
-       
+
        if ((x = cache_map.find (src)) == cache_map.end ()) {
                return;
        }
@@ -1686,7 +1686,7 @@ WaveViewCache::consolidate_image_cache (boost::shared_ptr<ARDOUR::AudioSource> s
                ++nxt;
 
                boost::shared_ptr<Entry> e1 (*c1);
-               
+
                if (channel != e1->channel
                    || height != e1->height
                    || amplitude != e1->amplitude
@@ -1696,12 +1696,12 @@ WaveViewCache::consolidate_image_cache (boost::shared_ptr<ARDOUR::AudioSource> s
                        /* doesn't match current properties, ignore and move on
                         * to the next one.
                         */
-                       
+
                        other_entries++;
                        c1 = nxt;
                        continue;
                }
-               
+
                /* c1 now points to a cached image entry that matches current
                 * properties. Check all subsequent cached imaged entries to
                 * see if there are others that also match but represent
@@ -1714,7 +1714,7 @@ WaveViewCache::consolidate_image_cache (boost::shared_ptr<ARDOUR::AudioSource> s
                        ++nxt2;
 
                        boost::shared_ptr<Entry> e2 (*c2);
-                       
+
                        if (e1 == e2 || channel != e2->channel
                            || height != e2->height
                            || amplitude != e2->amplitude
@@ -1727,7 +1727,7 @@ WaveViewCache::consolidate_image_cache (boost::shared_ptr<ARDOUR::AudioSource> s
                                c2 = nxt2;
                                continue;
                        }
-                       
+
                        if (e2->start >= e1->start && e2->end <= e1->end) {
                                /* c2 is fully contained by c1, so delete it */
                                caches.erase (c2);
@@ -1754,7 +1754,7 @@ void
 WaveViewCache::add (boost::shared_ptr<ARDOUR::AudioSource> src, boost::shared_ptr<Entry> ce)
 {
        /* MUST BE CALLED FROM (SINGLE) GUI THREAD */
-       
+
        Cairo::RefPtr<Cairo::ImageSurface> img (ce->image);
 
        image_cache_size += img->get_height() * img->get_width () * 4; /* 4 = bytes per FORMAT_ARGB32 pixel */
@@ -1792,7 +1792,7 @@ void
 WaveViewCache::cache_flush ()
 {
        /* Build a sortable list of all cache entries */
-       
+
        CacheList cache_list;
 
        for (ImageCache::const_iterator cm = cache_map.begin(); cm != cache_map.end(); ++cm) {
@@ -1800,7 +1800,7 @@ WaveViewCache::cache_flush ()
                        cache_list.push_back (make_pair (cm->first, *cl));
                }
        }
-       
+
        /* sort list in LRU order */
        SortByTimestamp sorter;
        sort (cache_list.begin(), cache_list.end(), sorter);
@@ -1810,32 +1810,32 @@ WaveViewCache::cache_flush ()
                ListEntry& le (cache_list.front());
 
                ImageCache::iterator x;
-               
+
                if ((x = cache_map.find (le.first)) != cache_map.end ()) {
-               
+
                        CacheLine& cl  = x->second;
-                       
+
                        for (CacheLine::iterator c = cl.begin(); c != cl.end(); ++c) {
-                               
+
                                if (*c == le.second) {
 
                                        DEBUG_TRACE (DEBUG::WaveView, string_compose ("Removing cache line entry for %1\n", x->first->name()));
-                                       
+
                                        /* Remove this entry from this cache line */
                                        cl.erase (c);
-                                       
+
                                        if (cl.empty()) {
                                                /* remove cache line from main cache: no more entries */
                                                cache_map.erase (x);
                                        }
-                                       
+
                                        break;
                                }
                        }
-                       
+
                        Cairo::RefPtr<Cairo::ImageSurface> img (le.second->image);
                        uint64_t size = img->get_height() * img->get_width() * 4; /* 4 = bytes per FORMAT_ARGB32 pixel */
-                       
+
                        if (image_cache_size > size) {
                                image_cache_size -= size;
                        } else {
index 259b0e6da537748fc616f017c0d072045f013570..c8e477697c47679f2ebeb520830a2b69001f6f2c 100644 (file)
@@ -35,7 +35,7 @@ static const bool show_bg_fades = false;
 #else
 static const bool show_bg_fades = true;
 #endif
-       
+
 XFadeCurve::XFadeCurve (Canvas* c)
        : Item (c)
        , points_per_segment (32)
index 8339ed7c195dceb36c92411b873a3a72f1837d8a..9fd530f201782e591aa618176e0873faf4d4c0fb 100644 (file)
@@ -31,7 +31,7 @@
 
 struct _AnimationInfo {
        GTimer *timer;
-       
+
        gdouble start_modifier;
        gdouble stop_time;
        GtkWidget *widget;
@@ -107,11 +107,11 @@ static void
 destroy_animation_info_and_weak_unref (gpointer data)
 {
        AnimationInfo *animation_info = data;
-       
+
        /* force a last redraw. This is so that if the animation is removed,
         * the widget is left in a sane state. */
        force_widget_redraw (animation_info->widget);
-       
+
        g_object_weak_unref (G_OBJECT (animation_info->widget), on_animated_widget_destruction, data);
        animation_info_destroy (animation_info);
 }
@@ -122,7 +122,7 @@ lookup_animation_info (const GtkWidget *widget)
 {
        if (animated_widgets)
                return g_hash_table_lookup (animated_widgets, widget);
-       
+
        return NULL;
 }
 
@@ -131,26 +131,26 @@ static void
 add_animation (const GtkWidget *widget, gdouble stop_time)
 {
        AnimationInfo *value;
-       
+
        /* object already in the list, do not add it twice */
        if (lookup_animation_info (widget))
                return;
-       
+
        if (animated_widgets == NULL)
                animated_widgets = g_hash_table_new_full (g_direct_hash, g_direct_equal,
                                                          NULL, destroy_animation_info_and_weak_unref);
-       
+
        value = g_new(AnimationInfo, 1);
-       
+
        value->widget = (GtkWidget*) widget;
-       
+
        value->timer = g_timer_new ();
        value->stop_time= stop_time;
        value->start_modifier = 0.0;
 
        g_object_weak_ref (G_OBJECT (widget), on_animated_widget_destruction, value);
        g_hash_table_insert (animated_widgets, (GtkWidget*) widget, value);
-       
+
        start_timer ();
 }
 
@@ -161,34 +161,34 @@ update_animation_info (gpointer key, gpointer value, gpointer user_data)
 {
        AnimationInfo *animation_info;
        GtkWidget *widget = key;
-       
+
        animation_info = value;
        (void) user_data;
-       
+
        g_assert ((widget != NULL) && (animation_info != NULL));
-       
+
        /* remove the widget from the hash table if it is not drawable */
        if (!GTK_WIDGET_DRAWABLE (widget))
        {
                return TRUE;
        }
-       
+
        if (GE_IS_PROGRESS_BAR (widget))
        {
                gfloat fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (widget));
-               
+
                /* stop animation for filled/not filled progress bars */
                if (fraction <= 0.0 || fraction >= 1.0)
                        return TRUE;
        }
-       
+
        force_widget_redraw (widget);
-       
+
        /* stop at stop_time */
        if (animation_info->stop_time != 0 &&
            g_timer_elapsed (animation_info->timer, NULL) > animation_info->stop_time)
                return TRUE;
-       
+
        return FALSE;
 }
 
@@ -197,21 +197,21 @@ static gboolean
 animation_timeout_handler (gpointer data)
 {
        (void) data;
-       
+
        /*g_print("** TICK **\n");*/
-       
+
        /* enter threads as update_animation_info will use gtk/gdk. */
        gdk_threads_enter ();
        g_hash_table_foreach_remove (animated_widgets, update_animation_info, NULL);
        /* leave threads again */
        gdk_threads_leave ();
-       
+
        if(g_hash_table_size(animated_widgets)==0)
        {
                stop_timer ();
                return FALSE;
        }
-       
+
        return TRUE;
 }
 
@@ -220,13 +220,13 @@ on_checkbox_toggle (GtkWidget *widget, gpointer data)
 {
        AnimationInfo *animation_info;
        (void) data;
-       
+
        animation_info = lookup_animation_info (widget);
-       
+
        if (animation_info != NULL)
        {
                gfloat elapsed = g_timer_elapsed (animation_info->timer, NULL);
-               
+
                animation_info->start_modifier = elapsed - animation_info->start_modifier;
        }
        else
@@ -239,7 +239,7 @@ static void
 on_connected_widget_destruction (gpointer data, GObject *widget)
 {
        (void) widget;
-       
+
        connected_widgets = g_slist_remove (connected_widgets, data);
        g_free (data);
 }
@@ -251,14 +251,14 @@ disconnect_all_signals (void)
        while (item != NULL)
        {
                SignalInfo *signal_info = (SignalInfo*) item->data;
-               
+
                g_signal_handler_disconnect (signal_info->widget, signal_info->handler_id);
                g_object_weak_unref (G_OBJECT (signal_info->widget), on_connected_widget_destruction, signal_info);
                g_free (signal_info);
-               
+
                item = g_slist_next (item);
        }
-       
+
        g_slist_free (connected_widgets);
        connected_widgets = NULL;
 }
@@ -281,7 +281,7 @@ void
 clearlooks_animation_progressbar_add (GtkWidget *progressbar)
 {
        gdouble fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progressbar));
-       
+
        if (fraction < 1.0 && fraction > 0.0)
                add_animation ((GtkWidget*) progressbar, 0.0);
 }
@@ -295,10 +295,10 @@ clearlooks_animation_connect_checkbox (GtkWidget *widget)
                if (!g_slist_find_custom (connected_widgets, widget, find_signal_info))
                {
                        SignalInfo * signal_info = g_new (SignalInfo, 1);
-                       
+
                        signal_info->widget = widget;
                        signal_info->handler_id = g_signal_connect ((GObject*)widget, "toggled", G_CALLBACK (on_checkbox_toggle), NULL);
-                       
+
                        connected_widgets = g_slist_append (connected_widgets, signal_info);
                        g_object_weak_ref (G_OBJECT (widget), on_connected_widget_destruction, signal_info);
                }
@@ -317,7 +317,7 @@ gdouble
 clearlooks_animation_elapsed (gpointer data)
 {
        AnimationInfo *animation_info = lookup_animation_info (data);
-       
+
        if (animation_info)
                return   g_timer_elapsed (animation_info->timer, NULL)
                       - animation_info->start_modifier;
@@ -330,13 +330,13 @@ void
 clearlooks_animation_cleanup (void)
 {
        disconnect_all_signals ();
-       
+
        if (animated_widgets != NULL)
        {
                g_hash_table_destroy (animated_widgets);
                animated_widgets = NULL;
        }
-       
+
        stop_timer ();
 }
 #else /* !HAVE_ANIMATION */
index 4b82bb57580e46ac2c16617994aaf26587a2e1dd..e221a0d8e8cc8ac94c5f2fb280b81743ddac0423 100644 (file)
@@ -34,12 +34,12 @@ ge_hsb_from_color (const CairoColor *color,
        }
 
        *brightness = (max + min) / 2;
-       
+
        if (fabs(max - min) < 0.0001)
        {
                *hue = 0;
                *saturation = 0;
-       }       
+       }
        else
        {
                if (*brightness <= 0.5)
@@ -81,7 +81,7 @@ ge_color_from_hsb (gdouble hue,
        gdouble m1, m2, m3;
 
        if (!color) return;
-       
+
        if (brightness <= 0.5)
                m2 = brightness * (1 + saturation);
        else
@@ -93,7 +93,7 @@ ge_color_from_hsb (gdouble hue,
        hue_shift[1] = hue;
        hue_shift[2] = hue - 120;
 
-       color_shift[0] = color_shift[1] = color_shift[2] = brightness;  
+       color_shift[0] = color_shift[1] = color_shift[2] = brightness;
 
        i = (saturation == 0)?3:0;
 
@@ -114,12 +114,12 @@ ge_color_from_hsb (gdouble hue,
                        color_shift[i] = m1 + (m2 - m1) * (240 - m3) / 60;
                else
                        color_shift[i] = m1;
-       }       
+       }
 
        color->r = color_shift[0];
        color->g = color_shift[1];
-       color->b = color_shift[2];      
-       color->a = 1.0; 
+       color->b = color_shift[2];
+       color->a = 1.0;
 }
 
 void
@@ -201,7 +201,7 @@ ge_shade_color(const CairoColor *base, gdouble shade_ratio, CairoColor *composit
        saturation = MAX(saturation, 0.0);
 
        ge_color_from_hsb (hue, saturation, brightness, composite);
-       composite->a = base->a; 
+       composite->a = base->a;
 }
 
 void
@@ -219,7 +219,7 @@ ge_saturate_color (const CairoColor *base, gdouble saturate_level, CairoColor *c
        saturation = MAX(saturation, 0.0);
 
        ge_color_from_hsb (hue, saturation, brightness, composite);
-       composite->a = base->a; 
+       composite->a = base->a;
 }
 
 void
@@ -261,7 +261,7 @@ ge_cairo_set_color (cairo_t *cr, const CairoColor *color)
 {
        g_return_if_fail (cr && color);
 
-       cairo_set_source_rgba (cr, color->r, color->g, color->b, color->a);     
+       cairo_set_source_rgba (cr, color->r, color->g, color->b, color->a);
 }
 
 void
@@ -282,7 +282,7 @@ ge_cairo_pattern_add_color_stop_color (cairo_pattern_t *pattern,
 {
        g_return_if_fail (pattern && color);
 
-       cairo_pattern_add_color_stop_rgba (pattern, offset, color->r, color->g, color->b, color->a);    
+       cairo_pattern_add_color_stop_rgba (pattern, offset, color->r, color->g, color->b, color->a);
 }
 
 void
@@ -302,7 +302,7 @@ ge_cairo_pattern_add_color_stop_shade(cairo_pattern_t *pattern,
                ge_shade_color(color, shade, &shaded);
        }
 
-       ge_cairo_pattern_add_color_stop_color(pattern, offset, &shaded);        
+       ge_cairo_pattern_add_color_stop_color(pattern, offset, &shaded);
 }
 
 /* This function will draw a rounded corner at position x,y. If the radius
@@ -370,22 +370,22 @@ ge_cairo_rounded_rectangle (cairo_t *cr,
                cairo_move_to (cr, x+radius, y);
        else
                cairo_move_to (cr, x, y);
-       
+
        if (corners & CR_CORNER_TOPRIGHT)
                cairo_arc (cr, x+w-radius, y+radius, radius, G_PI * 1.5, G_PI * 2);
        else
                cairo_line_to (cr, x+w, y);
-       
+
        if (corners & CR_CORNER_BOTTOMRIGHT)
                cairo_arc (cr, x+w-radius, y+h-radius, radius, 0, G_PI * 0.5);
        else
                cairo_line_to (cr, x+w, y+h);
-       
+
        if (corners & CR_CORNER_BOTTOMLEFT)
                cairo_arc (cr, x+radius,   y+h-radius, radius, G_PI * 0.5, G_PI);
        else
                cairo_line_to (cr, x, y+h);
-       
+
        if (corners & CR_CORNER_TOPLEFT)
                cairo_arc (cr, x+radius,   y+radius,   radius, G_PI, G_PI * 1.5);
        else
@@ -425,7 +425,7 @@ ge_cairo_simple_border (cairo_t *cr,
        g_return_if_fail (cr != NULL);
        g_return_if_fail (tl != NULL);
        g_return_if_fail (br != NULL);
-       
+
 
        solid_color = (tl == br) || ((tl->r == br->r) && (tl->g == br->g) && (tl->b == br->b) && (tl->a == br->a));
 
@@ -437,16 +437,16 @@ ge_cairo_simple_border (cairo_t *cr,
 
        if (topleft_overlap)
        {
-               ge_cairo_set_color(cr, br);     
+               ge_cairo_set_color(cr, br);
 
                cairo_move_to(cr, x + 0.5, y + height - 0.5);
                cairo_line_to(cr, x + width - 0.5, y + height - 0.5);
                cairo_line_to(cr, x + width - 0.5, y + 0.5);
-               
+
                cairo_stroke (cr);
        }
 
-       ge_cairo_set_color(cr, tl);     
+       ge_cairo_set_color(cr, tl);
 
        cairo_move_to(cr, x + 0.5, y + height - 0.5);
        cairo_line_to(cr, x + 0.5, y + 0.5);
@@ -457,7 +457,7 @@ ge_cairo_simple_border (cairo_t *cr,
                if (!solid_color)
                {
                        cairo_stroke(cr);
-                       ge_cairo_set_color(cr, br);     
+                       ge_cairo_set_color(cr, br);
                }
 
                cairo_move_to(cr, x + 0.5, y + height - 0.5);
@@ -479,7 +479,7 @@ void ge_cairo_polygon (cairo_t *cr,
 
        cairo_save(cr);
 
-       ge_cairo_set_color(cr, color);  
+       ge_cairo_set_color(cr, color);
        cairo_move_to(cr, points[0].x, points[0].y);
 
        for (i = 1; i < npoints; i++)
@@ -490,7 +490,7 @@ void ge_cairo_polygon (cairo_t *cr,
                        cairo_line_to(cr, points[i].x, points[i].y);
                }
        }
-       
+
        if ((points[npoints-1].x != points[0].x) ||
                (points[npoints-1].y != points[0].y))
        {
@@ -511,7 +511,7 @@ void ge_cairo_line (cairo_t *cr,
 {
        cairo_save(cr);
 
-       ge_cairo_set_color(cr, color);  
+       ge_cairo_set_color(cr, color);
        cairo_set_line_width (cr, 1);
 
        cairo_move_to(cr, x1 + 0.5, y1 + 0.5);
@@ -531,13 +531,13 @@ ge_cairo_mirror (cairo_t     *cr,
                  gint        *height)
 {
        cairo_matrix_t matrix;
-       
+
        cairo_matrix_init_identity (&matrix);
-       
+
        cairo_translate (cr, *x, *y);
        *x = 0;
        *y = 0;
-       
+
        if (mirror & CR_MIRROR_HORIZONTAL)
        {
                cairo_matrix_scale (&matrix, -1, 1);
@@ -566,7 +566,7 @@ ge_cairo_exchange_axis (cairo_t  *cr,
        cairo_matrix_init (&matrix, 0, 1, 1, 0, 0, 0);
 
        cairo_transform (cr, &matrix);
-       
+
        /* swap width/height */
        tmp = *width;
        *x = 0;
@@ -658,7 +658,7 @@ ge_cairo_pattern_fill(cairo_t *canvas,
  ***********************************************/
 CairoPattern*
 ge_cairo_color_pattern(CairoColor *base)
-{      
+{
        CairoPattern * result = g_new0(CairoPattern, 1);
 
        #if  ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2)))
@@ -674,7 +674,7 @@ ge_cairo_color_pattern(CairoColor *base)
                                                        base->a);
 
        result->operator = CAIRO_OPERATOR_SOURCE;
-       
+
        return result;
 }
 
@@ -685,7 +685,7 @@ ge_cairo_color_pattern(CairoColor *base)
  ***********************************************/
 CairoPattern*
 ge_cairo_pixbuf_pattern(GdkPixbuf *pixbuf)
-{      
+{
        CairoPattern * result = g_new0(CairoPattern, 1);
 
        cairo_t *canvas;
@@ -701,7 +701,7 @@ ge_cairo_pixbuf_pattern(GdkPixbuf *pixbuf)
 
        width = gdk_pixbuf_get_width(pixbuf);
        height = gdk_pixbuf_get_height(pixbuf);
-       
+
        surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
 
        canvas = cairo_create(surface);
@@ -728,7 +728,7 @@ ge_cairo_pixbuf_pattern(GdkPixbuf *pixbuf)
  ***********************************************/
 CairoPattern*
 ge_cairo_pixmap_pattern(GdkPixmap *pixmap)
-{      
+{
        CairoPattern * result = NULL;
 
        GdkPixbuf * pixbuf;
@@ -741,7 +741,7 @@ ge_cairo_pixmap_pattern(GdkPixmap *pixmap)
                                0, 0, 0, 0, width, height);
 
        result = ge_cairo_pixbuf_pattern(pixbuf);
-       
+
        g_object_unref (pixbuf);
 
        return result;
@@ -762,7 +762,7 @@ ge_cairo_linear_shade_gradient_pattern(CairoColor *base,
                                                gboolean vertical)
 {
        CairoPattern * result = g_new0(CairoPattern, 1);
-       
+
        #if  ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2)))
                result->type = CAIRO_PATTERN_TYPE_LINEAR;
        #endif
@@ -796,7 +796,7 @@ ge_cairo_pattern_destroy(CairoPattern *pattern)
        {
                if (pattern->handle)
                        cairo_pattern_destroy(pattern->handle);
-                       
+
                g_free(pattern);
        }
 }
@@ -810,7 +810,7 @@ const gchar*
 g_module_check_init (GModule *module)
 {
        (void) module;
-       
+
        return gtk_check_version (GTK_MAJOR_VERSION,
                                  GTK_MINOR_VERSION,
                                  GTK_MICRO_VERSION - GTK_INTERFACE_AGE);
index 29803a2d71936b91ae2c67ccbc6e5619f992d64b..bf01a002a46004ce7564108d2b42529e54466bce 100644 (file)
@@ -104,9 +104,9 @@ clearlooks_draw_shadow (cairo_t *cr, const ClearlooksColors *colors, gfloat radi
        ge_shade_color (&colors->shade[6], 0.92, &shadow);
 
        cairo_set_line_width (cr, 1.0);
-       
+
        cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.1);
-       
+
        cairo_move_to (cr, width, radius);
        ge_cairo_rounded_corner (cr, width, height, radius, CR_CORNER_BOTTOMRIGHT);
        cairo_line_to (cr, radius, height);
@@ -156,42 +156,42 @@ clearlooks_draw_highlight_and_shade (cairo_t *cr, const ClearlooksColors *colors
 
        width  -= 3;
        height -= 3;
-       
+
        cairo_save (cr);
-       
+
        /* Top/Left highlight */
        if (corners & CR_CORNER_BOTTOMLEFT)
                cairo_move_to (cr, x, y+height-radius);
        else
                cairo_move_to (cr, x, y+height);
-       
+
        ge_cairo_rounded_corner (cr, x, y, radius, corners & CR_CORNER_TOPLEFT);
 
        if (corners & CR_CORNER_TOPRIGHT)
                cairo_line_to (cr, x+width-radius, y);
        else
                cairo_line_to (cr, x+width, y);
-       
+
        if (params->shadow & CL_SHADOW_OUT)
                ge_cairo_set_color (cr, &hilight);
        else
                ge_cairo_set_color (cr, &shadow);
-               
+
        cairo_stroke (cr);
-       
+
        /* Bottom/Right highlight -- this includes the corners */
        cairo_move_to (cr, x+width-radius, y); /* topright and by radius to the left */
        ge_cairo_rounded_corner (cr, x+width, y, radius, corners & CR_CORNER_TOPRIGHT);
        ge_cairo_rounded_corner (cr, x+width, y+height, radius, corners & CR_CORNER_BOTTOMRIGHT);
        ge_cairo_rounded_corner (cr, x, y+height, radius, corners & CR_CORNER_BOTTOMLEFT);
-       
+
        if (params->shadow & CL_SHADOW_OUT)
                ge_cairo_set_color (cr, &shadow);
        else
                ge_cairo_set_color (cr, &hilight);
-       
+
        cairo_stroke (cr);
-       
+
        cairo_restore (cr);
 }
 
@@ -206,7 +206,7 @@ clearlooks_set_border_gradient (cairo_t *cr, const CairoColor *color, double hil
        pattern = cairo_pattern_create_linear (0, 0, width, height);
        cairo_pattern_add_color_stop_rgb (pattern, 0, color->r, color->g, color->b);
        cairo_pattern_add_color_stop_rgb (pattern, 1, bottom_shade.r, bottom_shade.g, bottom_shade.b);
-       
+
        cairo_set_source (cr, pattern);
        cairo_pattern_destroy (pattern);
 }
@@ -229,7 +229,7 @@ clearlooks_draw_gripdots (cairo_t *cr, const ClearlooksColors *colors, int x, in
                {
                        xoff = x -(xr * 3 / 2) + 3 * i;
                        yoff = y -(yr * 3 / 2) + 3 * j;
-                       
+
                        cairo_rectangle (cr, width/2+0.5+xoff, height/2+0.5+yoff, 2, 2);
                        cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.8+contrast);
                        cairo_fill (cr);
@@ -254,9 +254,9 @@ clearlooks_draw_button (cairo_t *cr,
 
        CairoColor shadow;
        ge_shade_color (border_normal, 0.925, &shadow);
-       
+
        cairo_save (cr);
-       
+
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1.0);
 
@@ -275,23 +275,23 @@ clearlooks_draw_button (cairo_t *cr,
                cairo_translate (cr, 0.5, 0.5);
                params->style_functions->draw_inset (cr, &params->parentbg, 0, 0, width-1, height-1, radius+1, params->corners);
                cairo_translate (cr, -0.5, -0.5);
-       }               
-       
+       }
+
        ge_cairo_rounded_rectangle (cr, xoffset+1, yoffset+1,
                                             width-(xoffset*2)-2,
                                             height-(yoffset*2)-2,
                                             radius, params->corners);
-       
+
        if (!params->active)
        {
                cairo_pattern_t *pattern;
                gdouble shade_size = ((100.0/height)*8.0)/100.0;
                CairoColor top_shade, bottom_shade, middle_shade;
-               
+
                ge_shade_color (fill, 1.1, &top_shade);
                ge_shade_color (fill, 0.98, &middle_shade);
                ge_shade_color (fill, 0.93, &bottom_shade);
-               
+
                pattern = cairo_pattern_create_linear (0, 0, 0, height);
                cairo_pattern_add_color_stop_rgb (pattern, 0.0, top_shade.r, top_shade.g, top_shade.b);
                cairo_pattern_add_color_stop_rgb (pattern, shade_size, fill->r, fill->g, fill->b);
@@ -307,7 +307,7 @@ clearlooks_draw_button (cairo_t *cr,
        else
        {
                cairo_pattern_t *pattern;
-               
+
                ge_cairo_set_color (cr, fill);
                cairo_fill_preserve (cr);
 
@@ -346,7 +346,7 @@ clearlooks_draw_button (cairo_t *cr,
                ge_cairo_set_color (cr, d);
                ge_cairo_stroke_rectangle (cr, 3.5, 3.5, width-7, height-7);
        }
-       
+
        ge_cairo_rounded_rectangle (cr, xoffset + 0.5, yoffset + 0.5, width-(xoffset*2)-1, height-(yoffset*2)-1, radius, params->corners);
 
        if (params->disabled)
@@ -356,9 +356,9 @@ clearlooks_draw_button (cairo_t *cr,
                        clearlooks_set_border_gradient (cr, border_normal, 1.32, 0, height);
                else
                        ge_cairo_set_color (cr, border_normal);
-       
+
        cairo_stroke (cr);
-       
+
        /* Draw the "shadow" */
        if (!params->active)
        {
@@ -368,7 +368,7 @@ clearlooks_draw_button (cairo_t *cr,
                cairo_line_to (cr, width-params->xthickness, height - params->ythickness - 1);
                cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.1);
                cairo_stroke (cr);
-               
+
                /* Draw topleft shadow */
                clearlooks_draw_top_left_highlight (cr, fill, params, width, height, radius);
        }
@@ -384,13 +384,13 @@ clearlooks_draw_entry (cairo_t *cr,
        const CairoColor *base = &colors->base[params->state_type];
        CairoColor border = colors->shade[params->disabled ? 4 : 6];
        double radius = MIN (params->radius, MIN ((width - 4.0) / 2.0, (height - 4.0) / 2.0));
-       
+
        if (params->focus)
                border = colors->spot[2];
 
        cairo_translate (cr, x+0.5, y+0.5);
        cairo_set_line_width (cr, 1.0);
-       
+
        /* Fill the background (shouldn't have to) */
        cairo_rectangle (cr, -0.5, -0.5, width, height);
        ge_cairo_set_color (cr, &params->parentbg);
@@ -400,7 +400,7 @@ clearlooks_draw_entry (cairo_t *cr,
        cairo_rectangle (cr, 1.5, 1.5, width-4, height-4);
        ge_cairo_set_color (cr, base);
        cairo_fill (cr);
-       
+
        params->style_functions->draw_inset (cr, &params->parentbg, 0, 0, width-1, height-1, radius+1, params->corners);
 
        /* Draw the inner shadow */
@@ -472,20 +472,20 @@ clearlooks_draw_spinbutton_down (cairo_t *cr,
        ge_shade_color (&colors->bg[GTK_STATE_NORMAL], 0.8, &shadow);
 
        cairo_translate (cr, x+1, y+1);
-       
+
        ge_cairo_rounded_rectangle (cr, 1, 1, width-4, height-4, radius, params->corners);
-       
+
        ge_cairo_set_color (cr, &colors->bg[params->state_type]);
-       
+
        cairo_fill_preserve (cr);
-       
+
        pattern = cairo_pattern_create_linear (0, 0, 0, height);
        cairo_pattern_add_color_stop_rgb (pattern, 0.0, shadow.r, shadow.g, shadow.b);
        cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0);
-       
+
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
-       
+
        cairo_pattern_destroy (pattern);
 }
 
@@ -503,13 +503,13 @@ clearlooks_scale_draw_gradient (cairo_t *cr,
        cairo_pattern_add_color_stop_rgb (pattern, 0.0, c1->r, c1->g, c1->b);
        cairo_pattern_add_color_stop_rgb (pattern, 1.0, c2->r, c2->g, c2->b);
 
-       cairo_rectangle (cr, x+0.5, y+0.5, width-1, height-1);  
+       cairo_rectangle (cr, x+0.5, y+0.5, width-1, height-1);
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
        cairo_pattern_destroy (pattern);
-       
+
        ge_cairo_set_color (cr, c3);
-       ge_cairo_stroke_rectangle (cr, x, y, width, height);    
+       ge_cairo_stroke_rectangle (cr, x, y, width, height);
 }
 
 #define TROUGH_SIZE 6
@@ -527,7 +527,7 @@ clearlooks_draw_scale_trough (cairo_t *cr,
        {
                trough_width  = width-3;
                trough_height = TROUGH_SIZE-2;
-               
+
                translate_x   = x + 0.5;
                translate_y   = y + 0.5 + (height/2) - (TROUGH_SIZE/2);
        }
@@ -535,19 +535,19 @@ clearlooks_draw_scale_trough (cairo_t *cr,
        {
                trough_width  = TROUGH_SIZE-2;
                trough_height = height-3;
-               
+
                translate_x   = x + 0.5 + (width/2) - (TROUGH_SIZE/2);
                translate_y  = y + 0.5;
        }
 
        cairo_set_line_width (cr, 1.0);
        cairo_translate (cr, translate_x, translate_y);
-       
+
        if (!slider->fill_level)
                params->style_functions->draw_inset (cr, &params->parentbg, 0, 0, trough_width+2, trough_height+2, 0, 0);
-       
+
        cairo_translate (cr, 1, 1);
-       
+
        if (!slider->lower && ! slider->fill_level)
                clearlooks_scale_draw_gradient (cr, &colors->shade[3], /* top */
                                                    &colors->shade[2], /* bottom */
@@ -575,7 +575,7 @@ clearlooks_draw_slider (cairo_t *cr,
 
        cairo_pattern_t *pattern;
 
-       cairo_set_line_width (cr, 1.0); 
+       cairo_set_line_width (cr, 1.0);
        cairo_translate      (cr, x, y);
 
        if (params->prelight)
@@ -619,7 +619,7 @@ clearlooks_draw_slider (cairo_t *cr,
        if (params->prelight)
        {
                CairoColor highlight;
-               ge_shade_color (spot, 1.5, &highlight); 
+               ge_shade_color (spot, 1.5, &highlight);
                cairo_pattern_add_color_stop_rgb (pattern, 0.0, highlight.r, highlight.g, highlight.b);
                cairo_pattern_add_color_stop_rgb (pattern, 1.0, spot->r, spot->g, spot->b);
                cairo_set_source (cr, pattern);
@@ -650,10 +650,10 @@ clearlooks_draw_slider (cairo_t *cr,
        {
                cairo_move_to (cr, 6, 0.5);
                cairo_line_to (cr, 6, height-1);
-       
+
                cairo_move_to (cr, width-7, 0.5);
                cairo_line_to (cr, width-7, height-1);
-       
+
                cairo_set_line_width (cr, 1.0);
                cairo_set_source_rgba (cr, border->r,
                                           border->g,
@@ -672,7 +672,7 @@ clearlooks_draw_slider_button (cairo_t *cr,
 {
        double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
        cairo_set_line_width (cr, 1.0);
-       
+
        if (!slider->horizontal)
                ge_cairo_exchange_axis (cr, &x, &y, &width, &height);
        cairo_translate (cr, x+0.5, y+0.5);
@@ -694,15 +694,15 @@ clearlooks_draw_progressbar_trough (cairo_t *cr,
        CairoColor       shadow;
        cairo_pattern_t *pattern;
        double          radius = MIN (params->radius, MIN ((height-2.0) / 2.0, (width-2.0) / 2.0));
-       
+
        cairo_save (cr);
 
        cairo_set_line_width (cr, 1.0);
-       
+
        /* Fill with bg color */
        ge_cairo_set_color (cr, &colors->bg[params->state_type]);
-       
-       cairo_rectangle (cr, x, y, width, height);      
+
+       cairo_rectangle (cr, x, y, width, height);
        cairo_fill (cr);
 
        /* Create trough box */
@@ -724,8 +724,8 @@ clearlooks_draw_progressbar_trough (cairo_t *cr,
        /* Top shadow */
        cairo_rectangle (cr, x+1, y+1, width-2, 4);
        pattern = cairo_pattern_create_linear (x, y, x, y+4);
-       cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3);    
-       cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.);     
+       cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3);
+       cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.);
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
        cairo_pattern_destroy (pattern);
@@ -733,8 +733,8 @@ clearlooks_draw_progressbar_trough (cairo_t *cr,
        /* Left shadow */
        cairo_rectangle (cr, x+1, y+1, 4, height-2);
        pattern = cairo_pattern_create_linear (x, y, x+4, y);
-       cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3);    
-       cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.);     
+       cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3);
+       cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.);
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
        cairo_pattern_destroy (pattern);
@@ -776,7 +776,7 @@ clearlooks_draw_progressbar_fill (cairo_t *cr,
 
        stroke_width = height*2;
        x_step = (((float)stroke_width/10)*offset); /* This looks weird ... */
-       
+
        cairo_translate (cr, x, y);
 
        cairo_save (cr);
@@ -804,16 +804,16 @@ clearlooks_draw_progressbar_fill (cairo_t *cr,
                cairo_line_to (cr, stroke_width-x_step,   0);
                cairo_line_to (cr, stroke_width/2-x_step, height);
                cairo_line_to (cr, -x_step, height);
-               
+
                cairo_translate (cr, stroke_width, 0);
                tile_pos += stroke_width;
        }
-       
+
        cairo_set_source_rgba (cr, colors->spot[2].r,
                                   colors->spot[2].g,
                                   colors->spot[2].b,
                                   0.15);
-       
+
        cairo_fill (cr);
        cairo_restore (cr); /* rounded clip region */
 
@@ -893,7 +893,7 @@ clearlooks_draw_progressbar_fill (cairo_t *cr,
                ge_cairo_set_color (cr, &shadow);
                cairo_stroke (cr);
        }
-       
+
        cairo_restore (cr);
 
        cairo_restore (cr); /* rotation, mirroring */
@@ -908,9 +908,9 @@ clearlooks_draw_optionmenu (cairo_t *cr,
 {
        SeparatorParameters separator;
        int offset = params->ythickness + 1;
-       
+
        params->style_functions->draw_button (cr, colors, params, x, y, width, height);
-       
+
        separator.horizontal = FALSE;
        params->style_functions->draw_separator (cr, colors, params, &separator, x+optionmenu->linepos, y + offset, 2, height - offset*2);
 }
@@ -923,7 +923,7 @@ clearlooks_draw_menu_item_separator (cairo_t                   *cr,
                                      int x, int y, int width, int height)
 {
        (void) widget;
-       
+
        cairo_save (cr);
        cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT);
        ge_cairo_set_color (cr, &colors->shade[5]);
@@ -979,10 +979,10 @@ clearlooks_draw_menubar2 (cairo_t *cr,
        (void) menubar;
 
        ge_shade_color (&colors->bg[0], 0.96, &lower);
-       
+
        cairo_translate (cr, x, y);
        cairo_rectangle (cr, 0, 0, width, height);
-       
+
        /* Draw the gradient */
        pattern = cairo_pattern_create_linear (0, 0, 0, height);
        cairo_pattern_add_color_stop_rgb (pattern, 0.0, colors->bg[0].r,
@@ -994,7 +994,7 @@ clearlooks_draw_menubar2 (cairo_t *cr,
        cairo_set_source      (cr, pattern);
        cairo_fill            (cr);
        cairo_pattern_destroy (pattern);
-       
+
        /* Draw bottom line */
        cairo_set_line_width (cr, 1.0);
        cairo_move_to        (cr, 0, height-0.5);
@@ -1049,7 +1049,7 @@ clearlooks_get_frame_gap_clip (int x, int y, int width, int height,
 {
        (void) x;
        (void) y;
-       
+
        if (frame->gap_side == CL_GAP_TOP)
        {
                CLEARLOOKS_RECTANGLE_SET ((*bevel),  1.5 + frame->gap_x,  -0.5,
@@ -1062,21 +1062,21 @@ clearlooks_get_frame_gap_clip (int x, int y, int width, int height,
                CLEARLOOKS_RECTANGLE_SET ((*bevel),  1.5 + frame->gap_x,  height - 2.5,
                                                                                         frame->gap_width - 3, 2.0);
                CLEARLOOKS_RECTANGLE_SET ((*border), 0.5 + frame->gap_x,  height - 1.5,
-                                                                                        frame->gap_width - 2, 2.0);            
+                                                                                        frame->gap_width - 2, 2.0);
        }
        else if (frame->gap_side == CL_GAP_LEFT)
        {
                CLEARLOOKS_RECTANGLE_SET ((*bevel),  -0.5, 1.5 + frame->gap_x,
                                                                                         2.0, frame->gap_width - 3);
                CLEARLOOKS_RECTANGLE_SET ((*border), -0.5, 0.5 + frame->gap_x,
-                                                                                        1.0, frame->gap_width - 2);                    
+                                                                                        1.0, frame->gap_width - 2);
        }
        else if (frame->gap_side == CL_GAP_RIGHT)
        {
                CLEARLOOKS_RECTANGLE_SET ((*bevel),  width - 2.5, 1.5 + frame->gap_x,
                                                                                         2.0, frame->gap_width - 3);
                CLEARLOOKS_RECTANGLE_SET ((*border), width - 1.5, 0.5 + frame->gap_x,
-                                                                                        1.0, frame->gap_width - 2);                    
+                                                                                        1.0, frame->gap_width - 2);
        }
 }
 
@@ -1095,7 +1095,7 @@ clearlooks_draw_frame            (cairo_t *cr,
        CairoColor hilight;
 
        ge_shade_color (&colors->bg[GTK_STATE_NORMAL], 1.05, &hilight);
-       
+
        if (frame->shadow == CL_SHADOW_NONE) {
                const CairoColor *bg = &colors->bg[params->state_type];
                ge_cairo_set_color (cr, bg);
@@ -1104,14 +1104,14 @@ clearlooks_draw_frame            (cairo_t *cr,
                cairo_stroke (cr);
                return;
        }
-       
+
        if (frame->gap_x != -1)
                clearlooks_get_frame_gap_clip (x, y, width, height,
                                               frame, &bevel_clip, &frame_clip);
-       
+
        cairo_set_line_width (cr, 1.0);
        cairo_translate      (cr, x+0.5, y+0.5);
-       
+
        /* save everything */
        cairo_save (cr);
        /* Set clip for the bevel */
@@ -1123,7 +1123,7 @@ clearlooks_draw_frame            (cairo_t *cr,
                cairo_rectangle      (cr, bevel_clip.x, bevel_clip.y, bevel_clip.width, bevel_clip.height);
                cairo_clip           (cr);
        }
-       
+
        /* Draw the bevel */
        if (frame->shadow == CL_SHADOW_ETCHED_IN || frame->shadow == CL_SHADOW_ETCHED_OUT)
        {
@@ -1141,7 +1141,7 @@ clearlooks_draw_frame            (cairo_t *cr,
                shadow.shadow  = frame->shadow;
                clearlooks_draw_highlight_and_shade (cr, colors, &shadow, width, height, 0);
        }
-       
+
        /* restore the previous clip region */
        cairo_restore    (cr);
        cairo_save       (cr);
@@ -1188,7 +1188,7 @@ clearlooks_draw_tab (cairo_t *cr,
        CairoColor           hilight;
 
        cairo_pattern_t     *pattern;
-       
+
        double               radius;
        double               strip_size;
 
@@ -1199,7 +1199,7 @@ clearlooks_draw_tab (cairo_t *cr,
        cairo_clip           (cr);
        cairo_new_path       (cr);
 
-       /* Translate and set line width */      
+       /* Translate and set line width */
        cairo_set_line_width (cr, 1.0);
        cairo_translate      (cr, x+0.5, y+0.5);
 
@@ -1210,7 +1210,7 @@ clearlooks_draw_tab (cairo_t *cr,
        {
                height += 3.0;
                strip_size = 2.0/height; /* 2 pixel high strip */
-               
+
                if (tab->gap_side == CL_GAP_TOP)
                        cairo_translate (cr, 0.0, -3.0); /* gap at the other side */
        }
@@ -1218,18 +1218,18 @@ clearlooks_draw_tab (cairo_t *cr,
        {
                width += 3.0;
                strip_size = 2.0/width;
-               
+
                if (tab->gap_side == CL_GAP_LEFT)
                        cairo_translate (cr, -3.0, 0.0); /* gap at the other side */
        }
-       
+
        /* Set the fill color */
        fill = &colors->bg[params->state_type];
 
        /* Set tab shape */
        ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1,
                                    radius, params->corners);
-       
+
        /* Draw fill */
        ge_cairo_set_color (cr, fill);
        cairo_fill   (cr);
@@ -1241,15 +1241,15 @@ clearlooks_draw_tab (cairo_t *cr,
        if (!params->active)
        {
                ShadowParameters shadow;
-               
+
                shadow.shadow  = CL_SHADOW_OUT;
                shadow.corners = params->corners;
-               
+
                clearlooks_draw_highlight_and_shade (cr, colors, &shadow,
                                                     width,
                                                     height, radius);
        }
-       
+
 
        if (params->active)
        {
@@ -1260,7 +1260,7 @@ clearlooks_draw_tab (cairo_t *cr,
                                                        tab->gap_side == CL_GAP_BOTTOM ? height   : 0 );
 
                ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-               
+
                ge_shade_color (fill, 0.92, &shadow);
 
                cairo_pattern_add_color_stop_rgba  (pattern, 0.0,                               hilight.r, hilight.g, hilight.b, 0.4);
@@ -1278,9 +1278,9 @@ clearlooks_draw_tab (cairo_t *cr,
                                                        tab->gap_side == CL_GAP_TOP    ? height-2 : 0,
                                                        tab->gap_side == CL_GAP_RIGHT  ? width    : 0,
                                                        tab->gap_side == CL_GAP_BOTTOM ? height   : 0 );
-       
+
                ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-               
+
 
                cairo_pattern_add_color_stop_rgb  (pattern, 0.0,        stripe_fill->r, stripe_fill->g, stripe_fill->b);
                cairo_pattern_add_color_stop_rgb  (pattern, strip_size, stripe_fill->r, stripe_fill->g, stripe_fill->b);
@@ -1292,7 +1292,7 @@ clearlooks_draw_tab (cairo_t *cr,
        }
 
        ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-       
+
        if (params->active)
        {
                ge_cairo_set_color (cr, border2);
@@ -1304,7 +1304,7 @@ clearlooks_draw_tab (cairo_t *cr,
                                                        tab->gap_side == CL_GAP_TOP    ? height-2 : 2,
                                                        tab->gap_side == CL_GAP_RIGHT  ? width    : 2,
                                                        tab->gap_side == CL_GAP_BOTTOM ? height   : 2 );
-               
+
                cairo_pattern_add_color_stop_rgb (pattern, 0.0,        stripe_border->r, stripe_border->g, stripe_border->b);
                cairo_pattern_add_color_stop_rgb (pattern, strip_size, stripe_border->r, stripe_border->g, stripe_border->b);
                cairo_pattern_add_color_stop_rgb (pattern, strip_size, border1->r,       border1->g,       border1->b);
@@ -1335,12 +1335,12 @@ clearlooks_draw_separator (cairo_t *cr,
        {
                cairo_set_line_width  (cr, 1.0);
                cairo_translate       (cr, x, y+0.5);
-               
+
                cairo_move_to         (cr, 0.0,   0.0);
                cairo_line_to         (cr, width, 0.0);
                ge_cairo_set_color    (cr, &color);
                cairo_stroke          (cr);
-               
+
                cairo_move_to         (cr, 0.0,   1.0);
                cairo_line_to         (cr, width, 1.0);
                ge_cairo_set_color    (cr, &hilight);
@@ -1350,12 +1350,12 @@ clearlooks_draw_separator (cairo_t *cr,
        {
                cairo_set_line_width  (cr, 1.0);
                cairo_translate       (cr, x+0.5, y);
-               
+
                cairo_move_to         (cr, 0.0, 0.0);
                cairo_line_to         (cr, 0.0, height);
                ge_cairo_set_color    (cr, &color);
                cairo_stroke          (cr);
-               
+
                cairo_move_to         (cr, 1.0, 0.0);
                cairo_line_to         (cr, 1.0, height);
                ge_cairo_set_color    (cr, &hilight);
@@ -1377,12 +1377,12 @@ clearlooks_draw_list_view_header (cairo_t *cr,
        CairoColor hilight;
        CairoColor shadow;
 
-       ge_shade_color (border, 1.5, &hilight); 
-       ge_shade_color (border, 0.925, &shadow);        
+       ge_shade_color (border, 1.5, &hilight);
+       ge_shade_color (border, 0.925, &shadow);
 
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1.0);
-       
+
        /* Draw highlight */
        if (header->order == CL_ORDER_FIRST)
        {
@@ -1391,19 +1391,19 @@ clearlooks_draw_list_view_header (cairo_t *cr,
        }
        else
                cairo_move_to (cr, 0.0, 0.5);
-       
+
        cairo_line_to (cr, width, 0.5);
-       
+
        ge_cairo_set_color (cr, &hilight);
        cairo_stroke (cr);
-       
+
        /* Draw bottom border */
        cairo_move_to (cr, 0.0, height-0.5);
        cairo_line_to (cr, width, height-0.5);
        ge_cairo_set_color (cr, border);
        cairo_stroke (cr);
 
-       /* Draw bottom shade */ 
+       /* Draw bottom shade */
        pattern = cairo_pattern_create_linear (0.0, height-5.0, 0.0, height-1.0);
        cairo_pattern_add_color_stop_rgba     (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.0);
        cairo_pattern_add_color_stop_rgba     (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.3);
@@ -1412,14 +1412,14 @@ clearlooks_draw_list_view_header (cairo_t *cr,
        cairo_set_source      (cr, pattern);
        cairo_fill            (cr);
        cairo_pattern_destroy (pattern);
-       
+
        /* Draw resize grip */
        if ((params->ltr && header->order != CL_ORDER_LAST) ||
            (!params->ltr && header->order != CL_ORDER_FIRST) || header->resizable)
        {
                SeparatorParameters separator;
                separator.horizontal = FALSE;
-               
+
                if (params->ltr)
                        params->style_functions->draw_separator (cr, colors, params, &separator,
                                                                 width-1.5, 4.0, 2, height-8.0);
@@ -1445,7 +1445,7 @@ clearlooks_draw_toolbar (cairo_t *cr,
        (void) widget;
        dark  = &colors->shade[3];
        ge_shade_color (fill, 1.1, &light);
-       
+
        cairo_set_line_width (cr, 1.0);
        cairo_translate (cr, x, y);
 
@@ -1507,10 +1507,10 @@ clearlooks_draw_menubaritem (cairo_t *cr,
        CairoColor fill_shade;
        CairoColor border = colors->spot[2];
        cairo_pattern_t *pattern;
-       
+
        ge_shade_color (&border, 1.05, &border);
        ge_shade_color (fill, 0.85, &fill_shade);
-       
+
        cairo_set_line_width (cr, 1.0);
        ge_cairo_rounded_rectangle (cr, x + 0.5, y + 0.5, width - 1, height, widget->radius, widget->corners);
 
@@ -1537,7 +1537,7 @@ clearlooks_draw_selected_cell (cairo_t                  *cr,
        CairoColor border;
        cairo_pattern_t *pattern;
        cairo_save (cr);
-       
+
        cairo_translate (cr, x, y);
 
        if (params->focus)
@@ -1560,8 +1560,8 @@ clearlooks_draw_selected_cell (cairo_t                  *cr,
        cairo_fill       (cr);
 
        cairo_pattern_destroy (pattern);
-       
-       ge_shade_color(&upper_color, 0.8, &border);     
+
+       ge_shade_color(&upper_color, 0.8, &border);
 
        cairo_move_to  (cr, 0, 0.5);
        cairo_rel_line_to (cr, width, 0);
@@ -1586,18 +1586,18 @@ clearlooks_draw_scrollbar_trough (cairo_t *cr,
        CairoColor        bg_shade;
        cairo_pattern_t  *pattern;
        const CairoColor *border = &colors->shade[5];
-       
+
        (void) widget;
        bg = &colors->shade[2];
        ge_shade_color (bg, 0.95, &bg_shade);
-       
+
        cairo_set_line_width (cr, 1);
        /* cairo_translate (cr, x, y); */
-       
+
        if (scrollbar->horizontal)
                ge_cairo_exchange_axis (cr, &x, &y, &width, &height);
 
-       cairo_translate (cr, x, y);     
+       cairo_translate (cr, x, y);
 
        /* Draw fill */
        cairo_rectangle (cr, 1, 0, width-2, height);
@@ -1607,12 +1607,12 @@ clearlooks_draw_scrollbar_trough (cairo_t *cr,
        /* Draw shadow */
        pattern = cairo_pattern_create_linear (1, 0, 3, 0);
        cairo_pattern_add_color_stop_rgb (pattern, 0,   bg_shade.r, bg_shade.g, bg_shade.b);
-       cairo_pattern_add_color_stop_rgb (pattern, 1.0, bg->r,      bg->g,      bg->b); 
+       cairo_pattern_add_color_stop_rgb (pattern, 1.0, bg->r,      bg->g,      bg->b);
        cairo_rectangle (cr, 1, 0, 4, height);
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
        cairo_pattern_destroy (pattern);
-       
+
        /* Draw border */
        ge_cairo_set_color (cr, border);
        ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1);
@@ -1633,7 +1633,7 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr,
        double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
 
        ge_shade_color(&colors->shade[6], 1.05, &border);
-       
+
        if (scrollbar->horizontal)
        {
                if (stepper->stepper == CL_STEPPER_A)
@@ -1648,22 +1648,22 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr,
                else if (stepper->stepper == CL_STEPPER_D)
                        corners = CR_CORNER_BOTTOMLEFT | CR_CORNER_BOTTOMRIGHT;
        }
-       
+
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1);
-       
+
        ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, corners);
-       
+
        if (scrollbar->horizontal)
                pattern = cairo_pattern_create_linear (0, 0, 0, height);
        else
                pattern = cairo_pattern_create_linear (0, 0, width, 0);
-                               
+
        s2 = colors->bg[widget->state_type];
        ge_shade_color(&s2, 1.06, &s1);
        ge_shade_color(&s2, 0.98, &s3);
        ge_shade_color(&s2, 0.94, &s4);
-       
+
        cairo_pattern_add_color_stop_rgb(pattern, 0,    s1.r, s1.g, s1.b);
        cairo_pattern_add_color_stop_rgb(pattern, 0.5,  s2.r, s2.g, s2.b);
        cairo_pattern_add_color_stop_rgb(pattern, 0.7,  s3.r, s3.g, s3.b);
@@ -1671,15 +1671,15 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr,
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
        cairo_pattern_destroy (pattern);
-       
+
        cairo_translate (cr, 0.5, 0.5);
        clearlooks_draw_top_left_highlight (cr, &s2, widget, width, height, (stepper->stepper == CL_STEPPER_A) ? radius : 0);
        cairo_translate (cr, -0.5, -0.5);
-       
+
        ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, corners);
        clearlooks_set_border_gradient (cr, &border, 1.2, (scrollbar->horizontal ? 0 : width), (scrollbar->horizontal ? height: 0));
        cairo_stroke (cr);
-       
+
        cairo_translate (cr, 0.5, 0.5);
 }
 
@@ -1710,11 +1710,11 @@ clearlooks_draw_scrollbar_slider (cairo_t *cr,
                else
                        height += 1;
        }
-       
+
        if (!scrollbar->horizontal)
                ge_cairo_exchange_axis (cr, &x, &y, &width, &height);
 
-       cairo_translate (cr, x, y);     
+       cairo_translate (cr, x, y);
 
        if (scrollbar->has_color)
        {
@@ -1726,27 +1726,27 @@ clearlooks_draw_scrollbar_slider (cairo_t *cr,
 
                if (widget->prelight)
                        ge_shade_color (&fill, 1.1, &fill);
-                       
+
                cairo_set_line_width (cr, 1);
-               
+
                ge_shade_color (&fill, 1.3, &hilight);
                ge_shade_color (&fill, 1.1, &shade1);
                ge_shade_color (&fill, 1.05, &shade2);
                ge_shade_color (&fill, 0.98, &shade3);
-               
+
                pattern = cairo_pattern_create_linear (1, 1, 1, height-2);
                cairo_pattern_add_color_stop_rgb (pattern, 0,   shade1.r, shade1.g, shade1.b);
                cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b);
-               cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade3.r, shade3.g, shade3.b);  
+               cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade3.r, shade3.g, shade3.b);
                cairo_pattern_add_color_stop_rgb (pattern, 1,   fill.r,  fill.g,  fill.b);
                cairo_rectangle (cr, 1, 1, width-2, height-2);
                cairo_set_source (cr, pattern);
                cairo_fill (cr);
                cairo_pattern_destroy (pattern);
-               
+
                cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5);
                ge_cairo_stroke_rectangle (cr, 1.5, 1.5, width-3, height-3);
-       
+
                ge_cairo_set_color (cr, border);
                ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1);
        }
@@ -1760,12 +1760,12 @@ clearlooks_draw_scrollbar_slider (cairo_t *cr,
                int bar_x, i;
 
                ge_shade_color(&colors->shade[6], 1.05, &border);
-               
+
                s2 = colors->bg[widget->state_type];
                ge_shade_color(&s2, 1.06, &s1);
                ge_shade_color(&s2, 0.98, &s3);
                ge_shade_color(&s2, 0.94, &s4);
-       
+
                pattern = cairo_pattern_create_linear(1, 1, 1, height-1);
                cairo_pattern_add_color_stop_rgb(pattern, 0,   s1.r, s1.g, s1.b);
                cairo_pattern_add_color_stop_rgb(pattern, 0.5, s2.r, s2.g, s2.b);
@@ -1776,20 +1776,20 @@ clearlooks_draw_scrollbar_slider (cairo_t *cr,
                cairo_set_source(cr, pattern);
                cairo_fill(cr);
                cairo_pattern_destroy(pattern);
-               
+
                clearlooks_set_border_gradient (cr, &border, 1.2, 0, height);
                ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1);
-               
+
                cairo_move_to (cr, 1.5, height-1.5);
                cairo_line_to (cr, 1.5, 1.5);
                cairo_line_to (cr, width-1.5, 1.5);
                ge_shade_color (&s2, 1.3, &s5);
                cairo_set_source_rgba (cr, s5.r, s5.g, s5.b, 0.5);
                cairo_stroke(cr);
-               
+
                /* draw handles */
                cairo_set_line_width (cr, 1);
-               
+
                bar_x = width/2 - 4;
                cairo_translate(cr, 0.5, 0.5);
                for (i=0; i<3; i++)
@@ -1798,16 +1798,16 @@ clearlooks_draw_scrollbar_slider (cairo_t *cr,
                        cairo_line_to (cr, bar_x, height-5);
                        ge_cairo_set_color (cr, dark);
                        cairo_stroke (cr);
-                       
+
                        cairo_move_to (cr, bar_x+1, 4);
                        cairo_line_to (cr, bar_x+1, height-5);
                        ge_cairo_set_color (cr, light);
                        cairo_stroke (cr);
-                       
+
                        bar_x += 3;
                }
        }
-       
+
 }
 
 static void
@@ -1892,7 +1892,7 @@ clearlooks_draw_handle (cairo_t *cr,
 {
        const CairoColor *fill  = &colors->bg[params->state_type];
        int num_bars = 6; /* shut up gcc warnings */
-       
+
        switch (handle->type)
        {
                case CL_HANDLE_TOOLBAR:
@@ -1909,11 +1909,11 @@ clearlooks_draw_handle (cairo_t *cr,
                ge_cairo_set_color (cr, fill);
                cairo_fill (cr);
        }
-       
+
        cairo_translate (cr, x+0.5, y+0.5);
-       
+
        cairo_set_line_width (cr, 1);
-       
+
        if (handle->horizontal)
        {
                params->style_functions->draw_gripdots (cr, colors, 0, 0, width, height, num_bars, 2, 0.1);
@@ -2037,28 +2037,28 @@ clearlooks_draw_radiobutton (cairo_t *cr,
        cairo_pattern_add_color_stop_rgba (pt, 0.5, shadow.r, shadow.b, shadow.g, 0.5);
        cairo_pattern_add_color_stop_rgba (pt, 0.5, highlight.r, highlight.g, highlight.b, 0.5);
        cairo_pattern_add_color_stop_rgb (pt, 1.0, highlight.r, highlight.g, highlight.b);
-       
+
        cairo_translate (cr, x, y);
-       
+
        cairo_set_line_width (cr, 2);
-       cairo_arc       (cr, 7, 7, 6, 0, G_PI*2);       
+       cairo_arc       (cr, 7, 7, 6, 0, G_PI*2);
        cairo_set_source (cr, pt);
        cairo_stroke (cr);
        cairo_pattern_destroy (pt);
 
        cairo_set_line_width (cr, 1);
 
-       cairo_arc       (cr, 7, 7, 5.5, 0, G_PI*2);     
-       
+       cairo_arc       (cr, 7, 7, 5.5, 0, G_PI*2);
+
        if (!widget->disabled)
        {
                ge_cairo_set_color (cr, &colors->base[0]);
                cairo_fill_preserve (cr);
        }
-       
+
        ge_cairo_set_color (cr, border);
        cairo_stroke (cr);
-       
+
        if (draw_bullet)
        {
                if (inconsistent)
@@ -2077,7 +2077,7 @@ clearlooks_draw_radiobutton (cairo_t *cr,
                        cairo_arc (cr, 7, 7, 3, 0, G_PI*2);
                        ge_cairo_set_color (cr, dot);
                        cairo_fill (cr);
-               
+
                        cairo_arc (cr, 6, 6, 1, 0, G_PI*2);
                        cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5);
                        cairo_fill (cr);
@@ -2099,7 +2099,7 @@ clearlooks_draw_checkbox (cairo_t *cr,
 
        inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
        draw_bullet |= inconsistent;
-       
+
        if (widget->disabled)
        {
                border = &colors->shade[5];
@@ -2113,11 +2113,11 @@ clearlooks_draw_checkbox (cairo_t *cr,
 
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1);
-       
+
        if (widget->xthickness > 2 && widget->ythickness > 2)
        {
                widget->style_functions->draw_inset (cr, &widget->parentbg, 0.5, 0.5, width-1, height-1, 1, CR_CORNER_ALL);
-               
+
                /* Draw the rectangle for the checkbox itself */
                ge_cairo_rounded_rectangle (cr, 1.5, 1.5, width-3, height-3, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL);
        }
@@ -2126,13 +2126,13 @@ clearlooks_draw_checkbox (cairo_t *cr,
                /* Draw the rectangle for the checkbox itself */
                ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL);
        }
-       
+
        if (!widget->disabled)
        {
                ge_cairo_set_color (cr, &colors->base[0]);
                cairo_fill_preserve (cr);
        }
-       
+
        ge_cairo_set_color (cr, border);
        cairo_stroke (cr);
 
@@ -2149,13 +2149,13 @@ clearlooks_draw_checkbox (cairo_t *cr,
                        cairo_set_line_width (cr, 1.7);
                        cairo_move_to (cr, 0.5 + (width*0.2), (height*0.5));
                        cairo_line_to (cr, 0.5 + (width*0.4), (height*0.7));
-               
+
                        cairo_curve_to (cr, 0.5 + (width*0.4), (height*0.7),
                                            0.5 + (width*0.5), (height*0.4),
                                            0.5 + (width*0.70), (height*0.25));
 
                }
-               
+
                ge_cairo_set_color (cr, dot);
                cairo_stroke (cr);
        }
@@ -2174,7 +2174,7 @@ clearlooks_draw_normal_arrow (cairo_t *cr, const CairoColor *color,
        arrow_width = MIN (height * 2.0 + MAX (1.0, ceil (height * 2.0 / 6.0 * 2.0) / 2.0) / 2.0, width);
        line_width_2 = MAX (1.0, ceil (arrow_width / 6.0 * 2.0) / 2.0) / 2.0;
        arrow_height = arrow_width / 2.0 + line_width_2;
-       
+
        cairo_translate (cr, x, y - arrow_height / 2.0);
 
        cairo_move_to (cr, -arrow_width / 2.0, line_width_2);
@@ -2185,10 +2185,10 @@ clearlooks_draw_normal_arrow (cairo_t *cr, const CairoColor *color,
        cairo_line_to (cr, arrow_width / 2.0, line_width_2);
        cairo_line_to (cr, 0, arrow_height);
        cairo_close_path (cr);
-       
+
        ge_cairo_set_color (cr, color);
        cairo_fill (cr);
-       
+
        cairo_restore (cr);
 }
 
@@ -2199,13 +2199,13 @@ clearlooks_draw_combo_arrow (cairo_t *cr, const CairoColor *color,
        double arrow_width = MIN (height * 2 / 3.0, width);
        double arrow_height = arrow_width / 2.0;
        double gap_size = 1.0 * arrow_height;
-       
+
        cairo_save (cr);
        cairo_translate (cr, x, y - (arrow_height + gap_size) / 2.0);
        cairo_rotate (cr, G_PI);
        clearlooks_draw_normal_arrow (cr, color, 0, 0, arrow_width, arrow_height);
        cairo_restore (cr);
-       
+
        clearlooks_draw_normal_arrow (cr, color, x, y + (arrow_height + gap_size) / 2.0, arrow_width, arrow_height);
 }
 
@@ -2215,7 +2215,7 @@ _clearlooks_draw_arrow (cairo_t *cr, const CairoColor *color,
                         double x, double y, double width, double height)
 {
        double rotate;
-       
+
        if (dir == CL_DIRECTION_LEFT)
                rotate = G_PI*1.5;
        else if (dir == CL_DIRECTION_RIGHT)
@@ -2226,11 +2226,11 @@ _clearlooks_draw_arrow (cairo_t *cr, const CairoColor *color,
                rotate = 0;
        else
                return;
-       
+
        if (type == CL_ARROW_NORMAL)
        {
                cairo_translate (cr, x, y);
-               cairo_rotate (cr, -rotate);             
+               cairo_rotate (cr, -rotate);
                clearlooks_draw_normal_arrow (cr, color, 0, 0, width, height);
        }
        else if (type == CL_ARROW_COMBO)
@@ -2249,10 +2249,10 @@ clearlooks_draw_arrow (cairo_t *cr,
 {
        const CairoColor *color = &colors->fg[widget->state_type];
        gdouble tx, ty;
-       
+
        tx = x + width/2.0;
        ty = y + height/2.0;
-       
+
        if (widget->disabled)
        {
                _clearlooks_draw_arrow (cr, &colors->shade[0],
@@ -2261,7 +2261,7 @@ clearlooks_draw_arrow (cairo_t *cr,
        }
 
        cairo_identity_matrix (cr);
-       
+
        _clearlooks_draw_arrow (cr, color, arrow->direction, arrow->type,
                                tx, ty, width, height);
 }
index 164ea2b33aafc5e7f74c77626d23d14f6dd71da7..cf3c96a4515b63cb74734f098273303c358b700b 100644 (file)
@@ -60,7 +60,7 @@ clearlooks_draw_glossy_gradient (cairo_t         *cr,
        cairo_set_source (cr, pt);
        ge_cairo_rounded_rectangle (cr, x, y, width, height, radius, corners);
        cairo_fill (cr);
-       
+
        cairo_pattern_destroy (pt);
 }
 
@@ -203,42 +203,42 @@ clearlooks_glossy_draw_highlight_and_shade (cairo_t          *cr,
        /* not really sure of shading ratios... we will think */
        ge_shade_color (bg_color, 0.8, &shadow);
        ge_shade_color (bg_color, 1.2, &highlight);
-       
+
        cairo_save (cr);
-       
+
        /* Top/Left highlight */
        if (corners & CR_CORNER_BOTTOMLEFT)
                cairo_move_to (cr, x, y+height-radius);
        else
                cairo_move_to (cr, x, y+height);
-       
+
        ge_cairo_rounded_corner (cr, x, y, radius, corners & CR_CORNER_TOPLEFT);
 
        if (corners & CR_CORNER_TOPRIGHT)
                cairo_line_to (cr, x+width-radius, y);
        else
                cairo_line_to (cr, x+width, y);
-       
+
        if (params->shadow & CL_SHADOW_OUT)
                cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5);
        else
                cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.5);
-       
+
        cairo_stroke (cr);
-       
+
        /* Bottom/Right highlight -- this includes the corners */
        cairo_move_to (cr, x+width-radius, y); /* topright and by radius to the left */
        ge_cairo_rounded_corner (cr, x+width, y, radius, corners & CR_CORNER_TOPRIGHT);
        ge_cairo_rounded_corner (cr, x+width, y+height, radius, corners & CR_CORNER_BOTTOMRIGHT);
        ge_cairo_rounded_corner (cr, x, y+height, radius, corners & CR_CORNER_BOTTOMLEFT);
-       
+
        if (params->shadow & CL_SHADOW_OUT)
                cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.5);
        else
                cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5);
-       
+
        cairo_stroke (cr);
-       
+
        cairo_restore (cr);
 }
 
@@ -255,7 +255,7 @@ clearlooks_glossy_draw_button (cairo_t *cr,
        double radius;
 
        cairo_pattern_t *pattern;
-       
+
        cairo_save (cr);
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1.0);
@@ -293,7 +293,7 @@ clearlooks_glossy_draw_button (cairo_t *cr,
                        ge_cairo_set_color (cr, &glow);
                        cairo_stroke (cr);
                }
-               
+
                /* if (!(params->enable_glow && !params->active && !params->disabled)) */
                if (!(params->prelight && params->enable_glow && !params->active)) {
                        if (!(params->disabled))
@@ -308,7 +308,7 @@ clearlooks_glossy_draw_button (cairo_t *cr,
        clearlooks_draw_glossy_gradient (cr, xoffset+1, yoffset+1,
                                      width-(xoffset*2)-2, height-(yoffset*2)-2,
                                      &fill, params->disabled, radius, params->corners);
-       
+
        /* Pressed button shadow */
        if (params->active)
        {
@@ -320,16 +320,16 @@ clearlooks_glossy_draw_button (cairo_t *cr,
                ge_cairo_rounded_rectangle (cr, xoffset+1, yoffset+1, width-(xoffset*2)-2, height, radius, params->corners & (CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMLEFT));
                cairo_clip (cr);
                cairo_rectangle (cr, xoffset+1, yoffset+1, width-(xoffset*2)-2, 3);
-       
+
                pattern = cairo_pattern_create_linear (xoffset+1, yoffset+1, xoffset+1, yoffset+4);
                cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.58);
                cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0);
                cairo_set_source (cr, pattern);
                cairo_fill (cr);
                cairo_pattern_destroy (pattern);
-               
+
                cairo_rectangle (cr, xoffset+1, yoffset+1, 3, height-(yoffset*2)-2);
-       
+
                pattern = cairo_pattern_create_linear (xoffset+1, yoffset+1, xoffset+4, yoffset+1);
                cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.58);
                cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0);
@@ -339,13 +339,13 @@ clearlooks_glossy_draw_button (cairo_t *cr,
 
                cairo_restore (cr);
        }
-       
+
        /* Default button highlight */
        if (params->is_default && !params->active && !params->disabled)
        {
                const CairoColor *glow = &colors->spot[0];
                double hh = (height-5)/2.0 + 1;
-               
+
                cairo_rectangle (cr, 3.5, 3.5, width-7, height-7);
                ge_cairo_set_color (cr, glow);
                cairo_stroke (cr);
@@ -355,7 +355,7 @@ clearlooks_glossy_draw_button (cairo_t *cr,
                cairo_rel_line_to (cr, width-5, 0); cairo_rel_line_to (cr, 0, hh);
                ge_cairo_set_color (cr, glow);
                cairo_stroke (cr);
-               
+
                hh--;
 
                glow = &colors->spot[1];
@@ -364,7 +364,7 @@ clearlooks_glossy_draw_button (cairo_t *cr,
                ge_cairo_set_color (cr, glow);
                cairo_stroke (cr);
        }
-       
+
        /* Border */
        if (params->is_default || (params->prelight && params->enable_glow))
                border_normal = colors->spot[2];
@@ -390,14 +390,14 @@ clearlooks_glossy_draw_progressbar_trough (cairo_t *cr,
        CairoColor        shadow;
        cairo_pattern_t  *pattern;
        double           radius = MIN (params->radius, MIN ((height-2.0) / 2.0, (width-2.0) / 2.0));
-       
+
        cairo_save (cr);
 
        cairo_set_line_width (cr, 1.0);
-       
+
        /* Fill with bg color */
        ge_cairo_set_color (cr, &colors->bg[params->state_type]);
-       
+
        cairo_rectangle (cr, x, y, width, height);
        cairo_fill (cr);
 
@@ -474,7 +474,7 @@ clearlooks_glossy_draw_progressbar_fill (cairo_t *cr,
 
        stroke_width = height*2;
        x_step = (((float)stroke_width/10)*offset); /* This looks weird ... */
-       
+
        cairo_translate (cr, x, y);
 
        cairo_save (cr);
@@ -505,16 +505,16 @@ clearlooks_glossy_draw_progressbar_fill (cairo_t *cr,
                cairo_line_to (cr, stroke_width-x_step,   0);
                cairo_line_to (cr, stroke_width/2-x_step, height);
                cairo_line_to (cr, -x_step, height);
-               
+
                cairo_translate (cr, stroke_width, 0);
                tile_pos += stroke_width;
        }
-       
+
        cairo_set_source_rgba (cr, colors->spot[2].r,
                                   colors->spot[2].g,
                                   colors->spot[2].b,
                                   0.15);
-       
+
        cairo_fill (cr);
        cairo_restore (cr); /* rounded clip region */
 
@@ -592,7 +592,7 @@ clearlooks_glossy_draw_progressbar_fill (cairo_t *cr,
                ge_cairo_set_color (cr, &shadow);
                cairo_stroke (cr);
        }
-       
+
        cairo_restore (cr);
 
        cairo_restore (cr); /* rotation, mirroring */
@@ -616,7 +616,7 @@ clearlooks_glossy_scale_draw_gradient (cairo_t *cr,
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
        cairo_pattern_destroy (pattern);
-       
+
        clearlooks_set_mixed_color (cr, c3, c1, 0.3);
        ge_cairo_stroke_rectangle (cr, x, y, width, height);
 }
@@ -636,7 +636,7 @@ clearlooks_glossy_draw_scale_trough (cairo_t *cr,
        {
                trough_width  = width-3;
                trough_height = TROUGH_SIZE-2;
-               
+
                translate_x   = x + 0.5;
                translate_y   = y + 0.5 + (height/2) - (TROUGH_SIZE/2);
        }
@@ -644,7 +644,7 @@ clearlooks_glossy_draw_scale_trough (cairo_t *cr,
        {
                trough_width  = TROUGH_SIZE-2;
                trough_height = height-3;
-               
+
                translate_x   = x + 0.5 + (width/2) - (TROUGH_SIZE/2);
                translate_y  = y + 0.5;
        }
@@ -654,9 +654,9 @@ clearlooks_glossy_draw_scale_trough (cairo_t *cr,
 
        if (!slider->fill_level)
                params->style_functions->draw_inset (cr, &params->parentbg, 0, 0, trough_width+2, trough_height+2, 0, 0);
-       
+
        cairo_translate (cr, 1, 1);
-       
+
        if (!slider->lower && !slider->fill_level)
                clearlooks_glossy_scale_draw_gradient (cr, &colors->shade[3], /* top */
                                                    &colors->shade[2], /* bottom */
@@ -686,7 +686,7 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        CairoColor           hilight;
 
        cairo_pattern_t     *pattern;
-       
+
        double               radius;
 
        radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
@@ -706,25 +706,25 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM)
        {
                height += 3.0;
-               
+
                if (tab->gap_side == CL_GAP_TOP)
                        cairo_translate (cr, 0.0, -3.0); /* gap at the other side */
        }
        else
        {
                width += 3.0;
-               
+
                if (tab->gap_side == CL_GAP_LEFT)
                        cairo_translate (cr, -3.0, 0.0); /* gap at the other side */
        }
-       
+
        /* Set the fill color */
        fill = &colors->bg[params->state_type];
 
        /* Set tab shape */
        ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1,
                                    radius, params->corners);
-       
+
        /* Draw fill */
        ge_cairo_set_color (cr, fill);
        cairo_fill   (cr);
@@ -735,10 +735,10 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        if (!params->active)
        {
                ShadowParameters shadow;
-               
+
                shadow.shadow  = CL_SHADOW_OUT;
                shadow.corners = params->corners;
-               
+
                clearlooks_glossy_draw_highlight_and_shade (cr, &colors->bg[0], &shadow,
                                                     width,
                                                     height, radius);
@@ -754,7 +754,7 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
                                                       tab->gap_side == CL_GAP_BOTTOM ? height   : 0);
 
                ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-               
+
                ge_shade_color (fill, 1.06, &shadow);
                ge_shade_color (fill, 1.18, &hilight);
                ge_shade_color (fill, 1.12, &f1);
@@ -777,9 +777,9 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
                                                       tab->gap_side == CL_GAP_TOP    ? height-2 : 0,
                                                       tab->gap_side == CL_GAP_RIGHT  ? width    : 0,
                                                       tab->gap_side == CL_GAP_BOTTOM ? height   : 0);
-       
+
                ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-               
+
 
                cairo_pattern_add_color_stop_rgba (pattern, 0.0, stripe_fill->r, stripe_fill->g, stripe_fill->b, 0.5);
                cairo_pattern_add_color_stop_rgba (pattern, 0.8, fill->r, fill->g, fill->b, 0.0);
@@ -789,7 +789,7 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        }
 
        ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-       
+
        if (params->active)
        {
                ge_cairo_set_color (cr, border);
@@ -801,7 +801,7 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
                                                       tab->gap_side == CL_GAP_TOP    ? height-2 : 2,
                                                       tab->gap_side == CL_GAP_RIGHT  ? width    : 2,
                                                       tab->gap_side == CL_GAP_BOTTOM ? height   : 2);
-               
+
                cairo_pattern_add_color_stop_rgb (pattern, 0.0, stripe_border->r, stripe_border->g, stripe_border->b);
                cairo_pattern_add_color_stop_rgb (pattern, 0.8, border->r,        border->g,        border->b);
                cairo_set_source (cr, pattern);
@@ -822,7 +822,7 @@ clearlooks_glossy_draw_slider (cairo_t *cr,
        CairoColor  a, b, c, d;
        cairo_pattern_t *pattern;
 
-       cairo_set_line_width (cr, 1.0); 
+       cairo_set_line_width (cr, 1.0);
        cairo_translate      (cr, x, y);
 
        cairo_translate (cr, -0.5, -0.5);
@@ -840,7 +840,7 @@ clearlooks_glossy_draw_slider (cairo_t *cr,
        pattern = cairo_pattern_create_linear (1, 1, 1, height-2);
        cairo_pattern_add_color_stop_rgb (pattern, 0,   a.r, a.g, a.b);
        cairo_pattern_add_color_stop_rgb (pattern, 0.5, b.r, b.g, b.b);
-       cairo_pattern_add_color_stop_rgb (pattern, 0.5, c.r, c.g, c.b); 
+       cairo_pattern_add_color_stop_rgb (pattern, 0.5, c.r, c.g, c.b);
        cairo_pattern_add_color_stop_rgb (pattern, 1.0, d.r, d.g, d.b);
        cairo_rectangle (cr, 1, 1, width-2, height-2);
        cairo_set_source (cr, pattern);
@@ -868,12 +868,12 @@ clearlooks_glossy_draw_slider_button (cairo_t *cr,
        double radius = MIN (params->radius, MIN ((width - 1.0) / 2.0, (height - 1.0) / 2.0));
 
        cairo_set_line_width (cr, 1.0);
-       
+
        if (!slider->horizontal)
                ge_cairo_exchange_axis (cr, &x, &y, &width, &height);
 
        cairo_translate (cr, x+0.5, y+0.5);
-       
+
        params->style_functions->draw_shadow (cr, colors, radius, width-1, height-1);
        params->style_functions->draw_slider (cr, colors, params, 1, 1, width-2, height-2);
 }
@@ -891,7 +891,7 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr,
        CairoColor  fill, s1, s2, s4;
        cairo_pattern_t *pattern;
        double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
-       
+
        if (scrollbar->horizontal)
        {
                if (stepper->stepper == CL_STEPPER_A)
@@ -906,22 +906,22 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr,
                else if (stepper->stepper == CL_STEPPER_D)
                        corners = CR_CORNER_BOTTOMLEFT | CR_CORNER_BOTTOMRIGHT;
        }
-       
+
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1);
-       
+
        ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, corners);
-       
+
        if (scrollbar->horizontal)
                pattern = cairo_pattern_create_linear (0, 0, 0, height);
        else
                pattern = cairo_pattern_create_linear (0, 0, width, 0);
-                               
+
        fill = colors->bg[widget->state_type];
        ge_shade_color(&fill, 1.16, &s1);
        ge_shade_color(&fill, 1.08, &s2);
        ge_shade_color(&fill, 1.08, &s4);
-       
+
        cairo_pattern_add_color_stop_rgb(pattern, 0,    s1.r, s1.g, s1.b);
        cairo_pattern_add_color_stop_rgb(pattern, 0.5,  s2.r, s2.g, s2.b);
        cairo_pattern_add_color_stop_rgb(pattern, 0.5,  fill.r, fill.g, fill.b);
@@ -929,16 +929,16 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr,
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
        cairo_pattern_destroy (pattern);
-       
+
        cairo_translate (cr, 0.5, 0.5);
        cairo_translate (cr, -0.5, -0.5);
-       
+
        ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, corners);
        clearlooks_set_mixed_color (cr, border, &fill, 0.2);
        if (widget->prelight)
                ge_cairo_set_color (cr, &colors->spot[2]);
        cairo_stroke (cr);
-       
+
        cairo_translate (cr, 0.5, 0.5);
 }
 
@@ -975,7 +975,7 @@ clearlooks_glossy_draw_scrollbar_slider (cairo_t *cr,
                else
                        height += 1;
        }
-       
+
        if (!scrollbar->horizontal)
                ge_cairo_exchange_axis (cr, &x, &y, &width, &height);
 
@@ -983,14 +983,14 @@ clearlooks_glossy_draw_scrollbar_slider (cairo_t *cr,
 
        if (widget->prelight)
                ge_shade_color (&fill, 1.1, &fill);
-               
+
        cairo_set_line_width (cr, 1);
-       
+
        ge_shade_color (&fill, 1.25, &hilight);
        ge_shade_color (&fill, 1.16, &shade1);
        ge_shade_color (&fill, 1.08, &shade2);
        ge_shade_color (&fill, 1.08, &shade3);
-       
+
        pattern = cairo_pattern_create_linear (1, 1, 1, height-2);
        cairo_pattern_add_color_stop_rgb (pattern, 0,   shade1.r, shade1.g, shade1.b);
        cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b);
@@ -1000,7 +1000,7 @@ clearlooks_glossy_draw_scrollbar_slider (cairo_t *cr,
        cairo_set_source (cr, pattern);
        cairo_fill (cr);
        cairo_pattern_destroy (pattern);
-       
+
        if (scrollbar->has_color)
        {
                cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5);
@@ -1050,7 +1050,7 @@ clearlooks_glossy_draw_list_view_header (cairo_t *cr,
        cairo_fill (cr);
 
        cairo_pattern_destroy (pattern);
-       
+
        /* Draw highlight */
        if (header->order == CL_ORDER_FIRST)
        {
@@ -1059,19 +1059,19 @@ clearlooks_glossy_draw_list_view_header (cairo_t *cr,
        }
        else
                cairo_move_to (cr, 0.0, 0.5);
-       
+
        cairo_line_to (cr, width, 0.5);
-       
+
        cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5);
        cairo_stroke (cr);
-       
+
        /* Draw resize grip */
        if ((params->ltr && header->order != CL_ORDER_LAST) ||
            (!params->ltr && header->order != CL_ORDER_FIRST) || header->resizable)
        {
                SeparatorParameters separator;
                separator.horizontal = FALSE;
-               
+
                if (params->ltr)
                        params->style_functions->draw_separator (cr, colors, params, &separator,
                                                                 width-1.5, 4.0, 2, height-8.0);
@@ -1090,7 +1090,7 @@ clearlooks_glossy_draw_toolbar (cairo_t *cr,
 {
        CairoColor light;
        const CairoColor *dark;
-       
+
        const CairoColor *fill  = &colors->bg[GTK_STATE_NORMAL];
        dark  = &colors->shade[3];
 
@@ -1099,15 +1099,15 @@ clearlooks_glossy_draw_toolbar (cairo_t *cr,
        (void) height;
 
        ge_shade_color (fill, 1.1, &light);
-       
+
        cairo_set_line_width (cr, 1.0);
        cairo_translate (cr, x, y);
-       
+
        if (toolbar->style == 1) /* Enable Extra features */
        {
                cairo_pattern_t *pattern;
                CairoColor shade1, shade2, shade3;
-               
+
                ge_shade_color (fill, 1.08, &shade1);
                ge_shade_color (fill, 1.04, &shade2);
                ge_shade_color (fill, 1.04, &shade3);
@@ -1137,7 +1137,7 @@ clearlooks_glossy_draw_toolbar (cairo_t *cr,
                        cairo_line_to       (cr, width-1, 0.5);
                        ge_cairo_set_color  (cr, &light);
                        cairo_stroke        (cr);
-               }       
+               }
        }
 
        /* Draw shadow */
@@ -1271,9 +1271,9 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
        cairo_pattern_add_color_stop_rgba (pt, 0.5, shadow.r, shadow.b, shadow.g, 0.5);
        cairo_pattern_add_color_stop_rgba (pt, 0.5, highlight.r, highlight.g, highlight.b, 0.5);
        cairo_pattern_add_color_stop_rgb (pt, 1.0, highlight.r, highlight.g, highlight.b);
-       
+
        cairo_translate (cr, x, y);
-       
+
        cairo_set_line_width (cr, 2);
        cairo_arc       (cr, 7, 7, 6, 0, G_PI*2);
        cairo_set_source (cr, pt);
@@ -1283,19 +1283,19 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
        cairo_set_line_width (cr, 1);
 
        cairo_arc       (cr, 7, 7, 5.5, 0, G_PI*2);
-       
+
        if (!widget->disabled)
        {
                if (widget->prelight)
                        clearlooks_set_mixed_color (cr, &colors->base[0], &colors->spot[1], 0.5);
-               else            
+               else
                        ge_cairo_set_color (cr, &colors->base[0]);
                cairo_fill_preserve (cr);
        }
-       
+
        ge_cairo_set_color (cr, border);
        cairo_stroke (cr);
-       
+
        if (draw_bullet)
        {
                if (inconsistent)
@@ -1314,7 +1314,7 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
                        cairo_arc (cr, 7, 7, 3, 0, G_PI*2);
                        ge_cairo_set_color (cr, dot);
                        cairo_fill (cr);
-               
+
                        cairo_arc (cr, 6, 6, 1, 0, G_PI*2);
                        cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5);
                        cairo_fill (cr);
@@ -1336,7 +1336,7 @@ clearlooks_glossy_draw_checkbox (cairo_t *cr,
 
        inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
        draw_bullet |= inconsistent;
-       
+
        if (widget->disabled)
        {
                border = &colors->shade[5];
@@ -1346,19 +1346,19 @@ clearlooks_glossy_draw_checkbox (cairo_t *cr,
        {
                if (widget->prelight)
                        border = &colors->spot[2];
-               else            
+               else
                        border = &colors->shade[6];
                dot    = &colors->text[GTK_STATE_NORMAL];
        }
 
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1);
-       
+
        if (widget->xthickness > 2 && widget->ythickness > 2)
        {
                widget->style_functions->draw_inset (cr, &widget->parentbg, 0.5, 0.5,
                                            width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL);
-               
+
                /* Draw the rectangle for the checkbox itself */
                ge_cairo_rounded_rectangle (cr, 1.5, 1.5,
                                   width-3, height-3, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL);
@@ -1369,7 +1369,7 @@ clearlooks_glossy_draw_checkbox (cairo_t *cr,
                ge_cairo_rounded_rectangle (cr, 0.5, 0.5,
                                   width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL);
        }
-       
+
        if (!widget->disabled)
        {
                if (widget->prelight)
@@ -1378,7 +1378,7 @@ clearlooks_glossy_draw_checkbox (cairo_t *cr,
                        ge_cairo_set_color (cr, &colors->base[0]);
                cairo_fill_preserve (cr);
        }
-       
+
        ge_cairo_set_color (cr, border);
        cairo_stroke (cr);
 
@@ -1395,13 +1395,13 @@ clearlooks_glossy_draw_checkbox (cairo_t *cr,
                        cairo_set_line_width (cr, 1.7);
                        cairo_move_to (cr, 0.5 + (width*0.2), (height*0.5));
                        cairo_line_to (cr, 0.5 + (width*0.4), (height*0.7));
-               
+
                        cairo_curve_to (cr, 0.5 + (width*0.4), (height*0.7),
                                            0.5 + (width*0.5), (height*0.4),
                                            0.5 + (width*0.70), (height*0.25));
 
                }
-               
+
                ge_cairo_set_color (cr, dot);
                cairo_stroke (cr);
        }
index 748d16346873a5eeda12197bcc0268c9a9b39b75..97aca7eeac1b6e7767558b36e232ec8837a7edcd 100644 (file)
@@ -123,7 +123,7 @@ clearlooks_gummy_draw_highlight_and_shade (cairo_t                *cr,
                cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5);
        else
                cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.5);
-               
+
        cairo_stroke (cr);
 
        /* Bottom/Right highlight -- this includes the corners */
@@ -465,7 +465,7 @@ clearlooks_gummy_draw_progressbar_fill (cairo_t                     *cr,
                cairo_line_to (cr, stroke_width-x_step,   0);
                cairo_line_to (cr, stroke_width/2-x_step, height);
                cairo_line_to (cr, -x_step, height);
-               
+
                cairo_translate (cr, stroke_width, 0);
                tile_pos += stroke_width;
        }
@@ -846,7 +846,7 @@ clearlooks_gummy_draw_slider (cairo_t                *cr,
        int bar_x, i;
        int shift_x;
 
-       cairo_set_line_width (cr, 1.0); 
+       cairo_set_line_width (cr, 1.0);
        cairo_translate      (cr, x, y);
 
        cairo_translate (cr, -0.5, -0.5);
@@ -1445,7 +1445,7 @@ clearlooks_gummy_draw_checkbox (cairo_t                  *cr,
        {
                if (widget->prelight)
                        border = &colors->spot[2];
-               else            
+               else
                        border = &colors->shade[6];
                dot    = &colors->text[GTK_STATE_NORMAL];
        }
@@ -1457,7 +1457,7 @@ clearlooks_gummy_draw_checkbox (cairo_t                  *cr,
        {
                widget->style_functions->draw_inset (cr, &widget->parentbg, 0.5, 0.5,
                                   width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL);
-               
+
                /* Draw the rectangle for the checkbox itself */
                ge_cairo_rounded_rectangle (cr, 1.5, 1.5,
                                   width-3, height-3, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL);
@@ -1468,12 +1468,12 @@ clearlooks_gummy_draw_checkbox (cairo_t                  *cr,
                ge_cairo_rounded_rectangle (cr, 0.5, 0.5,
                                   width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL);
        }
-       
+
        if (!widget->disabled)
-       {               
+       {
                if (widget->prelight)
                        clearlooks_set_mixed_color (cr, &colors->base[0], &colors->spot[1], 0.5);
-               else            
+               else
                        ge_cairo_set_color (cr, &colors->base[0]);
                cairo_fill_preserve (cr);
        }
index 6b8939ce513f296096cf12190b75c6fa1ea2acff..2156b841b065839de3cb8d9cfd536555a582d8cc 100644 (file)
@@ -63,7 +63,7 @@ clearlooks_set_border_gradient (cairo_t *cr, const CairoColor *color, double hil
        pattern = cairo_pattern_create_linear (0, 0, width, height);
        cairo_pattern_add_color_stop_rgb (pattern, 0, color->r, color->g, color->b);
        cairo_pattern_add_color_stop_rgb (pattern, 1, bottom_shade.r, bottom_shade.g, bottom_shade.b);
-       
+
        cairo_set_source (cr, pattern);
        cairo_pattern_destroy (pattern);
 }
@@ -76,16 +76,16 @@ clearlooks_inverted_draw_button (cairo_t *cr,
 {
        double xoffset = 0, yoffset = 0;
        double radius = params->radius;
-       const CairoColor *fill = &colors->bg[params->state_type];       
+       const CairoColor *fill = &colors->bg[params->state_type];
        const CairoColor *border_disabled = &colors->shade[4];
        CairoColor border_normal;
        CairoColor shadow;
 
        ge_shade_color(&colors->shade[6], 1.05, &border_normal);
        ge_shade_color (&border_normal, 0.925, &shadow);
-       
+
        cairo_save (cr);
-       
+
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1.0);
 
@@ -104,21 +104,21 @@ clearlooks_inverted_draw_button (cairo_t *cr,
                cairo_translate (cr, 0.5, 0.5);
                params->style_functions->draw_inset (cr, &params->parentbg, 0, 0, width-1, height-1, radius+1, params->corners);
                cairo_translate (cr, -0.5, -0.5);
-       }               
-       
+       }
+
        ge_cairo_rounded_rectangle (cr, xoffset+1, yoffset+1,
                                             width-(xoffset*2)-2,
                                             height-(yoffset*2)-2,
                                             radius, params->corners);
-       
+
        if (!params->active)
        {
                cairo_pattern_t *pattern;
 
                CairoColor top_shade, bottom_shade;
-               ge_shade_color (fill, 0.95, &top_shade);                
+               ge_shade_color (fill, 0.95, &top_shade);
                ge_shade_color (fill, 1.05, &bottom_shade);
-               
+
                pattern = cairo_pattern_create_linear (0, 0, 0, height);
                cairo_pattern_add_color_stop_rgb (pattern, 0.0, top_shade.r, top_shade.g, top_shade.b);
                cairo_pattern_add_color_stop_rgb (pattern, 1.0, bottom_shade.r, bottom_shade.g, bottom_shade.b);
@@ -129,7 +129,7 @@ clearlooks_inverted_draw_button (cairo_t *cr,
        else
        {
                cairo_pattern_t *pattern;
-               
+
                ge_cairo_set_color (cr, fill);
                cairo_fill_preserve (cr);
 
@@ -168,7 +168,7 @@ clearlooks_inverted_draw_button (cairo_t *cr,
                ge_cairo_set_color (cr, d);
                ge_cairo_stroke_rectangle (cr, 3.5, 3.5, width-7, height-7);
        }
-       
+
        if (params->disabled)
                        ge_cairo_set_color (cr, border_disabled);
        else
@@ -176,12 +176,12 @@ clearlooks_inverted_draw_button (cairo_t *cr,
                        clearlooks_set_border_gradient (cr, &border_normal, 1.32, 0, height);
                else
                        ge_cairo_set_color (cr, &border_normal);
-       
+
        ge_cairo_rounded_rectangle (cr, xoffset + 0.5, yoffset + 0.5,
                                   width-(xoffset*2)-1, height-(yoffset*2)-1,
                                   radius, params->corners);
        cairo_stroke (cr);
-       
+
        /* Draw the "shadow" */
        if (!params->active)
        {
@@ -191,7 +191,7 @@ clearlooks_inverted_draw_button (cairo_t *cr,
                cairo_line_to (cr, width-params->xthickness, height - params->ythickness - 1);
                cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.1);
                cairo_stroke (cr);
-               
+
                /* Draw topleft shadow */
                clearlooks_draw_top_left_highlight (cr, fill, params, width, height, radius);
        }
@@ -233,7 +233,7 @@ clearlooks_inverted_draw_progressbar_fill (cairo_t *cr,
 
        stroke_width = height*2;
        x_step = (((float)stroke_width/10)*offset); /* This looks weird ... */
-       
+
        cairo_translate (cr, x, y);
 
        cairo_save (cr);
@@ -244,7 +244,7 @@ clearlooks_inverted_draw_progressbar_fill (cairo_t *cr,
        ge_cairo_rounded_rectangle (cr, -radius, 0, width + radius, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT);
        cairo_clip (cr);
 
-               
+
        ge_shade_color (&colors->spot[1], 1.05, &top_shade);
 
        /* Draw the background gradient */
@@ -264,16 +264,16 @@ clearlooks_inverted_draw_progressbar_fill (cairo_t *cr,
                cairo_line_to (cr, stroke_width-x_step,   0);
                cairo_line_to (cr, stroke_width/2-x_step, height);
                cairo_line_to (cr, -x_step, height);
-               
+
                cairo_translate (cr, stroke_width, 0);
                tile_pos += stroke_width;
        }
-       
+
        cairo_set_source_rgba (cr, colors->spot[2].r,
                                   colors->spot[2].g,
                                   colors->spot[2].b,
                                   0.15);
-       
+
        cairo_fill (cr);
        cairo_restore (cr); /* rounded clip region */
 
@@ -353,7 +353,7 @@ clearlooks_inverted_draw_progressbar_fill (cairo_t *cr,
                ge_cairo_set_color (cr, &shadow);
                cairo_stroke (cr);
        }
-       
+
        cairo_restore (cr);
 
        cairo_restore (cr); /* rotation, mirroring */
@@ -398,10 +398,10 @@ clearlooks_inverted_draw_menubaritem (cairo_t *cr,
        CairoColor fill_shade;
        CairoColor border = colors->spot[2];
        cairo_pattern_t *pattern;
-       
+
        ge_shade_color (&border, 1.05, &border);
        ge_shade_color (fill, 0.85, &fill_shade);
-       
+
        cairo_set_line_width (cr, 1.0);
        ge_cairo_rounded_rectangle (cr, x + 0.5, y + 0.5, width - 1, height, widget->radius, widget->corners);
 
@@ -433,7 +433,7 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
        CairoColor           shadow;
 
        cairo_pattern_t     *pattern;
-       
+
        double               radius;
        double               strip_size;
 
@@ -444,7 +444,7 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
        cairo_clip           (cr);
        cairo_new_path       (cr);
 
-       /* Translate and set line width */      
+       /* Translate and set line width */
        cairo_set_line_width (cr, 1.0);
        cairo_translate      (cr, x+0.5, y+0.5);
 
@@ -455,7 +455,7 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
        {
                height += 3.0;
                strip_size = 2.0/height; /* 2 pixel high strip */
-               
+
                if (tab->gap_side == CL_GAP_TOP)
                        cairo_translate (cr, 0.0, -3.0); /* gap at the other side */
        }
@@ -463,18 +463,18 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
        {
                width += 3.0;
                strip_size = 2.0/width;
-               
+
                if (tab->gap_side == CL_GAP_LEFT)
                        cairo_translate (cr, -3.0, 0.0); /* gap at the other side */
        }
-       
+
        /* Set the fill color */
        fill = &colors->bg[params->state_type];
 
        /* Set tab shape */
        ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1,
                                    radius, params->corners);
-       
+
        /* Draw fill */
        ge_cairo_set_color (cr, fill);
        cairo_fill   (cr);
@@ -489,7 +489,7 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
                                                        tab->gap_side == CL_GAP_BOTTOM ? height   : 0 );
 
                ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-               
+
                ge_shade_color (fill, 0.92, &shadow);
 
                cairo_pattern_add_color_stop_rgba  (pattern, 0.0,                               hilight.r, hilight.g, hilight.b, 0.4);
@@ -507,9 +507,9 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
                                                        tab->gap_side == CL_GAP_TOP    ? height-2 : 0,
                                                        tab->gap_side == CL_GAP_RIGHT  ? width    : 0,
                                                        tab->gap_side == CL_GAP_BOTTOM ? height   : 0 );
-       
+
                ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-               
+
 
                cairo_pattern_add_color_stop_rgb  (pattern, 0.0,        stripe_fill->r, stripe_fill->g, stripe_fill->b);
                cairo_pattern_add_color_stop_rgb  (pattern, strip_size, stripe_fill->r, stripe_fill->g, stripe_fill->b);
@@ -521,10 +521,10 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
        }
 
        ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners);
-       
+
        if (params->active)
        {
-               ge_cairo_set_color (cr, border2);       
+               ge_cairo_set_color (cr, border2);
                cairo_stroke (cr);
        }
        else
@@ -533,7 +533,7 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
                                                        tab->gap_side == CL_GAP_TOP    ? height-2 : 2,
                                                        tab->gap_side == CL_GAP_RIGHT  ? width    : 2,
                                                        tab->gap_side == CL_GAP_BOTTOM ? height   : 2 );
-               
+
                cairo_pattern_add_color_stop_rgb (pattern, 0.0,        stripe_border->r, stripe_border->g, stripe_border->b);
                cairo_pattern_add_color_stop_rgb (pattern, strip_size, stripe_border->r, stripe_border->g, stripe_border->b);
                cairo_pattern_add_color_stop_rgb (pattern, strip_size, border1->r,       border1->g,       border1->b);
@@ -557,7 +557,7 @@ clearlooks_inverted_draw_slider (cairo_t *cr,
 
        cairo_pattern_t *pattern;
 
-       cairo_set_line_width (cr, 1.0); 
+       cairo_set_line_width (cr, 1.0);
        cairo_translate      (cr, x, y);
 
        if (params->disabled)
@@ -634,10 +634,10 @@ clearlooks_inverted_draw_slider (cairo_t *cr,
        {
                cairo_move_to (cr, 6, 0.5);
                cairo_line_to (cr, 6, height-1);
-       
+
                cairo_move_to (cr, width-7, 0.5);
                cairo_line_to (cr, width-7, height-1);
-       
+
                cairo_set_line_width (cr, 1.0);
                cairo_set_source_rgba (cr, border->r,
                                           border->g,
@@ -656,7 +656,7 @@ clearlooks_inverted_draw_slider_button (cairo_t *cr,
 {
        double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
        cairo_set_line_width (cr, 1.0);
-       
+
        if (!slider->horizontal)
                ge_cairo_exchange_axis (cr, &x, &y, &width, &height);
        cairo_translate (cr, x+0.5, y+0.5);
@@ -683,12 +683,12 @@ clearlooks_inverted_draw_list_view_header (cairo_t *cr,
        CairoColor shadow;
 
        ge_shade_color (border, 1.5, &hilight);
-       ge_shade_color (fill, 1.05, &hilight_header);   
-       ge_shade_color (fill, 0.95, &shadow);   
+       ge_shade_color (fill, 1.05, &hilight_header);
+       ge_shade_color (fill, 0.95, &shadow);
 
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1.0);
-       
+
        /* Draw highlight */
        if (header->order == CL_ORDER_FIRST)
        {
@@ -697,19 +697,19 @@ clearlooks_inverted_draw_list_view_header (cairo_t *cr,
        }
        else
                cairo_move_to (cr, 0.0, 0.5);
-       
+
        cairo_line_to (cr, width, 0.5);
-       
+
        ge_cairo_set_color (cr, &hilight);
        cairo_stroke (cr);
-       
+
        /* Draw bottom border */
        cairo_move_to (cr, 0.0, height-0.5);
        cairo_line_to (cr, width, height-0.5);
        ge_cairo_set_color (cr, border);
        cairo_stroke (cr);
 
-       /* Draw bottom shade */ 
+       /* Draw bottom shade */
        pattern = cairo_pattern_create_linear (0.0, 0, 0.0, height-1.0);
        cairo_pattern_add_color_stop_rgb     (pattern, 0.0, shadow.r, shadow.g, shadow.b);
        cairo_pattern_add_color_stop_rgb     (pattern, 1.0, hilight_header.r, hilight_header.g, hilight_header.b);
@@ -718,14 +718,14 @@ clearlooks_inverted_draw_list_view_header (cairo_t *cr,
        cairo_set_source      (cr, pattern);
        cairo_fill            (cr);
        cairo_pattern_destroy (pattern);
-       
+
        /* Draw resize grip */
        if ((params->ltr && header->order != CL_ORDER_LAST) ||
            (!params->ltr && header->order != CL_ORDER_FIRST) || header->resizable)
        {
                SeparatorParameters separator;
                separator.horizontal = FALSE;
-               
+
                if (params->ltr)
                        params->style_functions->draw_separator (cr, colors, params, &separator,
                                                                 width-1.5, 4.0, 2, height-8.0);
@@ -749,7 +749,7 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr,
        CairoColor s1, s2, s3;
        cairo_pattern_t *pattern;
        double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
-       
+
        ge_shade_color(&colors->shade[6], 1.05, &border);
 
        if (scrollbar->horizontal)
@@ -766,21 +766,21 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr,
                else if (stepper->stepper == CL_STEPPER_D)
                        corners = CR_CORNER_BOTTOMLEFT | CR_CORNER_BOTTOMRIGHT;
        }
-       
+
        cairo_translate (cr, x, y);
        cairo_set_line_width (cr, 1);
-       
+
        ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, corners);
-       
+
        if (scrollbar->horizontal)
                pattern = cairo_pattern_create_linear (0, 0, 0, height);
        else
                pattern = cairo_pattern_create_linear (0, 0, width, 0);
-                               
+
        s1 = colors->bg[widget->state_type];
        ge_shade_color(&s1, 0.95, &s2);
        ge_shade_color(&s1, 1.05, &s3);
-       
+
        cairo_pattern_add_color_stop_rgb(pattern, 0,    s2.r, s2.g, s2.b);
        cairo_pattern_add_color_stop_rgb(pattern, 1.0,  s3.r, s3.g, s3.b);
        cairo_set_source (cr, pattern);
@@ -789,10 +789,10 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr,
 
        clearlooks_draw_top_left_highlight (cr, &s1, widget, width, height, radius);
 
-       ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, corners);  
+       ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, corners);
        clearlooks_set_border_gradient (cr, &border, 1.2, (scrollbar->horizontal ? 0 : width), (scrollbar->horizontal ? height: 0));
        cairo_stroke (cr);
-       
+
        cairo_translate (cr, 0.5, 0.5);
 }
 
@@ -823,11 +823,11 @@ clearlooks_inverted_draw_scrollbar_slider (cairo_t *cr,
                else
                        height += 1;
        }
-       
+
        if (!scrollbar->horizontal)
                ge_cairo_exchange_axis (cr, &x, &y, &width, &height);
 
-       cairo_translate (cr, x, y);     
+       cairo_translate (cr, x, y);
 
        if (scrollbar->has_color)
        {
@@ -836,30 +836,30 @@ clearlooks_inverted_draw_scrollbar_slider (cairo_t *cr,
                CairoColor  hilight;
                CairoColor  shade1, shade2, shade3;
                cairo_pattern_t *pattern;
-                               
+
                if (widget->prelight)
                        ge_shade_color (&fill, 1.1, &fill);
-                       
+
                cairo_set_line_width (cr, 1);
-               
+
                ge_shade_color (&fill, 1.3, &hilight);
                ge_shade_color (&fill, 1.1, &shade1);
                ge_shade_color (&fill, 1.05, &shade2);
                ge_shade_color (&fill, 0.98, &shade3);
-               
+
                pattern = cairo_pattern_create_linear (1, 1, 1, height-2);
                cairo_pattern_add_color_stop_rgb (pattern, 0,    fill.r,  fill.g,  fill.b);
                cairo_pattern_add_color_stop_rgb (pattern, 0.5,  shade3.r, shade3.g, shade3.b);
-               cairo_pattern_add_color_stop_rgb (pattern, 0.5,  shade2.r, shade2.g, shade2.b); 
+               cairo_pattern_add_color_stop_rgb (pattern, 0.5,  shade2.r, shade2.g, shade2.b);
                cairo_pattern_add_color_stop_rgb (pattern, 1.0,  shade1.r, shade1.g, shade1.b);
                cairo_rectangle (cr, 1, 1, width-2, height-2);
                cairo_set_source (cr, pattern);
                cairo_fill (cr);
                cairo_pattern_destroy (pattern);
-               
+
                cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5);
                ge_cairo_stroke_rectangle (cr, 1.5, 1.5, width-3, height-3);
-       
+
                ge_cairo_set_color (cr, border);
                ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1);
        }
@@ -869,9 +869,9 @@ clearlooks_inverted_draw_scrollbar_slider (cairo_t *cr,
                CairoColor s1, s2, s3;
                cairo_pattern_t *pattern;
                int bar_x, i;
-               
+
                const CairoColor *dark  = &colors->shade[4];
-               const CairoColor *light = &colors->shade[0];            
+               const CairoColor *light = &colors->shade[0];
 
                ge_shade_color(&colors->shade[6], 1.05, &border);
 
@@ -888,15 +888,15 @@ clearlooks_inverted_draw_scrollbar_slider (cairo_t *cr,
                cairo_set_source(cr, pattern);
                cairo_fill(cr);
                cairo_pattern_destroy(pattern);
-               
+
                clearlooks_draw_top_left_highlight (cr, &s2, widget, width, height, 0);
 
                clearlooks_set_border_gradient (cr, &border, 1.2, 0, height);
                ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1);
-               
+
                /* draw handles */
                cairo_set_line_width (cr, 1);
-               
+
                bar_x = width/2 - 4;
                cairo_translate(cr, 0.5, 0.5);
                for (i=0; i<3; i++)
@@ -905,12 +905,12 @@ clearlooks_inverted_draw_scrollbar_slider (cairo_t *cr,
                        cairo_line_to (cr, bar_x, height-5);
                        ge_cairo_set_color (cr, dark);
                        cairo_stroke (cr);
-                       
+
                        cairo_move_to (cr, bar_x+1, 4);
                        cairo_line_to (cr, bar_x+1, height-5);
                        ge_cairo_set_color (cr, light);
                        cairo_stroke (cr);
-                       
+
                        bar_x += 3;
                }
        }
@@ -927,7 +927,7 @@ clearlooks_inverted_draw_selected_cell (cairo_t                  *cr,
        CairoColor border;
        cairo_pattern_t *pattern;
        cairo_save (cr);
-       
+
        cairo_translate (cr, x, y);
 
        if (params->focus)
@@ -951,7 +951,7 @@ clearlooks_inverted_draw_selected_cell (cairo_t                  *cr,
        cairo_fill       (cr);
        cairo_pattern_destroy (pattern);
 
-       ge_shade_color(&upper_color, 0.8, &border);     
+       ge_shade_color(&upper_color, 0.8, &border);
 
        cairo_move_to  (cr, 0, 0.5);
        cairo_rel_line_to (cr, width, 0);
@@ -975,7 +975,7 @@ clearlooks_register_style_inverted (ClearlooksStyleFunctions *functions)
        functions->draw_menubaritem       = clearlooks_inverted_draw_menubaritem;
        functions->draw_tab               = clearlooks_inverted_draw_tab;
        functions->draw_list_view_header  = clearlooks_inverted_draw_list_view_header;
-       functions->draw_scrollbar_stepper = clearlooks_inverted_draw_scrollbar_stepper; 
+       functions->draw_scrollbar_stepper = clearlooks_inverted_draw_scrollbar_stepper;
        functions->draw_scrollbar_slider  = clearlooks_inverted_draw_scrollbar_slider;
        functions->draw_selected_cell     = clearlooks_inverted_draw_selected_cell;
 }
index a4f8032e6532c133076c4f72ab1c77b215d3d5be..fdce13af1c0e14eb87e9e561471b23ef11f0133c 100644 (file)
@@ -333,7 +333,7 @@ static guint
 clearlooks_rc_style_parse (GtkRcStyle *rc_style,
                           GtkSettings  *settings,
                           GScanner   *scanner)
-               
+
 {
        static GQuark scope_id = 0;
        ClearlooksRcStyle *clearlooks_style = CLEARLOOKS_RC_STYLE (rc_style);
@@ -482,6 +482,6 @@ static GtkStyle *
 clearlooks_rc_style_create_style (GtkRcStyle *rc_style)
 {
        (void) rc_style;
-       
+
        return GTK_STYLE (g_object_new (CLEARLOOKS_TYPE_STYLE, NULL));
 }
index 59e64d54308b7f4f6dc7c8aa48de054211740edc..b1257f4878379553de26c84fc17cccc2e02c90b4 100644 (file)
@@ -65,7 +65,7 @@ clearlooks_set_widget_parameters (const GtkWidget      *widget,
 
        params->active      = (state_type == GTK_STATE_ACTIVE);
        params->prelight    = (state_type == GTK_STATE_PRELIGHT);
-       params->disabled    = (state_type == GTK_STATE_INSENSITIVE);                    
+       params->disabled    = (state_type == GTK_STATE_INSENSITIVE);
        params->state_type  = (ClearlooksStateType)state_type;
        params->corners     = CR_CORNER_ALL;
        params->ltr         = ge_widget_is_ltr ((GtkWidget*)widget);
@@ -76,10 +76,10 @@ clearlooks_set_widget_parameters (const GtkWidget      *widget,
 
        if (!params->active && widget && GE_IS_TOGGLE_BUTTON (widget))
                params->active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-               
+
        params->xthickness = style->xthickness;
        params->ythickness = style->ythickness;
-               
+
        /* This is used in GtkEntry to fake transparency. The reason to do this
         * is that the entry has it's entire background filled with base[STATE].
         * This is not a very good solution as it will eg. fail if one changes
@@ -91,7 +91,7 @@ clearlooks_set_widget_parameters (const GtkWidget      *widget,
 static void
 clearlooks_style_draw_flat_box (DRAW_ARGS)
 {
-       if (detail &&   
+       if (detail &&
            state_type == GTK_STATE_SELECTED && (
            !strncmp ("cell_even", detail, 9) ||
            !strncmp ("cell_odd", detail, 8)))
@@ -162,7 +162,7 @@ clearlooks_style_draw_shadow (DRAW_ARGS)
            (DETAIL ("frame") && ge_is_in_combo_box (widget)))
        {
                WidgetParameters params;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
                /* Override the entries state type, because we are too lame to handle this via
@@ -175,25 +175,25 @@ clearlooks_style_draw_shadow (DRAW_ARGS)
                        width += style->xthickness;
                        if (!params.ltr)
                                x -= style->xthickness;
-                       
+
                        if (params.ltr)
                                params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT;
                        else
                                params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT;
                }
-               
+
                STYLE_FUNCTION (draw_entry) (cr, &clearlooks_style->colors, &params,
                                       x, y, width, height);
        }
        else if (DETAIL ("frame") && widget && GE_IS_STATUSBAR (widget->parent))
        {
                WidgetParameters params;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
                gtk_style_apply_default_background (style, window, TRUE, state_type,
                                                    area, x, y, width, height);
-               
+
                STYLE_FUNCTION (draw_statusbar) (cr, colors, &params,
                                           x, y, width, height);
        }
@@ -204,10 +204,10 @@ clearlooks_style_draw_shadow (DRAW_ARGS)
                frame.shadow  = shadow_type;
                frame.gap_x   = -1;                 /* No gap will be drawn */
                frame.border  = &colors->shade[4];
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
                params.corners = CR_CORNER_NONE;
-       
+
                if (widget && !g_str_equal ("XfcePanelWindow", gtk_widget_get_name (gtk_widget_get_toplevel (widget))))
                        STYLE_FUNCTION(draw_frame) (cr, colors, &params, &frame,
                                               x, y, width, height);
@@ -230,10 +230,10 @@ clearlooks_style_draw_shadow (DRAW_ARGS)
                frame.border = &colors->shade[5];
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
                params.corners = CR_CORNER_ALL;
-               
+
                STYLE_FUNCTION(draw_frame) (cr, colors, &params, &frame, x, y, width, height);
        }
-       
+
        cairo_destroy (cr);
 }
 
@@ -257,13 +257,13 @@ clearlooks_style_draw_box_gap (DRAW_ARGS,
                WidgetParameters params;
                FrameParameters  frame;
                gboolean start, end;
-               
+
                frame.shadow    = shadow_type;
                frame.gap_side  = gap_side;
                frame.gap_x     = gap_x;
                frame.gap_width = gap_width;
                frame.border    = &colors->shade[5];
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
                clearlooks_get_notebook_tab_position (widget, &start, &end);
@@ -314,7 +314,7 @@ clearlooks_style_draw_box_gap (DRAW_ARGS,
                ge_cairo_rounded_rectangle (cr, x, y, width, height, params.radius, params.corners);
                ge_cairo_set_color (cr, &colors->bg[GTK_STATE_NORMAL]);
                cairo_fill (cr);
-               
+
                STYLE_FUNCTION(draw_frame) (cr, colors, &params, &frame,
                                       x, y, width, height);
        }
@@ -325,8 +325,8 @@ clearlooks_style_draw_box_gap (DRAW_ARGS,
                                                                           x, y, width, height,
                                                                           gap_side, gap_x, gap_width);
        }
-       
-       cairo_destroy (cr);     
+
+       cairo_destroy (cr);
 }
 
 static void
@@ -340,16 +340,16 @@ clearlooks_style_draw_extension (DRAW_ARGS, GtkPositionType gap_side)
        SANITIZE_SIZE
 
        cr = ge_gdk_drawable_to_cairo (window, area);
-       
+
        if (DETAIL ("tab"))
        {
                WidgetParameters params;
                TabParameters    tab;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
-               
+
                tab.gap_side = (ClearlooksGapSide)gap_side;
-               
+
                switch (gap_side)
                {
                        case CL_GAP_BOTTOM:
@@ -364,7 +364,7 @@ clearlooks_style_draw_extension (DRAW_ARGS, GtkPositionType gap_side)
                        case CL_GAP_LEFT:
                                params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT;
                }
-               
+
                STYLE_FUNCTION(draw_tab) (cr, colors, &params, &tab,
                                     x, y, width, height);
        }
@@ -375,7 +375,7 @@ clearlooks_style_draw_extension (DRAW_ARGS, GtkPositionType gap_side)
                                              gap_side);
 
        }
-       
+
        cairo_destroy (cr);
 }
 
@@ -386,15 +386,15 @@ clearlooks_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
        ClearlooksColors *colors = &clearlooks_style->colors;
        cairo_t          *cr;
        gboolean         is_horizontal;
-       
+
        CHECK_ARGS
        SANITIZE_SIZE
-       
+
        cr = ge_gdk_drawable_to_cairo (window, area);
-       
+
        /* Evil hack to work around broken orientation for toolbars */
        is_horizontal = (width > height);
-       
+
        if (DETAIL ("handlebox"))
        {
                WidgetParameters params;
@@ -403,7 +403,7 @@ clearlooks_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
                handle.type = CL_HANDLE_TOOLBAR;
                handle.horizontal = is_horizontal;
-               
+
                /* Is this ever true? -Daniel */
                if (GE_IS_TOOLBAR (widget) && shadow_type != GTK_SHADOW_NONE)
                {
@@ -417,7 +417,7 @@ clearlooks_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
                        STYLE_FUNCTION(draw_toolbar) (cr, colors, &params, &toolbar, x, y, width, height);
                        cairo_restore (cr);
                }
-               
+
                STYLE_FUNCTION(draw_handle) (cr, colors, &params, &handle,
                                        x, y, width, height);
        }
@@ -429,7 +429,7 @@ clearlooks_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
                handle.type = CL_HANDLE_SPLITTER;
                handle.horizontal = orientation == GTK_ORIENTATION_HORIZONTAL;
-                       
+
                STYLE_FUNCTION(draw_handle) (cr, colors, &params, &handle,
                                        x, y, width, height);
        }
@@ -441,7 +441,7 @@ clearlooks_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
                handle.type = CL_HANDLE_TOOLBAR;
                handle.horizontal = is_horizontal;
-               
+
                /* Is this ever true? -Daniel */
                if (GE_IS_TOOLBAR (widget) && shadow_type != GTK_SHADOW_NONE)
                {
@@ -455,7 +455,7 @@ clearlooks_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
                        STYLE_FUNCTION(draw_toolbar) (cr, colors, &params, &toolbar, x, y, width, height);
                        cairo_restore (cr);
                }
-               
+
                STYLE_FUNCTION(draw_handle) (cr, colors, &params, &handle,
                                        x, y, width, height);
        }
@@ -480,7 +480,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
        {
                WidgetParameters params;
                MenuBarParameters menubar;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
                menubar.style = clearlooks_style->menubarstyle;
@@ -495,18 +495,18 @@ clearlooks_style_draw_box (DRAW_ARGS)
        {
                WidgetParameters params;
                ListViewHeaderParameters header;
-               
+
                gint columns, column_index;
                gboolean resizable = TRUE;
-               
+
                /* XXX: This makes unknown treeview header CL_ORDER_MIDDLE, in need for something nicer */
                columns = 3;
                column_index = 1;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
-               
+
                params.corners = CR_CORNER_NONE;
-               
+
                if (GE_IS_TREE_VIEW (widget->parent))
                {
                        clearlooks_treeview_get_header_index (GTK_TREE_VIEW(widget->parent),
@@ -518,18 +518,18 @@ clearlooks_style_draw_box (DRAW_ARGS)
                        clearlooks_clist_get_header_index (GTK_CLIST(widget->parent),
                                                                                widget, &column_index, &columns);
                }
-               
+
                header.resizable = resizable;
-               
+
                if (column_index == 0)
                        header.order = params.ltr ? CL_ORDER_FIRST : CL_ORDER_LAST;
                else if (column_index == columns-1)
                        header.order = params.ltr ? CL_ORDER_LAST : CL_ORDER_FIRST;
                else
                        header.order = CL_ORDER_MIDDLE;
-               
+
                gtk_style_apply_default_background (style, window, FALSE, state_type, area, x, y, width, height);
-               
+
                STYLE_FUNCTION(draw_list_view_header) (cr, colors, &params, &header,
                                                  x, y, width, height);
        }
@@ -562,7 +562,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
                if (GE_IS_TOGGLE_BUTTON (widget) &&
                    gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
                        params.active = TRUE;
-               
+
                STYLE_FUNCTION(draw_button) (cr, &clearlooks_style->colors, &params,
                                             x, y, width, height);
        }
@@ -572,14 +572,14 @@ clearlooks_style_draw_box (DRAW_ARGS)
                {
                        WidgetParameters params;
                        clearlooks_set_widget_parameters (widget, style, state_type, &params);
-                       
+
                        if (style->xthickness == 3)
                        {
                                width++;
                                if (params.ltr)
                                        x--;
                        }
-                       
+
                        if (DETAIL ("spinbutton_up"))
                        {
                                height+=2;
@@ -595,28 +595,28 @@ clearlooks_style_draw_box (DRAW_ARGS)
                                else
                                        params.corners = CR_CORNER_BOTTOMLEFT;
                        }
-                       
+
                        STYLE_FUNCTION(draw_spinbutton_down) (cr, &clearlooks_style->colors, &params, x, y, width, height);
                }
        }
        else if (DETAIL ("spinbutton"))
        {
                WidgetParameters params;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
-               
+
                if (params.ltr)
                        params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT;
                else
                        params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT;
-               
+
                if (style->xthickness == 3)
                {
                        if (params.ltr)
                                x--;
                        width++;
                }
-               
+
                STYLE_FUNCTION(draw_spinbutton) (cr, &clearlooks_style->colors, &params,
                                            x, y, width, height);
        }
@@ -624,15 +624,15 @@ clearlooks_style_draw_box (DRAW_ARGS)
        {
                WidgetParameters params;
                SliderParameters slider;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
                params.corners    = CR_CORNER_NONE;
-               
+
                slider.lower = DETAIL ("trough-lower");
                slider.fill_level = DETAIL ("trough-fill-level") || DETAIL ("trough-fill-level-full");
 
                slider.horizontal = (GTK_RANGE (widget)->orientation == GTK_ORIENTATION_HORIZONTAL);
-               
+
                STYLE_FUNCTION(draw_scale_trough) (cr, &clearlooks_style->colors,
                                              &params, &slider,
                                              x, y, width, height);
@@ -640,9 +640,9 @@ clearlooks_style_draw_box (DRAW_ARGS)
        else if (DETAIL ("trough") && widget && GE_IS_PROGRESS_BAR (widget))
        {
                WidgetParameters params;
-               
-               clearlooks_set_widget_parameters (widget, style, state_type, &params);          
-               
+
+               clearlooks_set_widget_parameters (widget, style, state_type, &params);
+
                STYLE_FUNCTION(draw_progressbar_trough) (cr, colors, &params,
                                                    x, y, width, height);
        }
@@ -650,16 +650,16 @@ clearlooks_style_draw_box (DRAW_ARGS)
        {
                WidgetParameters params;
                ScrollBarParameters scrollbar;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
                params.corners = CR_CORNER_NONE;
-               
+
                scrollbar.horizontal = TRUE;
                scrollbar.junction   = clearlooks_scrollbar_get_junction (widget);
-               
+
                if (GE_IS_RANGE (widget))
                        scrollbar.horizontal = GTK_RANGE (widget)->orientation == GTK_ORIENTATION_HORIZONTAL;
-               
+
                if (scrollbar.horizontal)
                {
                        x += 2;
@@ -670,7 +670,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
                        y += 2;
                        height -= 4;
                }
-               
+
                STYLE_FUNCTION(draw_scrollbar_trough) (cr, colors, &params, &scrollbar,
                                                  x, y, width, height);
        }
@@ -682,9 +682,9 @@ clearlooks_style_draw_box (DRAW_ARGS)
 
 #ifdef HAVE_ANIMATION
                if(clearlooks_style->animation && CL_IS_PROGRESS_BAR (widget))
-               {       
+               {
                        gboolean activity_mode = GTK_PROGRESS (widget)->activity_mode;
-                       
+
                        if (!activity_mode)
                                clearlooks_animation_progressbar_add ((gpointer)widget);
                }
@@ -706,7 +706,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
                        progressbar.value = 0;
                        progressbar.pulsing = FALSE;
                }
-               
+
                if (!params.ltr)
                {
                        if (progressbar.orientation == GTK_PROGRESS_LEFT_TO_RIGHT)
@@ -750,12 +750,12 @@ clearlooks_style_draw_box (DRAW_ARGS)
                                        tmp.height += 2;
                                }
                        }
-                       
+
                        cairo_reset_clip (cr);
                        gdk_cairo_rectangle (cr, &tmp);
                        cairo_clip (cr);
                }
-               
+
                STYLE_FUNCTION(draw_progressbar_fill) (cr, colors, &params, &progressbar,
                                                  x, y, width, height,
                                                  10 - (int)(elapsed * 10.0) % 10);
@@ -764,29 +764,29 @@ clearlooks_style_draw_box (DRAW_ARGS)
        {
                WidgetParameters params;
                OptionMenuParameters optionmenu;
-               
+
                GtkRequisition indicator_size;
                GtkBorder indicator_spacing;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
-               
+
                params.enable_glow = TRUE;
 
                ge_option_menu_get_props (widget, &indicator_size, &indicator_spacing);
-               
+
                if (ge_widget_is_ltr (widget))
                        optionmenu.linepos = width - (indicator_size.width + indicator_spacing.left + indicator_spacing.right) - 1;
                else
                        optionmenu.linepos = (indicator_size.width + indicator_spacing.left + indicator_spacing.right) + 1;
-                       
+
                STYLE_FUNCTION(draw_optionmenu) (cr, colors, &params, &optionmenu,
-                                                x, y, width, height);          
+                                                x, y, width, height);
        }
        else if (DETAIL ("menuitem"))
        {
                WidgetParameters params;
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
-               
+
                if (widget && GE_IS_MENU_BAR (widget->parent))
                {
                        params.corners = CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT;
@@ -794,7 +794,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
                        STYLE_FUNCTION(draw_menubaritem) (cr, colors, &params, x, y, width, height);
                }
                else
-               {       
+               {
                        params.corners = CR_CORNER_ALL;
                        STYLE_FUNCTION(draw_menuitem) (cr, colors, &params, x, y, width, height);
                }
@@ -805,15 +805,15 @@ clearlooks_style_draw_box (DRAW_ARGS)
                ScrollBarParameters scrollbar;
                ScrollBarStepperParameters stepper;
                GdkRectangle this_rectangle;
-               
+
                this_rectangle.x = x;
                this_rectangle.y = y;
                this_rectangle.width  = width;
                this_rectangle.height = height;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
                params.corners = CR_CORNER_NONE;
-               
+
                scrollbar.has_color  = FALSE;
                scrollbar.horizontal = TRUE;
                scrollbar.junction   = clearlooks_scrollbar_get_junction (widget);
@@ -823,7 +823,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
                }
 
                scrollbar.horizontal = DETAIL ("hscrollbar");
-               
+
                stepper.stepper = clearlooks_scrollbar_get_stepper (widget, &this_rectangle);
 
                STYLE_FUNCTION(draw_scrollbar_stepper) (cr, colors, &params, &scrollbar, &stepper,
@@ -845,14 +845,14 @@ clearlooks_style_draw_box (DRAW_ARGS)
        }
        else if (DETAIL ("trough"))
        {
-                       
+
        }
        else if (DETAIL ("menu"))
        {
                WidgetParameters params;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
-               
+
                STYLE_FUNCTION(draw_menu_frame) (cr, colors, &params, x, y, width, height);
        }
        else if (DETAIL ("hseparator") || DETAIL ("vseparator"))
@@ -878,7 +878,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
                clearlooks_parent_class->draw_box (style, window, state_type, shadow_type, area,
                                        widget, detail, x, y, width, height);
        }
-       
+
        cairo_destroy (cr);
 }
 
@@ -894,21 +894,21 @@ clearlooks_style_draw_slider (DRAW_ARGS, GtkOrientation orientation)
 
        CHECK_ARGS
        SANITIZE_SIZE
-       
+
        if (DETAIL ("hscale") || DETAIL ("vscale"))
        {
                WidgetParameters params;
                SliderParameters slider;
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
-               
+
                slider.horizontal = (orientation == GTK_ORIENTATION_HORIZONTAL);
                slider.lower = FALSE;
                slider.fill_level = FALSE;
-               
+
                if (clearlooks_style->style == CL_STYLE_GLOSSY) /* XXX! */
                        params.corners = CR_CORNER_ALL;
-               
+
                STYLE_FUNCTION(draw_slider_button) (cr, &clearlooks_style->colors,
                                               &params, &slider,
                                               x, y, width, height);
@@ -940,7 +940,7 @@ clearlooks_style_draw_slider (DRAW_ARGS, GtkOrientation orientation)
                if ((clearlooks_style->style == CL_STYLE_GLOSSY || clearlooks_style->style == CL_STYLE_GUMMY)
                        && !scrollbar.has_color)
                        scrollbar.color = colors->bg[0];
-               
+
                STYLE_FUNCTION(draw_scrollbar_slider) (cr, colors, &params, &scrollbar,
                                                       x, y, width, height);
        }
@@ -961,7 +961,7 @@ clearlooks_style_draw_option (DRAW_ARGS)
        CheckboxParameters checkbox;
        cairo_t *cr;
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
-       
+
        (void) detail;
 
        CHECK_ARGS
@@ -969,12 +969,12 @@ clearlooks_style_draw_option (DRAW_ARGS)
 
        cr = ge_gdk_drawable_to_cairo (window, area);
        colors = &clearlooks_style->colors;
-       
+
        checkbox.shadow_type = shadow_type;
        checkbox.in_menu = (widget && GTK_IS_MENU(widget->parent));
-               
+
        clearlooks_set_widget_parameters (widget, style, state_type, &params);
-       
+
        STYLE_FUNCTION(draw_radiobutton) (cr, colors, &params, &checkbox, x, y, width, height);
 
        cairo_destroy (cr);
@@ -992,11 +992,11 @@ clearlooks_style_draw_check (DRAW_ARGS)
        SANITIZE_SIZE
 
        cr = ge_gdk_drawable_to_cairo (window, area);
-       
+
        clearlooks_set_widget_parameters (widget, style, state_type, &params);
-       
+
        params.corners = CR_CORNER_ALL;
-       
+
        checkbox.shadow_type = shadow_type;
        checkbox.in_cell = DETAIL("cellcheck");
 
@@ -1004,7 +1004,7 @@ clearlooks_style_draw_check (DRAW_ARGS)
 
        STYLE_FUNCTION(draw_checkbox) (cr, &clearlooks_style->colors, &params, &checkbox,
                                  x, y, width, height);
-       
+
        cairo_destroy (cr);
 }
 
@@ -1041,7 +1041,7 @@ clearlooks_style_draw_vline (GtkStyle               *style,
         * (and even if, a normal one should be better on menu bars) */
        STYLE_FUNCTION(draw_separator) (cr, colors, NULL, &separator,
                                        x, y1, 2, y2-y1+1);
-       
+
        cairo_destroy (cr);
 }
 
@@ -1069,16 +1069,16 @@ clearlooks_style_draw_hline (GtkStyle               *style,
        colors = &clearlooks_style->colors;
 
        cr = ge_gdk_drawable_to_cairo (window, area);
-       
+
        separator.horizontal = TRUE;
-       
+
        if (!DETAIL ("menuitem"))
                STYLE_FUNCTION(draw_separator) (cr, colors, NULL, &separator,
                                                x1, y, x2-x1+1, 2);
        else
                STYLE_FUNCTION(draw_menu_item_separator) (cr, colors, NULL, &separator,
                                                           x1, y, x2-x1+1, 2);
-       
+
        cairo_destroy (cr);
 }
 
@@ -1097,22 +1097,22 @@ clearlooks_style_draw_shadow_gap (DRAW_ARGS,
 
        cr     = ge_gdk_drawable_to_cairo (window, area);
        colors = &clearlooks_style->colors;
-       
+
        if (DETAIL ("frame"))
        {
                WidgetParameters params;
                FrameParameters  frame;
-               
+
                frame.shadow    = shadow_type;
                frame.gap_side  = gap_side;
                frame.gap_x     = gap_x;
                frame.gap_width = gap_width;
                frame.border    = &colors->shade[5];
-               
+
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
                params.corners = CR_CORNER_ALL;
-               
+
                STYLE_FUNCTION(draw_frame) (cr, colors, &params, &frame,
                                       x, y, width, height);
        }
@@ -1122,7 +1122,7 @@ clearlooks_style_draw_shadow_gap (DRAW_ARGS,
                                                                           widget, detail, x, y, width, height,
                                                                           gap_side, gap_x, gap_width);
        }
-       
+
        cairo_destroy (cr);
 }
 
@@ -1157,7 +1157,7 @@ clearlooks_style_draw_resize_grip (GtkStyle       *style,
 
        cr = ge_gdk_drawable_to_cairo (window, area);
 
-       clearlooks_set_widget_parameters (widget, style, state_type, &params);  
+       clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
        STYLE_FUNCTION(draw_resize_grip) (cr, colors, &params, &grip,
                                     x, y, width, height);
@@ -1170,7 +1170,7 @@ clearlooks_style_draw_tab (DRAW_ARGS)
 {
        ClearlooksColors *colors;
        WidgetParameters params;
-       ArrowParameters  arrow;         
+       ArrowParameters  arrow;
        cairo_t *cr;
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
 
@@ -1180,12 +1180,12 @@ clearlooks_style_draw_tab (DRAW_ARGS)
 
        CHECK_ARGS
        SANITIZE_SIZE
-       
+
        cr = ge_gdk_drawable_to_cairo (window, area);
 
        clearlooks_set_widget_parameters (widget, style, state_type, &params);
        arrow.type      = CL_ARROW_COMBO;
-       arrow.direction = CL_DIRECTION_DOWN;    
+       arrow.direction = CL_DIRECTION_DOWN;
 
        STYLE_FUNCTION(draw_arrow) (cr, colors, &params, &arrow, x, y, width, height);
 
@@ -1231,12 +1231,12 @@ clearlooks_style_draw_arrow (GtkStyle  *style,
        clearlooks_set_widget_parameters (widget, style, state_type, &params);
        arrow.type = CL_ARROW_NORMAL;
        arrow.direction = (ClearlooksDirection)arrow_type;
-       
+
        if (ge_is_combo_box (widget, FALSE) && !ge_is_combo_box_entry (widget))
        {
                arrow.type = CL_ARROW_COMBO;
        }
-       
+
        /* I have no idea why, but the arrow of GtkCombo is larger than in other places.
         * Subtracting 3 seems to fix this. */
        if (widget && widget->parent && GE_IS_COMBO (widget->parent->parent))
@@ -1247,9 +1247,9 @@ clearlooks_style_draw_arrow (GtkStyle  *style,
                        x += 2;
                width -= 3;
        }
-       
+
        STYLE_FUNCTION(draw_arrow) (cr, colors, &params, &arrow, x, y, width, height);
-       
+
        cairo_destroy (cr);
 }
 
@@ -1258,12 +1258,12 @@ clearlooks_style_init_from_rc (GtkStyle * style,
                               GtkRcStyle * rc_style)
 {
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
-       
+
        clearlooks_parent_class->init_from_rc (style, rc_style);
-       
+
        g_assert ((CLEARLOOKS_RC_STYLE (rc_style)->style < CL_NUM_STYLES));
        clearlooks_style->style         = CLEARLOOKS_RC_STYLE (rc_style)->style;
-       
+
        clearlooks_style->menubarstyle      = CLEARLOOKS_RC_STYLE (rc_style)->menubarstyle;
        clearlooks_style->toolbarstyle      = CLEARLOOKS_RC_STYLE (rc_style)->toolbarstyle;
        clearlooks_style->has_scrollbar_color = CLEARLOOKS_RC_STYLE (rc_style)->flags & CL_FLAG_SCROLLBAR_COLOR;
@@ -1284,11 +1284,11 @@ clearlooks_style_realize (GtkStyle * style)
        CairoColor bg_normal;
        double contrast;
        int i;
-       
+
        clearlooks_parent_class->realize (style);
 
        contrast = CLEARLOOKS_RC_STYLE (style->rc_style)->contrast;
-       
+
        /* Lighter to darker */
        ge_gdk_color_to_cairo (&style->bg[GTK_STATE_NORMAL], &bg_normal);
 
@@ -1296,13 +1296,13 @@ clearlooks_style_realize (GtkStyle * style)
        {
                ge_shade_color(&bg_normal, (shades[i]-0.7) * contrast + 0.7, &clearlooks_style->colors.shade[i]);
        }
-               
+
        ge_gdk_color_to_cairo (&style->bg[GTK_STATE_SELECTED], &spot_color);
-       
+
        ge_shade_color(&spot_color, 1.42, &clearlooks_style->colors.spot[0]);
        ge_shade_color(&spot_color, 1.05, &clearlooks_style->colors.spot[1]);
        ge_shade_color(&spot_color, 0.65, &clearlooks_style->colors.spot[2]);
-       
+
        for (i=0; i<5; i++)
        {
                ge_gdk_color_to_cairo (&style->fg[i], &clearlooks_style->colors.fg[i]);
@@ -1405,7 +1405,7 @@ clearlooks_style_copy (GtkStyle * style, GtkStyle * src)
 {
        ClearlooksStyle * cl_style = CLEARLOOKS_STYLE (style);
        ClearlooksStyle * cl_src = CLEARLOOKS_STYLE (src);
-       
+
        cl_style->colors              = cl_src->colors;
        cl_style->menubarstyle        = cl_src->menubarstyle;
        cl_style->toolbarstyle        = cl_src->toolbarstyle;
@@ -1415,7 +1415,7 @@ clearlooks_style_copy (GtkStyle * style, GtkStyle * src)
        cl_style->animation           = cl_src->animation;
        cl_style->radius              = cl_src->radius;
        cl_style->style               = cl_src->style;
-       
+
        clearlooks_parent_class->copy (style, src);
 }
 
@@ -1508,7 +1508,7 @@ clearlooks_style_draw_layout (GtkStyle * style,
                        ge_shade_color (&params.parentbg, 1.2, &temp);
                else
                        ge_shade_color (&colors->bg[widget->state], 1.2, &temp);
-               
+
                etched.red = (int) (temp.r * 65535);
                etched.green = (int) (temp.g * 65535);
                etched.blue = (int) (temp.b * 65535);
@@ -1550,11 +1550,11 @@ clearlooks_style_draw_render_icon (GtkStyle            *style,
         * GtkIconSet can be used without a style and if so
         * it uses this function.
         */
-       
+
        base_pixbuf = gtk_icon_source_get_pixbuf (source);
-       
+
        g_return_val_if_fail (base_pixbuf != NULL, NULL);
-       
+
        if (widget && gtk_widget_has_screen (widget)) {
                screen = gtk_widget_get_screen (widget);
                settings = gtk_settings_get_for_screen (screen);
@@ -1566,7 +1566,7 @@ clearlooks_style_draw_render_icon (GtkStyle            *style,
                GTK_NOTE (MULTIHEAD,
                          g_warning ("Using the default screen for gtk_default_render_icon()"));
        }
-       
+
 
        if (size != (GtkIconSize) -1 && !gtk_icon_size_lookup_for_settings (settings, size, &width, &height)) {
                g_warning (G_STRLOC ": invalid icon size '%d'", size);
@@ -1580,21 +1580,21 @@ clearlooks_style_draw_render_icon (GtkStyle            *style,
                scaled = scale_or_ref (base_pixbuf, width, height);
        else
                scaled = g_object_ref (base_pixbuf);
-       
+
        /* If the state was wildcarded, then generate a state. */
        if (gtk_icon_source_get_state_wildcarded (source)) {
                if (state == GTK_STATE_INSENSITIVE) {
                        stated = set_transparency (scaled, 0.3);
                        gdk_pixbuf_saturate_and_pixelate (stated, stated,
                                                          0.1, FALSE);
-                       
+
                        g_object_unref (scaled);
                } else if (state == GTK_STATE_PRELIGHT) {
                        stated = gdk_pixbuf_copy (scaled);
-                       
+
                        gdk_pixbuf_saturate_and_pixelate (scaled, stated,
                                                          1.2, FALSE);
-                       
+
                        g_object_unref (scaled);
                } else {
                        stated = scaled;
@@ -1616,7 +1616,7 @@ static void
 clearlooks_style_class_init (ClearlooksStyleClass * klass)
 {
        GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);
-       
+
        clearlooks_style_class = CLEARLOOKS_STYLE_CLASS (klass);
        clearlooks_parent_class = g_type_class_peek_parent (klass);
 
index 78f3ca1675a508933e9fabb0ec77a054a89fe23b..b30683645301ab09cb9dedda260107e5ea4730dd 100644 (file)
@@ -48,7 +48,7 @@ struct _ClearlooksStyle
        ClearlooksColors colors;
 
        ClearlooksStyles style;
-       
+
        guint8   menubarstyle;
        guint8   toolbarstyle;
        GdkColor scrollbar_color;
index 6559f3c16cd3125f24bed908468efc838b100b5d..893113cc9ed9464b29f970992f5d05cd46f08b01 100644 (file)
@@ -125,7 +125,7 @@ typedef struct
        CairoColor bg[5];
        CairoColor base[5];
        CairoColor text[5];
-       
+
        CairoColor shade[9];
        CairoColor spot[3];
 } ClearlooksColors;
@@ -141,9 +141,9 @@ typedef struct
        boolean enable_glow;
 
        gfloat  radius;
-       
+
        ClearlooksStateType state_type;
-       
+
        uint8 corners;
        uint8 xthickness;
        uint8 ythickness;
@@ -189,7 +189,7 @@ typedef struct
 typedef struct
 {
        CairoCorners    corners;
-       ClearlooksShadowType shadow;    
+       ClearlooksShadowType shadow;
 } ShadowParameters;
 
 typedef struct
@@ -301,7 +301,7 @@ struct _ClearlooksStyleFunctions
                                       const WidgetParameters           *widget,
                                       const OptionMenuParameters *optionmenu,
                                       int x, int y, int width, int height);
-                                       
+
        void (*draw_inset)            (cairo_t                          *cr,
                                        const CairoColor                *bg_color,
                                        double x, double y, double w, double h,
@@ -415,7 +415,7 @@ struct _ClearlooksStyleFunctions
                                       const WidgetParameters           *widget,
                                       const ArrowParameters            *arrow,
                                       int x, int y, int width, int height);
-       
+
        void (*draw_checkbox)         (cairo_t                          *cr,
                                       const ClearlooksColors           *colors,
                                       const WidgetParameters           *widget,
index 6d4d8a286dfcae0cc177a8892b8e4b2b04b6e499..c3ac9a8864152835f6b7e4cb9b41b3fd98fb5953 100644 (file)
@@ -49,7 +49,7 @@ void clearlooks_clist_get_header_index (GtkCList *clist, GtkWidget *button,
 {
        int i;
        *columns = clist->columns;
-       
+
        for (i=0; i<*columns; i++)
        {
                if (clist->column[i].button == button)
@@ -66,22 +66,22 @@ clearlooks_get_parent_bg (const GtkWidget *widget, CairoColor *color)
        GtkStateType state_type;
        const GtkWidget *parent;
        GdkColor *gcolor;
-       
+
        if (widget == NULL)
                return;
-       
+
        parent = widget->parent;
-       
+
        while (parent && GTK_WIDGET_NO_WINDOW (parent) && !((GTK_IS_NOTEBOOK (parent)) || (GTK_IS_TOOLBAR (parent))))
                parent = parent->parent;
 
        if (parent == NULL)
                return;
-       
+
        state_type = GTK_WIDGET_STATE (parent);
-       
+
        gcolor = &parent->style->bg[state_type];
-       
+
        ge_gdk_color_to_cairo (gcolor, color);
 }
 
@@ -101,12 +101,12 @@ clearlooks_scrollbar_get_stepper (GtkWidget    *widget,
        check_rectangle.y      = widget->allocation.y;
        check_rectangle.width  = stepper->width;
        check_rectangle.height = stepper->height;
-       
+
        orientation = GTK_RANGE (widget)->orientation;
-       
+
        if (widget->allocation.x == -1 && widget->allocation.y == -1)
                return CL_STEPPER_UNKNOWN;
-               
+
        if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
                value = CL_STEPPER_A;
 
@@ -116,7 +116,7 @@ clearlooks_scrollbar_get_stepper (GtkWidget    *widget,
                        check_rectangle.x = widget->allocation.x + stepper->width;
                else
                        check_rectangle.y = widget->allocation.y + stepper->height;
-               
+
                if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
                        value = CL_STEPPER_B;
        }
@@ -127,7 +127,7 @@ clearlooks_scrollbar_get_stepper (GtkWidget    *widget,
                        check_rectangle.x = widget->allocation.x + widget->allocation.width - (stepper->width * 2);
                else
                        check_rectangle.y = widget->allocation.y + widget->allocation.height - (stepper->height * 2);
-               
+
                if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
                        value = CL_STEPPER_C;
        }
@@ -138,11 +138,11 @@ clearlooks_scrollbar_get_stepper (GtkWidget    *widget,
                        check_rectangle.x = widget->allocation.x + widget->allocation.width - stepper->width;
                else
                        check_rectangle.y = widget->allocation.y + widget->allocation.height - stepper->height;
-               
+
                if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
                        value = CL_STEPPER_D;
        }
-       
+
        return value;
 }
 
@@ -150,13 +150,13 @@ ClearlooksStepper
 clearlooks_scrollbar_visible_steppers (GtkWidget *widget)
 {
        ClearlooksStepper steppers = 0;
-       
+
        if (!GE_IS_RANGE (widget))
                return 0;
-       
+
        if (GTK_RANGE (widget)->has_stepper_a)
                steppers |= CL_STEPPER_A;
-       
+
        if (GTK_RANGE (widget)->has_stepper_b)
                steppers |= CL_STEPPER_B;
 
@@ -171,27 +171,27 @@ clearlooks_scrollbar_visible_steppers (GtkWidget *widget)
 
 ClearlooksJunction
 clearlooks_scrollbar_get_junction (GtkWidget    *widget)
-{      
+{
        GtkAdjustment *adj;
        ClearlooksJunction junction = CL_JUNCTION_NONE;
-       
+
        if (!GE_IS_RANGE (widget))
                return CL_JUNCTION_NONE;
 
        adj = GTK_RANGE (widget)->adjustment;
-       
+
        if (adj->value <= adj->lower &&
                (GTK_RANGE (widget)->has_stepper_a || GTK_RANGE (widget)->has_stepper_b))
        {
                junction |= CL_JUNCTION_BEGIN;
        }
-       
+
        if (adj->value >= adj->upper - adj->page_size &&
                (GTK_RANGE (widget)->has_stepper_c || GTK_RANGE (widget)->has_stepper_d))
        {
                junction |= CL_JUNCTION_END;
        }
-       
+
        return junction;
 }
 
@@ -245,7 +245,7 @@ clearlooks_get_notebook_tab_position (GtkWidget *widget,
                        GtkWidget *tab_label;
                        gboolean expand;
                        GtkPackType pack_type;
-                                               
+
                        tab_child = gtk_notebook_get_nth_page (notebook, i);
 
                        /* Skip invisible tabs */
index 0b30c52b726efb880415efdf0607ad1e6db235fd..1a4fe3103976a0890c6a6c53e32e8ea40d7b8801 100644 (file)
@@ -156,7 +156,7 @@ ge_is_bonobo_dock_item (GtkWidget * widget)
                  result = TRUE;
                  child = NULL;
                }
-            }  
+            }
 
           if (children)
            g_list_free(children);
@@ -278,7 +278,7 @@ ge_button_get_default_border (GtkWidget *widget,
 {
        GtkBorder default_border = {1, 1, 1, 1};
        GtkBorder *tmp_border = NULL;
-       
+
        if (widget && GE_IS_BUTTON (widget))
                gtk_widget_style_get (widget, "default-border", &tmp_border, NULL);
 
@@ -298,7 +298,7 @@ gboolean
 ge_widget_is_ltr (GtkWidget *widget)
 {
        GtkTextDirection dir = GTK_TEXT_DIR_NONE;
-       
+
        if (GE_IS_WIDGET (widget))
                dir = gtk_widget_get_direction (widget);
 
index 68bd0e6ee957cc8771bfc079eaf0ecbe8fba4509..cf133eba2fc45ea15eb6c602ed5f70be4994a5fa 100644 (file)
@@ -12,11 +12,11 @@ static void cl_draw_borders (GdkWindow *window, GtkWidget *widget, GtkStyle *sty
 static void cl_draw_line (GdkWindow *window, GtkWidget *widget, GtkStyle *style,
                    int x1, int y1, int x2, int y2, CLBorderType border,
                    CLRectangle *r);
-                               
+
 static void cl_draw_corner (GdkWindow *window, GtkWidget *widget, GtkStyle *style,
                      int x, int y, int width, int height,
                      CLRectangle *r, CLCornerSide corner);
-                                       
+
 static void cl_draw_fill (GdkWindow *window, GtkWidget *widget, GtkStyle *style,
                    int x, int y, int width, int height, CLRectangle *r);
 
@@ -27,11 +27,11 @@ void cl_draw_rectangle (GdkWindow *window, GtkWidget *widget, GtkStyle *style,
        {
                cl_draw_fill(window, widget, style, x, y, width, height, r);
        }
-       
+
        if (r->bordergc)
        {
                cl_draw_borders(window, widget, style, x, y, width, height, r);
-       }       
+       }
 }
 
 
@@ -117,10 +117,10 @@ static void cl_draw_line (GdkWindow *window, GtkWidget *widget, GtkStyle *style,
                        r->gradient_type == CL_GRADIENT_VERTICAL && border == CL_BORDER_TOP)
                        gdk_gc_set_foreground (r->bordergc, r->border_gradient.from);
                else
-                       gdk_gc_set_foreground (r->bordergc, r->border_gradient.to);                             
+                       gdk_gc_set_foreground (r->bordergc, r->border_gradient.to);
 
                gdk_draw_line (window, r->bordergc, x1, y1, x2, y2);
-               
+
                gdk_gc_set_foreground (r->bordergc, &tmp_color);
        }
 }
@@ -142,7 +142,7 @@ static GdkColor *cl_get_gradient_corner_color (CLRectangle *r, CLCornerSide corn
        {
                color = r->border_gradient.to;
        }
-       
+
        return color;
 }
 
@@ -161,7 +161,7 @@ static void cl_draw_corner (GdkWindow *window, GtkWidget *widget, GtkStyle *styl
 
        if (r->corners[corner] == CL_CORNER_NONE)
                return;
-       
+
        color = cl_get_gradient_corner_color (r, corner);
        gdk_gc_get_values (r->bordergc, &values);
 
@@ -185,21 +185,21 @@ static void cl_draw_corner (GdkWindow *window, GtkWidget *widget, GtkStyle *styl
        {
                x1 = (corner == CL_CORNER_TOPLEFT ||
                      corner == CL_CORNER_BOTTOMLEFT) ? x+1 : x+width - 2;
-               
+
                y1 = (corner == CL_CORNER_TOPLEFT ||
                      corner == CL_CORNER_TOPRIGHT) ? y+1 : y+height - 2;
-               
+
                gdk_gc_set_foreground (r->bordergc, color);
                gdk_draw_point (window, r->bordergc, x1, y1);
-               
+
                gdk_gc_set_foreground (r->bordergc, &aacolor);
-               
+
                x1 = (corner == CL_CORNER_TOPLEFT ||
                      corner == CL_CORNER_BOTTOMLEFT) ? x+1 : x+width-2;
 
                y1 = (corner == CL_CORNER_TOPLEFT ||
-                     corner == CL_CORNER_TOPRIGHT) ? y : y+height-1;           
-               
+                     corner == CL_CORNER_TOPRIGHT) ? y : y+height-1;
+
                gdk_draw_point (window, r->bordergc, x1, y1);
 
                x1 = (corner == CL_CORNER_TOPLEFT ||
@@ -209,7 +209,7 @@ static void cl_draw_corner (GdkWindow *window, GtkWidget *widget, GtkStyle *styl
                      corner == CL_CORNER_TOPRIGHT) ? y+1 : y+height-2;
 
                gdk_draw_point (window, r->bordergc, x1, y1);
-                                                               
+
        }
        else if (r->corners[corner] == CL_CORNER_NARROW)
        {
@@ -218,7 +218,7 @@ static void cl_draw_corner (GdkWindow *window, GtkWidget *widget, GtkStyle *styl
 
                y1 = (corner == CL_CORNER_TOPLEFT ||
                      corner == CL_CORNER_TOPRIGHT) ? y : y+height-1;
-                               
+
                gdk_gc_set_foreground (r->bordergc, &aacolor);
                gdk_draw_point (window, r->bordergc, x1, y1);
        }
@@ -258,8 +258,8 @@ void cl_rectangle_set_button(CLRectangle *r, GtkStyle *style,
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        int              my_state_type = (state_type == GTK_STATE_ACTIVE) ? 2 : 0;
        GdkGC           *border_gc = clearlooks_style->border_gc[CL_BORDER_UPPER+my_state_type];
-       
-       
+
+
        cl_rectangle_init (r, style->bg_gc[state_type],
                           clearlooks_style->border_gc[CL_BORDER_UPPER+my_state_type],
                           tl, tr, bl, br);
@@ -279,9 +279,9 @@ void cl_rectangle_set_button(CLRectangle *r, GtkStyle *style,
 
        r->topleft     = (state_type != GTK_STATE_ACTIVE) ? style->light_gc[state_type] : clearlooks_style->shade_gc[4];
        r->bottomright = (state_type != GTK_STATE_ACTIVE) ? clearlooks_style->shade_gc[1] : NULL;
-       
+
        shade (&style->bg[state_type], &r->tmp_color, 0.93);
-       
+
 
        cl_rectangle_set_gradient (&r->fill_gradient,
                                   &style->bg[state_type],
@@ -296,21 +296,21 @@ void cl_rectangle_set_entry (CLRectangle *r, GtkStyle *style,
 {
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        GdkGC *bordergc;
-       
+
        if (has_focus)
                bordergc = clearlooks_style->spot3_gc;
        else if (state_type != GTK_STATE_INSENSITIVE)
                bordergc = clearlooks_style->border_gc[CL_BORDER_LOWER];
        else
-               bordergc = clearlooks_style->shade_gc[3];               
-       
+               bordergc = clearlooks_style->shade_gc[3];
+
        cl_rectangle_init (r, style->base_gc[state_type], bordergc,
                       tl, tr, bl, br);
 
        if (state_type != GTK_STATE_INSENSITIVE )
                r->topleft     = (has_focus) ? clearlooks_style->spot1_gc
                                         : style->bg_gc[GTK_STATE_NORMAL];
-       
+
        if (has_focus)
                r->bottomright = clearlooks_style->spot1_gc;
        else if (state_type == GTK_STATE_INSENSITIVE)
@@ -328,24 +328,24 @@ void cl_draw_shadow(GdkWindow *window, GtkWidget *widget, GtkStyle *style,
                x1 = x+1+(r->corners[CL_CORNER_BOTTOMLEFT]/2);
                y1 = y2 = y+height-2;
                x2 = x+width - 1 - (1+r->corners[CL_CORNER_BOTTOMRIGHT]/2);
-               
+
                gdk_draw_line (window, r->bottomright, x1, y1, x2, y2);
-               
+
                x1 = x2 = x+width-2;
                y1 = y+1+(r->corners[CL_CORNER_TOPRIGHT]/2);
                y2 = y+height - 1 - (1+r->corners[CL_CORNER_BOTTOMRIGHT]/2);
 
                gdk_draw_line (window, r->bottomright, x1, y1, x2, y2);
        }
-       
+
        if (r->topleft != NULL)
        {
                x1 = x+1+(r->corners[CL_CORNER_TOPLEFT]/2);
                y1 = y2 = y+1;
                x2 = x+width-1-(1+r->corners[CL_CORNER_TOPRIGHT]/2);
-               
+
                gdk_draw_line (window, r->topleft, x1, y1, x2, y2);
-               
+
                x1 = x2 = x+1;
                y1 = y+1+(r->corners[CL_CORNER_TOPLEFT]/2);
                y2 = y+height-1-(1+r->corners[CL_CORNER_BOTTOMLEFT]/2);
@@ -371,16 +371,16 @@ void cl_rectangle_init (CLRectangle *r,
                         int tl, int tr, int bl, int br)
 {
        r->gradient_type = CL_GRADIENT_NONE;
-       
+
        r->border_gradient.from = r->border_gradient.to = NULL;
        r->fill_gradient.from   = r->fill_gradient.to   = NULL;
-       
+
        r->fillgc      = fillgc;
        r->bordergc    = bordergc;
-       
+
        r->topleft     = NULL;
        r->bottomright = NULL;
-       
+
        r->corners[CL_CORNER_TOPLEFT] = tl;
        r->corners[CL_CORNER_TOPRIGHT] = tr;
        r->corners[CL_CORNER_BOTTOMLEFT] = bl;
@@ -392,7 +392,7 @@ void cl_rectangle_set_corners (CLRectangle *r, int tl, int tr, int bl, int br)
        r->corners[CL_CORNER_TOPLEFT] = tl;
        r->corners[CL_CORNER_TOPRIGHT] = tr;
        r->corners[CL_CORNER_BOTTOMLEFT] = bl;
-       r->corners[CL_CORNER_BOTTOMRIGHT] = br; 
+       r->corners[CL_CORNER_BOTTOMRIGHT] = br;
 }
 
 void cl_set_corner_sharpness (const gchar *detail, GtkWidget *widget, CLRectangle *r)
@@ -402,7 +402,7 @@ void cl_set_corner_sharpness (const gchar *detail, GtkWidget *widget, CLRectangl
                gboolean rtl = get_direction (widget->parent) == GTK_TEXT_DIR_RTL;
                int cl = rtl ? CL_CORNER_ROUND : CL_CORNER_NONE;
                int cr = rtl ? CL_CORNER_NONE  : CL_CORNER_ROUND;
-               
+
                cl_rectangle_set_corners (r, cl, cr, cl, cr);
        }
        else if (detail && !strcmp (detail, "spinbutton_up"))
@@ -434,25 +434,25 @@ void cl_rectangle_set_clip_rectangle (CLRectangle *r, GdkRectangle *area)
 {
        if (area == NULL)
                return;
-       
+
        if (r->fillgc)
                gdk_gc_set_clip_rectangle (r->fillgc, area);
-       
+
        if (r->bordergc)
-               gdk_gc_set_clip_rectangle (r->bordergc, area);          
+               gdk_gc_set_clip_rectangle (r->bordergc, area);
 
        if (r->topleft)
-               gdk_gc_set_clip_rectangle (r->topleft, area);           
+               gdk_gc_set_clip_rectangle (r->topleft, area);
 
        if (r->bottomright)
-               gdk_gc_set_clip_rectangle (r->bottomright, area);               
+               gdk_gc_set_clip_rectangle (r->bottomright, area);
 }
 
 void cl_rectangle_reset_clip_rectangle (CLRectangle *r)
 {
        if (r->fillgc)
                gdk_gc_set_clip_rectangle (r->fillgc, NULL);
-       
+
        if (r->bordergc)
                gdk_gc_set_clip_rectangle (r->bordergc, NULL);
 
@@ -494,37 +494,37 @@ GdkPixmap* cl_progressbar_tile_new (GdkDrawable *drawable, GtkWidget *widget,
        int trans;
 
        int stripe_width   = height/2;
-       int topright       = height + stripe_width;     
+       int topright       = height + stripe_width;
        int topright_div_2 = topright/2;
 
-       double shift;   
+       double shift;
        GdkPoint points[4];
 
        GtkProgressBarOrientation orientation = gtk_progress_bar_get_orientation (GTK_PROGRESS_BAR (widget));
        gboolean is_horizontal = (orientation == GTK_PROGRESS_LEFT_TO_RIGHT || orientation == GTK_PROGRESS_RIGHT_TO_LEFT) ? 1 : 0;
-       
+
        GdkPixmap *tmp = gdk_pixmap_new (widget->window, width, height, -1);
 
        GdkColor tmp_color;
        shade (&clearlooks_style->spot2, &tmp_color, 0.90);
-       
+
        if (is_horizontal)
                draw_hgradient (tmp, style->black_gc, style, 0, 0, width, height,
                            &clearlooks_style->spot2, &tmp_color );
        else
                draw_vgradient (tmp, style->black_gc, style, 0, 0, width, height,
                            &tmp_color, &clearlooks_style->spot2); /* TODO: swap for RTL */
-       
+
        if (orientation == GTK_PROGRESS_RIGHT_TO_LEFT ||
            orientation == GTK_PROGRESS_BOTTOM_TO_TOP)
        {
                offset = -offset;
                xdir = -1;
        }
-       
+
        if (get_direction (widget) == GTK_TEXT_DIR_RTL)
                offset = -offset;
-       
+
        if (is_horizontal)
        {
                points[0] = (GdkPoint){xdir*(topright - stripe_width - topright_div_2), 0};  /* topleft */
@@ -539,11 +539,11 @@ GdkPixmap* cl_progressbar_tile_new (GdkDrawable *drawable, GtkWidget *widget,
                points[2] = (GdkPoint){0, xdir*(stripe_width - topright_div_2)};        /* bottomright */
                points[3] = (GdkPoint){0, xdir*(-topright_div_2)};                      /* bottomleft */
        }
-                                               
-       
+
+
        shift = (stripe_width*2)/(double)10;
        cl_progressbar_points_transform (points, 4, (offset*shift), is_horizontal);
-               
+
        trans = (width/2)-1-(stripe_width*2);
        cl_progressbar_points_transform (points, 4, trans, is_horizontal);
        gdk_draw_polygon (tmp, clearlooks_style->spot2_gc, TRUE, points, 4);
@@ -557,7 +557,7 @@ GdkPixmap* cl_progressbar_tile_new (GdkDrawable *drawable, GtkWidget *widget,
        trans = (width/2)-1+(stripe_width*2);
        cl_progressbar_points_transform (points, 4, trans, is_horizontal);
        gdk_draw_polygon (tmp, clearlooks_style->spot2_gc, TRUE, points, 4);
-       
+
        return tmp;
 }
 
@@ -576,9 +576,9 @@ void cl_progressbar_fill (GdkDrawable *drawable, GtkWidget *widget,
             ny = y,
             nwidth = height,
             nheight = width;
-       
+
        gdk_gc_set_clip_rectangle (gc, area);
-       
+
        switch (orientation)
        {
                case GTK_PROGRESS_LEFT_TO_RIGHT:
@@ -648,9 +648,9 @@ void cl_progressbar_fill (GdkDrawable *drawable, GtkWidget *widget,
                        break;
                }
        }
-       
+
        gdk_gc_set_clip_rectangle (gc, NULL);
-       
+
        g_object_unref (tile);
 }
 
@@ -664,7 +664,7 @@ GdkColor cl_gc_set_fg_color_shade (GdkGC *gc, GdkColormap *colormap,
        gdk_gc_get_values (gc, &values);
        gdk_rgb_find_color (colormap, &tmp_color);
        gdk_gc_set_foreground (gc, &tmp_color);
-       
+
        return values.foreground;
 }
 
@@ -675,10 +675,10 @@ static void cl_get_window_style_state (GtkWidget *widget, GtkStyle **style, GtkS
        GtkStyle *windowstyle = NULL;
        GtkWidget *tmpwidget = widget;
        GtkStateType windowstate;
-       
+
        if (widget && GTK_IS_ENTRY (widget))
                tmpwidget = tmpwidget->parent;
-       
+
        while (tmpwidget && GTK_WIDGET_NO_WINDOW (tmpwidget) && !GTK_IS_NOTEBOOK(tmpwidget))
        {
                tmpwidget = tmpwidget->parent;
@@ -692,9 +692,9 @@ static GdkGC *cl_get_window_bg_gc (GtkWidget *widget)
 {
        GtkStyle *style;
        GtkStateType state_type;
-       
+
        cl_get_window_style_state (widget, &style, &state_type);
-       
+
        return style->bg_gc[state_type];
 }
 
@@ -709,18 +709,18 @@ void cl_draw_inset (GtkStyle *style, GdkWindow *window, GtkWidget *widget,
 {
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE(style);
        ClearlooksStyle *clwindowstyle; /* style of the window this widget is on */
-       GtkStateType     windowstate;   
+       GtkStateType     windowstate;
        CLRectangle      r;
 
        cl_rectangle_init (&r, NULL, style->black_gc,
                           tl, tr, bl, br);
-       
+
        r.gradient_type = CL_GRADIENT_VERTICAL;
-       
+
        cl_get_window_style_state(widget, (GtkStyle**)&clwindowstyle, &windowstate);
-       
+
        g_assert (clwindowstyle != NULL);
-       
+
        if (GTK_WIDGET_HAS_DEFAULT (widget))
        {
                r.bordergc = style->mid_gc[GTK_STATE_NORMAL];
@@ -748,16 +748,16 @@ void cl_draw_button(GtkStyle *style, GdkWindow *window,
        GdkGC *bg_gc = NULL;
        gboolean is_active = FALSE;
        CLRectangle r;
-       
+
        /* Get the background color of the window we're on */
        bg_gc = cl_get_window_bg_gc(widget);
-       
+
        cl_rectangle_set_button (&r, style, state_type,
                                 GTK_WIDGET_HAS_DEFAULT (widget),
                                 GTK_WIDGET_HAS_FOCUS (widget),
                                 CL_CORNER_ROUND, CL_CORNER_ROUND,
                                 CL_CORNER_ROUND, CL_CORNER_ROUND);
-               
+
        if (state_type == GTK_STATE_ACTIVE)
                is_active = TRUE;
 
@@ -768,24 +768,24 @@ void cl_draw_button(GtkStyle *style, GdkWindow *window,
                cl_rectangle_set_gradient (&r.fill_gradient, &clearlooks_style->shade[1], &clearlooks_style->shade[1]);
                r.topleft     = clearlooks_style->shade_gc[3];
                r.bottomright = clearlooks_style->shade_gc[1];
-               
+
                is_active = TRUE;
-       }       
+       }
 
        if (!is_active)
                r.fillgc = NULL;
-               
+
        if (!GTK_IS_NOTEBOOK (widget->parent))
        {
                gdk_draw_rectangle (window, bg_gc, FALSE, x, y, width-1, height-1);
-       
+
                /* Draw "sunken" look when border thickness is more than 2 pixels. */
                if (style->xthickness > 2 && style->ythickness > 2)
                cl_draw_inset (style, window, widget, area, x, y, width, height,
                               CL_CORNER_ROUND, CL_CORNER_ROUND,
                               CL_CORNER_ROUND, CL_CORNER_ROUND);
        }
-       
+
        /* Draw "sunken" look when border thickness is more than 2 pixels.*/
        if (style->xthickness > 2 && style->ythickness > 2)
        {
@@ -794,37 +794,37 @@ void cl_draw_button(GtkStyle *style, GdkWindow *window,
                height-=2;
                width-=2;
        }
-       
+
        /* Don't draw the normal gradient for normal buttons. */
 
        cl_rectangle_set_clip_rectangle (&r, area);
        cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
-       
-       
+
+
        if (!is_active)
        {
                int tmp_height = (float)height*0.25;
-       
+
                gdk_gc_set_clip_rectangle (style->bg_gc[state_type], area);
-               
+
                draw_hgradient (window, style->bg_gc[state_type], style,
                                x+2,y+2,width-4,tmp_height,
                                &clearlooks_style->button_g1[state_type],
                                    &clearlooks_style->button_g2[state_type]);
-               
+
                draw_hgradient (window, style->bg_gc[state_type], style,
                                x+2, y+2+tmp_height, width-4, height-3-tmp_height*2,
                                &clearlooks_style->button_g2[state_type],
                                    &clearlooks_style->button_g3[state_type]);
-               
+
                draw_hgradient (window, style->bg_gc[state_type], style,
                                x+2,y+height-tmp_height-1,width-4,tmp_height,
                                &clearlooks_style->button_g3[state_type],
                                    &clearlooks_style->button_g4[state_type]);
 
                gdk_gc_set_clip_rectangle (style->bg_gc[state_type], NULL);
-       }                               
-       
+       }
+
        cl_draw_shadow    (window, widget, style, x, y, width, height, &r);
        cl_rectangle_reset_clip_rectangle (&r);
 }
@@ -840,21 +840,21 @@ void cl_draw_spinbutton(GtkStyle *style, GdkWindow *window,
        GdkRectangle new_area;
 
        int tl = CL_CORNER_NONE, tr = CL_CORNER_NONE,
-           bl = CL_CORNER_NONE, br = CL_CORNER_NONE;   
-       
+           bl = CL_CORNER_NONE, br = CL_CORNER_NONE;
+
        if (area == NULL)
        {
                new_area.x = x;
                new_area.y = y;
                new_area.width = width;
                new_area.height = height;
-               area = &new_area;               
+               area = &new_area;
        }
 
        if (!strcmp (detail, "spinbutton")) /* draws the 'back' of the spinbutton */
        {
                GdkGC *bg_gc = cl_get_window_bg_gc(widget);
-               
+
                gdk_gc_set_clip_rectangle (bg_gc, area);
                gdk_draw_rectangle (window, bg_gc, FALSE, x, y, width-1, height-1);
                gdk_gc_set_clip_rectangle (bg_gc, NULL);
@@ -863,32 +863,32 @@ void cl_draw_spinbutton(GtkStyle *style, GdkWindow *window,
                        cl_draw_inset (style, window, widget, area, x, y, width, height,
                                       CL_CORNER_NONE, CL_CORNER_ROUND,
                                       CL_CORNER_NONE, CL_CORNER_ROUND);
-               
+
                return;
        }
 
        if (!strcmp (detail, "spinbutton_up"))
        {
                tr = CL_CORNER_ROUND;
-               
+
                (style->xthickness > 2 && style->ythickness > 2) ? y++ : height++;
        }
-       
+
        if (!strcmp (detail, "spinbutton_down"))
        {
                br = CL_CORNER_ROUND;
-               
+
                if (style->xthickness > 2 && style->ythickness > 2)
                        height--;
        }
-       
+
        cl_rectangle_set_button (&r, style, state_type,
                                 GTK_WIDGET_HAS_DEFAULT  (widget),
                                 GTK_WIDGET_HAS_FOCUS (widget),
                                 tl, tr,
                                 bl, br);
        width--;
-       
+
        cl_rectangle_set_clip_rectangle (&r, area);
        cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
        cl_draw_shadow    (window, widget, style, x, y, width, height, &r);
@@ -902,15 +902,15 @@ void cl_draw_combobox_entry (GtkStyle *style, GdkWindow *window,
                              gint x, gint y, gint width, gint height)
 {
        CLRectangle r;
-       
+
        gboolean rtl = get_direction (widget->parent) == GTK_TEXT_DIR_RTL;
        gboolean has_focus = GTK_WIDGET_HAS_FOCUS (widget);
-       
+
        int cl = rtl ? CL_CORNER_NONE  : CL_CORNER_ROUND,
                cr = rtl ? CL_CORNER_ROUND : CL_CORNER_NONE;
-       
+
        GdkGC *bg_gc = cl_get_window_bg_gc(widget);
-       
+
        if (rtl)
        {
                if (!has_focus)
@@ -924,7 +924,7 @@ void cl_draw_combobox_entry (GtkStyle *style, GdkWindow *window,
                width += 2;
                if (has_focus) width--; /* this gives us a 2px focus line at the right side. */
        }
-       
+
        cl_rectangle_set_entry (&r, style, state_type,
                                                   cl, cr, cl, cr,
                                                   has_focus);
@@ -944,12 +944,12 @@ void cl_draw_combobox_entry (GtkStyle *style, GdkWindow *window,
                width-=2;
                height-=2;
        }
-       
+
        cl_rectangle_set_clip_rectangle (&r, area);
 
        cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
        cl_draw_shadow (window, widget, style, x, y, width, height, &r);
-       
+
        cl_rectangle_reset_clip_rectangle (&r);
 }
 
@@ -969,16 +969,16 @@ void cl_draw_combobox_button (GtkStyle *style, GdkWindow *window,
                                 GTK_WIDGET_HAS_FOCUS (widget),
                                 CL_CORNER_NONE, CL_CORNER_ROUND,
                                 CL_CORNER_NONE, CL_CORNER_ROUND);
-       
+
        if (state_type == GTK_STATE_ACTIVE)
                is_active = TRUE;
        else
                r.fillgc = NULL;
-       
+
        /* Seriously, why can't non-gtk-apps at least try to be decent citizens?
           Take this fscking OpenOffice.org 1.9 for example. The morons responsible
           for this utter piece of crap give the clip size wrong values! :'(  */
-       
+
        if (area)
        {
                area->x = x;
@@ -989,20 +989,20 @@ void cl_draw_combobox_button (GtkStyle *style, GdkWindow *window,
 
        x--;
        width++;
-       
+
        /* Draw "sunken" look when border thickness is more than 2 pixels. */
        if (GTK_IS_COMBO(widget->parent))
                draw_inset = (widget->parent->style->xthickness > 2 &&
                          widget->parent->style->ythickness > 2);
        else
                draw_inset = (style->xthickness > 2 && style->ythickness > 2);
-               
+
        if (draw_inset)
        {
                cl_draw_inset (style, window, widget, area, x, y, width, height,
                               CL_CORNER_NONE, CL_CORNER_ROUND,
                               CL_CORNER_NONE, CL_CORNER_ROUND);
-       
+
                x++;
                y++;
                height-=2;
@@ -1013,36 +1013,36 @@ void cl_draw_combobox_button (GtkStyle *style, GdkWindow *window,
                x++;
                width--;
        }
-       
+
        if (area)
                cl_rectangle_set_clip_rectangle (&r, area);
 
        cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
-       
+
        if (!is_active)
        {
                int tmp_height = (float)height*0.25;
-       
+
                gdk_gc_set_clip_rectangle (style->bg_gc[state_type], area);
-               
+
                draw_hgradient (window, style->bg_gc[state_type], style,
                                x+2,y+2,width-4,tmp_height,
                                &clearlooks_style->button_g1[state_type],
                                    &clearlooks_style->button_g2[state_type]);
-               
+
                draw_hgradient (window, style->bg_gc[state_type], style,
                                x+2, y+2+tmp_height, width-4, height-3-tmp_height*2,
                                &clearlooks_style->button_g2[state_type],
                                    &clearlooks_style->button_g3[state_type]);
-               
+
                draw_hgradient (window, style->bg_gc[state_type], style,
                                x+2,y+height-tmp_height-1,width-4,tmp_height,
                                &clearlooks_style->button_g3[state_type],
                                    &clearlooks_style->button_g4[state_type]);
 
                gdk_gc_set_clip_rectangle (style->bg_gc[state_type], NULL);
-       }                                       
-       
+       }
+
        cl_draw_shadow    (window, widget, style, x, y, width, height, &r);
 
        if (area)
@@ -1059,31 +1059,31 @@ void cl_draw_entry (GtkStyle *style, GdkWindow *window,
        CLRectangle r;
        gboolean has_focus = GTK_WIDGET_HAS_FOCUS(widget);
        GdkGC *bg_gc = cl_get_window_bg_gc(widget);
-       
+
        gdk_draw_rectangle (window, bg_gc, FALSE, x, y, width-1, height-1);
 
        gtk_style_apply_default_background (style, window, TRUE, state_type,
                                                                                area, x+1, y+1, width-2, height-2);
 
-       
+
        cl_rectangle_set_entry (&r, style, state_type,
                                                        CL_CORNER_ROUND, CL_CORNER_ROUND,
                                                        CL_CORNER_ROUND, CL_CORNER_ROUND,
                                                        has_focus);
-       
+
        /* Draw "sunken" look when border thickness is more than 2 pixels. */
        if (style->xthickness > 2 && style->ythickness > 2)
        {
                cl_draw_inset (style, window, widget, area, x, y, width, height,
                               CL_CORNER_ROUND, CL_CORNER_ROUND,
                               CL_CORNER_ROUND, CL_CORNER_ROUND);
-       
+
                x++;
                y++;
                width-=2;
                height-=2;
        }
-       
+
        cl_rectangle_set_clip_rectangle (&r, area);
        cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
        cl_draw_shadow (window, widget, style, x, y, width, height, &r);
@@ -1102,14 +1102,14 @@ void cl_draw_optionmenu(GtkStyle *style, GdkWindow *window,
        int line_pos;
 
        option_menu_get_props (widget, &indicator_size, &indicator_spacing);
-       
+
        if (get_direction (widget) == GTK_TEXT_DIR_RTL)
                line_pos = x + (indicator_size.width + indicator_spacing.left + indicator_spacing.right) + style->xthickness;
        else
                line_pos = x + width - (indicator_size.width + indicator_spacing.left + indicator_spacing.right) - style->xthickness;
 
        cl_draw_button (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
-       
+
        gdk_draw_line (window, clearlooks_style->shade_gc[3],
                                   line_pos, y + style->ythickness - 1, line_pos,
                                   y + height - style->ythickness);
@@ -1130,7 +1130,7 @@ void cl_draw_menuitem_button (GdkDrawable *window, GtkWidget *widget, GtkStyle *
        GdkColor lower_color;
 
        shade (&style->base[GTK_STATE_SELECTED], &lower_color, 0.85);
-       
+
        if (menubar)
        {
                height++;
@@ -1141,17 +1141,17 @@ void cl_draw_menuitem_button (GdkDrawable *window, GtkWidget *widget, GtkStyle *
        {
                r->bordergc    = clearlooks_style->spot3_gc;
        }
-       
+
        cl_rectangle_set_corners (r, corner, corner, corner, corner);
-       
+
        cl_rectangle_set_gradient (&r->fill_gradient,
                                   &style->base[GTK_STATE_SELECTED], &lower_color);
 
        r->gradient_type = CL_GRADIENT_VERTICAL;
-       
+
        r->fillgc  = clearlooks_style->spot2_gc;
        r->topleft = clearlooks_style->spot1_gc;
-       
+
        cl_rectangle_set_clip_rectangle (r, area);
        cl_draw_rectangle (window, widget, style, x, y, width, height, r);
        cl_draw_shadow (window, widget, style, x, y, width, height, r);
@@ -1165,22 +1165,22 @@ void cl_draw_menuitem_flat (GdkDrawable *window, GtkWidget *widget, GtkStyle *st
        ClearlooksStyle *clearlooks_style = (ClearlooksStyle*)style;
        gboolean menubar  = (widget->parent && GTK_IS_MENU_BAR(widget->parent)) ? TRUE : FALSE;
        GdkColor tmp;
-       
+
        cl_rectangle_set_corners (r, CL_CORNER_NARROW, CL_CORNER_NARROW,
                                     CL_CORNER_NARROW, CL_CORNER_NARROW);
-       
+
        tmp = cl_gc_set_fg_color_shade (style->black_gc, style->colormap,
                                        &style->base[GTK_STATE_PRELIGHT], 0.8);
 
        r->bordergc = style->black_gc;
        r->fillgc = style->base_gc[GTK_STATE_PRELIGHT];
-       
+
        if (menubar) height++;
 
        cl_rectangle_set_clip_rectangle (r, area);
        cl_draw_rectangle (window, widget, style, x, y, width, height, r);
-       cl_rectangle_reset_clip_rectangle (r);  
-       
+       cl_rectangle_reset_clip_rectangle (r);
+
        gdk_gc_set_foreground (style->black_gc, &tmp);
 }
 
@@ -1192,29 +1192,29 @@ void cl_draw_menuitem_gradient (GdkDrawable *window, GtkWidget *widget, GtkStyle
        gboolean menubar  = (widget->parent && GTK_IS_MENU_BAR(widget->parent)) ? TRUE : FALSE;
        GdkColor tmp;
        GdkColor lower_color;
-       
+
        shade (&style->base[GTK_STATE_SELECTED], &lower_color, 0.8);
-       
+
        cl_rectangle_set_corners (r, CL_CORNER_NARROW, CL_CORNER_NARROW,
                                     CL_CORNER_NARROW, CL_CORNER_NARROW);
-       
+
        cl_rectangle_set_gradient (&r->fill_gradient,
                                   &style->base[GTK_STATE_SELECTED], &lower_color);
 
        r->gradient_type = CL_GRADIENT_VERTICAL;
-       
+
        tmp = cl_gc_set_fg_color_shade (style->black_gc, style->colormap,
                                        &style->base[GTK_STATE_PRELIGHT], 0.8);
 
        r->bordergc = style->black_gc;
        r->fillgc = style->base_gc[GTK_STATE_PRELIGHT];
-       
+
        if (menubar) height++;
 
        cl_rectangle_set_clip_rectangle (r, area);
        cl_draw_rectangle (window, widget, style, x, y, width, height, r);
        cl_rectangle_reset_clip_rectangle (r);
-       
+
        gdk_gc_set_foreground (style->black_gc, &tmp);
 }
 
@@ -1228,12 +1228,12 @@ void cl_draw_treeview_header (GtkStyle *style, GdkWindow *window,
        gint columns = 0, column_index = -1, fill_width = width;
        gboolean is_etree = strcmp("ETree", G_OBJECT_TYPE_NAME(widget->parent)) == 0;
        gboolean resizable = TRUE;
-       
+
        GdkGC *bottom = clearlooks_style->shade_gc[5];
-               
+
        if ( width < 2 || height < 2 )
                return;
-       
+
        if (GTK_IS_TREE_VIEW (widget->parent))
        {
                gtk_treeview_get_header_index (GTK_TREE_VIEW(widget->parent),
@@ -1245,20 +1245,20 @@ void cl_draw_treeview_header (GtkStyle *style, GdkWindow *window,
                gtk_clist_get_header_index (GTK_CLIST(widget->parent),
                                            widget, &column_index, &columns);
        }
-       
+
        if (area)
        {
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[0], area);
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[4], area);
-               gdk_gc_set_clip_rectangle (style->bg_gc[state_type], area);                     
+               gdk_gc_set_clip_rectangle (style->bg_gc[state_type], area);
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[5], area);
        }
-       
+
        if (state_type != GTK_STATE_NORMAL)
                fill_width-=2;
-       
+
        gdk_draw_rectangle (window, style->bg_gc[state_type], TRUE, x, y, fill_width, height-(height/3)+1);
-       
+
        draw_hgradient (window, style->bg_gc[state_type], style,
                        x, 1+y+height-(height/3), fill_width, height/3,
                        &style->bg[state_type], &clearlooks_style->inset_dark[state_type]);
@@ -1268,26 +1268,26 @@ void cl_draw_treeview_header (GtkStyle *style, GdkWindow *window,
                gdk_draw_line (window, clearlooks_style->shade_gc[4], x+width-2, y+4, x+width-2, y+height-5);
                gdk_draw_line (window, clearlooks_style->shade_gc[0], x+width-1, y+4, x+width-1, y+height-5);
        }
-       
+
        /* left light line */
        if (column_index == 0)
                gdk_draw_line (window, clearlooks_style->shade_gc[0], x, y+1, x, y+height-2);
-               
+
        /* top light line */
        gdk_draw_line (window, clearlooks_style->shade_gc[0], x, y, x+width-1, y);
-       
+
        /* bottom dark line */
        if (state_type == GTK_STATE_INSENSITIVE)
                bottom = clearlooks_style->shade_gc[3];
-       
-       
+
+
        gdk_draw_line (window, bottom, x, y+height-1, x+width-1, y+height-1);
-       
+
        if (area)
        {
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[0], NULL);
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[4], NULL);
                gdk_gc_set_clip_rectangle (style->bg_gc[state_type], NULL);
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[5], NULL);
-       }               
+       }
 }
index 0605cba1f954663b47a50b872ea4aacb88e3a7b6..eb707db6c0e80ab3d052720d63d0d273b8f718e7 100644 (file)
@@ -21,17 +21,17 @@ typedef struct
 {
        CLGradient      fill_gradient;
        CLGradient      border_gradient;
-       
+
        CLGradientType  gradient_type;
-       
+
        GdkGC          *bordergc;
        GdkGC          *fillgc;
 
        guint8          corners[4];
-       
+
        GdkGC          *topleft;                /* top + left shadow */
        GdkGC          *bottomright;    /* bottom + right shadow */
-       
+
        GdkColor        tmp_color;              /* used for gradient */
 } CLRectangle;
 
@@ -79,7 +79,7 @@ void cl_rectangle_set_entry (CLRectangle *r, GtkStyle *style,
                             CLBorderType tl, CLBorderType tr,
                             CLBorderType bl, CLBorderType br,
                             gboolean has_focus);
-                                                       
+
 void cl_draw_shadow(GdkWindow *window, GtkWidget *widget, GtkStyle *style,
                     int x, int y, int width, int height, CLRectangle *r);
 
@@ -99,12 +99,12 @@ void cl_rectangle_reset (CLRectangle *r, GtkStyle *style);
 
 GdkPixmap* cl_progressbar_tile_new (GdkDrawable *drawable, GtkWidget *widget,
                               GtkStyle *style, gint height, gint offset);
-                               
+
 void cl_progressbar_fill (GdkDrawable *drawable, GtkWidget *widget,
                           GtkStyle *style, GdkGC *gc,
                           gint x, gint y, gint width, gint height,
                                                  guint8 offset, GdkRectangle *area);
-                                               
+
 GdkColor cl_gc_set_fg_color_shade (GdkGC *gc, GdkColormap *colormap,
                                    GdkColor *from, gfloat s);
 
@@ -113,31 +113,31 @@ void cl_draw_spinbutton(GtkStyle *style, GdkWindow *window,
                         GdkRectangle *area,
                         GtkWidget *widget, const gchar *detail,
                         gint x, gint y, gint width, gint height);
-                                               
+
 void cl_draw_button(GtkStyle *style, GdkWindow *window,
                     GtkStateType state_type, GtkShadowType shadow_type,
                     GdkRectangle *area,
                     GtkWidget *widget, const gchar *detail,
                     gint x, gint y, gint width, gint height);
-                                       
+
 void cl_draw_entry (GtkStyle *style, GdkWindow *window,
                     GtkStateType state_type, GtkShadowType shadow_type,
                     GdkRectangle *area,
                     GtkWidget *widget, const gchar *detail,
                     gint x, gint y, gint width, gint height);
-                                       
+
 void cl_draw_combobox_entry (GtkStyle *style, GdkWindow *window,
                              GtkStateType state_type, GtkShadowType shadow_type,
                              GdkRectangle *area,
                              GtkWidget *widget, const gchar *detail,
                              gint x, gint y, gint width, gint height);
-               
+
 void cl_draw_combobox_button (GtkStyle *style, GdkWindow *window,
                              GtkStateType state_type, GtkShadowType shadow_type,
                              GdkRectangle *area,
                              GtkWidget *widget, const gchar *detail,
                              gint x, gint y, gint width, gint height);
-                                                       
+
 void cl_draw_menuitem_button (GdkDrawable *window, GtkWidget *widget, GtkStyle *style,
                               GdkRectangle *area, GtkStateType state_type,
                               int x, int y, int wiidth, int height, CLRectangle *r);
@@ -149,11 +149,11 @@ void cl_draw_menuitem_flat (GdkDrawable *window, GtkWidget *widget, GtkStyle *st
 void cl_draw_menuitem_gradient (GdkDrawable *window, GtkWidget *widget, GtkStyle *style,
                                 GdkRectangle *area, GtkStateType state_type,
                                 int x, int y, int wiidth, int height, CLRectangle *r);
-                                                       
+
 void cl_draw_treeview_header (GtkStyle *style, GdkWindow *window,
                               GtkStateType state_type, GtkShadowType shadow_type,
                               GdkRectangle *area,
                               GtkWidget *widget, const gchar *detail,
                               gint x, gint y, gint width, gint height);
-                                                       
+
 #endif /* CLEARLOOKS_DRAW_H */
index f3af2044fee8f2f410eb4b60e9d64065f894131b..639edbabb752dd5629de0d707b032e5c02c3d14e 100644 (file)
@@ -251,20 +251,20 @@ theme_parse_listviewitemstyle(GtkSettings  *settings,
                           guint8       *listviewitemstyle)
 {
   guint token;
-       
+
   token = g_scanner_get_next_token(scanner);
-       
+
   token = g_scanner_get_next_token(scanner);
 
   if (token != G_TOKEN_EQUAL_SIGN)
      return G_TOKEN_EQUAL_SIGN;
-               
+
   token = g_scanner_get_next_token(scanner);
   if (token != G_TOKEN_INT)
     return G_TOKEN_INT;
-               
+
   *listviewitemstyle = scanner->value.v_int;
-       
+
   return G_TOKEN_NONE;
 }
 
@@ -272,7 +272,7 @@ static guint
 clearlooks_rc_style_parse (GtkRcStyle *rc_style,
                           GtkSettings  *settings,
                           GScanner   *scanner)
-               
+
 {
   static GQuark scope_id = 0;
   ClearlooksRcStyle *clearlooks_style = CLEARLOOKS_RC_STYLE (rc_style);
@@ -359,15 +359,15 @@ clearlooks_rc_style_merge (GtkRcStyle *dest,
                           GtkRcStyle *src)
 {
        ClearlooksRcStyle *dest_w, *src_w;
-       
+
        parent_class->merge (dest, src);
-       
+
        if (!CLEARLOOKS_IS_RC_STYLE (src))
                return;
-       
+
        src_w = CLEARLOOKS_RC_STYLE (src);
        dest_w = CLEARLOOKS_RC_STYLE (dest);
-       
+
        dest_w->contrast = src_w->contrast;
        dest_w->sunkenmenubar = src_w->sunkenmenubar;
        dest_w->progressbarstyle = src_w->progressbarstyle;
index 29cc30dd9b18d216e6198817c1eff892d54c0c51..da4720ed56403ff468586746d0209d45182c658d 100644 (file)
@@ -43,7 +43,7 @@ static void cl_progressbar_remove (gpointer data)
 
        progressbars = g_list_remove (progressbars, data);
        g_object_unref (data);
-       
+
        if (g_list_first(progressbars) == NULL) {
                g_source_remove(timer_id);
                timer_id = 0;
@@ -58,11 +58,11 @@ static void update_progressbar (gpointer data, gpointer user_data)
                return;
 
        fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (data));
-       
+
        /* update only if not filled */
        if (fraction < 1.0)
                gtk_widget_queue_resize ((GtkWidget*)data);
-       
+
        if (fraction >= 1.0 || GTK_PROGRESS (data)->activity_mode)
                cl_progressbar_remove (data);
 }
@@ -89,7 +89,7 @@ static void cl_progressbar_add (gpointer data)
 
        g_object_ref (data);
        g_signal_connect ((GObject*)data, "unrealize", G_CALLBACK (cl_progressbar_remove), data);
-       
+
        if (timer_id == 0)
                timer_id = g_timeout_add (100, timer_func, NULL);
 }
@@ -98,7 +98,7 @@ static GdkColor *
 clearlooks_get_spot_color (ClearlooksRcStyle *clearlooks_rc)
 {
        GtkRcStyle *rc = GTK_RC_STYLE (clearlooks_rc);
-       
+
        if (clearlooks_rc->has_spot_color)
                return &clearlooks_rc->spot_color;
        else
@@ -128,12 +128,12 @@ draw_tab (GtkStyle      *style,
        GtkRequisition indicator_size;
        GtkBorder indicator_spacing;
        gint arrow_height;
-       
+
        option_menu_get_props (widget, &indicator_size, &indicator_spacing);
-       
+
        indicator_size.width += (indicator_size.width % 2) - 1;
        arrow_height = indicator_size.width / 2 + 2;
-       
+
        x += (width - indicator_size.width) / 2;
        y += height/2;
 
@@ -147,11 +147,11 @@ draw_tab (GtkStyle      *style,
                            GTK_ARROW_DOWN, 1+x, 1+y+1,
                            indicator_size.width, arrow_height);
        }
-       
+
        draw_arrow (window, style->fg_gc[state_type], area,
                    GTK_ARROW_UP, x, y-arrow_height,
                    indicator_size.width, arrow_height);
-       
+
        draw_arrow (window, style->fg_gc[state_type], area,
                    GTK_ARROW_DOWN, x, y+1,
                    indicator_size.width, arrow_height);
@@ -175,9 +175,9 @@ clearlooks_draw_arrow (GtkStyle      *style,
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        gint original_width, original_x;
        GdkGC *gc;
-       
+
        sanitize_size (window, &width, &height);
-       
+
        if (is_combo_box (widget))
        {
                width = 7;
@@ -194,57 +194,57 @@ clearlooks_draw_arrow (GtkStyle      *style,
                                    GTK_ARROW_DOWN, 1+x, 1+y+1,
                                    width, height);
                }
-       
+
                draw_arrow (window, style->fg_gc[state], area,
                            GTK_ARROW_UP, x, y-height,
                            width, height);
-       
+
                draw_arrow (window, style->fg_gc[state], area,
                            GTK_ARROW_DOWN, x, y+1,
                            width, height);
-               
+
                return;
        }
-       
+
        original_width = width;
        original_x = x;
-       
+
        /* Make spinbutton arrows and arrows in menus
        * slightly larger to get the right pixels drawn */
        if (DETAIL ("spinbutton"))
                height += 1;
-       
+
        if (DETAIL("menuitem"))
        {
                width = 6;
                height = 7;
        }
-       
+
        /* Compensate arrow position for "sunken" look */
        if (DETAIL ("spinbutton") && arrow_type == GTK_ARROW_DOWN &&
            style->xthickness > 2 && style->ythickness > 2)
                        y -= 1;
-       
+
        if (widget && widget->parent && GTK_IS_COMBO (widget->parent->parent))
        {
                width -= 2;
                height -=2;
                x++;
        }
-       
+
        calculate_arrow_geometry (arrow_type, &x, &y, &width, &height);
-       
+
        if (DETAIL ("menuitem"))
                x = original_x + original_width - width;
-       
+
        if (DETAIL ("spinbutton") && (arrow_type == GTK_ARROW_DOWN))
                y += 1;
-       
+
        if (state == GTK_STATE_INSENSITIVE)
                draw_arrow (window, style->light_gc[state], area, arrow_type, x + 1, y + 1, width, height);
 
        gc = style->fg_gc[state];
-               
+
        draw_arrow (window, gc, area, arrow_type, x, y, width, height);
 }
 
@@ -259,7 +259,7 @@ draw_flat_box (DRAW_ARGS)
 
        sanitize_size (window, &width, &height);
 
-       if (detail &&   
+       if (detail &&
            clearlooks_style->listviewitemstyle == 1 &&
            state_type == GTK_STATE_SELECTED && (
            !strncmp ("cell_even", detail, strlen ("cell_even")) ||
@@ -279,7 +279,7 @@ draw_flat_box (DRAW_ARGS)
                        gc = style->base_gc[GTK_STATE_ACTIVE];
                        upper_color = &style->base[GTK_STATE_ACTIVE];
                }
-               
+
                if (GTK_IS_TREE_VIEW (widget) && 0)
                {
                        GtkTreeSelection *sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
@@ -292,12 +292,12 @@ draw_flat_box (DRAW_ARGS)
                                return;
                        }
                }
-               
+
                shade (upper_color, &lower_color, 0.8);
 
                if (area)
                        gdk_gc_set_clip_rectangle (gc, area);
-               
+
                draw_hgradient (window, gc, style,
                                x, y, width, height, upper_color, &lower_color);
 
@@ -319,7 +319,7 @@ draw_shadow (DRAW_ARGS)
 {
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        CLRectangle r;
-       
+
        GdkGC *outer_gc = clearlooks_style->shade_gc[4];
        GdkGC *gc1 = NULL;
        GdkGC *gc2 = NULL;
@@ -358,12 +358,12 @@ draw_shadow (DRAW_ARGS)
                        gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[3], area);
                        gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[0], area);
                }
-               
+
                gdk_draw_line (window, clearlooks_style->shade_gc[3],
                               x, y, x + width, y);
                gdk_draw_line (window, clearlooks_style->shade_gc[0],
                               x, y + 1, x + width, y + 1);
-               
+
                if (area)
                {
                        gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[3], NULL);
@@ -411,7 +411,7 @@ draw_shadow (DRAW_ARGS)
                {
                        GdkGC *a = clearlooks_style->shade_gc[(shadow_type == GTK_SHADOW_ETCHED_IN) ? 0 : 3];
                        GdkGC *b = clearlooks_style->shade_gc[(shadow_type == GTK_SHADOW_ETCHED_IN) ? 3 : 0];
-       
+
                        cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_NONE,
                                                      CL_CORNER_NONE, CL_CORNER_NONE);
 
@@ -419,17 +419,17 @@ draw_shadow (DRAW_ARGS)
                        cl_rectangle_set_clip_rectangle (&r, area);
                        cl_draw_rectangle (window, widget, style, x+1, y+1, width-1, height-1, &r);
                        cl_rectangle_reset_clip_rectangle (&r);
-       
+
                        r.bordergc = b;
                        cl_rectangle_set_clip_rectangle (&r, area);
-                       cl_draw_rectangle (window, widget, style, x, y, width-1, height-1, &r); 
+                       cl_draw_rectangle (window, widget, style, x, y, width-1, height-1, &r);
                        cl_rectangle_reset_clip_rectangle (&r);
                }
                else if (shadow_type == GTK_SHADOW_ETCHED_IN)
                {
                        GdkGC *a = clearlooks_style->shade_gc[(shadow_type == GTK_SHADOW_ETCHED_IN) ? 3 : 0];
                        GdkGC *b = clearlooks_style->shade_gc[(shadow_type == GTK_SHADOW_ETCHED_IN) ? 0 : 3];
-       
+
                        cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_NONE,
                                                      CL_CORNER_NONE, CL_CORNER_NONE);
 
@@ -437,12 +437,12 @@ draw_shadow (DRAW_ARGS)
                        cl_rectangle_set_clip_rectangle (&r, area);
                        cl_draw_rectangle (window, widget, style, x+1, y+1, width-1, height-1, &r);
                        cl_rectangle_reset_clip_rectangle (&r);
-       
+
                        r.bordergc = b;
                        cl_rectangle_set_clip_rectangle (&r, area);
-                       cl_draw_rectangle (window, widget, style, x, y, width-1, height-1, &r); 
+                       cl_draw_rectangle (window, widget, style, x, y, width-1, height-1, &r);
                        cl_rectangle_reset_clip_rectangle (&r);
-               }               
+               }
                else
                        parent_class->draw_shadow (style, window, state_type, shadow_type,
                                                   area, widget, detail,
@@ -464,7 +464,7 @@ draw_box_gap (DRAW_ARGS,
 {
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        CLRectangle r;
-       
+
        GdkRegion *area_region = NULL,
                  *gap_region  = NULL;
        GdkRectangle light_rect;
@@ -473,10 +473,10 @@ draw_box_gap (DRAW_ARGS,
 #if DEBUG
                printf("draw_box_gap: %s %d %d %d %d\n", detail, x, y, width, height);
 #endif
-       
+
        g_return_if_fail (GTK_IS_STYLE (style));
        g_return_if_fail (window != NULL);
-       
+
        sanitize_size (window, &width, &height);
 
        cl_rectangle_reset (&r, style);
@@ -493,7 +493,7 @@ draw_box_gap (DRAW_ARGS,
                GdkRectangle tmp = { x, y, width, height };
                area_region = gdk_region_rectangle (&tmp);
        }
-       
+
        switch (gap_side)
        {
                case GTK_POS_TOP:
@@ -503,7 +503,7 @@ draw_box_gap (DRAW_ARGS,
 
                        GDK_RECTANGLE_SET (light_rect, x+gap_x+1, y, x+gap_x+1, y+1);
                        GDK_RECTANGLE_SET (dark_rect, x+gap_x+gap_width-2, y, x+gap_x+gap_width-2, y);
-                               
+
                        cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_NONE,
                                                      CL_CORNER_ROUND, CL_CORNER_ROUND);
 
@@ -513,7 +513,7 @@ draw_box_gap (DRAW_ARGS,
                {
                        GdkRectangle rect = { x+gap_x+1, y+height-2, gap_width-2, 2 };
                        gap_region = gdk_region_rectangle (&rect);
-                               
+
                        GDK_RECTANGLE_SET (light_rect, x+gap_x+1, y+height-2, x+gap_x+1, y+height-1);
                        GDK_RECTANGLE_SET (dark_rect, x+gap_x+gap_width-2, y+height-2, x+gap_x+gap_width-2, y+height-1);
 
@@ -526,37 +526,37 @@ draw_box_gap (DRAW_ARGS,
                {
                        GdkRectangle rect = { x, y+gap_x+1, 2, gap_width-2 };
                        gap_region = gdk_region_rectangle (&rect);
-                               
+
                        GDK_RECTANGLE_SET (light_rect, x, y+gap_x+1, x+1, y+gap_x+1);
                        GDK_RECTANGLE_SET (dark_rect, x, y+gap_x+gap_width-2, x, y+gap_x+gap_width-2);
 
                        cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_ROUND,
                                                      CL_CORNER_NONE, CL_CORNER_ROUND);
                        break;
-               }               
+               }
                case GTK_POS_RIGHT:
                {
                        GdkRectangle rect = { x+width-2, y+gap_x+1, 2, gap_width-2 };
                        gap_region = gdk_region_rectangle (&rect);
-                               
+
                        GDK_RECTANGLE_SET (light_rect, x+width-2, y+gap_x+1, x+width-1, y+gap_x+1);
                        GDK_RECTANGLE_SET (dark_rect, x+width-2, y+gap_x+gap_width-2, x+width-1, y+gap_x+gap_width-2);
 
                        cl_rectangle_set_corners (&r, CL_CORNER_ROUND, CL_CORNER_NONE,
                                                      CL_CORNER_ROUND, CL_CORNER_NONE);
                        break;
-               }               
+               }
        }
-               
+
        gdk_region_subtract (area_region, gap_region);
-               
+
        gdk_gc_set_clip_region (r.bordergc,    area_region);
        gdk_gc_set_clip_region (r.topleft,     area_region);
        gdk_gc_set_clip_region (r.bottomright, area_region);
-       
+
        gdk_region_destroy (area_region);
        gdk_region_destroy (gap_region);
-       
+
        gdk_draw_rectangle (window, style->bg_gc[state_type], TRUE, x, y, width, height);
 
        cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
@@ -566,12 +566,12 @@ draw_box_gap (DRAW_ARGS,
        gdk_gc_set_clip_region (r.bordergc,    NULL);
        gdk_gc_set_clip_region (r.topleft,     NULL);
        gdk_gc_set_clip_region (r.bottomright, NULL);
-       
+
        /* it's a semi hack */
        gdk_draw_line (window, style->light_gc[state_type],
                       light_rect.x, light_rect.y,
                       light_rect.width, light_rect.height);
-               
+
        gdk_draw_line (window, clearlooks_style->shade_gc[1],
                       dark_rect.x, dark_rect.y,
                       dark_rect.width, dark_rect.height);
@@ -592,9 +592,9 @@ draw_extension (DRAW_ARGS, GtkPositionType gap_side)
 
        g_return_if_fail (GTK_IS_STYLE (style));
        g_return_if_fail (window != NULL);
-       
+
        sanitize_size (window, &width, &height);
-       
+
        if (DETAIL ("tab"))
        {
                GdkRectangle new_area;
@@ -603,12 +603,12 @@ draw_extension (DRAW_ARGS, GtkPositionType gap_side)
                cl_rectangle_set_button (&r, style, state_type, FALSE, FALSE,
                                                                CL_CORNER_ROUND, CL_CORNER_ROUND,
                                                                CL_CORNER_ROUND, CL_CORNER_ROUND);
-               
+
                if (state_type == GTK_STATE_ACTIVE)
                        shade (&style->bg[state_type], &tmp_color, 1.08);
                else
                        shade (&style->bg[state_type], &tmp_color, 1.05);
-               
+
                if (area)
                {
                        new_area = *area;
@@ -620,7 +620,7 @@ draw_extension (DRAW_ARGS, GtkPositionType gap_side)
                        new_area.width = width;
                        new_area.height = height;
                }
-               
+
                switch (gap_side)
                {
                        case GTK_POS_BOTTOM:
@@ -666,20 +666,20 @@ draw_extension (DRAW_ARGS, GtkPositionType gap_side)
                                               &clearlooks_style->border[CL_BORDER_LOWER+my_state_type]);
                                break;
                }
-               
-               r.topleft = style->light_gc[state_type];                
+
+               r.topleft = style->light_gc[state_type];
                r.bottomright = (state_type == GTK_STATE_NORMAL) ? clearlooks_style->shade_gc[1] : NULL;
 
                cl_rectangle_set_clip_rectangle (&r, &new_area);
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_draw_shadow (window, widget, style, x, y, width, height, &r);
                cl_rectangle_reset_clip_rectangle (&r);
-               
+
                /* draw the selection stripe */
                if (state_type != GTK_STATE_ACTIVE) {
                        cl_rectangle_set_gradient (&r.fill_gradient, NULL, NULL);
                        r.fillgc = clearlooks_style->spot2_gc;
-                       
+
                        switch (gap_side)
                        {
                                case GTK_POS_BOTTOM:
@@ -717,14 +717,14 @@ draw_extension (DRAW_ARGS, GtkPositionType gap_side)
                                                                      CL_CORNER_ROUND, CL_CORNER_NONE);
                                        cl_rectangle_set_gradient (&r.border_gradient, &clearlooks_style->spot3, &clearlooks_style->spot2);
                                        r.gradient_type = CL_GRADIENT_HORIZONTAL;
-                               
+
                                        cl_rectangle_set_clip_rectangle (&r, &new_area);
                                        cl_draw_rectangle (window, widget, style, x, y, 3, height, &r);
                                        cl_rectangle_reset_clip_rectangle (&r);
                                        break;
                        }
                }
-               
+
 
        }
        else
@@ -752,16 +752,16 @@ draw_handle (DRAW_ARGS, GtkOrientation orientation)
        int i;
        int n_lines;
        int offset;
-       
+
 #if DEBUG
                printf("draw_handle: %s %d %d %d %d\n", detail, x, y, width, height);
 #endif
 
        g_return_if_fail (GTK_IS_STYLE (style));
        g_return_if_fail (window != NULL);
-       
+
        sanitize_size (window, &width, &height);
-       
+
        if (state_type == GTK_STATE_PRELIGHT)
                gtk_style_apply_default_background (style, window,
                                          widget && !GTK_WIDGET_NO_WINDOW (widget),
@@ -786,10 +786,10 @@ draw_handle (DRAW_ARGS, GtkOrientation orientation)
             orientation == GTK_ORIENTATION_VERTICAL )
        {
                /* The line in the toolbar */
-       
+
                light_gc = style->light_gc[state_type];
                dark_gc = clearlooks_style->shade_gc[3];
-               
+
                if (area)
                {
                        gdk_gc_set_clip_rectangle (light_gc, area);
@@ -810,14 +810,14 @@ draw_handle (DRAW_ARGS, GtkOrientation orientation)
 
                gdk_draw_line (window, clearlooks_style->shade_gc[0], x, y, x + width, y);
                gdk_draw_line (window, clearlooks_style->shade_gc[3], x, y + height - 1, x + width, y + height - 1);
-                       
+
                if (area)
                {
                        gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[0], NULL);
                        gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[3], NULL);
                }
        }
-       
+
        light_gc = clearlooks_style->shade_gc[0];
        dark_gc = clearlooks_style->shade_gc[4];
 
@@ -825,7 +825,7 @@ draw_handle (DRAW_ARGS, GtkOrientation orientation)
        rect.y = y + ythick;
        rect.width = width - (xthick * 2);
        rect.height = height - (ythick * 2);
-       
+
        if (area)
                intersect = gdk_rectangle_intersect (area, &rect, &dest);
        else
@@ -839,19 +839,19 @@ draw_handle (DRAW_ARGS, GtkOrientation orientation)
 
        gdk_gc_set_clip_rectangle (light_gc, &dest);
        gdk_gc_set_clip_rectangle (dark_gc, &dest);
-       
+
        n_lines = (!strcmp (detail, "paned")) ? 21 : 11;
 
        if (orientation == GTK_ORIENTATION_VERTICAL)
-       {       
+       {
                h = width - 2 * xthick;
                h = MAX (3, h - 6);
-               
+
                xx = x + (width - h) / 2;
                offset = (height - 2*ythick - 2*n_lines)/2 + 1;
                if (offset < 0)
                        offset = 0;
-                       
+
                for (i = 0, yy = y + ythick + offset; yy <= (y + height - ythick - 1) && i < n_lines; yy += 2, i++)
                {
                        gdk_draw_line (window, dark_gc, xx, yy, xx + h, yy);
@@ -862,12 +862,12 @@ draw_handle (DRAW_ARGS, GtkOrientation orientation)
        {
                h = height - 2 * ythick;
                h = MAX (3, h - 6);
-               
+
                yy = y + (height - h) / 2;
                offset = (width - 2*xthick - 2*n_lines)/2 + 1;
                if (offset < 0)
                        offset = 0;
-               
+
                for (i = 0, xx = x + xthick + offset;  i < n_lines; xx += 2, i++)
                {
                        gdk_draw_line (window, dark_gc, xx, yy, xx, yy + h);
@@ -891,13 +891,13 @@ draw_box (DRAW_ARGS)
 #ifdef DEBUG
                printf("draw_box: %s %d %d %d %d\n", detail, x, y, width, height);
 #endif
-       
+
        g_return_if_fail (style != NULL);
        g_return_if_fail (window != NULL);
 
        if (width == -1 || height == -1)
                false_size = TRUE;
-               
+
        if ((width == -1) && (height == -1))
                gdk_window_get_size (window, &width, &height);
        else if (width == -1)
@@ -909,7 +909,7 @@ draw_box (DRAW_ARGS)
 
        if (widget == NULL)
                return;
-       
+
        /* listview headers */
        if (widget && DETAIL ("button") && widget->parent &&
                 (GTK_IS_TREE_VIEW(widget->parent) ||
@@ -938,7 +938,7 @@ draw_box (DRAW_ARGS)
                 !strcmp (detail, "spinbutton_up") ||
                 !strcmp (detail, "spinbutton_down") ||
                 !strcmp (detail, "spinbutton")))
-       {               
+       {
                cl_draw_spinbutton (style, window, state_type, shadow_type, area,
                                    widget, detail, x, y, width, height);
        }
@@ -955,7 +955,7 @@ draw_box (DRAW_ARGS)
                        r.fill_gradient.to = &clearlooks_style->shade[2];
                        r.bottomright = clearlooks_style->shade_gc[2];
                }
-               
+
                cl_set_corner_sharpness (detail, widget, &r);
 
                if (!strcmp (detail, "spinbutton_up"))
@@ -971,24 +971,24 @@ draw_box (DRAW_ARGS)
                        gtk_style_apply_default_background (style, window, FALSE, state_type,
                                                            area, x, y, width, height);
                }
-       
-               cl_rectangle_set_clip_rectangle (&r, area);     
+
+               cl_rectangle_set_clip_rectangle (&r, area);
                cl_draw_rectangle (window, widget, style, x+1, y+1, width-2, height-2, &r);
                cl_draw_shadow (window, widget, style, x+1, y+1, width-2, height-2, &r);
-               cl_rectangle_reset_clip_rectangle (&r);         
+               cl_rectangle_reset_clip_rectangle (&r);
        }
        else if (DETAIL ("trough") && GTK_IS_PROGRESS_BAR (widget))
        {
                GdkPoint points[4] = { {x,y}, {x+width-1,y}, {x,y+height-1}, {x+width-1,y+height-1} };
-               
+
                gdk_draw_points (window, style->bg_gc[state_type], points, 4);
-               
+
                r.bordergc = clearlooks_style->shade_gc[5];
                r.fillgc   = clearlooks_style->shade_gc[2];
-                       
+
                cl_rectangle_set_corners (&r, CL_CORNER_NARROW, CL_CORNER_NARROW,
                                                  CL_CORNER_NARROW, CL_CORNER_NARROW);
-               
+
                cl_rectangle_set_clip_rectangle (&r, area);
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_rectangle_reset_clip_rectangle (&r);
@@ -1001,11 +1001,11 @@ draw_box (DRAW_ARGS)
                            *shadow = clearlooks_style->shade_gc[4];
                GdkColor upper_color = *clearlooks_get_spot_color (CLEARLOOKS_RC_STYLE (style->rc_style)),
                                 lower_color;
-               
+
                GtkAdjustment *adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
-               
+
                GtkOrientation orientation = GTK_RANGE (widget)->orientation;
-               
+
                gint fill_size = (orientation ? height : width) *
                                 (1 / ((adjustment->upper - adjustment->lower) /
                                      (adjustment->value - adjustment->lower)));
@@ -1020,60 +1020,60 @@ draw_box (DRAW_ARGS)
                        x += (width - SCALE_SIZE) / 2;
                        width = SCALE_SIZE;
                }
-               
+
                if (state_type == GTK_STATE_INSENSITIVE)
                {
                        outer  = clearlooks_style->shade_gc[4];
                        inner  = clearlooks_style->shade_gc[2];
                        shadow = clearlooks_style->shade_gc[3];
                }
-               
+
                cl_rectangle_init (&r, inner, outer, CL_CORNER_NONE, CL_CORNER_NONE,
                                                     CL_CORNER_NONE, CL_CORNER_NONE );
-               
+
                r.topleft = shadow;
-               
-               cl_rectangle_set_clip_rectangle (&r, area);     
+
+               cl_rectangle_set_clip_rectangle (&r, area);
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_draw_shadow (window, widget, style, x, y, width, height, &r);
-               cl_rectangle_reset_clip_rectangle (&r); 
+               cl_rectangle_reset_clip_rectangle (&r);
 
                /* DRAW FILL */
                shade (&upper_color, &lower_color, 1.3);
-               
+
                r.bordergc = clearlooks_style->spot3_gc;
                r.fillgc   = style->bg_gc[state_type];
-               
+
                r.gradient_type = (orientation == GTK_ORIENTATION_HORIZONTAL ) ? CL_GRADIENT_VERTICAL
                                                                                                                                           : CL_GRADIENT_HORIZONTAL;
-               
+
                cl_rectangle_set_gradient (&r.fill_gradient, &upper_color, &lower_color);
-               
-               cl_rectangle_set_clip_rectangle (&r, area);     
+
+               cl_rectangle_set_clip_rectangle (&r, area);
                if (orientation == GTK_ORIENTATION_HORIZONTAL && fill_size > 1)
                {
                        if (gtk_range_get_inverted(GTK_RANGE(widget)) != (get_direction(widget) == GTK_TEXT_DIR_RTL))
                                cl_draw_rectangle (window, widget, style, x+width-fill_size, y, fill_size, height, &r);
                        else
-                               cl_draw_rectangle (window, widget, style, x, y, fill_size, height, &r);                         
+                               cl_draw_rectangle (window, widget, style, x, y, fill_size, height, &r);
                }
                else if (fill_size > 1)
                {
                        if (gtk_range_get_inverted (GTK_RANGE (widget)))
                                cl_draw_rectangle (window, widget, style, x, y+height-fill_size, width, fill_size, &r);
                        else
-                               cl_draw_rectangle (window, widget, style, x, y, width, fill_size, &r);                  
+                               cl_draw_rectangle (window, widget, style, x, y, width, fill_size, &r);
                }
-               cl_rectangle_reset_clip_rectangle (&r); 
+               cl_rectangle_reset_clip_rectangle (&r);
        }
        else if (DETAIL ("trough"))
        {
                GdkGC *inner  = clearlooks_style->shade_gc[3],
-                     *outer  = clearlooks_style->shade_gc[5];  
-               
+                     *outer  = clearlooks_style->shade_gc[5];
+
                cl_rectangle_init (&r, inner, outer, CL_CORNER_NONE, CL_CORNER_NONE,
                                                     CL_CORNER_NONE, CL_CORNER_NONE );
-               
+
                if (GTK_RANGE (widget)->orientation == GTK_ORIENTATION_VERTICAL)
                {
                        y+=1;
@@ -1084,7 +1084,7 @@ draw_box (DRAW_ARGS)
                        x+=1;
                        width-=2;
                }
-               
+
                cl_rectangle_set_clip_rectangle (&r, area);
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_rectangle_reset_clip_rectangle (&r);
@@ -1114,18 +1114,18 @@ draw_box (DRAW_ARGS)
                }
 
                cl_rectangle_set_button (&r, style, state_type, FALSE, FALSE, 0,0,0,0);
-               
+
                cl_rectangle_set_gradient (&r.fill_gradient, NULL, NULL);
                cl_rectangle_set_gradient (&r.fill_gradient, &clearlooks_style->inset_light[state_type],
                                           &clearlooks_style->inset_dark[state_type]);
-       
-               
+
+
                r.gradient_type = horizontal ? CL_GRADIENT_VERTICAL
                                             : CL_GRADIENT_HORIZONTAL;
-               
+
                r.bottomright = clearlooks_style->shade_gc[1];
                r.border_gradient.to = r.border_gradient.from;
-               
+
                if (button_type == CL_SCROLLBUTTON_OTHER)
                {
                        cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_NONE,
@@ -1149,11 +1149,11 @@ draw_box (DRAW_ARGS)
                                cl_rectangle_set_corners (&r, CL_CORNER_NONE,  CL_CORNER_NONE,
                                                                                          CL_CORNER_ROUND, CL_CORNER_ROUND);
                }
-               
-               cl_rectangle_set_clip_rectangle (&r, area);     
+
+               cl_rectangle_set_clip_rectangle (&r, area);
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_draw_shadow (window, widget, style, x, y, width, height, &r);
-               cl_rectangle_reset_clip_rectangle (&r); 
+               cl_rectangle_reset_clip_rectangle (&r);
 
        }
        else if (DETAIL ("slider"))
@@ -1161,7 +1161,7 @@ draw_box (DRAW_ARGS)
                if (DETAIL("slider") && widget && GTK_IS_RANGE (widget))
                {
                        GtkAdjustment *adj = GTK_RANGE (widget)->adjustment;
-                       
+
                        if (adj->value <= adj->lower &&
                                (GTK_RANGE (widget)->has_stepper_a || GTK_RANGE (widget)->has_stepper_b))
                        {
@@ -1185,11 +1185,11 @@ draw_box (DRAW_ARGS)
                                        width+=1;
                        }
                }
-                       
+
                cl_rectangle_set_button (&r, style, state_type, FALSE, GTK_WIDGET_HAS_FOCUS (widget),
                                        CL_CORNER_NONE, CL_CORNER_NONE,
                                        CL_CORNER_NONE, CL_CORNER_NONE);
-               
+
                r.gradient_type = GTK_IS_HSCROLLBAR (widget) ? CL_GRADIENT_VERTICAL
                                                             : CL_GRADIENT_HORIZONTAL;
 
@@ -1198,11 +1198,11 @@ draw_box (DRAW_ARGS)
 
                r.bottomright = clearlooks_style->shade_gc[1];
                r.border_gradient.to = r.border_gradient.from;
-               
-               cl_rectangle_set_clip_rectangle (&r, area);     
+
+               cl_rectangle_set_clip_rectangle (&r, area);
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_draw_shadow (window, widget, style, x, y, width, height, &r);
-               cl_rectangle_reset_clip_rectangle (&r); 
+               cl_rectangle_reset_clip_rectangle (&r);
        }
        else if (detail && !strcmp (detail, "optionmenu")) /* supporting deprecated */
        {
@@ -1213,7 +1213,7 @@ draw_box (DRAW_ARGS)
                if (clearlooks_style->menuitemstyle == 0)
                {
                        cl_draw_menuitem_flat (window, widget, style, area, state_type,
-                                              x, y, width, height, &r);                        
+                                              x, y, width, height, &r);
                }
                else if (clearlooks_style->menuitemstyle == 1)
                {
@@ -1230,52 +1230,52 @@ draw_box (DRAW_ARGS)
        {
                GdkGC *dark = clearlooks_style->shade_gc[2];
                GdkColor upper_color, lower_color;
-               
+
                /* don't draw sunken menubar on gnome panel
                   IT'S A HACK! HORRIBLE HACK! HIDEOUS HACK!
                   BUT IT WORKS FOR ME(tm)! */
                if (widget->parent &&
                        strcmp(G_OBJECT_TYPE_NAME (widget->parent), "PanelWidget") == 0)
                        return;
-               
+
                shade(&style->bg[state_type], &upper_color, 1.0);
                shade(&style->bg[state_type], &lower_color, 0.95);
-       
+
                cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_NONE,
                                              CL_CORNER_NONE, CL_CORNER_NONE);
-               
+
                r.fillgc = style->bg_gc[state_type];
                r.bordergc = clearlooks_style->shade_gc[2];
                r.gradient_type = CL_GRADIENT_VERTICAL;
-               
+
                cl_rectangle_set_gradient (&r.border_gradient, &clearlooks_style->shade[2],
                                                               &clearlooks_style->shade[3]);
                cl_rectangle_set_gradient (&r.fill_gradient, &upper_color, &lower_color);
-               
+
                /* make vertical and top borders invisible for style 2 */
                if (clearlooks_style->menubarstyle == 2) {
                        x--; width+=2;
                        y--; height+=1;
                }
-               
+
                cl_rectangle_set_clip_rectangle (&r, area);
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_rectangle_reset_clip_rectangle (&r);
        }
        else if (DETAIL ("menu") && widget->parent &&
                 GDK_IS_WINDOW (widget->parent->window))
-       {       
+       {
                cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_NONE,
                                              CL_CORNER_NONE, CL_CORNER_NONE);
-               
+
                r.bordergc    = clearlooks_style->border_gc[CL_BORDER_UPPER];
                r.topleft     = style->light_gc[state_type];
                r.bottomright = clearlooks_style->shade_gc[1];
-               
+
                cl_rectangle_set_clip_rectangle (&r, area);
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_draw_shadow (window, widget, style, x, y, width, height, &r);
-               cl_rectangle_reset_clip_rectangle (&r); 
+               cl_rectangle_reset_clip_rectangle (&r);
 
                return;
        }
@@ -1285,29 +1285,29 @@ draw_box (DRAW_ARGS)
                         lower_color,
                         prev_foreground;
                gboolean activity_mode = GTK_PROGRESS (widget)->activity_mode;
-               
+
 #ifdef HAVE_ANIMATION
                if (!activity_mode && gtk_progress_bar_get_fraction (widget) != 1.0 &&
                        !cl_progressbar_known((gconstpointer)widget))
                {
                        cl_progressbar_add ((gpointer)widget);
                }
-#endif         
+#endif
                cl_progressbar_fill (window, widget, style, style->black_gc,
                                     x, y, width, height,
 #ifdef HAVE_ANIMATION
                                     activity_mode ? 0 : pboffset,
 #else
-                                    0,         
+                                    0,
 #endif
                                     area);
-               
+
                cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_NONE,
                                              CL_CORNER_NONE, CL_CORNER_NONE);
-               
+
                r.bordergc = clearlooks_style->spot3_gc;
                r.topleft = clearlooks_style->spot2_gc;
-               
+
                prev_foreground = cl_gc_set_fg_color_shade (clearlooks_style->spot2_gc,
                                                            style->colormap,
                                                            &clearlooks_style->spot2,
@@ -1317,7 +1317,7 @@ draw_box (DRAW_ARGS)
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
                cl_draw_shadow (window, widget, style, x, y, width, height, &r);
                cl_rectangle_reset_clip_rectangle (&r);
-               
+
                gdk_gc_set_foreground (clearlooks_style->spot2_gc, &prev_foreground);
        }
 
@@ -1328,21 +1328,21 @@ draw_box (DRAW_ARGS)
                        gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[0], area);
                        gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[3], area);
                }
-               
+
                gtk_style_apply_default_background (style, window,
                                widget && !GTK_WIDGET_NO_WINDOW (widget),
                                state_type, area, x, y, width, height);
-               
+
                /* we only want the borders on horizontal toolbars */
                if ( DETAIL ("menubar") || height < 2*width ) {
                        if (!DETAIL ("menubar"))
                                gdk_draw_line (window, clearlooks_style->shade_gc[0],
                                               x, y, x + width, y); /* top */
-                                                       
+
                        gdk_draw_line (window, clearlooks_style->shade_gc[3],
                                       x, y + height - 1, x + width, y + height - 1); /* bottom */
                }
-               
+
                if (area)
                {
                        gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[0], NULL);
@@ -1368,10 +1368,10 @@ ensure_check_pixmaps (GtkStyle     *style,
        ClearlooksRcStyle *clearlooks_rc = CLEARLOOKS_RC_STYLE (style->rc_style);
        GdkPixbuf *check, *base, *inconsistent, *composite;
        GdkColor *spot_color = clearlooks_get_spot_color (clearlooks_rc);
-       
+
        if (clearlooks_style->check_pixmap_nonactive[state] != NULL)
                return;
-       
+
        if (state == GTK_STATE_ACTIVE || state == GTK_STATE_SELECTED) {
                check = generate_bit (check_alpha, &style->text[GTK_STATE_NORMAL], 1.0);
                inconsistent = generate_bit (check_inconsistent_alpha, &style->text[GTK_STATE_NORMAL], 1.0);
@@ -1379,24 +1379,24 @@ ensure_check_pixmaps (GtkStyle     *style,
                check = generate_bit (check_alpha, &style->text[state], 1.0);
                inconsistent = generate_bit (check_inconsistent_alpha, &style->text[state], 1.0);
        }
-       
+
        if (state == GTK_STATE_ACTIVE && !treeview)
                base = generate_bit (check_base_alpha, &style->bg[state], 1.0);
        else
                base = generate_bit (check_base_alpha, &style->base[GTK_STATE_NORMAL], 1.0);
-       
+
        if (treeview)
                composite = generate_bit (NULL, &clearlooks_style->shade[6], 1.0);
        else
                composite = generate_bit (NULL, &clearlooks_style->shade[5], 1.0);
-       
+
        gdk_pixbuf_composite (base, composite,
                              0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
                              1.0, 1.0, GDK_INTERP_NEAREST, 255);
 
        clearlooks_style->check_pixmap_nonactive[state] =
                pixbuf_to_pixmap (style, composite, screen);
-       
+
        gdk_pixbuf_composite (check, composite,
                              0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
                              1.0, 1.0, GDK_INTERP_NEAREST, 255);
@@ -1457,7 +1457,7 @@ draw_check (DRAW_ARGS)
        y += (height - CHECK_SIZE)/2;
 
        gdk_draw_drawable (window, gc, pixmap, 0, 0, x, y, CHECK_SIZE, CHECK_SIZE);
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (gc, NULL);
 }
@@ -1486,7 +1486,7 @@ draw_slider (DRAW_ARGS, GtkOrientation orientation)
        if ((orientation == GTK_ORIENTATION_VERTICAL && height < 20) ||
                (orientation == GTK_ORIENTATION_HORIZONTAL && width < 20))
                return;
-       
+
        if (detail && strcmp ("slider", detail) == 0)
        {
                if (area)
@@ -1571,10 +1571,10 @@ ensure_radio_pixmaps (GtkStyle     *style,
        GdkPixbuf *dot, *circle, *outline, *inconsistent, *composite;
        GdkColor *spot_color = clearlooks_get_spot_color (clearlooks_rc);
        GdkColor *composite_color;
-       
+
        if (clearlooks_style->radio_pixmap_nonactive[state] != NULL)
                return;
-       
+
        if (state == GTK_STATE_ACTIVE || state == GTK_STATE_SELECTED) {
                dot = colorize_bit (dot_intensity, dot_alpha, &style->text[GTK_STATE_NORMAL]);
                inconsistent = generate_bit (inconsistent_alpha, &style->text[GTK_STATE_NORMAL], 1.0);
@@ -1582,9 +1582,9 @@ ensure_radio_pixmaps (GtkStyle     *style,
                dot = colorize_bit (dot_intensity, dot_alpha, &style->text[state]);
                inconsistent = generate_bit (inconsistent_alpha, &style->text[state], 1.0);
        }
-       
+
        outline = generate_bit (outline_alpha, &clearlooks_style->shade[5], 1.0);
-       
+
        if (clearlooks_style->radio_pixmap_mask == NULL)
        {
                gdk_pixbuf_render_pixmap_and_mask (outline,
@@ -1592,7 +1592,7 @@ ensure_radio_pixmaps (GtkStyle     *style,
                                                   &clearlooks_style->radio_pixmap_mask,
                                                   1);
        }
-       
+
        if (state == GTK_STATE_ACTIVE)
        {
                composite_color = &style->bg[GTK_STATE_PRELIGHT];
@@ -1603,31 +1603,31 @@ ensure_radio_pixmaps (GtkStyle     *style,
                composite_color = &style->bg[state];
                circle = generate_bit (circle_alpha, &style->base[GTK_STATE_NORMAL], 1.0);
        }
-       
+
        composite = generate_bit (NULL, composite_color, 1.0);
-       
+
        gdk_pixbuf_composite (outline, composite,
                              0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
                              1.0, 1.0, GDK_INTERP_NEAREST, 255);
-                                               
+
        gdk_pixbuf_composite (circle, composite,
                              0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
                              1.0, 1.0, GDK_INTERP_NEAREST, 255);
-       
+
        clearlooks_style->radio_pixmap_nonactive[state] =
                pixbuf_to_pixmap (style, composite, screen);
-       
+
        gdk_pixbuf_composite (dot, composite,
                              0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
                              1.0, 1.0, GDK_INTERP_NEAREST, 255);
-       
+
        clearlooks_style->radio_pixmap_active[state] =
                pixbuf_to_pixmap (style, composite, screen);
-       
+
        g_object_unref (composite);
-       
+
        composite = generate_bit (NULL, composite_color,1.0);
-       
+
        gdk_pixbuf_composite (outline, composite,
                              0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
                              1.0, 1.0, GDK_INTERP_NEAREST, 255);
@@ -1637,10 +1637,10 @@ ensure_radio_pixmaps (GtkStyle     *style,
        gdk_pixbuf_composite (inconsistent, composite,
                              0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
                              1.0, 1.0, GDK_INTERP_NEAREST, 255);
-       
+
        clearlooks_style->radio_pixmap_inconsistent[state] =
                pixbuf_to_pixmap (style, composite, screen);
-       
+
        g_object_unref (composite);
        g_object_unref (circle);
        g_object_unref (dot);
@@ -1654,42 +1654,42 @@ draw_option (DRAW_ARGS)
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        GdkGC *gc = style->base_gc[state_type];
        GdkPixmap *pixmap;
-       
+
        if (DETAIL ("option")) /* Menu item */
        {
                parent_class->draw_option (style, window, state_type, shadow_type,
                                           area, widget, detail, x, y, width, height);
                return;
        }
-       
+
        ensure_radio_pixmaps (style, state_type, gtk_widget_get_screen (widget));
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (gc, area);
-       
+
        if (shadow_type == GTK_SHADOW_IN)
                pixmap = clearlooks_style->radio_pixmap_active[state_type];
        else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */
                pixmap = clearlooks_style->radio_pixmap_inconsistent[state_type];
        else
                pixmap = clearlooks_style->radio_pixmap_nonactive[state_type];
-       
+
        x += (width - RADIO_SIZE)/2;
        y += (height - RADIO_SIZE)/2;
-       
+
 #ifndef GTKOSX
        gdk_gc_set_clip_mask (gc, clearlooks_style->radio_pixmap_mask);
        gdk_gc_set_clip_origin (gc, x, y);
 #endif
-       
+
        gdk_draw_drawable (window, gc, pixmap, 0, 0, x, y,
                           RADIO_SIZE, RADIO_SIZE);
-       
+
 #ifndef GTKOSX
        gdk_gc_set_clip_origin (gc, 0, 0);
        gdk_gc_set_clip_mask (gc, NULL);
 #endif
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (gc, NULL);
 }
@@ -1714,17 +1714,17 @@ draw_shadow_gap (DRAW_ARGS,
 
        g_return_if_fail (GTK_IS_STYLE (style));
        g_return_if_fail (window != NULL);
-       
+
        sanitize_size (window, &width, &height);
 
        cl_rectangle_reset (&r, style);
        cl_rectangle_set_corners (&r, CL_CORNER_NONE, CL_CORNER_NONE,
                                                                  CL_CORNER_NONE, CL_CORNER_NONE);
-       
+
        if (area)
        {
                area_region = gdk_region_rectangle (area);
-       
+
                switch (gap_side)
                {
                        case GTK_POS_TOP:
@@ -1744,18 +1744,18 @@ draw_shadow_gap (DRAW_ARGS,
                                GdkRectangle rect = { x, y+gap_x, 2, gap_width };
                                gap_region = gdk_region_rectangle (&rect);
                                break;
-                       }               
+                       }
                        case GTK_POS_RIGHT:
                        {
                                GdkRectangle rect = { x+width-2, y+gap_x, 2, gap_width };
                                gap_region = gdk_region_rectangle (&rect);
                                break;
-                       }               
+                       }
                }
-               
+
                gdk_region_subtract (area_region, gap_region);
        }
-       
+
        if (shadow_type == GTK_SHADOW_ETCHED_IN ||
            shadow_type == GTK_SHADOW_ETCHED_OUT)
        {
@@ -1772,9 +1772,9 @@ draw_shadow_gap (DRAW_ARGS,
                        a = clearlooks_style->shade_gc[3];
                        b = style->light_gc[state_type];
                }
-               
-               gdk_gc_set_clip_region (a, area_region);                
-               gdk_gc_set_clip_region (b, area_region);                
+
+               gdk_gc_set_clip_region (a, area_region);
+               gdk_gc_set_clip_region (b, area_region);
 
                r.bordergc = a;
                cl_draw_rectangle (window, widget, style, x+1, y+1, width-1, height-1, &r);
@@ -1782,21 +1782,21 @@ draw_shadow_gap (DRAW_ARGS,
                r.bordergc = b;
                cl_draw_rectangle (window, widget, style, x, y, width-1, height-1, &r);
 
-               gdk_gc_set_clip_region (a, NULL);       
-               gdk_gc_set_clip_region (b, NULL);               
+               gdk_gc_set_clip_region (a, NULL);
+               gdk_gc_set_clip_region (b, NULL);
        }
        else if (shadow_type == GTK_SHADOW_IN || shadow_type == GTK_SHADOW_OUT)
        {
                r.topleft     = (shadow_type == GTK_SHADOW_OUT) ? style->light_gc[state_type] : clearlooks_style->shade_gc[1];
                r.bottomright = (shadow_type == GTK_SHADOW_OUT) ? clearlooks_style->shade_gc[1] : style->light_gc[state_type];
                r.bordergc    = clearlooks_style->shade_gc[5];
-               
-               gdk_gc_set_clip_region (r.bordergc,    area_region);            
-               gdk_gc_set_clip_region (r.topleft,     area_region);            
-               gdk_gc_set_clip_region (r.bottomright, area_region);            
-                               
+
+               gdk_gc_set_clip_region (r.bordergc,    area_region);
+               gdk_gc_set_clip_region (r.topleft,     area_region);
+               gdk_gc_set_clip_region (r.bottomright, area_region);
+
                cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
-               
+
                cl_draw_shadow (window, widget, style, x, y, width, height, &r);
 
                gdk_gc_set_clip_region (r.bordergc,    NULL);
@@ -1828,25 +1828,25 @@ draw_hline (GtkStyle     *style,
 
        g_return_if_fail (GTK_IS_STYLE (style));
        g_return_if_fail (window != NULL);
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[2], area);
-       
+
        if (detail && !strcmp (detail, "label"))
        {
                if (state_type == GTK_STATE_INSENSITIVE)
                        gdk_draw_line (window, style->light_gc[state_type], x1 + 1, y + 1, x2 + 1, y + 1);
-                       
+
                gdk_draw_line (window, style->fg_gc[state_type], x1, y, x2, y);
        }
        else
        {
                gdk_draw_line (window, clearlooks_style->shade_gc[2], x1, y, x2, y);
-               
+
                /* if (DETAIL ("menuitem")) */
                gdk_draw_line (window, clearlooks_style->shade_gc[0], x1, y+1, x2, y+1);
        }
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[2], NULL);
 }
@@ -1873,16 +1873,16 @@ draw_vline (GtkStyle     *style,
 
        g_return_if_fail (GTK_IS_STYLE (style));
        g_return_if_fail (window != NULL);
-       
+
        thickness_light = style->xthickness / 2;
        thickness_dark = style->xthickness - thickness_light;
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[2], area);
-       
+
        gdk_draw_line (window, clearlooks_style->shade_gc[2], x, y1, x, y2 - 1);
        gdk_draw_line (window, clearlooks_style->shade_gc[0], x+1, y1, x+1, y2 - 1);
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[2], NULL);
 }
@@ -1911,38 +1911,38 @@ draw_focus (GtkStyle      *style,
 #if DEBUG
                printf("draw_focus: %s %d %d %d %d\n", detail, x, y, width, height);
 #endif
-       
+
        gc = clearlooks_style->shade_gc[6];
-       
+
        if (widget)
        {
                gtk_widget_style_get (widget,
                                      "focus-line-width", &line_width,
                                      "focus-line-pattern", (gchar *)&dash_list,
                                      NULL);
-       
+
                free_dash_list = TRUE;
        }
-       
+
        sanitize_size (window, &width, &height);
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (gc, area);
-       
+
        gdk_gc_set_line_attributes (gc, line_width,
                                    dash_list[0] ? GDK_LINE_ON_OFF_DASH : GDK_LINE_SOLID,
                                    GDK_CAP_BUTT, GDK_JOIN_MITER);
-       
-       
+
+
        if (detail && !strcmp (detail, "add-mode"))
        {
                if (free_dash_list)
                        g_free (dash_list);
-               
+
                dash_list = "\4\4";
                free_dash_list = FALSE;
        }
-       
+
        points[0].x = x + line_width / 2;
        points[0].y = y + line_width / 2;
        points[1].x = x + width - line_width + line_width / 2;
@@ -1952,7 +1952,7 @@ draw_focus (GtkStyle      *style,
        points[3].x = x + line_width / 2;
        points[3].y = y + height - line_width + line_width / 2;
        points[4] = points[0];
-       
+
        if (!dash_list[0])
        {
                gdk_draw_lines (window, gc, points, 5);
@@ -1960,41 +1960,41 @@ draw_focus (GtkStyle      *style,
        else
        {
                dash_len = strlen (dash_list);
-               
+
                if (dash_list[0])
                        gdk_gc_set_dashes (gc, 0, dash_list, dash_len);
-               
+
                gdk_draw_lines (window, gc, points, 3);
-               
+
                points[2].x += 1;
-               
+
                if (dash_list[0])
                {
                        gint dash_pixels = 0;
                        gint i;
-               
+
                        /* Adjust the dash offset for the bottom and left so we
                        * match up at the upper left.
                        */
                        for (i = 0; i < dash_len; i++)
                                dash_pixels += dash_list[i];
-                       
+
                        if (dash_len % 2 == 1)
                                dash_pixels *= 2;
-               
+
                        gdk_gc_set_dashes (gc,
                                                        dash_pixels - (width + height - 2 * line_width) % dash_pixels,
                                                        dash_list, dash_len);
                }
-               
+
                gdk_draw_lines (window, gc, points + 2, 3);
        }
-       
+
        gdk_gc_set_line_attributes (gc, 0, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER);
-       
+
        if (area)
                gdk_gc_set_clip_rectangle (gc, NULL);
-       
+
        if (free_dash_list)
                g_free (dash_list);
 }
@@ -2009,14 +2009,14 @@ draw_layout(GtkStyle * style,
             const gchar * detail, gint x, gint y, PangoLayout * layout)
 {
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
-       
+
        g_return_if_fail(GTK_IS_STYLE (style));
        g_return_if_fail(window != NULL);
 
        parent_class->draw_layout(style, window, state_type, use_text,
                                  area, widget, detail, x, y, layout);
 
-       
+
 }
 
 /**************************************************************************/
@@ -2205,7 +2205,7 @@ draw_resize_grip (GtkStyle       *style,
 
            xi -= 3;
            yi -= 3;
-       
+
          }
       }
       break;
@@ -2260,7 +2260,7 @@ draw_resize_grip (GtkStyle       *style,
 
            xi -= 3;
            yi += 3;
-       
+
          }
       }
       break;
@@ -2316,26 +2316,26 @@ clearlooks_style_init_from_rc (GtkStyle * style,
        double shades[] = {1.065, 0.93, 0.896, 0.85, 0.768, 0.665, 0.4, 0.205};
        int i;
        double contrast;
-       
+
        parent_class->init_from_rc (style, rc_style);
-       
+
        contrast = CLEARLOOKS_RC_STYLE (rc_style)->contrast;
-       
+
        clearlooks_style->sunkenmenubar = CLEARLOOKS_RC_STYLE (rc_style)->sunkenmenubar;
        clearlooks_style->progressbarstyle = CLEARLOOKS_RC_STYLE (rc_style)->progressbarstyle;
        clearlooks_style->menubarstyle = CLEARLOOKS_RC_STYLE (rc_style)->menubarstyle;
        clearlooks_style->menuitemstyle = CLEARLOOKS_RC_STYLE (rc_style)->menuitemstyle;
        clearlooks_style->listviewitemstyle = CLEARLOOKS_RC_STYLE (rc_style)->listviewitemstyle;
-       
+
        /* Lighter to darker */
        for (i = 0; i < 8; i++)
        {
                shade (&style->bg[GTK_STATE_NORMAL], &clearlooks_style->shade[i],
                       (shades[i]-0.7) * contrast + 0.7);
        }
-               
+
        spot_color = clearlooks_get_spot_color (CLEARLOOKS_RC_STYLE (rc_style));
-       
+
        clearlooks_style->spot_color = *spot_color;
        shade (&clearlooks_style->spot_color, &clearlooks_style->spot1, 1.42);
        shade (&clearlooks_style->spot_color, &clearlooks_style->spot2, 1.05);
@@ -2352,11 +2352,11 @@ realize_color (GtkStyle * style,
               GdkColor * color)
 {
        GdkGCValues gc_values;
-       
+
        gdk_colormap_alloc_color (style->colormap, color, FALSE, TRUE);
-       
+
        gc_values.foreground = *color;
-       
+
        return gtk_gc_get (style->depth, style->colormap, &gc_values, GDK_GC_FOREGROUND);
 }
 
@@ -2365,15 +2365,15 @@ clearlooks_style_realize (GtkStyle * style)
 {
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        int i;
-       
+
        parent_class->realize (style);
-       
+
        for (i = 0; i < 8; i++)
                clearlooks_style->shade_gc[i] = realize_color (style, &clearlooks_style->shade[i]);
 
        for (i=0; i < CL_BORDER_COUNT; i++)
                clearlooks_style->border_gc[i] = realize_color (style, &clearlooks_style->border[i]);
-               
+
        clearlooks_style->spot1_gc = realize_color (style, &clearlooks_style->spot1);
        clearlooks_style->spot2_gc = realize_color (style, &clearlooks_style->spot2);
        clearlooks_style->spot3_gc = realize_color (style, &clearlooks_style->spot3);
@@ -2390,10 +2390,10 @@ clearlooks_style_realize (GtkStyle * style)
                shade (&style->bg[i], &clearlooks_style->listview_bg[i], 1.015);
                gdk_rgb_find_color (style->colormap, &clearlooks_style->listview_bg[i]);
 
-               /* CREATE GRADIENT FOR BUTTONS */               
+               /* CREATE GRADIENT FOR BUTTONS */
                shade (&style->bg[i], &clearlooks_style->button_g1[i], 1.055);
                gdk_rgb_find_color (style->colormap, &clearlooks_style->button_g1[i]);
-               
+
                shade (&style->bg[i], &clearlooks_style->button_g2[i], 1.005);
                gdk_rgb_find_color (style->colormap, &clearlooks_style->button_g2[i]);
 
@@ -2411,7 +2411,7 @@ clearlooks_style_unrealize (GtkStyle * style)
 {
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        int i;
-       
+
        /* We don't free the colors, because we don't know if
        * gtk_gc_release() actually freed the GC. FIXME - need
        * a way of ref'ing colors explicitely so GtkGC can
@@ -2419,11 +2419,11 @@ clearlooks_style_unrealize (GtkStyle * style)
        */
        for (i=0; i < 8; i++)
                gtk_gc_release (clearlooks_style->shade_gc[i]);
-       
+
        gtk_gc_release (clearlooks_style->spot1_gc);
        gtk_gc_release (clearlooks_style->spot2_gc);
        gtk_gc_release (clearlooks_style->spot3_gc);
-       
+
        for (i = 0; i < 5; i++)
        {
                if (clearlooks_style->radio_pixmap_nonactive[i] != NULL)
@@ -2435,7 +2435,7 @@ clearlooks_style_unrealize (GtkStyle * style)
                        g_object_unref (clearlooks_style->radio_pixmap_inconsistent[i]);
                        clearlooks_style->radio_pixmap_inconsistent[i] = NULL;
                }
-               
+
                if (clearlooks_style->check_pixmap_nonactive[i] != NULL)
                {
                        g_object_unref (clearlooks_style->check_pixmap_nonactive[i]);
@@ -2446,21 +2446,21 @@ clearlooks_style_unrealize (GtkStyle * style)
                        clearlooks_style->check_pixmap_inconsistent[i] = NULL;
                }
        }
-       
+
        if (clearlooks_style->radio_pixmap_mask != NULL)
                g_object_unref (clearlooks_style->radio_pixmap_mask);
-               
+
        clearlooks_style->radio_pixmap_mask = NULL;
 
        while (progressbars = g_list_first (progressbars))
                cl_progressbar_remove (progressbars->data);
-       
+
        if (timer_id != 0)
        {
                g_source_remove(timer_id);
-               timer_id = 0;           
+               timer_id = 0;
        }
-       
+
        parent_class->unrealize (style);
 }
 
@@ -2529,16 +2529,16 @@ render_icon (GtkStyle            *style,
        GdkPixbuf *base_pixbuf;
        GdkScreen *screen;
        GtkSettings *settings;
-       
+
        /* Oddly, style can be NULL in this function, because
         * GtkIconSet can be used without a style and if so
         * it uses this function.
         */
-       
+
        base_pixbuf = gtk_icon_source_get_pixbuf (source);
-       
+
        g_return_val_if_fail (base_pixbuf != NULL, NULL);
-       
+
        if (widget && gtk_widget_has_screen (widget)) {
                screen = gtk_widget_get_screen (widget);
                settings = gtk_settings_get_for_screen (screen);
@@ -2550,7 +2550,7 @@ render_icon (GtkStyle            *style,
                GTK_NOTE (MULTIHEAD,
                          g_warning ("Using the default screen for gtk_default_render_icon()"));
        }
-       
+
 
        if (size != (GtkIconSize) -1 && !gtk_icon_size_lookup_for_settings (settings, size, &width, &height)) {
                g_warning (G_STRLOC ": invalid icon size '%d'", size);
@@ -2564,7 +2564,7 @@ render_icon (GtkStyle            *style,
                scaled = scale_or_ref (base_pixbuf, width, height);
        else
                scaled = g_object_ref (base_pixbuf);
-       
+
        /* If the state was wildcarded, then generate a state. */
        if (gtk_icon_source_get_state_wildcarded (source)) {
                if (state == GTK_STATE_INSENSITIVE) {
@@ -2581,14 +2581,14 @@ render_icon (GtkStyle            *style,
 #endif
                        gdk_pixbuf_saturate_and_pixelate (stated, stated,
                                                          0.1, FALSE);
-                       
+
                        g_object_unref (scaled);
                } else if (state == GTK_STATE_PRELIGHT) {
                        stated = gdk_pixbuf_copy (scaled);
-                       
+
                        gdk_pixbuf_saturate_and_pixelate (scaled, stated,
                                                          1.2, FALSE);
-                       
+
                        g_object_unref (scaled);
                } else {
                        stated = scaled;
@@ -2609,7 +2609,7 @@ static void
 clearlooks_style_class_init (ClearlooksStyleClass * klass)
 {
        GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);
-       
+
        parent_class = g_type_class_peek_parent (klass);
 
        style_class->realize = clearlooks_style_realize;
@@ -2630,7 +2630,7 @@ clearlooks_style_class_init (ClearlooksStyleClass * klass)
        style_class->draw_box_gap = draw_box_gap;
        style_class->draw_extension = draw_extension;
        style_class->draw_option = draw_option;
-       style_class->draw_layout = draw_layout; 
+       style_class->draw_layout = draw_layout;
        style_class->render_icon = render_icon;
        style_class->draw_flat_box = draw_flat_box;
 }
index 1e07877bf7ee511dc44b588934e44c10b79119a6..d56876d5330c3b52a6bad05eb2ff5a476693aef1 100644 (file)
@@ -55,43 +55,43 @@ typedef enum
 struct _ClearlooksStyle
 {
        GtkStyle parent_instance;
-       
+
        GdkColor shade[9];
-       
+
        GdkColor spot_color;
        GdkColor spot1;
        GdkColor spot2;
        GdkColor spot3;
-       
+
        GdkColor border[CL_BORDER_COUNT];
-       
+
        /* from light to dark */
        GdkGC *shade_gc[9];
        GdkGC *border_gc[CL_BORDER_COUNT];
-       
+
        GdkGC *spot1_gc;
        GdkGC *spot2_gc;
        GdkGC *spot3_gc;
-       
+
        GdkColor inset_light[5];
        GdkColor inset_dark[5];
-       
+
        GdkColor button_g1[5];
        GdkColor button_g2[5];
        GdkColor button_g3[5];
        GdkColor button_g4[5];
-       
+
        GdkColor listview_bg[5];
 
        GdkPixmap *radio_pixmap_nonactive[5];
        GdkPixmap *radio_pixmap_active[5];
        GdkPixmap *radio_pixmap_inconsistent[5];
        GdkBitmap *radio_pixmap_mask; /* All masks are the same */
-       
+
        GdkPixmap *check_pixmap_nonactive[5];
        GdkPixmap *check_pixmap_active[5];
        GdkPixmap *check_pixmap_inconsistent[5];
-       
+
        gboolean sunkenmenubar:1;
 
        guint8   progressbarstyle;
index 0d288123f22737b0f42c309358cc85ed32d2e2c7..d34a41b6372542e7eb0a9828b99f1702989ec0d1 100644 (file)
@@ -6,12 +6,12 @@ GtkTextDirection
 get_direction (GtkWidget *widget)
 {
        GtkTextDirection dir;
-       
+
        if (widget)
                dir = gtk_widget_get_direction (widget);
        else
                dir = GTK_TEXT_DIR_LTR;
-       
+
        return dir;
 }
 
@@ -23,22 +23,22 @@ generate_bit (unsigned char alpha[], GdkColor *color, double mult)
        unsigned char *pixels;
        int w, h, rs;
        int x, y;
-       
+
        r = (color->red >> 8) * mult;
        r = MIN(r, 255);
        g = (color->green >> 8) * mult;
        g = MIN(g, 255);
        b = (color->blue >> 8) * mult;
        b = MIN(b, 255);
-       
+
        pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, RADIO_SIZE, RADIO_SIZE);
-       
+
        w = gdk_pixbuf_get_width (pixbuf);
        h = gdk_pixbuf_get_height (pixbuf);
        rs = gdk_pixbuf_get_rowstride (pixbuf);
        pixels = gdk_pixbuf_get_pixels (pixbuf);
-       
-       
+
+
        for (y=0; y < h; y++)
        {
                for (x=0; x < w; x++)
@@ -52,7 +52,7 @@ generate_bit (unsigned char alpha[], GdkColor *color, double mult)
                                pixels[y*rs + x*4 + 3] = 255;
                }
        }
-       
+
        return pixbuf;
 }
 
@@ -71,29 +71,29 @@ colorize_bit (unsigned char *bit,
        int dest_rowstride;
        int width, height;
        guchar *dest_pixels;
-       
+
        pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, RADIO_SIZE, RADIO_SIZE);
-       
+
        if (pixbuf == NULL)
                return NULL;
-       
+
        dest_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
        width = gdk_pixbuf_get_width (pixbuf);
        height = gdk_pixbuf_get_height (pixbuf);
        dest_pixels = gdk_pixbuf_get_pixels (pixbuf);
-       
+
        for (y = 0; y < RADIO_SIZE; y++)
        {
                src = bit + y * RADIO_SIZE;
                asrc = alpha + y * RADIO_SIZE;
                dest = dest_pixels + y * dest_rowstride;
-       
+
                for (x = 0; x < RADIO_SIZE; x++)
                {
                        double dr, dg, db;
-       
+
                        intensity = (src[x] + 0 )/ 255.0;
-       
+
                        if (intensity <= 0.5)
                        {
                                /* Go from black at intensity = 0.0 to new_color at intensity = 0.5 */
@@ -108,16 +108,16 @@ colorize_bit (unsigned char *bit,
                                dg = (new_color->green + (65535 - new_color->green) * (intensity - 0.5) * 2.0) / 65535.0;
                                db = (new_color->blue + (65535 - new_color->blue) * (intensity - 0.5) * 2.0) / 65535.0;
                        }
-       
+
                        dest[0] = CLAMP_UCHAR (255 * dr);
                        dest[1] = CLAMP_UCHAR (255 * dg);
                        dest[2] = CLAMP_UCHAR (255 * db);
-       
+
                        dest[3] = asrc[x];
                        dest += 4;
                }
        }
-       
+
        return pixbuf;
 }
 
@@ -128,23 +128,23 @@ pixbuf_to_pixmap (GtkStyle  *style,
 {
        GdkGC *tmp_gc;
        GdkPixmap *pixmap;
-       
+
        pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen),
                                 gdk_pixbuf_get_width (pixbuf),
                                 gdk_pixbuf_get_height (pixbuf),
                                 style->depth);
-                                                       
+
        gdk_drawable_set_colormap (pixmap, style->colormap);
-       
+
        tmp_gc = gdk_gc_new (pixmap);
-       
+
        gdk_pixbuf_render_to_drawable (pixbuf, pixmap, tmp_gc, 0, 0, 0, 0,
                                       gdk_pixbuf_get_width (pixbuf),
                                       gdk_pixbuf_get_height (pixbuf),
                                       GDK_RGB_DITHER_NORMAL, 0, 0);
-       
+
        gdk_gc_unref (tmp_gc);
-       
+
        return pixmap;
 }
 
@@ -161,7 +161,7 @@ rgb_to_hls (gdouble *r,
        gdouble blue;
        gdouble h, l, s;
        gdouble delta;
-       
+
        red = *r;
        green = *g;
        blue = *b;
@@ -172,7 +172,7 @@ rgb_to_hls (gdouble *r,
                        max = red;
                else
                        max = blue;
-       
+
                if (green < blue)
                        min = green;
                else
@@ -184,7 +184,7 @@ rgb_to_hls (gdouble *r,
                        max = green;
                else
                        max = blue;
-       
+
                if (red < blue)
                        min = red;
                else
@@ -201,7 +201,7 @@ rgb_to_hls (gdouble *r,
                        s = (max - min) / (max + min);
                else
                        s = (max - min) / (2 - max - min);
-       
+
                delta = max -min;
                if (red == max)
                        h = (green - blue) / delta;
@@ -209,7 +209,7 @@ rgb_to_hls (gdouble *r,
                        h = 2 + (blue - red) / delta;
                else if (blue == max)
                        h = 4 + (red - green) / delta;
-       
+
                h *= 60;
                if (h < 0.0)
                        h += 360;
@@ -230,7 +230,7 @@ hls_to_rgb (gdouble *h,
        gdouble saturation;
        gdouble m1, m2;
        gdouble r, g, b;
-       
+
        lightness = *l;
        saturation = *s;
 
@@ -238,7 +238,7 @@ hls_to_rgb (gdouble *h,
                m2 = lightness * (1 + saturation);
        else
                m2 = lightness + saturation - lightness * saturation;
-               
+
        m1 = 2 * lightness - m2;
 
        if (saturation == 0)
@@ -254,7 +254,7 @@ hls_to_rgb (gdouble *h,
                        hue -= 360;
                while (hue < 0)
                        hue += 360;
-       
+
                if (hue < 60)
                        r = m1 + (m2 - m1) * hue / 60;
                else if (hue < 180)
@@ -263,13 +263,13 @@ hls_to_rgb (gdouble *h,
                        r = m1 + (m2 - m1) * (240 - hue) / 60;
                else
                        r = m1;
-       
+
                hue = *h;
                while (hue > 360)
                        hue -= 360;
                while (hue < 0)
                        hue += 360;
-       
+
                if (hue < 60)
                        g = m1 + (m2 - m1) * hue / 60;
                else if (hue < 180)
@@ -278,13 +278,13 @@ hls_to_rgb (gdouble *h,
                        g = m1 + (m2 - m1) * (240 - hue) / 60;
                else
                        g = m1;
-       
+
                hue = *h - 120;
                while (hue > 360)
                        hue -= 360;
                while (hue < 0)
                        hue += 360;
-       
+
                if (hue < 60)
                        b = m1 + (m2 - m1) * hue / 60;
                else if (hue < 180)
@@ -293,7 +293,7 @@ hls_to_rgb (gdouble *h,
                        b = m1 + (m2 - m1) * (240 - hue) / 60;
                else
                        b = m1;
-       
+
                *h = r;
                *l = g;
                *s = b;
@@ -306,27 +306,27 @@ shade (GdkColor * a, GdkColor * b, float k)
        gdouble red;
        gdouble green;
        gdouble blue;
-       
+
        red = (gdouble) a->red / 65535.0;
        green = (gdouble) a->green / 65535.0;
        blue = (gdouble) a->blue / 65535.0;
-       
+
        rgb_to_hls (&red, &green, &blue);
-       
+
        green *= k;
        if (green > 1.0)
                green = 1.0;
        else if (green < 0.0)
                green = 0.0;
-       
+
        blue *= k;
        if (blue > 1.0)
                blue = 1.0;
        else if (blue < 0.0)
                blue = 0.0;
-       
+
        hls_to_rgb (&red, &green, &blue);
-       
+
        b->red = red * 65535.0;
        b->green = green * 65535.0;
        b->blue = blue * 65535.0;
@@ -452,13 +452,13 @@ calculate_arrow_geometry (GtkArrowType  arrow_type,
                case GTK_ARROW_DOWN:
                        w += (w % 2) - 1;
                        h = (w / 2 + 1) + 1;
-               
+
                        if (h > *height)
                        {
                                h = *height;
                                w = 2 * (h - 1) - 1;
                        }
-               
+
                        if (arrow_type == GTK_ARROW_DOWN)
                        {
                                if (*height % 2 == 1 || h % 2 == 0)
@@ -470,18 +470,18 @@ calculate_arrow_geometry (GtkArrowType  arrow_type,
                                        *height -= 1;
                        }
                        break;
-       
+
                case GTK_ARROW_RIGHT:
                case GTK_ARROW_LEFT:
                        h += (h % 2) - 1;
                        w = (h / 2 + 1) + 1;
-               
+
                        if (w > *width)
                        {
                                w = *width;
                                h = 2 * (w - 1) - 1;
                        }
-               
+
                        if (arrow_type == GTK_ARROW_RIGHT)
                        {
                                if (*width % 2 == 1 || w % 2 == 0)
@@ -493,7 +493,7 @@ calculate_arrow_geometry (GtkArrowType  arrow_type,
                                        *width -= 1;
                        }
                        break;
-       
+
                default:
                        /* should not be reached */
                        break;
@@ -532,7 +532,7 @@ void gtk_clist_get_header_index (GtkCList *clist, GtkWidget *button,
 {
        *columns = clist->columns;
        int i;
-       
+
        for (i=0; i<*columns; i++)
        {
                if (clist->column[i].button == button)
@@ -549,7 +549,7 @@ sanitize_size (GdkWindow      *window,
                gint           *height)
 {
        gboolean set_bg = FALSE;
-       
+
        if ((*width == -1) && (*height == -1))
        {
                set_bg = GDK_IS_WINDOW (window);
@@ -559,7 +559,7 @@ sanitize_size (GdkWindow      *window,
                gdk_window_get_size (window, width, NULL);
        else if (*height == -1)
                gdk_window_get_size (window, NULL, height);
-       
+
        return set_bg;
 }
 
@@ -573,11 +573,11 @@ option_menu_get_props (GtkWidget      *widget,
 {
        GtkRequisition *tmp_size = NULL;
        GtkBorder *tmp_spacing = NULL;
-       
+
        if (widget)
                gtk_widget_style_get (widget, "indicator_size", &tmp_size,
                                      "indicator_spacing", &tmp_spacing, NULL);
-       
+
        if (tmp_size)
        {
                *indicator_size = *tmp_size;
@@ -585,7 +585,7 @@ option_menu_get_props (GtkWidget      *widget,
        }
        else
                *indicator_size = default_option_indicator_size;
-       
+
        if (tmp_spacing)
        {
                *indicator_spacing = *tmp_spacing;
@@ -651,7 +651,7 @@ internal_color_get_as_uchars(GdkColor *color,
        *red = (guchar) (color->red / 256.0);
        *green = (guchar) (color->green / 256.0);
        *blue = (guchar) (color->blue / 256.0);
-}                              
+}
 
 static GdkPixbuf*
 internal_create_horizontal_gradient_image_buffer (gint width, gint height,
@@ -716,7 +716,7 @@ internal_create_vertical_gradient_image_buffer (gint width, gint height,
        gint i, j, max_block, last_block;
        long r, g, b, dr, dg, db;
        GdkPixbuf *buffer;
-       
+
        guchar *ptr;
        guchar point[4];
 
@@ -754,7 +754,7 @@ internal_create_vertical_gradient_image_buffer (gint width, gint height,
                ptr[0] = r>>16;
                ptr[1] = g>>16;
                ptr[2] = b>>16;
-               
+
                if (width > 1)
                {
                        last_block = 0;
@@ -779,7 +779,7 @@ internal_create_vertical_gradient_image_buffer (gint width, gint height,
                g += dg;
                b += db;
        }
-       
+
        return buffer;
 }
 
@@ -806,15 +806,15 @@ draw_vgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
        #endif
        {
                GdkPixbuf *image_buffer = NULL;
-                               
+
                image_buffer = internal_create_horizontal_gradient_image_buffer (width, height, left_color, right_color);
-       
+
                if (image_buffer)
                {
                        gdk_draw_pixbuf(drawable, gc, image_buffer, 0, 0, x, y, width, height, GDK_RGB_DITHER_MAX, 0, 0);
 
                        g_object_unref(image_buffer);
-               }       
+               }
        }
        #ifndef ALWAYS_DITHER_GRADIENTS
        else
@@ -825,7 +825,7 @@ draw_vgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
                GdkGCValues old_values;
 
                gdk_gc_get_values (gc, &old_values);
-       
+
                if (left_color == right_color )
                {
                        col = *left_color;
@@ -835,7 +835,7 @@ draw_vgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
                        gdk_gc_set_foreground (gc, &old_values.foreground);
                        return;
                }
-       
+
                col = *left_color;
                dr = (right_color->red - left_color->red) / width;
                dg = (right_color->green - left_color->green) / width;
@@ -844,10 +844,10 @@ draw_vgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
                for (i = 0; i < width; i++)
                {
                        gdk_rgb_find_color (style->colormap, &col);
-       
+
                        gdk_gc_set_foreground (gc, &col);
                        gdk_draw_line (drawable, gc, x + i, y, x + i, y + height - 1);
-               
+
                        col.red += dr;
                        col.green += dg;
                        col.blue += db;
@@ -862,11 +862,11 @@ void
 draw_hgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
                 int x, int y, int width, int height,
                 GdkColor *top_color, GdkColor *bottom_color)
-{      
+{
        #ifndef ALWAYS_DITHER_GRADIENTS
        gboolean dither = ((style->depth > 0) && (style->depth <= 16));
        #endif
-       
+
        if ((width <= 0) || (height <= 0))
                return;
 
@@ -875,15 +875,15 @@ draw_hgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
        #endif
        {
                GdkPixbuf *image_buffer = NULL;
-                               
+
                image_buffer = internal_create_vertical_gradient_image_buffer (width, height, top_color, bottom_color);
-       
+
                if (image_buffer)
                {
                        gdk_draw_pixbuf(drawable, gc, image_buffer, 0, 0, x, y, width, height, GDK_RGB_DITHER_MAX, 0, 0);
 
                        g_object_unref(image_buffer);
-               }       
+               }
        }
        #ifndef ALWAYS_DITHER_GRADIENTS
        else
@@ -892,7 +892,7 @@ draw_hgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
                GdkColor col;
                int dr, dg, db;
                GdkGCValues old_values;
-       
+
                gdk_gc_get_values (gc, &old_values);
 
                if (top_color == bottom_color )
@@ -909,14 +909,14 @@ draw_hgradient (GdkDrawable *drawable, GdkGC *gc, GtkStyle *style,
                dr = (bottom_color->red - top_color->red) / height;
                dg = (bottom_color->green - top_color->green) / height;
                db = (bottom_color->blue - top_color->blue) / height;
-       
+
                for (i = 0; i < height; i++)
                {
                        gdk_rgb_find_color (style->colormap, &col);
-       
+
                        gdk_gc_set_foreground (gc, &col);
                        gdk_draw_line (drawable, gc, x, y + i, x + width - 1, y + i);
-               
+
                        col.red += dr;
                        col.green += dg;
                        col.blue += db;
@@ -934,7 +934,7 @@ void blend (GdkColormap *colormap,
        c->red   = (a->red   * alpha + b->red   * inAlpha) / 100;
        c->green = (a->green * alpha + b->green * inAlpha) / 100;
        c->blue  = (a->blue  * alpha + b->blue  * inAlpha) / 100;
-       
+
        gdk_rgb_find_color (colormap, c);
 }
 
@@ -962,7 +962,7 @@ GtkWidget *
 find_combo_box_widget (GtkWidget * widget)
 {
        GtkWidget *result = NULL;
-       
+
        if (widget && !GTK_IS_COMBO_BOX_ENTRY (widget))
        {
                if (GTK_IS_COMBO_BOX (widget))
@@ -970,7 +970,7 @@ find_combo_box_widget (GtkWidget * widget)
                else
                        result = find_combo_box_widget(widget->parent);
        }
-       
+
        return result;
 }
 
index ea2417f3cb780372a51a83f50c6b8d8a8a14e582..646115ede9e809810fe1c0565d100f8f6d3dd42e 100644 (file)
@@ -91,13 +91,13 @@ calculate_arrow_geometry (GtkArrowType  arrow_type,
                           gint         *y,
                           gint         *width,
                           gint         *height);
-                                               
+
 GtkWidget *special_get_ancestor(GtkWidget * widget,
                                       GType widget_type);
-                                       
+
 void blend (GdkColormap *colormap,
             GdkColor *a, GdkColor *b, GdkColor *c, int alpha);
-                       
+
 GtkWidget *get_parent_window (GtkWidget *widget);
 
 GdkColor *get_parent_bgcolor (GtkWidget *widget);
index 82868cd24c40b52294cd1c222a1ce2823adb753f..3784b2572054331806376a1e0b7fe05ebdf49e19 100644 (file)
@@ -108,7 +108,7 @@ public:
        void                       set_descriptor(const ParameterDescriptor& d) { _desc = d; }
 
        EventList::size_type size() const { return _events.size(); }
-        double length() const {                
+        double length() const {
                Glib::Threads::RWLock::ReaderLock lm (_lock);
                return _events.empty() ? 0.0 : _events.back()->when;
        }
@@ -126,7 +126,7 @@ public:
 
        virtual void add (double when, double value, bool with_guards=true, bool with_initial=true);
        virtual void editor_add (double when, double value, bool with_guard);
-       
+
        void fast_simple_add (double when, double value);
 
        void erase_range (double start, double end);
index 57a77afe7104e6392792b252dd2f532073af1054..b7d50d7d2ef3d05dc97cb82628aaf98e718c3df2 100644 (file)
@@ -77,7 +77,7 @@ protected:
        Controls            _controls;
 
        PBD::ScopedConnectionList _list_connections;
-       
+
 private:
 
        PBD::ScopedConnectionList _control_connections;
index 230b28974722f4c45b3c0786ce87e84a6b0f9fc1..9d47faf30d86e3d4971b70cf26b682be06f3cbef 100644 (file)
@@ -140,7 +140,7 @@ struct /*LIBEVORAL_API*/ Range {
        bool empty() const { return from == to; }
 };
 
-template<typename T>   
+template<typename T>
 bool operator== (Range<T> a, Range<T> b) {
        return a.from == b.from && a.to == b.to;
 }
@@ -149,7 +149,7 @@ template<typename T>
 class /*LIBEVORAL_API*/ RangeList {
 public:
        RangeList () : _dirty (false) {}
-       
+
        typedef std::list<Range<T> > List;
 
        List const & get () {
@@ -171,7 +171,7 @@ public:
                        return;
                }
 
-       restart:                
+       restart:
                for (typename List::iterator i = _list.begin(); i != _list.end(); ++i) {
                        for (typename List::iterator j = _list.begin(); j != _list.end(); ++j) {
 
@@ -192,7 +192,7 @@ public:
        }
 
 private:
-       
+
        List _list;
        bool _dirty;
 };
@@ -225,7 +225,7 @@ RangeList<T> subtract (Range<T> range, RangeList<T> sub)
        /* The basic idea here is to keep a list of the result ranges, and subtract
           the bits of `sub' from them one by one.
        */
-       
+
        for (typename RangeList<T>::List::const_iterator i = s.begin(); i != s.end(); ++i) {
 
                /* Here's where we'll put the new current result after subtracting *i from it */
index 23e0823ac9f7b34f04f90895ea0b2a076f7217b7..6c02507c174aaf2b52544104b3be038e9dca3d96 100644 (file)
@@ -50,7 +50,7 @@ public:
        B origin_b () const {
                return _origin_b;
        }
-       
+
        void set_origin_b (B o) {
                _origin_b = o;
        }
@@ -68,7 +68,7 @@ template<typename A, typename B>
 class LIBEVORAL_TEMPLATE_API IdentityConverter : public TimeConverter<A,B> {
   public:
        IdentityConverter() {}
-       
+
        B to(A a)   const;
        A from(B b) const;
 };
index 9341e1afb28db89a4ac5a5c57d68b4de6c76819c..2ad5b3f3288ad8b6f23d25432b54d88b33bf091a 100644 (file)
@@ -93,7 +93,7 @@ midi_event_size(const uint8_t* buffer)
        // see http://www.midi.org/techspecs/midimessages.php
        if (status == MIDI_CMD_COMMON_SYSEX) {
                int end;
-               
+
                for (end = 1; buffer[end] != MIDI_CMD_COMMON_SYSEX_END; end++) {
                        if ((buffer[end] & 0x80) != 0) {
                                return -1;
index 68858cd145ab02f08d9f6c679f3583140665a5c2..a6cd374c54fea235a6aec8b248b48779bc6ccd14 100644 (file)
@@ -54,7 +54,7 @@ void
 Control::set_double (double value, double frame, bool to_list)
 {
        _user_value = value;
-       
+
        /* if we're in a write pass, the automation watcher will determine the
           values and add them to the list, so we we don't need to bother.
        */
@@ -69,7 +69,7 @@ void
 Control::set_list(boost::shared_ptr<ControlList> list)
 {
        _list_marked_dirty_connection.disconnect ();
-       
+
        _list = list;
 
        if (_list) {
index 0755bd27d229bc26520af40de60439c330a1df53..d8665d339631a65bf2f6af7bbe04cf669ce17df5 100644 (file)
@@ -165,7 +165,7 @@ ControlList::operator= (const ControlList& other)
 
                _interpolation = other._interpolation;
                _default_value = other._default_value;
-               
+
                copy_events (other);
        }
 
@@ -269,49 +269,49 @@ ControlList::thin (double thinning_factor)
 
        {
                Glib::Threads::RWLock::WriterLock lm (_lock);
-               
+
                ControlEvent* prevprev = 0;
                ControlEvent* cur = 0;
                ControlEvent* prev = 0;
                iterator pprev;
                int counter = 0;
-               
+
                DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 thin from %2 events\n", this, _events.size()));
-               
+
                for (iterator i = _events.begin(); i != _events.end(); ++i) {
-                       
+
                        cur = *i;
                        counter++;
-                       
+
                        if (counter > 2) {
-                               
+
                                /* compute the area of the triangle formed by 3 points
                                 */
-                               
+
                                double area = fabs ((prevprev->when * (prev->value - cur->value)) +
                                                    (prev->when * (cur->value - prevprev->value)) +
                                                    (cur->when * (prevprev->value - prev->value)));
-                               
+
                                if (area < thinning_factor) {
                                        iterator tmp = pprev;
-                                       
+
                                        /* pprev will change to current
                                           i is incremented to the next event
                                           as we loop.
                                        */
-                                       
+
                                        pprev = i;
                                        _events.erase (tmp);
                                        changed = true;
                                        continue;
                                }
                        }
-                       
+
                        prevprev = prev;
                        prev = cur;
                        pprev = i;
                }
-               
+
                DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 thin => %2 events\n", this, _events.size()));
 
                if (changed) {
@@ -358,12 +358,12 @@ ControlList::start_write_pass (double when)
        new_write_pass = true;
        did_write_during_pass = false;
        insert_position = when;
-       
+
        /* leave the insert iterator invalid, so that we will do the lookup
           of where it should be in a "lazy" way - deferring it until
           we actually add the first point (which may never happen).
        */
-       
+
        unlocked_invalidate_insert_iterator ();
 }
 
@@ -382,9 +382,9 @@ ControlList::write_pass_finished (double /*when*/, double thinning_factor)
 
 void
 ControlList::set_in_write_pass (bool yn, bool add_point, double when)
-{      
+{
        DEBUG_TRACE (DEBUG::ControlList, string_compose ("now in write pass @ %1, add point ? %2\n", when, add_point));
-       
+
        _in_write_pass = yn;
 
        if (yn && add_point) {
@@ -401,19 +401,19 @@ ControlList::add_guard_point (double when)
        double eval_value = unlocked_eval (insert_position);
 
        if (most_recent_insert_iterator == _events.end()) {
-               
+
                DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 insert iterator at end, adding eval-value there %2\n", this, eval_value));
                _events.push_back (new ControlEvent (when, eval_value));
                /* leave insert iterator at the end */
-               
+
        } else if ((*most_recent_insert_iterator)->when == when) {
 
                DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 insert iterator at existing point, setting eval-value there %2\n", this, eval_value));
-               
+
                /* most_recent_insert_iterator points to a control event
                   already at the insert position, so there is
                   nothing to do.
-               
+
                   ... except ...
 
                   advance most_recent_insert_iterator so that the "real"
@@ -426,22 +426,22 @@ ControlList::add_guard_point (double when)
 
                /* insert a new control event at the right spot
                 */
-               
+
                DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 insert eval-value %2 just before iterator @ %3\n",
                                                                 this, eval_value, (*most_recent_insert_iterator)->when));
-               
+
                most_recent_insert_iterator = _events.insert (most_recent_insert_iterator, new ControlEvent (when, eval_value));
 
                /* advance most_recent_insert_iterator so that the "real"
                 * insert occurs in the right place, since it
                 * points to the control event just inserted.
                 */
-               
+
                ++most_recent_insert_iterator;
        }
-       
+
        /* don't do this again till the next write pass */
-       
+
        new_write_pass = false;
 }
 
@@ -458,7 +458,7 @@ ControlList::editor_add (double when, double value, bool with_guard)
        */
 
        if (_events.empty()) {
-               
+
                /* as long as the point we're adding is not at zero,
                 * add an "anchor" point there.
                 */
@@ -570,7 +570,7 @@ ControlList::add (double when, double value, bool with_guards, bool with_initial
                iterator insertion_point;
 
                if (_events.empty() && with_initial) {
-                       
+
                        /* empty: add an "anchor" point if the point we're adding past time 0 */
 
                        if (when >= 1) {
@@ -609,7 +609,7 @@ ControlList::add (double when, double value, bool with_guards, bool with_initial
                        }
 
                } else if (!_in_write_pass) {
-                               
+
                        /* not in a write pass: figure out the iterator we should insert in front of */
 
                        DEBUG_TRACE (DEBUG::ControlList, string_compose ("compute(b) MRI for position %1\n", when));
@@ -621,7 +621,7 @@ ControlList::add (double when, double value, bool with_guards, bool with_initial
 
                if (most_recent_insert_iterator == _events.end()) {
                        DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 appending new point at end\n", this));
-                       
+
                        const bool done = maybe_insert_straight_line (when, value);
                        if (!done) {
                                _events.push_back (new ControlEvent (when, value));
@@ -1032,7 +1032,7 @@ ControlList::truncate_end (double last_coordinate)
                        _events.back()->when = last_coordinate;
                        _events.back()->value = last_val;
                }
-               
+
                unlocked_invalidate_insert_iterator ();
                mark_dirty();
        }
@@ -1767,7 +1767,7 @@ ControlList::operator!= (ControlList const & other) const
        if (i != _events.end ()) {
                return true;
        }
-       
+
        return (
                _parameter != other._parameter ||
                _interpolation != other._interpolation ||
index aed972659bed422cf80772ff13fbc443386252ab..8a4aa470c1cba3b3332e67333cb58a2ff0a5e5ad 100644 (file)
@@ -221,7 +221,7 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen)
        min_x = _list.events().front()->when;
 
        if (x0 > max_x) {
-               /* totally past the end - just fill the entire array with the final value */    
+               /* totally past the end - just fill the entire array with the final value */
                for (int32_t i = 0; i < veclen; ++i) {
                        vec[i] = _list.events().back()->value;
                }
index a1dc24ff0df06e87c232b4a6aa3bb4558ef13ac9..86b70da87dea0820378f5ae3188755296131e415 100644 (file)
@@ -167,7 +167,7 @@ Event<Timestamp>::set_original_time (Timestamp t)
 {
        _original_time = t;
 }
-       
+
 #endif // EVORAL_EVENT_ALLOC
 
 template class Event<Evoral::Beats>;
index 7e4f58d73fb2ca929aebcadce1d54fcb93eea532..afd733032573414266f0945324a3ab099a640e23 100644 (file)
@@ -68,7 +68,7 @@ Note<Time>::Note(const Note<Time>& copy)
          _off_event.buffer = _off_event_buffer;
          memcpy(_off_event_buffer, copy._off_event_buffer, 3);
        */
-       
+
        assert(time() == copy.time());
        assert(end_time() == copy.end_time());
        assert(length() == copy.length());
index 0b3d4ac8e187246daa264c4ca539e830d7ade08e..7f032487b1a71162834d2170871d2422686a9db6 100644 (file)
@@ -723,7 +723,7 @@ Sequence<Time>::remove_note_unlocked(const constNotePtr note)
         */
 
        typename Sequence<Time>::Notes::iterator i;
-               
+
        for (i = note_lower_bound(note->time()); i != _notes.end() && (*i)->time() == note->time(); ++i) {
 
                if (*i == note) {
@@ -763,19 +763,19 @@ Sequence<Time>::remove_note_unlocked(const constNotePtr note)
                 * in this scenario, we have no choice other than to linear
                 * search the list of notes and find the note by ID.
                 */
-               
+
                for (i = _notes.begin(); i != _notes.end(); ++i) {
 
                        if ((*i)->id() == note->id()) {
-                               
+
                                DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1\tID-based pass, erasing note #%2 %3 @ %4\n", this, (*i)->id(), (int)(*i)->note(), (*i)->time()));
                                _notes.erase (i);
-                               
+
                                if (note->note() == _lowest_note || note->note() == _highest_note) {
-                                       
+
                                        _lowest_note = 127;
                                        _highest_note = 0;
-                                       
+
                                        for (typename Sequence<Time>::Notes::iterator ii = _notes.begin(); ii != _notes.end(); ++ii) {
                                                if ((*ii)->note() < _lowest_note)
                                                        _lowest_note = (*ii)->note();
@@ -783,18 +783,18 @@ Sequence<Time>::remove_note_unlocked(const constNotePtr note)
                                                        _highest_note = (*ii)->note();
                                        }
                                }
-                               
+
                                erased = true;
                                id_matched = true;
                                break;
                        }
                }
        }
-       
+
        if (erased) {
 
                Pitches& p (pitches (note->channel()));
-               
+
                typename Pitches::iterator j;
 
                /* if we had to ID-match above, we can't expect to find it in
@@ -818,11 +818,11 @@ Sequence<Time>::remove_note_unlocked(const constNotePtr note)
                         * notes by channel+time. We care only about its note number
                         * so the search_note has all other properties unset.
                         */
-                       
+
                        NotePtr search_note (new Note<Time>(0, Time(), Time(), note->note(), 0));
 
                        for (j = p.lower_bound (search_note); j != p.end() && (*j)->note() == note->note(); ++j) {
-                               
+
                                if ((*j) == note) {
                                        DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1\terasing pitch %2 @ %3\n", this, (int)(*j)->note(), (*j)->time()));
                                        p.erase (j);
@@ -836,7 +836,7 @@ Sequence<Time>::remove_note_unlocked(const constNotePtr note)
                }
 
                _edited = true;
-       
+
        } else {
                cerr << "Unable to find note to erase matching " << *note.get() << endmsg;
        }
index 67cc7b889e7b8c48a4c67d892b2615ea7315c098..9117751f54ac999e6d3386b9391d99df58f5d74e 100644 (file)
@@ -180,7 +180,7 @@ smf_add_track(smf_t *smf, smf_track_t *track)
 #else
                smf_set_format(smf, 1);
 #endif
-               
+
        }
 }
 
index d527cf178a165237c9da18a24b8df80a8ce8614d..5555fdcacef0f9587af3b2502bd878482244c6ca 100644 (file)
@@ -58,7 +58,7 @@ smf_event_is_metadata(const smf_event_t *event)
 {
        assert(event->midi_buffer);
        assert(event->midi_buffer_length > 0);
-       
+
        if (event->midi_buffer[0] == 0xFF)
                return (1);
 
@@ -76,7 +76,7 @@ smf_event_is_system_realtime(const smf_event_t *event)
 
        if (smf_event_is_metadata(event))
                return (0);
-       
+
        if (event->midi_buffer[0] >= 0xF8)
                return (1);
 
@@ -105,7 +105,7 @@ smf_event_is_sysex(const smf_event_t *event)
 {
        assert(event->midi_buffer);
        assert(event->midi_buffer_length > 0);
-       
+
        if (event->midi_buffer[0] == 0xF0)
                return (1);
 
index 96b36fdbb51b129c912cc68775f3923ae59f526c..a23a88fa49e6282461c582ce6f4231bda649e88b 100644 (file)
@@ -126,7 +126,7 @@ parse_mthd_header(smf_t *smf)
 
        if (!chunk_signature_matches(tmp_mthd, "MThd")) {
                g_critical("SMF error: MThd signature not found, is that a MIDI file?");
-               
+
                return (-2);
        }
 
@@ -199,7 +199,7 @@ parse_mthd_chunk(smf_t *smf)
                g_critical("SMF file uses FPS timing instead of PPQN, no support for that yet.");
                return (-4);
        }
-       
+
        return (0);
 }
 
@@ -372,7 +372,7 @@ expected_message_length(unsigned char status, const unsigned char *second_byte,
                case 0xA0: /* AfterTouch. */
                case 0xB0: /* Control Change. */
                case 0xE0: /* Pitch Wheel. */
-                       return (3);     
+                       return (3);
 
                case 0xC0: /* Program Change. */
                case 0xD0: /* Channel Pressure. */
@@ -388,7 +388,7 @@ static int
 extract_sysex_event(const unsigned char *buf, const size_t buffer_length, smf_event_t *event, uint32_t *len, int last_status)
 {
        (void) last_status;
-       
+
        int status;
        int32_t vlq_length, message_length;
        const unsigned char *c = buf;
@@ -433,7 +433,7 @@ static int
 extract_escaped_event(const unsigned char *buf, const size_t buffer_length, smf_event_t *event, uint32_t *len, int last_status)
 {
        (void) last_status;
-       
+
        int status;
        int32_t message_length = 0;
        int32_t vlq_length = 0;
@@ -709,7 +709,7 @@ parse_mtrk_header(smf_track_t *track)
        if (!chunk_signature_matches(mtrk, "MTrk")) {
                g_warning("SMF warning: Expected MTrk signature, got %c%c%c%c instead; ignoring this chunk.",
                                mtrk->id[0], mtrk->id[1], mtrk->id[2], mtrk->id[3]);
-               
+
                return (-2);
        }
 
@@ -741,7 +741,7 @@ smf_event_length_is_valid(const smf_event_t *event)
 {
        assert(event);
        assert(event->midi_buffer);
-       
+
        int32_t expected;
 
        if (event->midi_buffer_length < 1)
@@ -854,7 +854,7 @@ load_file_into_buffer(void **file_buffer, size_t *file_buffer_length, FILE* stre
        *file_buffer = malloc(*file_buffer_length);
        if (*file_buffer == NULL) {
                g_critical("malloc(3) failed: %s", strerror(errno));
-               
+
                return (-5);
        }
 
@@ -864,7 +864,7 @@ load_file_into_buffer(void **file_buffer, size_t *file_buffer_length, FILE* stre
                *file_buffer = NULL;
                return (-6);
        }
-       
+
        return (0);
 }
 
index 7c5747a3d58fe6c8f7131edb56fea1175c827aa1..6463955dba593178c51c9312b52406687d6dd5d1 100644 (file)
@@ -539,7 +539,7 @@ smf_validate(smf_t *smf)
                                return (-6);
                        }
                }
-                               
+
        }
 
        return (0);
index fb38ad09333f2c940b5357826270232a4a9f70b8..c172314815249188f95d7ce7fd27458e01e86230 100644 (file)
@@ -241,7 +241,7 @@ smf_create_tempo_map_and_compute_seconds(smf_t *smf)
 
        for (;;) {
                event = smf_get_next_event(smf);
-               
+
                if (event == NULL)
                        return;
 
@@ -275,7 +275,7 @@ smf_get_tempo_by_pulses(const smf_t *smf, size_t pulses)
                return (smf_get_tempo_by_number(smf, 0));
 
        assert(smf->tempo_array != NULL);
-       
+
        for (i = smf->tempo_array->len; i > 0; i--) {
                tempo = smf_get_tempo_by_number(smf, i - 1);
 
@@ -302,7 +302,7 @@ smf_get_tempo_by_seconds(const smf_t *smf, double seconds)
                return (smf_get_tempo_by_number(smf, 0));
 
        assert(smf->tempo_array != NULL);
-       
+
        for (i = smf->tempo_array->len; i > 0; i--) {
                tempo = smf_get_tempo_by_number(smf, i - 1);
 
index 139b676eaf95e7ab1cc20b35ddf20ebb5a9ed588..493c664bd2dc4fb616e1a8bb44bfed778cdcb31d 100644 (file)
@@ -177,7 +177,7 @@ cmd_ppqn(char *new_ppqn)
 
                g_message("Pulses Per Quarter Note changed to %d.", smf->ppqn);
        }
-       
+
        return (0);
 }
 
@@ -208,7 +208,7 @@ cmd_format(char *new_format)
 
                g_message("Forma changed to %d.", smf->format);
        }
-       
+
        return (0);
 }
 
@@ -343,7 +343,7 @@ show_event(smf_event_t *event)
                type = "Metadata";
        else
                type = "Event";
-       
+
        decoded = smf_event_decode(event);
 
        if (decoded == NULL) {
index e7634f360251be2d5c37e022264f309bf409d9fe..07b41848339f4485258af46ecadf5c6e5b86dd02 100644 (file)
@@ -334,7 +334,7 @@ CurveTest::constrainedCubic ()
           f"2(x2) = 2*(2*f'2(x2) + f'2(x1))/(x2 â€“ x1) - 6*(y2 â€“ y1)/ (x2 â€“ x1)^2
                   = 2*(2*0 + 1.8181)/(30 â€“ 10) â€“ 6*(150 â€“ 130)/(30 â€“ 10)^2
                   = -0.11818
-       
+
           d2 = 1/6 * (f"2(x2) - f"2(x1))/(x2 â€“ x1)
              = 1/6 * (-0.11818 + 0.063636)/(30 â€“ 10)
              = -0.0004545
index 2caea410e63c71f28777b823c1c9653417116756..b06a477b4d1e220df748ae2e37283e8ac2d10dac 100644 (file)
@@ -23,4 +23,4 @@ public:
        void coverageTest ();
 };
 
-       
+
index a4c8be1774ba9f1006359dbe576cc39eece03926..9471067de9d48602f20d60cee37b528a626045e9 100644 (file)
@@ -259,7 +259,7 @@ ActionManager::enable_accelerators ()
 
                for (acts = gtk_action_group_list_actions (group); acts; acts = g_list_next (acts)) {
                        ui_string += "<accelerator action=\"";
-                       
+
                        /* OK, this is pretty stupid ... there is the full
                         * accel path returned by gtk_action_get_accel_path ()
                         * but of course the UIManager doesn't use that, but
@@ -338,7 +338,7 @@ ActionManager::disable_active_actions ()
        }
        // save all action's states to action_states_to_restore
        save_action_states ();
-       
+
        // set all action's states disabled
        for (ActionStates::iterator i = action_states_to_restore.begin(); i != action_states_to_restore.end(); ++i) {
                if ((*i).sensitive) {
@@ -391,7 +391,7 @@ ActionManager::get_action (const char* path)
        *slash = '\0';
 
        return get_action (&copy[0], ++slash);
-       
+
 }
 
 RefPtr<Action>
@@ -493,7 +493,7 @@ void
 ActionManager::set_toggleaction_state (string n, bool s)
 {
        char const * name = n.c_str ();
-       
+
        const char *last_slash = strrchr (name, '/');
 
        if (last_slash == 0) {
@@ -526,13 +526,13 @@ string
 ActionManager::get_key_representation (const string& accel_path, AccelKey& key)
 {
        bool known = lookup_entry (accel_path, key);
-       
+
        if (known) {
                uint32_t k = possibly_translate_legal_accelerator_to_real_key (key.get_key());
                key = AccelKey (k, Gdk::ModifierType (key.get_mod()));
                return ui_manager->get_accel_group()->get_label (key.get_key(), Gdk::ModifierType (key.get_mod()));
        }
-       
+
        return unbound_string;
 }
 
index 87473adcd2b571ac69cae03e5674fd8ec09a9466..dfa2b4ac7c6f32bd3b3a64e39a7ee9586aa4974c 100644 (file)
@@ -37,12 +37,12 @@ guint BindingProxy::bind_statemask = Gdk::CONTROL_MASK;
 BindingProxy::BindingProxy (boost::shared_ptr<Controllable> c)
        : prompter (0),
          controllable (c)
-{                      
+{
 }
 
 BindingProxy::BindingProxy ()
        : prompter (0)
-{                      
+{
 }
 
 BindingProxy::~BindingProxy ()
@@ -89,7 +89,7 @@ BindingProxy::button_press_handler (GdkEventButton *ev)
                }
                return true;
        }
-       
+
        return false;
 }
 
index d9449ebb6bb4905e9758726e3a0d277c5c4c0112..71f35fcf367d17ad74dd1becf2a1a9840c7e6e16 100644 (file)
@@ -27,9 +27,9 @@ CairoPacker::draw_background (Gtk::Widget& w, GdkEventExpose*)
        int x, y;
        Gtk::Widget* window_parent;
        Glib::RefPtr<Gdk::Window> win = Gtkmm2ext::window_to_draw_on (w, &window_parent);
-       
+
        if (win) {
-               
+
                Cairo::RefPtr<Cairo::Context> context = win->create_cairo_context();
                w.translate_coordinates (*window_parent, 0, 0, x, y);
 
index aa8f883a7d979b808958155f02edc30c60998388..a597a7e29dcfc9e527f730107ce67677ad5d55ba 100644 (file)
@@ -38,7 +38,7 @@ void CairoWidget::set_source_rgb_a( cairo_t* cr, Gdk::Color col, float a)  //ToD
        float r = col.get_red_p ();
        float g = col.get_green_p ();
        float b = col.get_blue_p ();
-       
+
        cairo_set_source_rgba(cr, r, g, b, a);
 }
 
@@ -139,9 +139,9 @@ CairoWidget::on_expose_event (GdkEventExpose *ev)
                cairo_context->paint ();
        }
 #endif
-       
+
        Gtk::Widget* child = get_child ();
-       
+
        if (child) {
                propagate_expose (*child, ev);
        }
@@ -187,9 +187,9 @@ CairoWidget::on_expose_event (GdkEventExpose *ev)
 
        /* paint expose area the color of the parent window bg
        */
-       
+
        Gdk::Color bg (get_parent_bg());
-       
+
        cr->set_source_rgb (bg.get_red_p(), bg.get_green_p(), bg.get_blue_p());
        cr->fill ();
 
@@ -219,7 +219,7 @@ CairoWidget::on_expose_event (GdkEventExpose *ev)
 #ifdef OPTIONAL_CAIRO_IMAGE_SURFACE
        }
 #endif
-       
+
        return true;
 }
 
index 4a6056e19268cc74a2eb95a515d8ec631b90fb71..4de898c8323fa631c2e8f0cbb5b5b5d944067517 100644 (file)
@@ -149,9 +149,9 @@ CairoTextCell::set_size (Cairo::RefPtr<Cairo::Context>& context)
                for (n = 0; n < lim; ++n) {
                        buf[n] = '0' + digit;
                }
-               
+
                context->get_text_extents (&buf[0], ext);
-               
+
                max_width = max (ext.width + ext.x_bearing, max_width);
                max_height = max (ext.height, max_height);
                bsum += ext.x_bearing;
@@ -179,7 +179,7 @@ CairoCharCell::set_size (Cairo::RefPtr<Cairo::Context>& context)
        Cairo::TextExtents ext;
 
        _font->apply (context);
-       
+
        {
                const char* buf = "8";
                context->get_text_extents (buf, ext);
@@ -251,7 +251,7 @@ void
 CairoEditableText::add_cell (CairoCell* cell)
 {
        cells.push_back (cell);
-       
+
        CairoTextCell* tc = dynamic_cast<CairoTextCell*>(cell);
 
        if (tc) {
@@ -306,7 +306,7 @@ CairoEditableText::on_expose_event (GdkEventExpose* ev)
        Gtk::Allocation alloc = get_allocation ();
        double width = alloc.get_width();
        double height = alloc.get_height ();
-               
+
        if (_draw_bg) {
                context->set_source_rgba (bg_r, bg_g, bg_b, bg_a);
                if (_corner_radius) {
@@ -316,14 +316,14 @@ CairoEditableText::on_expose_event (GdkEventExpose* ev)
                }
                context->fill ();
        }
-       
+
        for (CellMap::iterator i = cells.begin(); i != cells.end(); ++i) {
 
                CairoCell* cell = (*i);
 
                /* is cell inside the expose area?
                 */
-               
+
                if (cell->intersects (ev->area)) {
                        if (cell == editing_cell) {
                                context->set_source_rgba (edit_r, edit_b, edit_g, edit_a);
@@ -413,9 +413,9 @@ CairoEditableText::set_cell_sizes ()
        if (!win) {
                return;
        }
-       
+
        Cairo::RefPtr<Cairo::Context> context = win->create_cairo_context();
-       
+
        if (!context) {
                return;
        }
@@ -432,7 +432,7 @@ CairoEditableText::on_size_request (GtkRequisition* req)
 
        max_cell_width = 0;
        max_cell_height = 0;
-       
+
        for (CellMap::iterator i = cells.begin(); i != cells.end(); ++i) {
                max_cell_width += (*i)->width();
                max_cell_height = std::max ((double) (*i)->height(), max_cell_height);
index 62419b423d37ac430b3f8bfb60b1fe4e6438d2e1..f8093cca1d0df2269f86faeaba1d961e185c6b05 100644 (file)
@@ -46,7 +46,7 @@ CellRendererColorSelector::CellRendererColorSelector()
        c.set_red (0);
        c.set_green (0);
        c.set_blue (0);
-       
+
        property_color() = c;
 }
 
@@ -70,21 +70,21 @@ CellRendererColorSelector::render_vfunc (const Glib::RefPtr<Gdk::Drawable>& wind
                cairo_t* cr = gdk_cairo_create (window->gobj());
                double r, g, b;
                Gdk::Color c = _property_color.get_value();
-               
+
                cairo_rectangle (cr, expose_area.get_x(), expose_area.get_y(), expose_area.get_width(), expose_area.get_height());
                cairo_clip (cr);
-               
+
                r = c.get_red_p();
                g = c.get_green_p();
                b = c.get_blue_p();
-               
+
                cairo_rectangle_t drawing_rect;
-               
+
                drawing_rect.x = cell_area.get_x() + property_xpad();
                drawing_rect.y = cell_area.get_y() + property_ypad();
                drawing_rect.width = cell_area.get_width() - (2 * property_xpad());
                drawing_rect.height = cell_area.get_height() - (2 * property_ypad());
-               
+
                Gtkmm2ext::rounded_rectangle (cr, drawing_rect.x, drawing_rect.y, drawing_rect.width, drawing_rect.height, 5);
                cairo_set_source_rgb (cr, r, g, b);
                cairo_fill (cr);
index c5c9eb98b02e68cf92ede37fff45bc35a81f011d..181e0db0f7c94d1d05cf9294fb2c353e34a97ae4 100644 (file)
@@ -70,7 +70,7 @@ CellRendererPixbufMulti::render_vfunc (const Glib::RefPtr<Gdk::Drawable>& window
 
        offset_width = cell_area.get_x() +  (int)(cell_area.get_width() - pb->get_width())/2;
        offset_height = cell_area.get_y() + (int)(cell_area.get_height() - pb->get_height())/2;
-       
+
        window->draw_pixbuf (RefPtr<GC>(), pb, 0, 0, offset_width, offset_height, -1, -1, Gdk::RGB_DITHER_NORMAL, 0, 0);
 }
 
index 9fefbfb88e895029e493cc5256b9550f1ee18855..af709b488f722630a768bb97c0398803e8cd7676 100644 (file)
@@ -75,7 +75,7 @@ CellRendererPixbufToggle::render_vfunc (const Glib::RefPtr<Gdk::Drawable>& windo
 {
        int offset_width = 0;
        int offset_height = 0;
-       
+
        if(property_active() == true){
 
                offset_width = cell_area.get_x() +  (int)(cell_area.get_width() - inactive_pixbuf->get_width())/2;
index 4cce090bccc75b449eb37f1dff7f860bb114e432..5dde9426e73c5cbc04c67e5c9963ffd5e228549b 100644 (file)
@@ -31,7 +31,7 @@ Choice::Choice (string title, string prompt, vector<string> choices, bool center
 {
        int n;
        vector<string>::iterator i;
-       
+
        if (center) {
                set_position (Gtk::WIN_POS_CENTER);
        } else {
@@ -49,7 +49,7 @@ Choice::Choice (string title, string prompt, vector<string> choices, bool center
 
        get_vbox()->set_border_width (12);
        get_vbox()->pack_start (*dhbox,  true, false);
-       
+
        set_has_separator (false);
        set_resizable (false);
        show_all_children ();
index 8782acaae8e3a63bdb9a5fb3cf562b11a6c6e467..876c68f665240a6800d356eaef1c08738b46ade3 100644 (file)
@@ -135,21 +135,21 @@ ClickBox::on_expose_event (GdkEventExpose *ev)
        Glib::RefPtr<Gdk::GC> fg_gc (style->get_fg_gc (Gtk::STATE_NORMAL));
        Glib::RefPtr<Gdk::GC> bg_gc (style->get_bg_gc (Gtk::STATE_NORMAL));
        Glib::RefPtr<Gdk::Window> win (get_window());
-       
+
        GdkRectangle base_rect;
        GdkRectangle draw_rect;
        gint x, y, width, height, depth;
-       
+
        win->get_geometry (x, y, width, height, depth);
-       
+
        base_rect.width = width;
        base_rect.height = height;
        base_rect.x = 0;
        base_rect.y = 0;
-       
+
        gdk_rectangle_intersect (&ev->area, &base_rect, &draw_rect);
        win->draw_rectangle (bg_gc, true, draw_rect.x, draw_rect.y, draw_rect.width, draw_rect.height);
-       
+
        if (twidth && theight) {
                win->draw_layout (fg_gc, (width - twidth) / 2, (height - theight) / 2, layout);
        }
index 06d17fce40a2bf63183ac8bde942667a5fe1d433..53b212d711f35696829f3732858aec0404e4a7d1 100644 (file)
@@ -49,10 +49,10 @@ DnDTreeViewBase::add_drop_targets (list<TargetEntry>& targets)
        for (list<TargetEntry>::iterator i = targets.begin(); i != targets.end(); ++i) {
                draggable.push_back (*i);
        }
-       
+
        enable_model_drag_source (draggable);
        enable_model_drag_dest (draggable);
-}      
+}
 
 void
 DnDTreeViewBase::add_object_drag (int column, string type_name)
index a899e5906a38493a70df31826af4348fc41d22c9..9a2f5a2cd95899a6f60a2b5e2ea764c75aac2f46 100644 (file)
@@ -162,7 +162,7 @@ Fader::get_image_scales (double &x_scale, double &y_scale)
        int pbheight = _face_pixbuf->get_height ();
        int width = get_width ();
        int height = get_height ();
-       
+
        if ((width != pbwidth) || (height != pbheight)) {
                x_scale = double (width) / double (pbwidth);
                if (x_scale == 0.0) {
@@ -186,17 +186,17 @@ Fader::set_touch_cursor (const Glib::RefPtr<Gdk::Pixbuf>& touch_cursor)
 void
 Fader::render (cairo_t* cr, cairo_rectangle_t*)
 {
-       
+
        double xscale = 1.0;
        double yscale = 1.0;
-       
+
        get_image_scales (xscale, yscale);
-       
+
        cairo_matrix_t matrix;
        cairo_get_matrix (cr, &matrix);
        cairo_matrix_scale (&matrix, xscale, yscale);
        cairo_set_matrix (cr, &matrix);
-       
+
        get_handle_position (_last_drawn_x, _last_drawn_y);
 
        if (_underlay_pixbuf != 0) {
@@ -264,9 +264,9 @@ Fader::on_button_press_event (GdkEventButton* ev)
 
        double xscale = 1.0;
        double yscale = 1.0;
-       
+
        get_image_scales (xscale, yscale);
-       
+
        double hw = _handle_pixbuf->get_width() * xscale;
        double hh = _handle_pixbuf->get_height() * yscale;
 
@@ -276,16 +276,16 @@ Fader::on_button_press_event (GdkEventButton* ev)
 
        double ev_pos_x;
        double ev_pos_y;
-               
+
        get_closest_point_on_line(_min_pos_x, _min_pos_y,
                                  _max_pos_x, _max_pos_y,
                                  ev->x, ev->y,
                                  ev_pos_x, ev_pos_y );
        add_modal_grab ();
-       
+
        _grab_window = ev->window;
        _dragging = true;
-       
+
        gdk_pointer_grab(ev->window,false,
                         GdkEventMask (Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK),
                         NULL,
@@ -293,7 +293,7 @@ Fader::on_button_press_event (GdkEventButton* ev)
                         ev->time);
 
        queue_draw();
-       
+
        return true;
 }
 
@@ -368,7 +368,7 @@ Fader::on_motion_notify_event (GdkEventMotion* ev)
        if (_dragging) {
                double ev_pos_x;
                double ev_pos_y;
-               
+
                if (ev->window != _grab_window) {
                        _grab_window = ev->window;
                        return true;
@@ -378,12 +378,12 @@ Fader::on_motion_notify_event (GdkEventMotion* ev)
                                          _max_pos_x, _max_pos_y,
                                          _grab_start_handle_x + (ev->x - _grab_start_mouse_x), _grab_start_handle_y + (ev->y - _grab_start_mouse_y),
                                          ev_pos_x, ev_pos_y );
-               
+
                double const fract = sqrt((ev_pos_x - _min_pos_x) * (ev_pos_x - _min_pos_x) +
                                          (ev_pos_y - _min_pos_y) * (ev_pos_y - _min_pos_y)) /
                        sqrt((double)((_max_pos_x - _min_pos_x) * (_max_pos_x - _min_pos_x) +
                                      (_max_pos_y - _min_pos_y) * (_max_pos_y - _min_pos_y)));
-               
+
                adjustment.set_value (adjustment.get_lower() + (adjustment.get_upper() - adjustment.get_lower()) * fract);
        }
        return true;
index e9d2c1c422b01c2295c0f088fc226473204144ff..48a2ed1ab03e32fc64262305612c256a1d47d8fb 100644 (file)
@@ -46,9 +46,9 @@ GroupedButtons::GroupedButtons (uint32_t nbuttons, uint32_t first_active)
        for (uint32_t n = 0; n < nbuttons; ++n) {
 
                Gtk::ToggleButton *button;
-               
+
                button = manage (new (Gtk::ToggleButton));
-               
+
                if (n == current_active) {
                        button->set_active (true);
                }
index d06e60ccd64a949e30a91554b2c624c9885a715b..d1601468591945033b5954fd07887ef28eed3d1c 100644 (file)
@@ -71,12 +71,12 @@ UI::UI (string namestr, int *argc, char ***argv)
        : AbstractUI<UIRequest> (namestr)
        , _receiver (*this)
        , errors (0)
-       
+
 {
        theMain = new Main (argc, argv);
 
        pthread_set_name ("gui");
-       
+
        _active = false;
 
        if (!theGtkUI) {
@@ -91,7 +91,7 @@ UI::UI (string namestr, int *argc, char ***argv)
        */
 
        run_loop_thread = Threads::Thread::self();
-       
+
        /* store "this" as the UI-for-thread of this thread, same argument
           as for previous line.
        */
@@ -144,7 +144,7 @@ UI::load_rcfile (string path, bool themechange)
         * This does not occur if wiget.get_style is used instead of rc.get_style below,
         * except that doesn't actually work...
         */
-       
+
        static Glib::RefPtr<Style>* fatal_style   = 0;
        static Glib::RefPtr<Style>* error_style   = 0;
        static Glib::RefPtr<Style>* warning_style = 0;
@@ -641,7 +641,7 @@ UI::toggle_errors ()
        }
 
        Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
-       
+
        if (tact->get_active()) {
                errors->set_position (WIN_POS_MOUSE);
                errors->show ();
index 0336fde242145eccd4273d1fe6a45c8fe4b64947..b03e351cbfc29db20f984e6e71c186272d847552 100644 (file)
@@ -38,7 +38,7 @@ namespace ActionManager {
 
        LIBGTKMM2EXT_API extern std::string unbound_string;  /* the key string returned if an action is not bound */
        LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::UIManager> ui_manager;
-       
+
        LIBGTKMM2EXT_API extern void set_sensitive (std::vector<Glib::RefPtr<Gtk::Action> >& actions, bool);
        LIBGTKMM2EXT_API extern std::string get_key_representation (const std::string& accel_path, Gtk::AccelKey& key);
 
index 70aedbe50eea9019979a40c4cf0b6fb55ecb3db6..da19a1a1f703b31c6456499e90c828b83b4e9198 100644 (file)
@@ -74,5 +74,5 @@ class LIBGTKMM2EXT_API AutoSpin
 };
 
 } /* namespace */
-       
+
 #endif /* __gtkmm2ext_auto_spin_h__ */
index ce10411a2cfd0a8cb09f54cbbd9355f2e1316c9e..f529c5c557554eac7a964120b535532a7915c372 100644 (file)
@@ -80,4 +80,4 @@ class LIBGTKMM2EXT_API BarController : public Gtk::Alignment
 
 }; /* namespace */
 
-#endif // __gtkmm2ext_bar_controller_h__               
+#endif // __gtkmm2ext_bar_controller_h__
index cf74d3aca048ecb3505189c8ed38e0a56976350c..d96f8145a44bc5bbe8b1fd4cf2f8dd00eb5bfdf5 100644 (file)
@@ -40,7 +40,7 @@ class LIBGTKMM2EXT_API BindableToggleButton : public Gtkmm2ext::StatefulToggleBu
        BindableToggleButton () {}
 
        virtual ~BindableToggleButton() {}
-       
+
        bool on_button_press_event (GdkEventButton *ev) {
                if (!binding_proxy.button_press_handler (ev)) {
                        StatefulToggleButton::on_button_press_event (ev);
@@ -49,7 +49,7 @@ class LIBGTKMM2EXT_API BindableToggleButton : public Gtkmm2ext::StatefulToggleBu
                        return true;
                }
        }
-       
+
        boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); }
        void set_controllable (boost::shared_ptr<PBD::Controllable> c);
         void watch ();
@@ -67,7 +67,7 @@ class LIBGTKMM2EXT_API BindableButton : public Gtkmm2ext::StatefulButton
    public:
        BindableButton (boost::shared_ptr<PBD::Controllable> c) : binding_proxy (c) {}
        ~BindableButton() {}
-       
+
        bool on_button_press_event (GdkEventButton *ev) {
                if (!binding_proxy.button_press_handler (ev)) {
                        StatefulButton::on_button_press_event (ev);
index 022a0cbcd9145b688a00a673dc69a7a2d2b58654..7108c46eb2b8af8c66c760b698c09f272511ae65 100644 (file)
@@ -39,7 +39,7 @@ class LIBGTKMM2EXT_API BindingProxy : public sigc::trackable
        BindingProxy (boost::shared_ptr<PBD::Controllable>);
        BindingProxy ();
        virtual ~BindingProxy();
-       
+
        void set_bind_button_state (guint button, guint statemask);
 
        static bool is_bind_action (GdkEventButton *);
@@ -51,10 +51,10 @@ class LIBGTKMM2EXT_API BindingProxy : public sigc::trackable
   protected:
        Gtkmm2ext::PopUp*  prompter;
        boost::shared_ptr<PBD::Controllable> controllable;
-       
+
        static guint bind_button;
        static guint bind_statemask;
-       
+
        PBD::ScopedConnection learning_connection;
        void learning_finished ();
        bool prompter_hiding (GdkEventAny *);
index 436dc0382d8b7ed6ae9552efe60ba9816a422270..b6b4ccd83e0c7e2626928e3d755ea42110146c8c 100644 (file)
@@ -39,11 +39,11 @@ public:
 
        Gtkmm2ext::ActiveState active_state() const { return _active_state; }
        Gtkmm2ext::VisualState visual_state() const { return _visual_state; }
-       
+
        /* derived widgets can override these two to catch
           changes in active & visual state
        */
-       
+
        virtual void set_active_state (Gtkmm2ext::ActiveState);
        virtual void set_visual_state (Gtkmm2ext::VisualState);
 
@@ -80,7 +80,7 @@ public:
 
        /* set_focus_handler() will cause all button-press events on any
           CairoWidget to invoke this slot/functor/function/method/callback.
-       
+
           We do this because in general, CairoWidgets do not grab
           keyboard focus, but a button press on them should
           clear focus from any active text entry.
@@ -103,7 +103,7 @@ protected:
        void on_style_changed (const Glib::RefPtr<Gtk::Style>&);
        bool on_button_press_event (GdkEventButton*);
        Gdk::Color get_parent_bg ();
-       
+
        /* this is an additional virtual "on_..." method. Glibmm does not
           provide a direct signal for name changes, so this acts as a proxy.
        */
@@ -125,7 +125,7 @@ protected:
        Glib::SignalProxyProperty _name_proxy;
        sigc::connection _parent_style_change;
        Widget * _current_parent;
-       
+
 };
 
 #endif
index a061672fb81177330927fb1fcb27ec9a57185923..8fe166624f2c7cdccfb2ca010e5f0f0233d2b151 100644 (file)
@@ -36,7 +36,7 @@ class LIBGTKMM2EXT_API CairoCell
   public:
        CairoCell(int32_t id);
        virtual ~CairoCell() {}
-       
+
        int32_t id() const { return _id; }
 
        virtual void render (Cairo::RefPtr<Cairo::Context>&) = 0;
@@ -165,7 +165,7 @@ public:
        void set_width_chars (CairoTextCell* cell, uint32_t);
 
        void set_draw_background (bool yn) { _draw_bg = yn; }
-       
+
        void set_colors (double cr, double cg, double cb, double ca) {
                r = cr;
                g = cg;
@@ -194,7 +194,7 @@ public:
        void set_xpad (double x) { _xpad = x; queue_resize(); }
        double ypad() const { return _ypad; }
        void set_ypad (double y) { _ypad = y; queue_resize(); }
-       
+
        double corner_radius() const { return _corner_radius; }
        void set_corner_radius (double r) { _corner_radius = r; queue_draw (); }
 
index e84a635fa07ddefd7331a2256f280404a5274acd..c921976dd3d944599cbd3f76179d10fdfb1edbac 100644 (file)
@@ -53,7 +53,7 @@ class LIBGTKMM2EXT_API CellRendererPixbufMulti : public Gtk::CellRenderer
        Glib::PropertyProxy<uint32_t> property_state();
 
        void set_pixbuf(uint32_t state, Glib::RefPtr<Gdk::Pixbuf> pixbuf);
-       
+
        typedef sigc::signal<void, const Glib::ustring&> SignalChanged;
 
        SignalChanged& signal_changed();
index 30171dd692d846db1bc70bb9e476e721a67c2962..3fd2d65aa94b1873b49c3881a74eba1658724d1c 100644 (file)
@@ -62,7 +62,7 @@ class LIBGTKMM2EXT_API CellRendererPixbufToggle : public Gtk::CellRenderer
   private:
        Glib::Property< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_;
        Glib::Property<bool> property_active_;
-       
+
        Glib::RefPtr<Gdk::Pixbuf> active_pixbuf;
        Glib::RefPtr<Gdk::Pixbuf> inactive_pixbuf;
 
index dd58f77a4c6760a5e9e26c33d37cff111ae0fe62..083fee6378a861330941c6602a349ab663e950f0 100644 (file)
@@ -52,7 +52,7 @@ class LIBGTKMM2EXT_API DnDTreeViewBase : public Gtk::TreeView
                Gtk::TreeView::on_drag_begin (context);
                start_object_drag ();
        }
-       
+
        void on_drag_leave(const Glib::RefPtr<Gdk::DragContext>& context, guint time) {
                suggested_action = context->get_suggested_action();
                TreeView::on_drag_leave (context, time);
@@ -73,12 +73,12 @@ class LIBGTKMM2EXT_API DnDTreeViewBase : public Gtk::TreeView
 
        struct DragData {
            DragData () : source (0) {}
-               
+
            Gtk::TreeView* source;
            int            data_column;
            std::string    object_type;
        };
-       
+
        static DragData drag_data;
 
        void start_object_drag () {
@@ -112,7 +112,7 @@ class /*LIBGTKMM2EXT_API*/ DnDTreeView : public DnDTreeViewBase
                        selection_data.set (8, (guchar*)&c, 1);
                }
        }
-       
+
        void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time) {
                if (suggested_action) {
                        /* this is a drag motion callback. just update the status to
@@ -122,14 +122,14 @@ class /*LIBGTKMM2EXT_API*/ DnDTreeView : public DnDTreeViewBase
                        TreeView::on_drag_data_received (context, x, y, selection_data, info, time);
                        return;
                }
-               
+
                if (selection_data.get_target() == "GTK_TREE_MODEL_ROW") {
-                       
+
                        TreeView::on_drag_data_received (context, x, y, selection_data, info, time);
-                       
+
 
                } else if (selection_data.get_target() == object_type) {
-                       
+
                        end_object_drag (const_cast<Glib::RefPtr<Gdk::DragContext>& > (context), x, y);
 
                } else {
@@ -147,16 +147,16 @@ class /*LIBGTKMM2EXT_API*/ DnDTreeView : public DnDTreeViewBase
                if (drag_data.source == 0) {
                        return;
                }
-                       
+
                Glib::RefPtr<Gtk::TreeModel> model = drag_data.source->get_model();
                DataType v;
                Gtk::TreeSelection::ListHandle_Path selection = drag_data.source->get_selection()->get_selected_rows ();
-               
+
                for (Gtk::TreeSelection::ListHandle_Path::iterator x = selection.begin(); x != selection.end(); ++x) {
                        model->get_iter (*x)->get_value (drag_data.data_column, v);
                        l.push_back (v);
                }
-               
+
                *source = drag_data.source;
        }
 
index 940a72859ee1a01814430889034d7846e4c6705d..84289aff34a62e7a64f799267d7603490dcb8910 100644 (file)
 
 namespace Gtkmm2ext {
 
-/** Parent class for children of a DnDVBox */  
+/** Parent class for children of a DnDVBox */
 class /*LIBGTKMM2EXT_API*/ DnDVBoxChild
 {
 public:
        virtual ~DnDVBoxChild () {}
-       
+
        /** @return The widget that is to be put into the DnDVBox */
        virtual Gtk::Widget& widget () = 0;
-       
+
        /** @return An EventBox containing the widget that should be used for selection, dragging etc. */
        virtual Gtk::EventBox& action_widget () = 0;
 
@@ -68,15 +68,15 @@ public:
                signal_drag_leave().connect (mem_fun (*this, &DnDVBox::drag_leave));
 
                _internal_vbox.show ();
-               
+
                drag_dest_set (_targets);
                signal_drag_data_received().connect (mem_fun (*this, &DnDVBox::drag_data_received));
        }
-       
+
        virtual ~DnDVBox ()
        {
                clear ();
-               
+
                delete _drag_icon;
        }
 
@@ -89,9 +89,9 @@ public:
                child->action_widget().signal_drag_end().connect (sigc::bind (mem_fun (*this, &DnDVBox::drag_end), child));
                child->action_widget().signal_button_press_event().connect (sigc::bind (mem_fun (*this, &DnDVBox::button_press), child));
                child->action_widget().signal_button_release_event().connect (sigc::bind (mem_fun (*this, &DnDVBox::button_release), child));
-               
+
                _internal_vbox.pack_start (child->widget(), false, false);
-               
+
                _children.push_back (child);
                child->widget().show ();
        }
@@ -180,7 +180,7 @@ public:
                T* after;
 
                std::pair<T*, double> r;
-               
+
                r.second = get_children_around_position (y, &before, &r.first, &after);
 
                return r;
@@ -206,7 +206,7 @@ public:
        {
                return create_or_update_placeholder (get_child_at_position (y).second);
        }
-       
+
        /** Children have been reordered by a drag */
        sigc::signal<void> Reordered;
 
@@ -241,7 +241,7 @@ private:
 
                return bottom;
        }
-       
+
        /** Look at a y coordinate and find the children below y, and the ones either side.
         *  @param y y position.
         *  @param before Filled in with the child before, or 0.
@@ -270,7 +270,7 @@ private:
                while (y >= bottom && j != _children.end()) {
 
                        top = bottom;
-                       
+
                        *before = *j;
                        ++i;
                        ++j;
@@ -297,13 +297,13 @@ private:
        void drag_begin (Glib::RefPtr<Gdk::DragContext> const & context, T* child)
        {
                _drag_child = child;
-               
+
                /* make up an icon for the drag */
                _drag_icon = new Gtk::Window (Gtk::WINDOW_POPUP);
-               
+
                Gtk::Allocation a = child->action_widget().get_allocation ();
                _drag_icon->set_size_request (a.get_width(), a.get_height());
-               
+
                _drag_icon->signal_expose_event().connect (sigc::mem_fun (*this, &DnDVBox::icon_expose));
                _drag_icon->set_name (get_name ());
 
@@ -317,7 +317,7 @@ private:
                int w, h;
                _drag_icon->get_size (w, h);
                _drag_icon->drag_set_as_icon (context, w / 2, h / 2);
-               
+
                _drag_source = this;
        }
 
@@ -336,22 +336,22 @@ private:
                cairo_rectangle (cr, 0, 0, w, h);
                cairo_fill (cr);
                cairo_destroy (cr);
-               
+
                return false;
        }
-       
+
        void drag_data_get (Glib::RefPtr<Gdk::DragContext> const &, Gtk::SelectionData & selection_data, guint, guint, T* child)
        {
                selection_data.set (selection_data.get_target(), 8, (const guchar *) &child, sizeof (&child));
        }
-       
+
        void drag_data_received (
                Glib::RefPtr<Gdk::DragContext> const & context, int /*x*/, int y, Gtk::SelectionData const & selection_data, guint /*info*/, guint time
                )
        {
                /* work out where it was dropped */
                std::pair<T*, double> const drop = get_child_at_position (y);
-               
+
                if (_drag_source == this) {
 
                        /* dropped from ourselves onto ourselves */
@@ -364,7 +364,7 @@ private:
 
                                /* where in the list this child should be dropped */
                                int target = drop.second + 0.5;
-                               
+
                                /* find out whether the child was `picked up' from before the drop position */
                                int n = 0;
                                typename std::list<T*>::const_iterator i = _children.begin ();
@@ -372,31 +372,31 @@ private:
                                        ++i;
                                        ++n;
                                }
-                               
+
                                /* if so, adjust the drop position to account for this */
                                if (n < target) {
                                        --target;
                                }
-                               
+
                                _internal_vbox.reorder_child (child->widget(), target);
                        }
-                       
+
                } else {
-                       
+
                        /* drag started in another DnDVBox; raise a signal to say what happened */
-                       
+
                        std::list<T*> dropped = _drag_source->selection ();
                        DropFromAnotherBox (_drag_source, drop.first, context);
                }
-               
+
                context->drag_finish (false, false, time);
        }
-       
+
        void drag_end (Glib::RefPtr<Gdk::DragContext> const &, T *)
        {
                delete _drag_icon;
                _drag_icon = 0;
-               
+
                _drag_child = 0;
                remove_placeholder ();
 
@@ -474,7 +474,7 @@ private:
                if (child) {
                        _expecting_unwanted_button_event = true;
                }
-                       
+
                if (ev->button == 1 || ev->button == 3) {
 
                        if (!selected (child)) {
@@ -492,7 +492,7 @@ private:
                                                if (selecting && !was_selected) {
                                                        add_to_selection (*i);
                                                }
-                                               
+
                                                if (!selecting && !done) {
                                                        if (selected (*i)) {
                                                                selecting = true;
@@ -509,19 +509,19 @@ private:
                                        }
 
                                } else {
-                                               
+
                                        if ((ev->state & Gdk::CONTROL_MASK) == 0) {
                                                clear_selection ();
                                        }
-                                       
+
                                        if (child) {
                                                add_to_selection (child);
                                        }
 
                                }
-                               
+
                                SelectionChanged (); /* EMIT SIGNAL */
-                               
+
                        } else {
                                /* XXX THIS NEEDS GENERALIZING FOR OS X */
                                if (ev->button == 1 && (ev->state & Gdk::CONTROL_MASK)) {
@@ -535,7 +535,7 @@ private:
 
                return ButtonPress (ev, child); /* EMIT SIGNAL */
        }
-       
+
        bool button_release (GdkEventButton* ev, T* child)
        {
                if (_expecting_unwanted_button_event == true && child == 0) {
@@ -565,7 +565,7 @@ private:
                        setup_child_state (*i);
                }
        }
-       
+
        void add_to_selection (T* child)
        {
                if ( !child->is_selectable() )
@@ -583,21 +583,21 @@ private:
                        setup_child_state (c);
                }
        }
-               
+
        T* child_from_widget (Gtk::Widget const * w) const
        {
                typename std::list<T*>::const_iterator i = _children.begin();
                while (i != _children.end() && &(*i)->widget() != w) {
                        ++i;
                }
-               
+
                if (i == _children.end()) {
                        return 0;
                }
 
                return *i;
        }
-       
+
        Gtk::VBox _internal_vbox;
        std::list<Gtk::TargetEntry> _targets;
        std::list<T*> _children;
@@ -611,12 +611,12 @@ private:
        Gtk::Label* _placeholder;
        /** Our child being dragged, or 0 */
        T* _drag_child;
-       
+
        static DnDVBox* _drag_source;
-       
+
 };
 
 template <class T>
 DnDVBox<T>* DnDVBox<T>::_drag_source = 0;
-       
+
 }
index cc0c2ef73ad2afe4d4c1334616698f82be3c1306..2dce03cb2bdd2fd746dfc2dc5b83d2c09f53a4e0 100644 (file)
@@ -30,7 +30,7 @@ class LIBGTKMM2EXT_API FocusEntry : public Gtk::Entry
 {
   public:
        FocusEntry ();
-       
+
   protected:
        bool on_button_press_event (GdkEventButton*);
        bool on_button_release_event (GdkEventButton*);
index 06e7fffe837ceb580ee74be4306d6c463bb7febf..15b01bff4f505646d33330332c704db1d2a26105 100644 (file)
@@ -36,7 +36,7 @@ class LIBGTKMM2EXT_API GroupedButtons : public sigc::trackable
   public:
        GroupedButtons (uint32_t nbuttons, uint32_t first_active);
        GroupedButtons (std::vector<Gtk::ToggleButton *>&);
-       
+
        Gtk::ToggleButton& button (uint32_t which) {
                return *buttons[which];
        }
index cc0d67b2ec6bdbc96079669efa001f0debb84228..868f71fd8db8ecb7ccfe3934508867302c414a7e 100644 (file)
@@ -167,7 +167,7 @@ class LIBGTKMM2EXT_API UI : public AbstractUI<UIRequest>
        sigc::signal<void> theme_changed;
 
        static bool just_hide_it (GdkEventAny *, Gtk::Window *);
-       
+
   protected:
        virtual void handle_fatal (const char *);
        virtual void display_message (const char *prefix, gint prefix_len,
index 73c9ad7d429e10253e141cb6f2e10dd3251fecaa..fca5d9f817ed6aa6f7ca2dd47c8b20d420a2461a 100644 (file)
@@ -145,7 +145,7 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
        static void set_insert_note_button (guint);
        static guint insert_note_modifier() { return insert_note_mod; }
        static void set_insert_note_modifier(guint);
-       
+
        static bool is_edit_event (GdkEventButton*);
        static bool is_delete_event (GdkEventButton*);
        static bool is_insert_note_event (GdkEventButton*);
index ee3ba167a5a4da99fcad9ebed2f83d77efe67401..91e7a67a7e71144f2c5e6dd47169b6e600fce9dc 100644 (file)
@@ -103,7 +103,7 @@ class LIBGTKMM2EXT_API MotionFeedback : public Gtk::VBox
           to a display value (0.0 .. 1.0)
        */
        virtual double to_display_value (double) = 0;
-       
+
        virtual double adjust (double nominal_delta) = 0;
 
   private:
@@ -130,5 +130,5 @@ class LIBGTKMM2EXT_API MotionFeedback : public Gtk::VBox
 };
 
 } /* namespace */
-       
+
 #endif // __gtkmm2ext_motion_feedback_h__
index 0ad9439fa821954385e9edd5fead76b60de71aca..9883fd2020db77cfcc9fbb95a6c064226e7cece5 100644 (file)
@@ -34,7 +34,7 @@ class LIBGTKMM2EXT_API PersistentTooltip : public sigc::trackable
   public:
        PersistentTooltip (Gtk::Widget *, bool draggable = false, int margin_y = 0);
        virtual ~PersistentTooltip ();
-       
+
        void set_tip (std::string);
        void set_font (Pango::FontDescription font);
        void set_center_alignment (bool align_to_center);
index 50586a902862a1a9841c1240cffd8fdf87fb9f11..0a0d2593c74b014c0d433c81dbd53163e1c24f92 100644 (file)
@@ -60,7 +60,7 @@ class LIBGTKMM2EXT_API PixScroller : public Gtk::DrawingArea
        double grab_start;
        int overall_height;
        bool dragging;
-       
+
        float default_value;
 
        void adjustment_changed ();
index 5d9ca69801a10ad4d3bc7b454ec219b658797f22..4d957b4868bdeb7c99a4f05e80d6dfe38c022aaf 100644 (file)
@@ -56,7 +56,7 @@ public:
 
        void set_min_page_size(double page_size);
        int get_handle_size() { return handle_size; }
-       
+
        inline int position_of(Component comp) { return position[comp]; }
 
        sigc::signal0<void> DragStarting;
index 460f4a88ae39b50154417d527e8a15cc928bc245..e756180eaf0b47671bf55c3040718d5720f89733 100644 (file)
@@ -81,4 +81,4 @@ class LIBGTKMM2EXT_API HSliderController : public SliderController
 
 }; /* namespace */
 
-#endif // __gtkmm2ext_slider_controller_h__            
+#endif // __gtkmm2ext_slider_controller_h__
index 98d13a2a7d723f800e54f4d9192770843d8a8605..51af88c00559679fecf95e08fd17fc8fa7027945 100644 (file)
@@ -48,7 +48,7 @@ class LIBGTKMM2EXT_API TextViewer : public Gtk::Window, public Transmitter
 
        void insert_file (const std::string &);
        void scroll_to_bottom ();
-       
+
        void deliver ();
 };
 
index 0182fec4567e6f82b4e303d19e80d63e62a5b1c6..62ffba3b9cd8591455e8c7c7924ec6bba43bd5ad 100644 (file)
@@ -58,16 +58,16 @@ namespace Gtkmm2ext {
 
        LIBGTKMM2EXT_API void get_ink_pixel_size (Glib::RefPtr<Pango::Layout>,
                                                  int& width, int& height);
-       
+
 
        LIBGTKMM2EXT_API void get_pixel_size (Glib::RefPtr<Pango::Layout>,
                                              int& width, int& height);
-       
+
        LIBGTKMM2EXT_API void set_size_request_to_display_given_text (Gtk::Widget &w,
                                                                      const gchar *text,
                                                                      gint hpadding,
                                                                      gint vpadding);
-       
+
        LIBGTKMM2EXT_API void set_size_request_to_display_given_text_width (Gtk::Widget& w,
                                                                            const gchar* htext,
                                                                            gint         hpadding,
@@ -108,7 +108,7 @@ namespace Gtkmm2ext {
 
        LIBGTKMM2EXT_API bool set_active_text_if_present (Gtk::ComboBoxText&,
                                  const std::string);
-       
+
        template<class T> /*LIBGTKMM2EXT_API*/ void deferred_delete (void *ptr) {
                delete static_cast<T *> (ptr);
        }
@@ -131,7 +131,7 @@ namespace Gtkmm2ext {
         LIBGTKMM2EXT_API void container_clear (Gtk::Container&);
 
        /* C++ API for rounded rectangles */
-       
+
         LIBGTKMM2EXT_API void rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
         LIBGTKMM2EXT_API void rounded_top_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
         LIBGTKMM2EXT_API void rounded_top_left_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
index 3e873f303be778f4628f5a4f162c1789872d13bb..bb8bd375f097f0d38a02d5cb3901e5e6382ae1aa 100644 (file)
@@ -14,7 +14,7 @@ namespace Gtkmm2ext {
                ExplicitActive,
                ImplicitActive,
        };
-       
+
        enum LIBGTKMM2EXT_API VisualState {
                /* these can be OR-ed together */
                NoVisualState = 0x0,
index 37bb28c1a2474aabc8c35bc14d1defa73ff66e1d..6f5fd132947f2bcb08ae1943276f14a9946ee333 100644 (file)
@@ -44,14 +44,14 @@ void
 IdleAdjustment::underlying_adjustment_value_changed ()
 {
        last_vc = g_get_monotonic_time();
-       
+
        if (timeout_queued) {
                return;
        }
 
        Glib::signal_timeout().connect(mem_fun(*this, &IdleAdjustment::timeout_handler), 250);
        timeout_queued = true;
-}      
+}
 
 gint
 IdleAdjustment::timeout_handler ()
index b0d952a11abcae0cdd6a986e6b9533871973ef9a..b08a1e4f8c19eb41859e05797d313fb8f2e3e2eb 100644 (file)
@@ -644,7 +644,7 @@ Keyboard::reset_bindings ()
 
                string new_path = user_keybindings_path;
                new_path += ".old";
-               
+
                if (::g_rename (user_keybindings_path.c_str(), new_path.c_str())) {
                        error << string_compose (_("Cannot rename your own keybinding file (%1)"), strerror (errno)) << endmsg;
                        return -1;
index 458aeeff3bf1a768927fe832a9a16bbfc9f99814..08436ac6bf325f0299ceeba0c43925c41d1889ac 100644 (file)
@@ -96,7 +96,7 @@ MotionFeedback::MotionFeedback (Glib::RefPtr<Gdk::Pixbuf> pix,
                value = new Label;
                value->set_justify (Gtk::JUSTIFY_RIGHT);
                value->show ();
-               
+
                 value_packer->add (*value);
 
                hpacker = manage (new HBox);
@@ -198,7 +198,7 @@ MotionFeedback::pixwin_button_release_event (GdkEventButton *ev)
                        _controllable->set_value (_controllable->lower ());
                }
                break;
-               
+
        case 3:
                if (pixwin.has_grab()) {
                        if (grab_is_fine) {
@@ -329,7 +329,7 @@ MotionFeedback::pixwin_key_press_event (GdkEventKey *ev)
                _controllable->set_value (_controllable->upper());
                break;
        }
-       
+
        return retval;
 }
 
@@ -343,7 +343,7 @@ MotionFeedback::pixwin_expose_event (GdkEventExpose*)
        GdkWindow *window = pixwin.get_window()->gobj();
        double display_val = to_display_value (_controllable->get_value());
        int32_t phase = lrint (display_val * 64.0);
-       
+
        // skip middle phase except for true middle value
 
        if (type == Rotary && phase == 32) {
@@ -496,30 +496,30 @@ MotionFeedback::render_pixbuf (int size)
        GdkColor dark;
        GdkColor bright;
        ProlooksHSV* hsv;
-               
+
        hsv = prolooks_hsv_new_for_gdk_color (base_color->gobj());
        bright = (prolooks_hsv_to_gdk_color (hsv, &col2), col2);
        prolooks_hsv_set_saturation (hsv, 0.66);
        prolooks_hsv_set_value (hsv, 0.67);
        dark = (prolooks_hsv_to_gdk_color (hsv, &col3), col3);
-               
+
        cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, size * 64, size);
        cairo_t* cr = cairo_create (surface);
-               
+
        for (int i = 0; i < 64; ++i) {
                cairo_save (cr);
                core_draw (cr, i, size, 20, size*i, 0, &bright, &dark);
                cairo_restore (cr);
        }
-               
+
        if (cairo_surface_write_to_png (surface, path) != CAIRO_STATUS_SUCCESS) {
                error << string_compose (_("motionfeedback: could not save image set to %1"), path) << endmsg;
                return pixbuf;
        }
-               
+
        cairo_destroy (cr);
        cairo_surface_destroy (surface);
-               
+
        try {
                pixbuf = Gdk::Pixbuf::create_from_file (path);
        } catch (const Gdk::PixbufError &e) {
@@ -530,7 +530,7 @@ MotionFeedback::render_pixbuf (int size)
 
        g_unlink (path);
        g_free (path);
-       
+
        return pixbuf;
 }
 
@@ -593,7 +593,7 @@ MotionFeedback::core_draw (cairo_t* cr, int phase, double size, double progress_
        cairo_arc (cr, xc, yc, progress_radius, start_angle, end_angle);
        cairo_stroke (cr);
 
-       
+
        float r = (value) * (((float)bright->red)/G_MAXUINT16) + (1.0-value)*(((float)dark->red)/G_MAXUINT16);
        float g = (value) * (((float)bright->green)/G_MAXUINT16) + (1.0-value)*(((float)dark->green)/G_MAXUINT16);
        float b = (value) * (((float)bright->blue)/G_MAXUINT16) + (1.0-value)*(((float)dark->blue)/G_MAXUINT16);
@@ -612,7 +612,7 @@ MotionFeedback::core_draw (cairo_t* cr, int phase, double size, double progress_
        cairo_arc (cr, xc, yc, progress_radius_outer-1, 0, 2.0*G_PI);
        cairo_fill (cr);
        cairo_pattern_destroy (shade_pattern);
-               
+
        //black border
        cairo_set_source_rgb (cr, 0, 0, 0 );
        cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
@@ -640,7 +640,7 @@ MotionFeedback::core_draw (cairo_t* cr, int phase, double size, double progress_
        cairo_set_source_rgba (cr, 0.3, 0.3, 0.3, 1 );
        cairo_arc (cr, xc, yc, progress_radius_inner-1, 0, 2.0*G_PI);
        cairo_fill (cr);
-               
+
        //knob shade
        shade_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, progress_radius_outer);
        cairo_pattern_add_color_stop_rgba (shade_pattern, 0, 1,1,1, 0.5);
@@ -649,7 +649,7 @@ MotionFeedback::core_draw (cairo_t* cr, int phase, double size, double progress_
        cairo_arc (cr, xc, yc, progress_radius_inner-1, 0, 2.0*G_PI);
        cairo_fill (cr);
        cairo_pattern_destroy (shade_pattern);
-               
+
        //inner circle
        cairo_set_source_rgba (cr, 0.3, 0.3, 0.3, 0.5 );
        cairo_arc (cr, xc, yc, progress_radius_inner-5, 0, 2.0*G_PI);
index 88be6ef100e536a98e117cd03cdc7d0bbbe98501..c7cb3f4df235b0d36f2be6b659927b4ad9cde4ff 100644 (file)
@@ -138,7 +138,7 @@ PersistentTooltip::show ()
                        _window->set_transient_for (*tlw);
                }
        }
-       
+
        set_tip (_tip);
 
        if (!_window->is_visible ()) {
@@ -146,7 +146,7 @@ PersistentTooltip::show ()
                int sw = gdk_screen_width ();
 
                _target->get_window()->get_origin (rx, ry);
-               
+
                /* the window needs to be realized first
                 * for _window->get_width() to be correct.
                 */
index 570d04c1c354550d6c8f29c7cb02771bdec784b5..55bbef8c80a357a3ed576b94a4d7499d306f8c5a 100644 (file)
@@ -104,7 +104,7 @@ PixScroller::on_expose_event (GdkEventExpose* ev)
                 context->paint();
                 context->restore();
        }
-       
+
        if (gdk_rectangle_intersect (sliderrect.gobj(), &ev->area, &intersect)) {
 
                 context->save();
@@ -136,7 +136,7 @@ PixScroller::on_button_press_event (GdkEventButton* ev)
        default:
                break;
        }
-                       
+
 
        return false;
 }
@@ -145,7 +145,7 @@ bool
 PixScroller::on_button_release_event (GdkEventButton* ev)
 {
        double scale;
-       
+
        if (ev->state & Keyboard::PrimaryModifier) {
                if (ev->state & Keyboard::SecondaryModifier) {
                        scale = 0.05;
@@ -195,7 +195,7 @@ bool
 PixScroller::on_scroll_event (GdkEventScroll* ev)
 {
        double scale;
-       
+
        if (ev->state & Keyboard::PrimaryModifier) {
                if (ev->state & Keyboard::SecondaryModifier) {
                        scale = 0.05;
@@ -235,7 +235,7 @@ PixScroller::on_motion_notify_event (GdkEventMotion* ev)
                        grab_window = ev->window;
                        return true;
                }
-               
+
                if (ev->state & Keyboard::PrimaryModifier) {
                        if (ev->state & Keyboard::SecondaryModifier) {
                                scale = 0.05;
@@ -253,7 +253,7 @@ PixScroller::on_motion_notify_event (GdkEventMotion* ev)
 
                fract = min (1.0, fract);
                fract = max (-1.0, fract);
-               
+
                fract = -fract;
 
                adj.set_value (adj.get_value() + scale * fract * (adj.get_upper() - adj.get_lower()));
index 028490f11e85811e2e9018778260c14e09559e88..898211c986489d2e0a10d16b258fb7a99252041e 100644 (file)
@@ -101,7 +101,7 @@ PopUp::touch ()
                set_size_request_to_display_given_text (label, my_text.c_str(), 25, 10);
                label.set_text (my_text);
                show_all ();
-               
+
                if (popdown_time != 0) {
                        timeout = g_timeout_add (popdown_time,
                                                   remove_prompt_timeout,
@@ -137,7 +137,7 @@ PopUp::on_delete_event (GdkEventAny* /*ev*/)
 
        if (popdown_time != 0 && timeout != -1) {
                g_source_remove (timeout);
-       }       
+       }
 
        if (delete_on_hide) {
                std::cerr << "deleting prompter\n" << endl;
index 03cfb25be41f905a3078fbda1c603c6ad79553c0..1f5e13b923c7679659e758bc360c673989f7a08a 100644 (file)
@@ -52,7 +52,7 @@ Prompter::init ()
        set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
        set_position (Gtk::WIN_POS_MOUSE);
        set_name ("Prompter");
-       
+
        add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
 
        /*
@@ -62,7 +62,7 @@ Prompter::init ()
           set_response_sensitive (Gtk::RESPONSE_ACCEPT, false)
           to prevent the RESPONSE_ACCEPT button from permitting blank strings.
        */
-       
+
        entryLabel.set_line_wrap (true);
        entryLabel.set_name ("PrompterLabel");
 
@@ -74,7 +74,7 @@ Prompter::init ()
 
        get_vbox()->pack_start (entryBox);
        show_all_children();
-}      
+}
 
 void
 Prompter::on_show ()
@@ -117,7 +117,7 @@ Prompter::entry_activated ()
        } else {
                response (Gtk::RESPONSE_CANCEL);
        }
-}              
+}
 
 void
 Prompter::on_entry_changed ()
index 9b56706d21b5eb69c984b37c297379a61ae4db84..69944b4bc7ad17f4cfe4bd5ad5a405432afd6400 100644 (file)
@@ -111,29 +111,29 @@ Scroomer::on_motion_notify_event (GdkEventMotion* ev)
                unzoomed_page += scale * fract * range;
                unzoomed_page = min(unzoomed_page, adj.get_upper() - unzoomed_val);
                unzoomed_page = max(unzoomed_page, min_page_size);
-               
+
                if (pinch){
                        temp = unzoomed_val + unzoomed_page;
                        unzoomed_val -= scale * fract * range * 0.5;
                        unzoomed_val = min(unzoomed_val, temp - min_page_size);
                        unzoomed_val = max(unzoomed_val, adj.get_lower());
                }
-               
+
                break;
        case Handle2:
                temp = unzoomed_val + unzoomed_page;
                unzoomed_val += scale * fract * range;
                unzoomed_val = min(unzoomed_val, temp - min_page_size);
                unzoomed_val = max(unzoomed_val, adj.get_lower());
-               
+
                unzoomed_page = temp - unzoomed_val;
-               
+
                if (pinch){
-                       
+
                        unzoomed_page -= scale * fract * range;
                }
-               
-               unzoomed_page = min(unzoomed_page, adj.get_upper() - unzoomed_val);             
+
+               unzoomed_page = min(unzoomed_page, adj.get_upper() - unzoomed_val);
                unzoomed_page = max(unzoomed_page, min_page_size);
                break;
        default:
@@ -145,10 +145,10 @@ Scroomer::on_motion_notify_event (GdkEventMotion* ev)
         * We don't start doing zoom until we are at least one scroomer width outside the scroomer's
         * area.
         */
-       
+
        if (ev->x > (get_width() * 2)) {
                zoom = ev->x - get_width();
-               
+
                double higher = unzoomed_val + unzoomed_page - half_min_page - val_at_pointer;
                double lower = val_at_pointer - (unzoomed_val + half_min_page);
 
@@ -204,7 +204,7 @@ Scroomer::on_motion_notify_event (GdkEventMotion* ev)
        adj.set_page_size (rint (page));
        adj.set_value (rint (val));
        adj.value_changed();
-       
+
        return true;
 }
 
@@ -241,7 +241,7 @@ Scroomer::on_button_press_event (GdkEventButton* ev)
                unzoomed_val = adj.get_value();
                unzoomed_page = adj.get_page_size();
                grab_window = ev->window;
-               
+
                if (ev->button == 3){
                        pinch = true;
                } else {
@@ -250,7 +250,7 @@ Scroomer::on_button_press_event (GdkEventButton* ev)
 
                DragStarting (); /* EMIT SIGNAL */
        }
-       
+
        if (ev->type == GDK_2BUTTON_PRESS && ev->button == 1) {
                DoubleClicked();
        }
@@ -289,7 +289,7 @@ Scroomer::on_button_release_event (GdkEventButton* ev)
        default:
                break;
        }
-       
+
        grab_comp = None;
 
        remove_modal_grab();
index 55499967d1542276b3635c404e72b81105754bf3..04fbd13001ea98672daa0d7f8e221dd730b3b14a 100644 (file)
@@ -157,7 +157,7 @@ Selector::chosen ()
 {
        Glib::RefPtr<Gtk::TreeSelection> tree_sel = tview.get_selection();
        Gtk::TreeModel::iterator iter = tree_sel->get_selected();
-       
+
        if (iter) {
                choice_made (new Result (tview, tree_sel));
        } else {
index c37fb6c3c4789eed3b641ad1ab07c9fb009df126..14933e511911ab8f8571493dcec590530346c2e1 100644 (file)
@@ -340,7 +340,7 @@ carbon_menu_item_update_accelerator (CarbonMenuItem *carbon_item,
                  default:
                          break;
                  }
-       
+
                  if (realkey != -1) {
                          SetMenuItemCommandKey (carbon_item->menu, carbon_item->index,
                                                 false, realkey);
@@ -381,7 +381,7 @@ carbon_menu_item_update_accelerator (CarbonMenuItem *carbon_item,
                  }
 
                  /* gdk/quartz maps Command to Meta */
-               
+
                  if (key->accel_mods & GDK_META_MASK) {
                          use_command = 1;
                  }
index 9890f80ceb19e0e22f10d7f028dc1644db036fcf..dbe5c3dc5cce3912adc5b8106a2c9be445e49b26 100644 (file)
@@ -65,7 +65,7 @@ TearOff::TearOff (Widget& c, bool allow_resize)
        VBox* box1;
        box1 = manage (new VBox);
        box1->pack_start (close_event_box, false, false, 2);
-       
+
        window_box.pack_end (*box1, false, false, 2);
 
        own_window.add_events (KEY_PRESS_MASK|KEY_RELEASE_MASK|BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK|POINTER_MOTION_MASK|POINTER_MOTION_HINT_MASK);
@@ -73,7 +73,7 @@ TearOff::TearOff (Widget& c, bool allow_resize)
        own_window.set_type_hint (WINDOW_TYPE_HINT_UTILITY);
 
        own_window.add (window_box);
-       
+
        own_window.signal_button_press_event().connect (mem_fun (*this, &TearOff::window_button_press));
        own_window.signal_button_release_event().connect (mem_fun (*this, &TearOff::window_button_release));
        own_window.signal_motion_notify_event().connect (mem_fun (*this, &TearOff::window_motion));
@@ -171,7 +171,7 @@ TearOff::close_click (GdkEventButton* /*ev*/)
 {
         put_it_back ();
        return true;
-}              
+}
 
 void
 TearOff::put_it_back ()
@@ -232,7 +232,7 @@ TearOff::window_motion (GdkEventMotion* ev)
        double x_delta;
        double y_delta;
        RefPtr<Gdk::Window> win (own_window.get_window());
-       
+
        own_window.get_pointer (mx, my);
 
        if (!dragging) {
@@ -250,10 +250,10 @@ TearOff::window_motion (GdkEventMotion* ev)
 
        win->get_root_origin (x, y);
        win->move ((gint) floor (x + x_delta), (gint) floor (y + y_delta));
-       
+
        drag_x = ev->x_root;
        drag_y = ev->y_root;
-       
+
        return true;
 }
 
index e62725acb4fb89854a826c840a84cf5bbcdcbfec..995cbc8eaa450d3b8dc92d3f637170eb29304acd 100644 (file)
@@ -108,7 +108,7 @@ TextViewer::scroll_to_bottom ()
        adj = scrollwin.get_vadjustment();
        adj->set_value (MAX(0,(adj->get_upper() - adj->get_page_size())));
 }
-       
+
 void
 TextViewer::deliver ()
 
index 24940c718c124bcf33cccc0ae120aa1bb220a403..4cfc0b26a02a5537c59cf76a62418878280417ed 100644 (file)
@@ -53,7 +53,7 @@ Gtkmm2ext::get_ink_pixel_size (Glib::RefPtr<Pango::Layout> layout,
                               int& height)
 {
        Pango::Rectangle ink_rect = layout->get_ink_extents ();
-       
+
        width = PANGO_PIXELS(ink_rect.get_width());
        height = PANGO_PIXELS(ink_rect.get_height());
 }
@@ -72,7 +72,7 @@ Gtkmm2ext::set_size_request_to_display_given_text (Gtk::Widget &w, const gchar *
 {
        int width, height;
        w.ensure_style ();
-       
+
        get_pixel_size (w.create_pango_layout (text), width, height);
        w.set_size_request(width + hpadding, height + vpadding);
 }
@@ -117,7 +117,7 @@ Gtkmm2ext::set_size_request_to_display_given_text (Gtk::Widget &w, std::string c
 {
        int width, height;
        w.ensure_style ();
-       
+
        get_pixel_size (w.create_pango_layout (text), width, height);
        w.set_size_request(width + hpadding, height + vpadding);
 }
@@ -141,7 +141,7 @@ Gtkmm2ext::set_size_request_to_display_given_text (Gtk::Widget &w,
                         break;
                 }
         }
-       
+
         if (i == strings.end()) {
                 /* make a copy of the strings then add one that has a descender */
                 copy = strings;
@@ -150,7 +150,7 @@ Gtkmm2ext::set_size_request_to_display_given_text (Gtk::Widget &w,
         } else {
                 to_use = &strings;
         }
-       
+
        for (vector<string>::const_iterator i = to_use->begin(); i != to_use->end(); ++i) {
                get_pixel_size (w.create_pango_layout (*i), width, height);
                width_max = max(width_max,width);
@@ -211,7 +211,7 @@ Gtkmm2ext::convert_bgra_to_rgba (guint8 const* src,
 {
        guint8 const* src_pixel = src;
        guint8*       dst_pixel = dst;
-       
+
         /* cairo pixel data is endian-dependent ARGB with A in the most significant 8 bits,
            with premultipled alpha values (see preceding function)
 
@@ -251,7 +251,7 @@ Gtkmm2ext::convert_bgra_to_rgba (guint8 const* src,
 
 #else
 #error ardour does not currently support PDP-endianess
-#endif                 
+#endif
 
                         dst_pixel += 4;
                         src_pixel += 4;
@@ -277,16 +277,16 @@ Gtkmm2ext::pixbuf_from_string(const string& name, const Pango::FontDescription&
        cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, clip_width, clip_height);
        cairo_t* cr = cairo_create (surface);
        cairo_text_extents_t te;
-       
+
        cairo_set_source_rgba (cr, fg.get_red_p(), fg.get_green_p(), fg.get_blue_p(), 1.0);
        cairo_select_font_face (cr, font.get_family().c_str(),
                                CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
        cairo_set_font_size (cr,  font.get_size() / Pango::SCALE);
        cairo_text_extents (cr, name.c_str(), &te);
-       
+
        cairo_move_to (cr, 0.5, int (0.5 - te.height / 2 - te.y_bearing + clip_height / 2));
        cairo_show_text (cr, name.c_str());
-       
+
        convert_bgra_to_rgba(cairo_image_surface_get_data (surface), buf->get_pixels(), clip_width, clip_height);
 
        cairo_destroy(cr);
@@ -765,10 +765,10 @@ Gtkmm2ext::fit_to_pixels (const string& str, int pixel_width, Pango::FontDescrip
 
        /* XXX: might need special care to get the ellipsis character, not sure
            how that works
-       */      
+       */
 
        string s = string (layout->get_text ().substr(line->get_start_index(), line->get_length()));
-       
+
        cerr << "fit to pixels of " << str << " returns " << s << endl;
 
        return s;
index 11342ab1d7af515f2a34b31d69ff9596cbdbb312..eaf25a9f7445bc7957d15e07fa0266020730d2a3 100644 (file)
@@ -24,7 +24,7 @@
 using namespace std;
 
 namespace {
-       
+
 // I don't know if this should be translated.
 const char* const title_separator = X_(" - ");
 
index 85631ecc6dc7837a5c45d933f33b167546cdab4f..b3cb42f59322662c601bf83e9bd20fe2b9c689de 100644 (file)
@@ -31,7 +31,7 @@ Channel::Channel (MIDI::byte channelnum, Port &p)
        _channel_number = channelnum;
 
        reset (0, 1, false);
-}      
+}
 
 void
 Channel::connect_signals ()
@@ -137,7 +137,7 @@ Channel::process_controller (Parser & /*parser*/, EventTwoBytes *tb)
 
        } else if ((tb->controller_number >= 32 &&
                    tb->controller_number <= 63)) {
-               
+
                int cn = tb->controller_number - 32;
 
                cv = (unsigned short) _controller_val[cn];
@@ -153,7 +153,7 @@ Channel::process_controller (Parser & /*parser*/, EventTwoBytes *tb)
                   high 7.
                */
 
-               
+
                if (_controller_14bit[cn] == false) {
                        _controller_14bit[cn] = true;
                        cv = (cv << 7) | (tb->value & 0x7f);
@@ -172,7 +172,7 @@ Channel::process_controller (Parser & /*parser*/, EventTwoBytes *tb)
        } else {
 
                /* controller can only take 7 bit values */
-               
+
                _controller_val[tb->controller_number] =
                        (controller_value_t) tb->value;
        }
index 622bf76d166d109a86a3855d9af7c31a091c8c61..ace51eae7d7d7b89fd7d20673086dc0536584a65 100644 (file)
@@ -105,7 +105,7 @@ IPMIDIPort::close_sockets ()
                ::closesocket (sockin);
                sockin = -1;
        }
-       
+
        if (sockout >= 0) {
                ::closesocket (sockout);
                sockout = -1;
@@ -171,12 +171,12 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
        addrin.sin_family = AF_INET;
        addrin.sin_addr.s_addr = htonl(INADDR_ANY);
        addrin.sin_port = htons(base_port);
-       
+
        if (::bind(sockin, (struct sockaddr *) (&addrin), sizeof(addrin)) < 0) {
                ::perror("bind");
                return false;
        }
-       
+
        // Will Hall, 2007
        // INADDR_ANY will bind to default interface,
        // specify alternate interface nameon which to bind...
@@ -194,7 +194,7 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
        } else {
                if_addr_in.s_addr = htonl (INADDR_ANY);
        }
-       
+
        struct ip_mreq mreq;
        mreq.imr_multiaddr.s_addr = ::inet_addr("225.0.0.37");
        mreq.imr_interface.s_addr = if_addr_in.s_addr;
@@ -212,7 +212,7 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
                ::perror("socket(out)");
                return false;
        }
-       
+
        // Will Hall, Oct 2007
        if (!ifname.empty()) {
                struct in_addr if_addr_out;
@@ -225,12 +225,12 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
                        return false;
                }
        }
-       
+
        ::memset(&addrout, 0, sizeof(struct sockaddr_in));
        addrout.sin_family = AF_INET;
        addrout.sin_addr.s_addr = ::inet_addr("225.0.0.37");
        addrout.sin_port = htons (base_port);
-       
+
        // Turn off loopback...
        int loop = 0;
        if (::setsockopt(sockout, IPPROTO_IP, IP_MULTICAST_LOOP, (char *) &loop, sizeof (loop)) < 0) {
@@ -247,7 +247,7 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
                error << "cannot set non-blocking mode for IP MIDI output socket (" << ::strerror (errno) << ')' << endmsg;
                return false;
        }
-       
+
        return true;
 #else
        return false;
@@ -282,7 +282,7 @@ IPMIDIPort::parse (framecnt_t timestamp)
         * parser. This will emit appropriate signals that will be handled
         * by anyone who cares.
         */
-       
+
        unsigned char buf[1024];
        struct sockaddr_in sender;
        socklen_t slen = sizeof(sender);
@@ -291,7 +291,7 @@ IPMIDIPort::parse (framecnt_t timestamp)
        if (r >= 0) {
 
                _parser->set_timestamp (timestamp);
-               
+
                for (int i = 0; i < r; ++i) {
                        _parser->scanner (buf[i]);
                }
index d397c99ea09c9bb2d7fb496b716818a9b91d3b55..6f4928209ab7b000518182a287d9fed0c75ab425 100644 (file)
@@ -79,19 +79,19 @@ class LIBMIDIPP_API Channel : public PBD::ScopedConnectionList {
        bool all_notes_off (timestamp_t timestamp) {
                return channel_msg (MIDI::controller, 123, 0, timestamp);
        }
-       
+
        bool control (byte id, byte value, timestamp_t timestamp) {
                return channel_msg (MIDI::controller, id, value, timestamp);
        }
-       
+
        bool note_on (byte note, byte velocity, timestamp_t timestamp) {
                return channel_msg (MIDI::on, note, velocity, timestamp);
        }
-       
+
        bool note_off (byte note, byte velocity, timestamp_t timestamp) {
                return channel_msg (MIDI::off, note, velocity, timestamp);
        }
-       
+
        bool aftertouch (byte value, timestamp_t timestamp) {
                return channel_msg (MIDI::chanpress, value, 0, timestamp);
        }
@@ -140,7 +140,7 @@ class LIBMIDIPP_API Channel : public PBD::ScopedConnectionList {
        size_t             _notes_on;
 
        void reset (timestamp_t timestamp, framecnt_t nframes, bool notes_off = true);
-       
+
        void process_note_off (Parser &, EventTwoBytes *);
        void process_note_on (Parser &, EventTwoBytes *);
        void process_controller (Parser &, EventTwoBytes *);
index 9e37253e52e533fb8c1efd3d302e26b971cdcfe6..313208892f34c048c9be335d5cc336e05678abae 100644 (file)
@@ -69,7 +69,7 @@ class LIBMIDIPP_API IPMIDIPort : public Port {
 
     static const int lowest_ipmidi_port_default = 21928;
 
-private:       
+private:
     int sockin;
     int sockout;
     struct sockaddr_in addrout;
index 45a251457efd3c799d516d483a1385753064bed0..e252e76fe19cde4974d44a4d2864cd2f9fd8e654 100644 (file)
@@ -48,18 +48,18 @@ public:
                : _bank(std::max(0, std::min(bank_num, 16383)))
                , _program(std::max(0, std::min(program_num, 127)))
        {}
-       
+
        inline PatchPrimaryKey& operator=(const PatchPrimaryKey& id) {
                _bank    = id._bank;
                _program = id._program;
                return *this;
        }
-       
+
        inline bool operator==(const PatchPrimaryKey& id) const {
                return (_bank    == id._bank &&
                        _program == id._program);
        }
-       
+
        /** Strict weak ordering. */
        inline bool operator<(const PatchPrimaryKey& id) const {
                if (_bank < id._bank) {
@@ -82,7 +82,7 @@ private:
 };
 
 class PatchBank;
-       
+
 class LIBMIDIPP_API Patch
 {
 public:
@@ -92,7 +92,7 @@ public:
 
        const std::string& name() const        { return _name; }
        void set_name(const std::string& name) { _name = name; }
-       
+
        const std::string& note_list_name() const  { return _note_list_name; }
 
        uint8_t program_number() const     { return _id.program(); }
@@ -154,17 +154,17 @@ public:
 
        const std::string& name() const        { return _name; }
        void set_name(const std::string& name) { _name = name; }
-       
+
        const PatchBanks& patch_banks() const    { return _patch_banks; }
 
        bool available_for_channel(uint8_t channel) const {
                return _available_for_channels.find(channel) != _available_for_channels.end();
        }
-       
+
        boost::shared_ptr<Patch> find_patch(const PatchPrimaryKey& key) {
                return _patch_map[key];
        }
-       
+
        boost::shared_ptr<Patch> previous_patch(const PatchPrimaryKey& key) {
                for (PatchList::const_iterator i = _patch_list.begin();
                         i != _patch_list.end();
@@ -176,10 +176,10 @@ public:
                                }
                        }
                }
-                       
+
                return boost::shared_ptr<Patch>();
        }
-       
+
        boost::shared_ptr<Patch> next_patch(const PatchPrimaryKey& key) {
                for (PatchList::const_iterator i = _patch_list.begin();
                         i != _patch_list.end();
@@ -192,7 +192,7 @@ public:
                                }
                        }
                }
-                       
+
                return boost::shared_ptr<Patch>();
        }
 
@@ -378,16 +378,16 @@ public:
        const std::string& name() const        { return _name; }
        void set_name(const std::string& name) { _name = name; }
 
-       
+
        XMLNode& get_state (void);
        int      set_state (const XMLTree&, const XMLNode&);
-       
+
        /// Note: channel here is 0-based while in the MIDNAM-file it's 1-based
        const std::string& channel_name_set_name_by_channel(uint8_t channel) {
                assert(channel <= 15);
                return _channel_name_set_assignments[channel];
        }
-       
+
 private:
        /// array index = channel number
        /// string contents = name of channel name set
@@ -408,13 +408,13 @@ public:
        typedef std::map<std::string, boost::shared_ptr<ControlNameList> >  ControlNameLists;
        typedef std::map<std::string, boost::shared_ptr<ValueNameList> >    ValueNameLists;
        typedef std::map<std::string, PatchNameList>                        PatchNameLists;
-       
+
        MasterDeviceNames() {};
        virtual ~MasterDeviceNames() {};
-       
+
        const std::string& manufacturer() const { return _manufacturer; }
        void set_manufacturer(const std::string& manufacturer) { _manufacturer = manufacturer; }
-       
+
        const Models& models() const { return _models; }
        void set_models(const Models some_models) { _models = some_models; }
 
@@ -427,7 +427,7 @@ public:
                uint8_t            number);
 
        const CustomDeviceModeNames& custom_device_mode_names() const { return _custom_device_mode_names; }
-       
+
        boost::shared_ptr<CustomDeviceMode> custom_device_mode_by_name(const std::string& mode_name);
        boost::shared_ptr<ChannelNameSet> channel_name_set_by_channel(const std::string& mode, uint8_t channel);
        boost::shared_ptr<Patch> find_patch(const std::string& mode, uint8_t channel, const PatchPrimaryKey& key);
@@ -445,7 +445,7 @@ public:
 
        XMLNode& get_state (void);
        int      set_state (const XMLTree&, const XMLNode&);
-       
+
 private:
        std::string           _manufacturer;
        Models                _models;
@@ -463,20 +463,20 @@ class LIBMIDIPP_API MIDINameDocument
 public:
        // Maps Model names to MasterDeviceNames
        typedef std::map<std::string, boost::shared_ptr<MasterDeviceNames> > MasterDeviceNamesList;
-       
+
        MIDINameDocument() {}
        MIDINameDocument(const std::string& filename);
        virtual ~MIDINameDocument() {};
 
        const std::string& author() const { return _author; }
        void set_author(const std::string& author) { _author = author; }
-       
+
        boost::shared_ptr<MasterDeviceNames> master_device_names(const std::string& model);
 
        const MasterDeviceNamesList& master_device_names_by_model() const { return _master_device_names_list; }
-       
+
        const MasterDeviceNames::Models& all_models() const { return _all_models; }
-               
+
        XMLNode& get_state (void);
        int      set_state (const XMLTree&, const XMLNode&);
 
index 3529031caf4efa265c2986d9f2d2a5e1cdb77741..caf1605c290ee522b9c614b96b494be3514c47e6 100644 (file)
@@ -60,10 +60,10 @@ class LIBMIDIPP_API MachineControl
                cmdChase = 0xB,
                cmdCommandErrorReset = 0xC,
                cmdMmcReset = 0xD,
-               
+
                cmdIllegalMackieJogStart = 0x20,
                cmdIllegalMackieJogStop = 0x21,
-               
+
                cmdWrite = 0x40,
                cmdMaskedWrite = 0x41,
                cmdRead = 0x42,
@@ -93,14 +93,14 @@ class LIBMIDIPP_API MachineControl
                cmdWait = 0x7C,
                cmdResume = 0x7F
        };
-       
+
         MachineControl ();
 
         void set_ports (MIDI::Port* input, MIDI::Port* output);
 
        Port* input_port() { return _input_port; }
        Port* output_port() { return _output_port; }
-       
+
        void set_receive_device_id (byte id);
        void set_send_device_id (byte id);
        byte receive_device_id () const { return _receive_device_id; }
@@ -114,7 +114,7 @@ class LIBMIDIPP_API MachineControl
        /* Signals to connect to if you want to run "callbacks"
           when certain MMC commands are received.
        */
-                       
+
        MMCSignal Stop;
        MMCSignal Play;
        MMCSignal DeferredPlay;
@@ -159,7 +159,7 @@ class LIBMIDIPP_API MachineControl
        /* The second argument is the shuttle speed, the third is
           true if the direction is "forwards", false for "reverse"
        */
-       
+
        PBD::Signal3<void,MachineControl&,float,bool> Shuttle;
 
        /* The second argument specifies the desired track record enabled
@@ -168,14 +168,14 @@ class LIBMIDIPP_API MachineControl
 
        PBD::Signal3<void,MachineControl &,size_t,bool>
                                             TrackRecordStatusChange;
-       
+
        /* The second argument specifies the desired track record enabled
           status.
        */
 
        PBD::Signal3<void,MachineControl &,size_t,bool>
                                             TrackMuteChange;
-       
+
        /* The second argument points to a byte array containing
           the locate target value in MMC Standard Time Code
           format (5 bytes, roughly: hrs/mins/secs/frames/subframes)
@@ -184,13 +184,13 @@ class LIBMIDIPP_API MachineControl
        PBD::Signal2<void,MachineControl &, const byte *> Locate;
 
        /* The second argument is the number of steps to jump */
-       
+
        PBD::Signal2<void,MachineControl &, int> Step;
 
 #define MMC_NTRACKS 48
 
        /* note: these are not currently in use */
-       
+
        byte updateRate;
        byte responseError;
        byte commandError;
@@ -261,7 +261,7 @@ class LIBMIDIPP_API MachineControl
        byte responseSegment;
        byte wait;
        byte resume;
-       
+
   private:
        byte _receive_device_id;
        byte _send_device_id;
@@ -276,7 +276,7 @@ class LIBMIDIPP_API MachineControl
        int  do_locate (byte *, size_t len);
        int  do_step (byte *, size_t len);
        int  do_shuttle (byte *, size_t len);
-       
+
        void write_track_status (byte *, size_t len, byte reg);
        void spp_start ();
        void spp_continue ();
@@ -293,7 +293,7 @@ public:
        MachineControlCommand () : _command (MachineControl::Command (0)) {}
        MachineControlCommand (MachineControl::Command);
        MachineControlCommand (Timecode::Time);
-       
+
        MIDI::byte* fill_buffer (MachineControl *mmc, MIDI::byte *) const;
 
 private:
index 05d674375c06f49588c7da1fc45a4a675f1bca48..0f2ecf49fd65b9c5e118a11225dbaf4b3c118670 100644 (file)
@@ -50,12 +50,12 @@ class LIBMIDIPP_API Parser {
           message the next time ::scanner() parses such a message. It should
           therefore be set before every byte passed into ::scanner().
        */
-       
+
        framecnt_t get_timestamp() const { return _timestamp; }
        void set_timestamp (const framecnt_t timestamp) { _timestamp = timestamp; }
 
        /* signals that anyone can connect to */
-       
+
        BankSignal            bank_change;
        TwoByteSignal         note_on;
        TwoByteSignal         note_off;
@@ -124,7 +124,7 @@ class LIBMIDIPP_API Parser {
        MTC_Status  mtc_running() const { return _mtc_running; }
        const byte *mtc_current() const { return _mtc_time; }
        bool        mtc_locked() const  { return _mtc_locked; }
-       
+
        PBD::Signal3<void, Parser &, int, framecnt_t>      mtc_qtr;
        PBD::Signal3<void, const byte *, bool, framecnt_t> mtc_time;
        PBD::Signal1<void, MTC_Status>                     mtc_status;
@@ -135,10 +135,10 @@ class LIBMIDIPP_API Parser {
        }
 
        void reset_mtc_state ();
-       
+
   private:
        /* tracing */
-       
+
        std::ostream *trace_stream;
        std::string trace_prefix;
        void trace_event (Parser &p, byte *msg, size_t len);
@@ -171,7 +171,7 @@ class LIBMIDIPP_API Parser {
        MTC_Status _mtc_running;
        bool       _mtc_locked;
        byte last_qtr_frame;
-       
+
        framecnt_t _timestamp;
 
        ParseState pre_variable_state;
index 1f85b53cd4c823e54a811548f96efe349bb00410..6d933f6a6d2daee8b2dfd235da4375e7f4d1d10e 100644 (file)
@@ -46,7 +46,7 @@ class LIBMIDIPP_API Port {
                IsInput = 0x1,  /* MUST MATCH JACK's JackPortIsInput */
                IsOutput = 0x2, /* MUST MATCH JACK's JackPortIsOutput */
        };
-       
+
        Port (std::string const &, Flags);
        Port (const XMLNode&);
        virtual ~Port ();
@@ -99,11 +99,11 @@ class LIBMIDIPP_API Port {
        Channel *channel (channel_t chn) {
                return _channel[chn&0x7F];
        }
-       
+
        Parser* parser () {
                return _parser;
        }
-       
+
        const char *name () const   { return _tagname.c_str(); }
        bool   ok ()   const        { return _ok; }
 
index 21cd3ba4578b9301cd0e95a758d40e5bcb198509..1b8c107b87f33071fdf5954b1df04330a980acbb 100644 (file)
@@ -58,7 +58,7 @@ main (int argc, char *argv[])
 
 {
        byte buf[1];
-       
+
        text_receiver.listen_to (error);
        text_receiver.listen_to (info);
        text_receiver.listen_to (fatal);
index 9f62c12dfe734b76c7e3a8f3cb47c5f18212c324..2205e5e2a0178686aa01cd8aaf6aed56f0f35aaf 100644 (file)
@@ -35,7 +35,7 @@ namespace MIDI
 
 namespace Name
 {
-       
+
 Patch::Patch (std::string name, uint8_t p_number, uint16_t b_number)
        : _name (name)
        , _id (p_number, b_number)
@@ -138,7 +138,7 @@ Patch::set_state (const XMLTree& tree, const XMLNode& node)
                        return -1;  // Failed to find a program number anywhere
                }
        }
-       
+
        XMLNode* use_note_name_list = node.child("UsesNoteNameList");
        if (use_note_name_list) {
                _note_list_name = use_note_name_list->property ("Name")->value();
@@ -478,7 +478,7 @@ operator<< (std::ostream& os, const ChannelNameSet& cns)
                os << (int) (*x) << ' ';
        }
        os << endl;
-       
+
        for (ChannelNameSet::PatchBanks::const_iterator pbi = cns._patch_banks.begin(); pbi != cns._patch_banks.end(); ++pbi) {
                os << "\tPatch Bank " << (*pbi)->name() << " with " << (*pbi)->patch_name_list().size() << " patches\n";
                for (PatchNameList::const_iterator pni = (*pbi)->patch_name_list().begin(); pni != (*pbi)->patch_name_list().end(); ++pni) {
@@ -493,12 +493,12 @@ void
 ChannelNameSet::set_patch_banks (const ChannelNameSet::PatchBanks& pb)
 {
        _patch_banks = pb;
-       
+
        _patch_map.clear ();
        _patch_list.clear ();
        _patch_list_name = "";
        _available_for_channels.clear ();
-       
+
        for (PatchBanks::const_iterator pbi = _patch_banks.begin(); pbi != _patch_banks.end(); ++pbi) {
                for (PatchNameList::const_iterator pni = (*pbi)->patch_name_list().begin(); pni != (*pbi)->patch_name_list().end(); ++pni) {
                        _patch_map[(*pni)->patch_primary_key()] = (*pni);
@@ -898,7 +898,7 @@ MIDINameDocument::set_state (const XMLTree& tree, const XMLNode&)
                error << "No author information in MIDNAM file" << endmsg;
                return -1;
        }
-       
+
        if (author->front()->children().size() > 0) {
                _author = author->front()->children().front()->content();
        }
@@ -922,7 +922,7 @@ MIDINameDocument::set_state (const XMLTree& tree, const XMLNode&)
                        _master_device_names_list.insert(
                                std::pair<std::string, boost::shared_ptr<MasterDeviceNames> >
                                (*model,      master_device_names));
-                       
+
                        _all_models.insert(*model);
                }
        }
index 074064f7bde8277feca0185a5390272db416ea81..d9ad0778654d6be853f0f85f6fc0b3a3b5a186d7 100644 (file)
@@ -256,7 +256,7 @@ MachineControl::is_mmc (MIDI::byte *sysex_buf, size_t len)
            sysex_buf[3] != 0x7) { /* MMC Response */
                return false;
        }
-       
+
        return true;
 }
 
@@ -465,7 +465,7 @@ MachineControl::process_mmc_message (Parser &, MIDI::byte *msg, size_t len)
                len -= skiplen;
 
        } while (len > 1); /* skip terminating EOX byte */
-}              
+}
 
 int
 MachineControl::do_masked_write (MIDI::byte *msg, size_t len)
@@ -473,7 +473,7 @@ MachineControl::do_masked_write (MIDI::byte *msg, size_t len)
        /* return the number of bytes "consumed" */
 
        int retval = msg[1] + 2; /* bytes following + 2 */
-       
+
        switch (msg[2]) {
        case 0x4f:  /* Track Record Ready Status */
                write_track_status (&msg[3], len - 3, msg[2]);
@@ -508,7 +508,7 @@ MachineControl::write_track_status (MIDI::byte *msg, size_t /*len*/, MIDI::byte
           bit 4: aux track b
 
           the format of the message (its an MMC Masked Write) is:
-       
+
           0x41      Command Code
           <count>   byte count of following data
           <name>    byte value of the field being written
@@ -516,7 +516,7 @@ MachineControl::write_track_status (MIDI::byte *msg, size_t /*len*/, MIDI::byte
           bitmap being written to
           <mask>    ones in the mask indicate which bits will be changed
           <data>    new data for the byte being written
-       
+
           by the time this code is executing, msg[0] is the
           byte number of the target byte. if its zero, we
           are writing to a special byte in the standard
@@ -524,20 +524,20 @@ MachineControl::write_track_status (MIDI::byte *msg, size_t /*len*/, MIDI::byte
           special. hence the bits for tracks 1 + 2 are bits
           5 and 6 of the first byte of the track
           bitmap. so:
-       
+
           change track 1:  msg[0] = 0;       << first byte of track bitmap
                            msg[1] = 0100000; << binary: bit 5 set
-       
+
           change track 2:  msg[0] = 0;       << first byte of track bitmap
                            msg[1] = 1000000; << binary: bit 6 set
-       
+
           change track 3:  msg[0] = 1;       << second byte of track bitmap
                            msg[1] = 0000001; << binary: bit 0 set
-       
+
           the (msg[0] * 8) - 6 computation is an attempt to
           extract the value of the first track: ie. the one
           that would be indicated by bit 0 being set.
-               
+
            so, if msg[0] = 0, msg[1] = 0100000 (binary),
           what happens is that base_track = -5, but by the
           time we check the correct bit, n = 5, and so the
@@ -565,13 +565,13 @@ MachineControl::write_track_status (MIDI::byte *msg, size_t /*len*/, MIDI::byte
                        */
 
                        bool val = (msg[2] & (1<<n));
-                       
+
                        switch (reg) {
                        case 0x4f:
                                trackRecordStatus[base_track+n] = val;
                                TrackRecordStatusChange (*this, base_track+n, val);
                                break;
-                               
+
                        case 0x62:
                                trackMute[base_track+n] = val;
                                TrackMuteChange (*this, base_track+n, val);
@@ -627,7 +627,7 @@ MachineControl::do_shuttle (MIDI::byte *msg, size_t /*msglen*/)
        } else {
                forward = true;
        }
-       
+
        left_shift = (sh & 0x38);
 
        integral = ((sh & 0x7) << left_shift) | (sm >> (7 - left_shift));
index 9259e3ad2bcaefcf5a5cffdb221ebe81c1dafd73..e81126cba7a9289eaad66a2d21091ac213d25325 100644 (file)
@@ -102,7 +102,7 @@ main (int argc, char *argv[])
 
 {
        byte buf[1];
-       
+
        text_receiver.listen_to (error);
        text_receiver.listen_to (info);
        text_receiver.listen_to (fatal);
index f23c6d832c3b9f335c7fe886765aa875dab6e317..7f7506c344ba5cc593e60401f78a244e1c23af93 100644 (file)
@@ -45,12 +45,12 @@ Parser::possible_mtc (MIDI::byte *sysex_buf, size_t msglen)
        }
 
         /* full MTC */
-       
+
        fake_mtc_time[0] = sysex_buf[8]; // frames
        fake_mtc_time[1] = sysex_buf[7]; // minutes
        fake_mtc_time[2] = sysex_buf[6]; // seconds
        fake_mtc_time[3] = (sysex_buf[5] & 0x1f); // hours
-       
+
        _mtc_fps = MTC_FPS ((sysex_buf[5] & 0x60) >> 5); // fps
        fake_mtc_time[4] = (byte) _mtc_fps;
 
@@ -108,7 +108,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
 #endif
 
        if (_mtc_running == MTC_Stopped) {
-       
+
                /* we are stopped but are seeing qtr frame messages */
 
                if (consecutive_qtr_frame_cnt == 0) {
@@ -116,11 +116,11 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
                        /* first quarter frame */
 
                        if (which_quarter_frame != 0 && which_quarter_frame != 7) {
-                               
+
                                last_qtr_frame = which_quarter_frame;
                                consecutive_qtr_frame_cnt++;
                        }
-                       
+
                        // cerr << "first seen qframe = " << (int) last_qtr_frame << endl;
 
                        return;
@@ -128,7 +128,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
                } else if (consecutive_qtr_frame_cnt == 1) {
 
                        /* third quarter frame */
-                       
+
 #ifdef DEBUG_MTC
                        cerr << "second seen qframe = " << (int) which_quarter_frame << endl;
 #endif
@@ -155,7 +155,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
                case MTC_Backward:
                        if (which_quarter_frame == 0) {
                                expected_mtc_quarter_frame_code = 7;
-                               
+
                        } else {
                                expected_mtc_quarter_frame_code = which_quarter_frame - 1;
                        }
@@ -164,9 +164,9 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
                case MTC_Stopped:
                        break;
                }
-               
+
        } else {
-               
+
                /* already running */
 
 // for testing bad MIDI connections etc.
@@ -186,7 +186,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
                        */
 
                        boost::optional<bool> res = mtc_skipped ();
-                       
+
                        if (res.get_value_or (false)) {
 
                                /* no error, reset next expected frame */
@@ -203,7 +203,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
                                case MTC_Backward:
                                        if (which_quarter_frame == 0) {
                                                expected_mtc_quarter_frame_code = 7;
-                                               
+
                                        } else {
                                                expected_mtc_quarter_frame_code = which_quarter_frame - 1;
                                        }
@@ -215,7 +215,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
 
 #ifdef DEBUG_MTC
                                cerr << "SKIPPED, next expected = " << expected_mtc_quarter_frame_code << endl;
-#endif                         
+#endif
                                return;
                        }
 
@@ -226,7 +226,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
 #endif
                        reset_mtc_state ();
                        mtc_status (MTC_Stopped);
-                       
+
                        return;
 
                } else {
@@ -267,18 +267,18 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
        case 5: // minutes MS nibble
                _qtr_mtc_time[2] |= (msg[1] & 0xf)<<4;
                break;
-               
+
        case 6: // hours LS nibble
                _qtr_mtc_time[3] |= msg[1] & 0xf;
                break;
 
        case 7:
-               
+
                /* last quarter frame msg has the MS bit of
                   the hour in bit 0, and the SMPTE FPS type
                   in bits 5 and 6
                */
-               
+
                _qtr_mtc_time[3] |= ((msg[1] & 0x1) << 4);
                _mtc_fps = MTC_FPS ((msg[1] & 0x6) >> 1);
                _qtr_mtc_time[4] = _mtc_fps;
@@ -289,7 +289,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
                break;
 
        }
-       
+
 #ifdef DEBUG_MTC
        cerr << "Emit MTC Qtr\n";
 #endif
@@ -301,12 +301,12 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
        switch (_mtc_running) {
        case MTC_Forward:
                if (which_quarter_frame == 7) {
-                       
+
                        /* we've reached the final of 8 quarter frame messages.
                           store the time, reset the pending time holder,
                           and signal anyone who wants to know the time.
                        */
-                       
+
                        if (consecutive_qtr_frame_cnt >= 8) {
                                memcpy (_mtc_time, _qtr_mtc_time, sizeof (_mtc_time));
                                memset (_qtr_mtc_time, 0, sizeof (_qtr_mtc_time));
@@ -317,15 +317,15 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
                                mtc_time (_mtc_time, false, _timestamp);
                        }
                        expected_mtc_quarter_frame_code = 0;
-                       
+
                } else {
                        expected_mtc_quarter_frame_code = which_quarter_frame + 1;
                }
                break;
-               
+
        case MTC_Backward:
                if (which_quarter_frame == 0) {
-                       
+
                        /* we've reached the final of 8 quarter frame messages.
                           store the time, reset the pending time holder,
                           and signal anyone who wants to know the time.
index f324047713dd316735ec1577acd53543a5af743a..e11094d26fd917f8f2718865826b576f7074ef0a 100644 (file)
@@ -50,55 +50,55 @@ Parser::midi_event_type_name (eventType t)
 
        case MIDI::any:
                return "any midi message";
-       
+
        case off:
                return "note off";
-       
+
        case on:
                return "note on";
-       
+
        case polypress:
                return "aftertouch";
-       
+
        case MIDI::controller:
                return "controller";
-       
+
        case program:
                return "program change";
-       
+
        case chanpress:
                return "channel pressure";
-       
+
        case MIDI::pitchbend:
                return "pitch bend";
-       
+
        case MIDI::sysex:
                return "system exclusive";
-       
+
        case MIDI::song:
                return "song position";
-       
+
        case MIDI::tune:
                return "tune";
-       
+
        case MIDI::eox:
                return "end of sysex";
-       
+
        case MIDI::timing:
                return "timing";
-       
+
        case MIDI::start:
                return "start";
-       
+
        case MIDI::stop:
                return "continue";
-       
+
        case MIDI::contineu:
                return "stop";
-       
+
        case active:
                return "active sense";
-       
+
        default:
                return "unknow MIDI event type";
        }
@@ -144,7 +144,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
        if ((o = trace_stream) == NULL) { /* can be asynchronously removed */
                return;
        }
-       
+
        type = (eventType) (msg[0]&0xF0);
 
        switch (type) {
@@ -158,7 +158,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                   << (int) msg[2]
                   << endmsg;
                break;
-               
+
        case on:
                *o << trace_prefix
                   << "Channel "
@@ -169,7 +169,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                   << (int) msg[2]
                   << endmsg;
                break;
-       
+
        case polypress:
                *o << trace_prefix
                   << "Channel "
@@ -178,7 +178,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                   << (int) msg[1]
                   << endmsg;
                break;
-       
+
        case MIDI::controller:
                *o << trace_prefix
                   << "Channel "
@@ -189,7 +189,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                   << (int) msg[2]
                   << endmsg;
                break;
-               
+
        case program:
                *o << trace_prefix
                   << "Channel "
@@ -198,7 +198,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                   << (int) msg[1]
                   << endmsg;
                break;
-               
+
        case chanpress:
                *o << trace_prefix
                   << "Channel "
@@ -207,7 +207,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                   << (int) msg[1]
                   << endmsg;
                break;
-       
+
        case MIDI::pitchbend:
                *o << trace_prefix
                   << "Channel "
@@ -216,7 +216,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                   << ((msg[2]<<7)|msg[1])
                   << endmsg;
                break;
-       
+
        case MIDI::sysex:
                if (len == 1) {
                        switch (msg[0]) {
@@ -253,7 +253,7 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                        default:
                                *o << trace_prefix
                                   << "System Exclusive (1 byte : " << hex << (int) *msg << dec << ')'
-                                  << endmsg;           
+                                  << endmsg;
                                break;
                        }
                } else {
@@ -263,42 +263,42 @@ Parser::trace_event (Parser &, MIDI::byte *msg, size_t len)
                                *o << (int) msgbuf[i] << ' ';
                        }
                        *o << dec << ']' << endmsg;
-                       
+
                }
                break;
-       
+
        case MIDI::song:
                *o << trace_prefix << "Song" << endmsg;
                break;
-       
+
        case MIDI::tune:
                *o << trace_prefix << "Tune" << endmsg;
                break;
-       
+
        case MIDI::eox:
                *o << trace_prefix << "End-of-System Exclusive" << endmsg;
                break;
-       
+
        case MIDI::timing:
                *o << trace_prefix << "Timing" << endmsg;
                break;
-       
+
        case MIDI::start:
                *o << trace_prefix << "Start" << endmsg;
                break;
-       
+
        case MIDI::stop:
                *o << trace_prefix << "Stop" << endmsg;
                break;
-       
+
        case MIDI::contineu:
                *o << trace_prefix << "Continue" << endmsg;
                break;
-       
+
        case active:
                *o << trace_prefix << "Active Sense" << endmsg;
                break;
-       
+
        default:
                *o << trace_prefix << "Unrecognized MIDI message" << endmsg;
                break;
@@ -327,9 +327,9 @@ Parser::scanner (unsigned char inbyte)
         boost::optional<int> edit_result;
 
        // cerr << "parse: " << hex << (int) inbyte << dec << " state = " << state << " msgindex = " << msgindex << " runnable = " << runnable << endl;
-       
+
        /* Check active sensing early, so it doesn't interrupt sysex.
-       
+
           NOTE: active sense messages are not considered to fit under
           "any" for the purposes of callbacks. If a caller wants
           active sense messages handled, which is unlikely, then
@@ -337,7 +337,7 @@ Parser::scanner (unsigned char inbyte)
           every other MIDI message in terms of semantics that its
           counter-productive to treat them similarly.
        */
-       
+
        if (inbyte == 0xfe) {
                message_counter[inbyte]++;
                if (!_offline) {
@@ -345,21 +345,21 @@ Parser::scanner (unsigned char inbyte)
                }
                return;
        }
-       
+
        /* If necessary, allocate larger message buffer. */
-       
+
        if (msgindex >= msglen) {
                msglen *= 2;
                msgbuf = (unsigned char *) realloc (msgbuf, msglen);
        }
-       
+
        /*
          Real time messages can occur ANYPLACE,
          but do not interrupt running status.
        */
 
        bool rtmsg = false;
-       
+
        switch (inbyte) {
        case 0xf8:
                rtmsg = true;
@@ -386,11 +386,11 @@ Parser::scanner (unsigned char inbyte)
 
        if (rtmsg) {
                boost::optional<int> res = edit (&inbyte, 1);
-               
+
                if (res.get_value_or (1) >= 0 && !_offline) {
                        realtime_msg (inbyte);
                }
-               
+
                return;
        }
 
@@ -438,11 +438,11 @@ Parser::scanner (unsigned char inbyte)
                        }
                }
        }
-       
+
        /*
         * Status bytes always start a new message, except EOX
         */
-       
+
        if (statusbit) {
 
                msgindex = 0;
@@ -469,11 +469,11 @@ Parser::scanner (unsigned char inbyte)
 
                return;
        }
-       
+
        /*
         * We've got a Data byte.
         */
-       
+
        msgbuf[msgindex++] = inbyte;
 
        switch (state) {
@@ -487,29 +487,29 @@ Parser::scanner (unsigned char inbyte)
                 * messages, so just handle it silently.
                 */
                break;
-               
+
        case NEEDTWOBYTES:
                /* wait for the second byte */
                if (msgindex < 3)
                        return;
                /*FALLTHRU*/
-               
+
        case NEEDONEBYTE:
                /* We've completed a 1 or 2 byte message. */
 
                 edit_result = edit (msgbuf, msgindex);
 
                if (edit_result.get_value_or (1)) {
-                       
+
                        /* message not cancelled by an editor */
-                       
+
                        message_counter[msgbuf[0] & 0xF0]++;
 
                        if (!_offline) {
                                signal (msgbuf, msgindex);
                        }
                }
-               
+
                if (runnable) {
                        /* In Runnable mode, we reset the message
                           index, but keep the callbacks_pending and state the
@@ -522,7 +522,7 @@ Parser::scanner (unsigned char inbyte)
                        state = NEEDSTATUS;
                }
                break;
-               
+
        case VARIABLELENGTH:
                /* nothing to do */
                break;
@@ -666,7 +666,7 @@ Parser::signal (MIDI::byte *msg, size_t len)
        switch (msgtype) {
        case none:
                break;
-               
+
        case off:
                channel_active_preparse[chan_i] (*this);
                note_off (*this, (EventTwoBytes *) &msg[1]);
@@ -674,7 +674,7 @@ Parser::signal (MIDI::byte *msg, size_t len)
                        (*this, (EventTwoBytes *) &msg[1]);
                channel_active_postparse[chan_i] (*this);
                break;
-               
+
        case on:
                channel_active_preparse[chan_i] (*this);
 
@@ -694,7 +694,7 @@ Parser::signal (MIDI::byte *msg, size_t len)
 
                channel_active_postparse[chan_i] (*this);
                break;
-               
+
        case MIDI::controller:
                channel_active_preparse[chan_i] (*this);
                controller (*this, (EventTwoBytes *) &msg[1]);
@@ -702,21 +702,21 @@ Parser::signal (MIDI::byte *msg, size_t len)
                        (*this, (EventTwoBytes *) &msg[1]);
                channel_active_postparse[chan_i] (*this);
                break;
-               
+
        case program:
                channel_active_preparse[chan_i] (*this);
                program_change (*this, msg[1]);
                channel_program_change[chan_i] (*this, msg[1]);
                channel_active_postparse[chan_i] (*this);
                break;
-               
+
        case chanpress:
                channel_active_preparse[chan_i] (*this);
                pressure (*this, msg[1]);
                channel_pressure[chan_i] (*this, msg[1]);
                channel_active_postparse[chan_i] (*this);
                break;
-               
+
        case polypress:
                channel_active_preparse[chan_i] (*this);
                poly_pressure (*this, (EventTwoBytes *) &msg[1]);
@@ -724,14 +724,14 @@ Parser::signal (MIDI::byte *msg, size_t len)
                        (*this, (EventTwoBytes *) &msg[1]);
                channel_active_postparse[chan_i] (*this);
                break;
-               
+
        case MIDI::pitchbend:
                channel_active_preparse[chan_i] (*this);
                pitchbend (*this, (msg[2]<<7)|msg[1]);
                channel_pitchbend[chan_i] (*this, (msg[2]<<7)|msg[1]);
                channel_active_postparse[chan_i] (*this);
                break;
-               
+
        case MIDI::sysex:
                sysex (*this, msg, len);
                break;
@@ -740,23 +740,23 @@ Parser::signal (MIDI::byte *msg, size_t len)
                process_mtc_quarter_frame (msg);
                mtc_quarter_frame (*this, *msg);
                break;
-               
+
        case MIDI::position:
                position (*this, msg, len);
                break;
-               
+
        case MIDI::song:
                song (*this, msg, len);
                break;
-       
+
        case MIDI::tune:
                tune (*this);
-       
+
        default:
                /* XXX some kind of warning ? */
                break;
        }
-       
+
        any (*this, msg, len);
 }
 
@@ -788,7 +788,7 @@ Parser::set_offline (bool yn)
                /* this hack deals with the possibility of our first MIDI
                   bytes being running status messages.
                */
-               
+
                channel_msg (0x90);
                state = NEEDSTATUS;
        }
index d214755248f6fbd1e7f99a35336624dd0a0e9b47..629dff07969ba64b739dce6dfb724d53e997e71d 100644 (file)
@@ -92,11 +92,11 @@ bool
 Port::clock (timestamp_t timestamp)
 {
        static byte clockmsg = 0xf8;
-       
+
        if (sends_output()) {
                return midimsg (&clockmsg, 1, timestamp);
        }
-       
+
        return false;
 }
 
@@ -150,7 +150,7 @@ Port::get_state () const
        } else {
                root->add_property ("mode", "output");
        }
-       
+
 #if 0
        byte device_inquiry[6];
 
@@ -160,7 +160,7 @@ Port::get_state () const
        device_inquiry[0] = 0x06;
        device_inquiry[0] = 0x02;
        device_inquiry[0] = 0xf7;
-       
+
        write (device_inquiry, sizeof (device_inquiry), 0);
 #endif
 
index 30f71032f4d8361a7ca4ff6395cf330722ead3a1..b4a1dd69bd2c8b9f37ec44a0fb6ce88e90029c67 100644 (file)
@@ -243,7 +243,7 @@ Panner1in2out::distribute_one (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gai
                        if (pan != 0.0f) {
 
                                /* pan is not 1 but also not 0, so we must do it "properly" */
-                               
+
                                mix_buffers_with_gain(dst,src,nframes,pan);
 
                                /* XXX it would be nice to mark the buffer as written to */
@@ -252,7 +252,7 @@ Panner1in2out::distribute_one (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gai
                } else {
 
                        /* pan is 1 so we can just copy the input samples straight in */
-                       
+
                        mix_buffers_no_gain(dst,src,nframes);
 
                        /* XXX it would be nice to mark the buffer as written to */
index 73d193d73b71529cc44c2ee55dee3b75e85c46a0..3cfc3585305a98bafdac5d865340f4e79c416838 100644 (file)
@@ -311,7 +311,7 @@ Panner2in2out::distribute_one (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gai
                        if (pan != 0.0f) {
 
                                /* pan is 1 but also not 0, so we must do it "properly" */
-                               
+
                                //obufs.get_audio(1).read_from (srcbuf, nframes);
                                mix_buffers_with_gain(dst,src,nframes,pan);
 
@@ -369,17 +369,17 @@ Panner2in2out::distribute_one (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gai
                        if (pan != 0.0f) {
 
                                /* pan is not 1 but also not 0, so we must do it "properly" */
-                               
+
                                mix_buffers_with_gain(dst,src,nframes,pan);
                                // obufs.get_audio(1).read_from (srcbuf, nframes);
-                               
+
                                /* XXX it would be nice to mark the buffer as written to */
                        }
 
                } else {
 
                        /* pan is 1 so we can just copy the input samples straight in */
-                       
+
                        mix_buffers_no_gain(dst,src,nframes);
 
                        /* XXX it would be nice to mark the buffer as written to */
index 9dc7826f67489edb25854760f8a56640eb79a761..bc81234eda79d4e572ea39b7a81171e41089e346 100644 (file)
@@ -51,7 +51,7 @@ class Panner2in2out : public Panner
 
        std::pair<double, double> position_range () const;
        std::pair<double, double> width_range () const;
-       
+
         void set_position (double);
         void set_width (double);
 
index 1b48a19eff912f2d92fb2df7587d6d6627fb4ac7..09dfa74785c303c1723c3203303c2e2d80bf68f1 100644 (file)
@@ -42,7 +42,7 @@
 using namespace std;
 using namespace PBD;
 using namespace Glib;
-       
+
 uint64_t BaseUI::rt_bit = 1;
 BaseUI::RequestType BaseUI::CallSlot = BaseUI::new_request_type();
 BaseUI::RequestType BaseUI::Quit = BaseUI::new_request_type();
@@ -91,7 +91,7 @@ BaseUI::signal_running ()
 {
        Glib::Threads::Mutex::Lock lm (_run_lock);
        _running.signal ();
-       
+
        return false; // don't call it again
 }
 
@@ -130,7 +130,7 @@ BaseUI::request_handler (Glib::IOCondition ioc)
 
        if (ioc & IO_IN) {
                request_channel.drain ();
-               
+
                /* there may been an error. we'd rather handle requests first,
                   and then get IO_HUP or IO_ERR on the next loop.
                */
index 9d152a6f861a941cbe9180ceca32927fd183a172..e1c6571f9cf135fcaacff22afb99351c2ee16802 100644 (file)
@@ -64,7 +64,7 @@ Backtrace::print (std::ostream& str) const
        if (size) {
 #ifdef HAVE_EXECINFO
                strings = ::backtrace_symbols (trace, size);
-#endif         
+#endif
                if (strings) {
                        for (i = 3; i < 5+18 && i < size; i++) {
                                str << strings[i] << std::endl;
@@ -151,7 +151,7 @@ is_interesting_object (void const* ptr)
        if (ptr == 0) {
                return false;
        }
-       
+
        return interesting_pointers().find (ptr) != interesting_pointers().end();
 }
 
@@ -194,10 +194,10 @@ boost_debug_shared_ptr_operator_equals (void const *sp, void const *old_obj, int
        if (is_interesting_object (old_obj)) {
                if (debug_out) {
                        cerr << "\tlost old sp @ " << sp << " for " << old_obj << " UC = " << old_use_count << " now for " << obj << " UC = " << new_use_count
-                            << " (total sp's = " << sptrs().size() << ')' << endl;                     
+                            << " (total sp's = " << sptrs().size() << ')' << endl;
                }
                PointerMap::iterator x = sptrs().find (sp);
-               
+
                if (x != sptrs().end()) {
                        sptrs().erase (x);
                        if (debug_out) {
@@ -214,11 +214,11 @@ boost_debug_shared_ptr_operator_equals (void const *sp, void const *old_obj, int
                newpair.second = new SPDebug (new Backtrace());
 
                sptrs().insert (newpair);
-               
+
                if (debug_out) {
                        cerr << "assignment created sp for " << obj << " @ " << sp << " used to point to " << old_obj << " UC = " << old_use_count
                             << " UC = " << new_use_count
-                            << " (total sp's = " << sptrs().size() << ')' << endl;                     
+                            << " (total sp's = " << sptrs().size() << ')' << endl;
                        cerr << *newpair.second << endl;
                }
        }
@@ -242,10 +242,10 @@ boost_debug_shared_ptr_reset (void const *sp, void const *old_obj, int old_use_c
        if (is_interesting_object (old_obj)) {
                if (debug_out) {
                        cerr << "\tlost old sp @ " << sp << " for " << old_obj << " UC = " << old_use_count << " now for " << obj << " UC = " << new_use_count
-                            << " (total sp's = " << sptrs().size() << ')' << endl;                     
+                            << " (total sp's = " << sptrs().size() << ')' << endl;
                }
                PointerMap::iterator x = sptrs().find (sp);
-               
+
                if (x != sptrs().end()) {
                        sptrs().erase (x);
                        if (debug_out) {
@@ -262,11 +262,11 @@ boost_debug_shared_ptr_reset (void const *sp, void const *old_obj, int old_use_c
                newpair.second = new SPDebug (new Backtrace());
 
                sptrs().insert (newpair);
-               
+
                if (debug_out) {
                        cerr << "reset created sp for " << obj << " @ " << sp << " used to point to " << old_obj << " UC = " << old_use_count
                             << " UC = " << new_use_count
-                            << " (total sp's = " << sptrs().size() << ')' << endl;                     
+                            << " (total sp's = " << sptrs().size() << ')' << endl;
                        cerr << *newpair.second << endl;
                }
        }
index c3c0752c848f3af448615a4de12c1017f1cf4fac..0228d004e4984729e9b29ad736ccef8b8f6ab456 100644 (file)
@@ -35,14 +35,14 @@ ControllableDescriptor::set (const std::string& str)
        string front = str.substr (0, first_space);
        string back = str.substr (first_space);
 
-       vector<string> path;    
+       vector<string> path;
        split (front, path, '/');
 
        if (path.size() < 2) {
                return -1;
        }
 
-       vector<string> rest;    
+       vector<string> rest;
        split (back, rest, ' ');
 
        if (rest.size() < 1) {
@@ -106,7 +106,7 @@ ControllableDescriptor::set (const std::string& str)
                        return -1;
                }
        } else if (path[1] == "send") {
-               
+
                if (path.size() == 3 && rest.size() == 2) {
                        if (path[2] == "gain") {
                                _subtype = SendGain;
@@ -118,7 +118,7 @@ ControllableDescriptor::set (const std::string& str)
                        return -1;
                }
        }
-       
+
        return 0;
 }
 
@@ -127,7 +127,7 @@ ControllableDescriptor::rid() const
 {
        if (banked()) {
                return _rid + _bank_offset;
-       }               
+       }
 
        return _rid;
 }
@@ -138,6 +138,6 @@ ControllableDescriptor::target (uint32_t n) const
        if (n < _target.size()) {
                return _target[n];
        }
-       
+
        return 0;
 }
index 8653b504e9185a538740d1b4e3e0f4af64045d5e..660891076d1c908390bb9c4b0e07293ff48d7447 100644 (file)
@@ -132,7 +132,7 @@ short_version (string orig, string::size_type target_length)
        }
 
        /* whatever the length is now, use it */
-       
+
        return orig;
 }
 
@@ -187,9 +187,9 @@ int_from_hex (char hic, char loc)
        } else if( ('A'<=hi) && (hi<='F') ) {
                hi -= ('A'-10);
        }
-       
+
        lo = (int) loc;
-       
+
        if( ('0'<=lo) && (lo<='9') ) {
                lo -= '0';
        } else if( ('a'<=lo) && (lo<='f') ) {
@@ -249,14 +249,14 @@ length2string (const int64_t frames, const double sample_rate)
        secs -= (hrs * 3600LL);
        int64_t mins = secs / 60LL;
        secs -= (mins * 60LL);
-       
+
        int64_t total_secs = (hrs * 3600LL) + (mins * 60LL) + secs;
        int64_t frames_remaining = (int64_t) floor (frames - (total_secs * sample_rate));
        float fractional_secs = (float) frames_remaining / sample_rate;
-       
+
        char duration_str[64];
        sprintf (duration_str, "%02" PRIi64 ":%02" PRIi64 ":%05.2f", hrs, mins, (float) secs + fractional_secs);
-       
+
        return duration_str;
 }
 
index 5e743ba557183a9d792992c3dca3cc05c7f12aa9..e3f6df5a311e357b2df20f12b822c9e12a740779 100644 (file)
@@ -16,7 +16,7 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
                        error << "cannot set non-blocking mode for x-thread pipe (read) (" << ::strerror (errno) << ')' << endmsg;
                        return;
                }
-               
+
                if (fcntl (fds[1], F_SETFL, O_NONBLOCK)) {
                        error << "cannot set non-blocking mode for x-thread pipe (write) (%2)" << ::strerror (errno) << ')' << endmsg;
                        return;
index 69d744e81d19f2a8794cf09cc5611bff4cdded8b..5eca5fb4e8daa70ebe6c01230488bbafd2a4a136 100644 (file)
@@ -43,7 +43,7 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
        // make the socket non-blockable if required
        u_long mode = (u_long)non_blocking;
        int otp_result = 0;
-       
+
        otp_result = ioctlsocket(send_socket, FIONBIO, &mode);
        if (otp_result != NO_ERROR) {
                std::cerr << "CrossThreadChannel::CrossThreadChannel() Send socket cannot be set to non blocking mode with error: " << WSAGetLastError() << std::endl;
@@ -72,10 +72,10 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
                std::cerr << "CrossThreadChannel::CrossThreadChannel() Setting receive socket address to local failed with error: " << WSAGetLastError() << std::endl;
                return;
        }
-       
+
        // construct IOChannel
        receive_channel = g_io_channel_win32_new_socket((gint)receive_socket);
-       
+
        // set binary data type
        GIOStatus g_status = g_io_channel_set_encoding (receive_channel, NULL, NULL);
        if (G_IO_STATUS_NORMAL != g_status ) {
@@ -104,7 +104,7 @@ CrossThreadChannel::wakeup ()
 {
        char c = 0;
 
-       // write one byte to wake up a thread which is listening our IOS        
+       // write one byte to wake up a thread which is listening our IOS
        sendto(send_socket, &c, sizeof(c), 0, (SOCKADDR*)&recv_address, sizeof(recv_address) );
 }
 
@@ -125,7 +125,7 @@ CrossThreadChannel::drain ()
 
                if (G_IO_STATUS_NORMAL != g_status) {
                        std::cerr << "CrossThreadChannel::CrossThreadChannel() Cannot drain from read buffer! " << g_status << std::endl;
-                       
+
                        if (g_error) {
                                std::cerr << "Error is Domain: " << g_error->domain << " Code: " << g_error->code << std::endl;
                                g_clear_error(&g_error);
@@ -184,7 +184,7 @@ CrossThreadChannel::receive (char& msg, bool wait)
                        return -1;
                }
        }
-       
+
        // fetch the message from the channel.
        GIOStatus g_status = g_io_channel_read_chars (receive_channel, &msg, sizeof(msg), &read, &g_error);
 
index 8ceea3f1af5ce7743fa283b38b74a75c76702e48..af8cd052cde2f594d20bef79308b2739176daa5f 100644 (file)
@@ -115,9 +115,9 @@ PBD::parse_debug_options (const char* str)
                         }
                 }
        }
-       
+
        debug_bits = bits;
-       
+
        return 0;
 }
 
index 50507972c21a026d07bf765446d73fcab1e44291..ddc82151945e74fc84ebe0e75e123ef302a44df1 100644 (file)
@@ -41,7 +41,7 @@ nocase_cmp(const string & s1, const string& s2)
 {
        string::const_iterator it1 = s1.begin();
        string::const_iterator it2 = s2.begin();
-       
+
        while ((it1 != s1.end()) && (it2 != s2.end())) {
                if(::toupper(*it1) != ::toupper(*it2))  {//letters differ?
                        // return -1 to indicate 'smaller than', 1 otherwise
@@ -97,7 +97,7 @@ EnumWriter::register_distinct (string type, vector<int> v, vector<string> s)
 
        newpair.first = type;
        newpair.second = EnumRegistration (v, s, false);
-       
+
        result = registry.insert (newpair);
 
        if (!result.second) {
@@ -113,7 +113,7 @@ EnumWriter::register_bits (string type, vector<int> v, vector<string> s)
 
        newpair.first = type;
        newpair.second = EnumRegistration (v, s, true);
-       
+
        result = registry.insert (newpair);
 
        if (!result.second) {
@@ -153,7 +153,7 @@ EnumWriter::read (string type, string value)
        } else {
                return read_distinct (x->second, value);
        }
-}      
+}
 
 string
 EnumWriter::write_bits (EnumRegistration& er, int value)
@@ -263,7 +263,7 @@ EnumWriter::read_bits (EnumRegistration& er, string str)
         }
 
        do {
-               
+
                comma = str.find_first_of (',');
                string segment = str.substr (0, comma);
 
index cfc56921381125dbcc01cdedab53f29e36152c37..4af2029308559273775c628cd058a4180fffc7d7 100644 (file)
@@ -144,12 +144,12 @@ EnvironmentalProtectionAgency::clear () const
 
        for (vector<string>::const_iterator e = ecopy.begin(); e != ecopy.end(); ++e) {
                 string::size_type equal = (*e).find_first_of ('=');
-                       
+
                 if (equal == string::npos) {
                         /* say what? an environ value without = ? */
                         continue;
                 }
-                       
+
                 string var_name = (*e).substr (0, equal);
                 g_unsetenv(var_name.c_str());
         }
index 6506c18be99a1261569453196e4c918540652617..d3f2fe50388b6fb6a52b1aa704ebf19561220d26 100644 (file)
@@ -66,7 +66,7 @@ EventLoop::invalidate_request (void* data)
         * want, and many of the objects we want to do this with already
         * inherit (indirectly) from sigc::trackable.
         */
-       
+
         if (ir->event_loop) {
                Glib::Threads::Mutex::Lock lm (ir->event_loop->slot_invalidation_mutex());
                for (list<BaseRequestObject*>::iterator i = ir->requests.begin(); i != ir->requests.end(); ++i) {
index 48a417c4f58d58caf3ffa93abee5445213be0ee7..1ca913c54c3234710fda0cd0e9b396142c760c43 100644 (file)
@@ -31,7 +31,7 @@ ffs (int x)
        return __builtin_ffs(x);
 #elif defined (COMPILER_MSVC)
        unsigned long index;
-#ifdef WIN64   
+#ifdef WIN64
        if (0 != _BitScanForward64(&index, (__int64)x))
 #else
        if (0 != _BitScanForward(&index, (unsigned long)x))
index 7812ad6696f9c4ed759a4729a728d28f07477f01..9838b4565beb7b354e2d8b18ff054331983a66b8 100644 (file)
@@ -172,9 +172,9 @@ FPU::FPU ()
        info << string_compose (_("CPU vendor: %1"), cpu_vendor) << endmsg;
 
        if (num_ids > 0) {
-       
+
                /* Now get CPU/FPU flags */
-       
+
                __cpuid (cpu_info, 1);
 
                if ((cpu_info[2] & (1<<27)) /* OSXSAVE */ &&
@@ -193,11 +193,11 @@ FPU::FPU ()
                }
 
                /* Figure out CPU/FPU denormal handling capabilities */
-       
+
                if (cpu_info[3] & (1 << 24)) {
-               
+
                        char** fxbuf = 0;
-               
+
                        /* DAZ wasn't available in the first version of SSE. Since
                           setting a reserved bit in MXCSR causes a general protection
                           fault, we need to be able to check the availability of this
@@ -226,10 +226,10 @@ FPU::FPU ()
                        assert (fxbuf);
                        (void) posix_memalign ((void **) fxbuf, 16, 512);
                        assert (*fxbuf);
-#endif                 
-               
+#endif
+
                        memset (*fxbuf, 0, 512);
-               
+
 #ifdef COMPILER_MSVC
                        char *buf = *fxbuf;
                        __asm {
@@ -244,19 +244,19 @@ FPU::FPU ()
                                : "memory"
                                );
 #endif
-               
+
                        uint32_t mxcsr_mask = *((uint32_t*) &((*fxbuf)[28]));
-               
+
                        /* if the mask is zero, set its default value (from intel specs) */
-               
+
                        if (mxcsr_mask == 0) {
                                mxcsr_mask = 0xffbf;
                        }
-               
+
                        if (mxcsr_mask & (1<<6)) {
                                _flags = Flags (_flags | HasDenormalsAreZero);
                        }
-               
+
 #if !defined HAVE_POSIX_MEMALIGN && defined PLATFORM_WINDOWS
                        _aligned_free (*fxbuf);
                        _aligned_free (fxbuf);
@@ -272,10 +272,10 @@ FPU::FPU ()
 
                const int parameter_end = 0x80000004;
                string cpu_brand;
-       
+
                if (cpu_info[0] >= parameter_end) {
                        char* cpu_string_ptr = cpu_string;
-               
+
                        for (int parameter = 0x80000002; parameter <= parameter_end &&
                                     cpu_string_ptr < &cpu_string[sizeof(cpu_string)]; parameter++) {
                                __cpuid(cpu_info, parameter);
@@ -287,7 +287,7 @@ FPU::FPU ()
                }
        }
 #endif /* !ARCH_X86 */
-}                      
+}
 
 FPU::~FPU ()
 {
index c9823f0dc8e5f2589ac8f163e40050c9232bfd73..9a610c7418e4135f6980653375e4d42a40746642 100644 (file)
@@ -61,7 +61,7 @@ ID::reset ()
 {
        Glib::Threads::Mutex::Lock lm (*counter_lock);
        _id = _counter++;
-}      
+}
 
 int
 ID::string_assign (string str)
index 14fa9ea66cfdd58802d86f87b39f0b6ccbd5085b..c48544d160ab294188601a5503d822f210546c33 100644 (file)
@@ -62,7 +62,7 @@ int cache_aligned_malloc (void** memptr, size_t size)
        }
 
        return 0;
-#endif 
+#endif
 }
 
 void cache_aligned_free (void* memptr)
@@ -101,7 +101,7 @@ int  aligned_malloc (void** memptr, size_t size, size_t alignment)
        }
 
        return 0;
-#endif 
+#endif
 }
 
 void aligned_free (void* memptr)
index 2fd7ab11da25fab56bc60f619ad6fb92d6c2cc9b..ae3631bfd2c3d00e69908d1c3d5be3c6382b9ab3 100644 (file)
@@ -182,7 +182,7 @@ char*
 MD5::digestFile (char *filename)
 {
        Init();
-               
+
        FILE *file;
        int len;
        unsigned char buffer[1024];
@@ -226,9 +226,9 @@ void
 MD5::Transform (uint32_t state[4], uint8_t const * block)
 {
        uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-               
+
        Decode (x, block, 64);
-               
+
        /* Round 1 */
        FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
        FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
@@ -246,7 +246,7 @@ MD5::Transform (uint32_t state[4], uint8_t const * block)
        FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
        FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
        FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-               
+
        /* Round 2 */
        GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
        GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
@@ -264,7 +264,7 @@ MD5::Transform (uint32_t state[4], uint8_t const * block)
        GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
        GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
        GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-               
+
        /* Round 3 */
        HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
        HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
@@ -334,7 +334,7 @@ void
 MD5::Decode (uint32_t *output, uint8_t const * input, size_t len)
 {
        size_t i, j;
-       
+
        for (i = 0, j = 0; j < len; i++, j += 4)
                output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
                        (((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
index 4867d3675cc1f241c2e71718c3fd1cb3c5d2faaf..82aaadb9eb26f2a6a27ad0d58cc69829d881358b 100644 (file)
@@ -50,7 +50,7 @@ mountpoint (string path)
        unsigned int matchlen;
        const char *cpath = path.c_str();
        char best[PATH_MAX+1];
-       
+
        if ((mntf = setmntent ("/etc/mtab", "r")) == 0) {
                return "";
        }
@@ -122,10 +122,10 @@ mountpoint (string path)
        unsigned int matchlen;
        const char *cpath = path.c_str();
        char best[PATH_MAX+1];
-       
+
        /* From the manpage, under "BUGS" : "The memory allocated by getmntinfo() cannot be free(3)'d by the
           application."
-       
+
           Thus: we do NOT try to free memory allocated by getmntinfo()
        */
 
@@ -163,13 +163,13 @@ mountpoint (string path)
                        }
                }
        }
-       
+
        return best;
 }
 #endif // HAVE_GETMNTENT
 
 #ifdef TEST_MOUNTPOINT
-               
+
 main (int argc, char *argv[])
 {
        printf ("mp of %s = %s\n", argv[1], mountpoint (argv[1]).c_str());
index bf10e5df58612e128c0c37f52a22c0f7c98b9f54..609d0ef5f4d77f9efdddcd9e37445db205f138d9 100644 (file)
@@ -152,7 +152,7 @@ gcd(int a, int b)
                b = c;
                c = a % b;
        }
-       
+
        return b;
 }
 
@@ -435,7 +435,7 @@ getopt_long(int nargc,
                        has_equal++;
                } else
                        current_argv_len = strlen(current_argv);
-       
+
                for (i = 0; long_options[i].name; i++) {
                        /* find matching long option */
                        if (strncmp(current_argv, long_options[i].name,
index 805e0b85cdcec9a889cb33e13919e332dccf7919..a92005a08621e9a0d850be26675d53bd3581ca02 100644 (file)
@@ -69,7 +69,7 @@ realpath (const char *original_path, char resolved_path[_MAX_PATH+1])
                // possibly need to add that functionality here at a later date.
        } else {
                char temp[(_MAX_PATH+1)*6]; // Allow for maximum length of a path in wchar characters
-               
+
                // POSIX 'realpath()' requires that the buffer size is at
                // least PATH_MAX+1, so assume that the user knew this !!
 
@@ -78,9 +78,9 @@ realpath (const char *original_path, char resolved_path[_MAX_PATH+1])
                if (0 != rpath) {
                        snprintf (resolved_path, _MAX_PATH+1, "%s", Glib::locale_to_utf8 (temp).c_str());
                }
-                       
+
        }
-       
+
        return (rpath);
 }
 
@@ -129,7 +129,7 @@ PBD::path_expand (string path)
        regex_t compiled_pattern;
        const int nmatches = 100;
        regmatch_t matches[nmatches];
-       
+
        if (regcomp (&compiled_pattern, "\\$([a-zA-Z_][a-zA-Z0-9_]*|\\{[a-zA-Z_][a-zA-Z0-9_]*\\})", REG_EXTENDED)) {
                std::cerr << "bad regcomp\n";
                 return path;
@@ -140,11 +140,11 @@ PBD::path_expand (string path)
                if (regexec (&compiled_pattern, path.c_str(), nmatches, matches, 0)) {
                        break;
                }
-               
+
                /* matches[0] gives the entire match */
-               
+
                string match = path.substr (matches[0].rm_so, matches[0].rm_eo - matches[0].rm_so);
-               
+
                /* try to get match from the environment */
 
                 if (match[1] == '{') {
index 229dc04f329d0ee868b8077ec776d0ab88db0826..13383c27d1116d373f2a257bc5ef7c596300ed9b 100644 (file)
@@ -101,7 +101,7 @@ PBD::init ()
 
        /* Initialize windows socket DLL for PBD::CrossThreadChannel
         */
-       
+
        if (WSAStartup(MAKEWORD(1,1),&wsaData) != 0) {
                fatal << X_("Windows socket initialization failed with error: ") << WSAGetLastError() << endmsg;
                abort();
@@ -141,7 +141,7 @@ PBD::cleanup ()
 #ifdef PLATFORM_WINDOWS
        PBD::MMCSS::deinitialize ();
        WSACleanup();
-#endif 
+#endif
 
        EnumWriter::destroy ();
        FPU::destroy ();
index d2f8840b907ad1f65b2964a047bef764ecc12775..323435bdd9fd8b9edf1bc371711c3d42227cd30d 100644 (file)
@@ -43,7 +43,7 @@ template<typename RequestBuffer> void
 cleanup_request_buffer (void* ptr)
 {
         RequestBuffer* rb = (RequestBuffer*) ptr;
-       
+
        /* this is called when the thread for which this request buffer was
         * allocated dies. That could be before or after the end of the UI
         * event loop for which this request buffer provides communication.
@@ -54,7 +54,7 @@ cleanup_request_buffer (void* ptr)
         * a request. If the UI has finished processing requests, then
         * we will leak this buffer object.
         */
-       
+
        rb->dead = true;
 }
 
@@ -127,7 +127,7 @@ AbstractUI<RequestObject>::register_thread (string target_gui, pthread_t thread_
           when the thread exits, and ensures that the buffer is marked
           dead. it will then be deleted during a call to handle_ui_requests()
        */
-       
+
        per_thread_request_buffer.set (b);
 }
 
@@ -229,7 +229,7 @@ AbstractUI<RequestObject>::handle_ui_requests ()
                      ++tmp;
                      request_buffers.erase (i);
                      i = tmp;
-             } else {          
+             } else {
                      ++i;
              }
         }
@@ -264,7 +264,7 @@ AbstractUI<RequestObject>::handle_ui_requests ()
 
                 if (req->invalidation) {
                        DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1/%2 remove request from its invalidation list\n", name(), pthread_name()));
-                       
+
                        /* after this call, if the object referenced by the
                         * invalidation record is deleted, it will no longer
                         * try to mark the request as invalid.
@@ -283,7 +283,7 @@ AbstractUI<RequestObject>::handle_ui_requests ()
                 */
 
                 request_buffer_map_lock.unlock ();
-               
+
                /* unlock the request lock while we execute the request, so
                 * that we don't needlessly block other threads (note: not RT
                 * threads since they have their own queue) from making requests.
@@ -328,7 +328,7 @@ AbstractUI<RequestObject>::send_request (RequestObject *req)
                DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1/%2 direct dispatch of request type %3\n", name(), pthread_name(), req->type));
                do_request (req);
                delete req;
-       } else {        
+       } else {
 
                /* If called from a different thread, we first check to see if
                 * the calling thread is registered with this UI. If so, there
@@ -374,7 +374,7 @@ AbstractUI<RequestObject>::call_slot (InvalidationRecord* invalidation, const bo
        }
 
        RequestObject *req = get_request (BaseUI::CallSlot);
-       
+
        if (req == 0) {
                return;
        }
@@ -384,7 +384,7 @@ AbstractUI<RequestObject>::call_slot (InvalidationRecord* invalidation, const bo
        /* copy semantics: copy the functor into the request object */
 
        req->the_slot = f;
-       
+
        /* the invalidation record is an object which will carry out
         * invalidation of any requests associated with it when it is
         * destroyed. it can be null. if its not null, associate this
@@ -401,5 +401,5 @@ AbstractUI<RequestObject>::call_slot (InvalidationRecord* invalidation, const bo
         }
 
        send_request (req);
-}      
+}
 
index 060d05d37f3471f67a3ec34c0a4d629ff8c898d6..5491210db7e951401cf69c43a79b21e95c9adb29 100644 (file)
@@ -92,10 +92,10 @@ class ABSTRACT_UI_API AbstractUI : public BaseUI
 
        RequestBufferMap request_buffers;
         static Glib::Threads::Private<RequestBuffer> per_thread_request_buffer;
-       
+
        Glib::Threads::Mutex               request_list_lock;
        std::list<RequestObject*> request_list;
-       
+
        RequestObject* get_request (RequestType);
        void handle_ui_requests ();
        void send_request (RequestObject *);
index 019ff857f494e83632431a9f02bb3cdccba75cd1..4b8c2e857a4df97eebd98f04cd00ad0ce02dea0b 100644 (file)
@@ -63,7 +63,7 @@ public:
        {
                return g_atomic_int_dec_and_test (&m_value);
        }
-       
+
        bool operator-- ()
        {
                return decrement_and_test ();
index eddaf862c59a6e40269d3af104903d59113f4c6a..ec2cf336785af2dcee2d45f66dacbe13c52580f8 100644 (file)
@@ -57,7 +57,7 @@ class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop
        std::string name() const { return _name; }
 
        bool ok() const { return _ok; }
-       
+
        static RequestType new_request_type();
        static RequestType CallSlot;
        static RequestType Quit;
index 9feac6366a9b353157da9a754be91500b6786921..337140e786f2af0ccb16dd51e6c9246069bafe8f 100644 (file)
@@ -34,13 +34,13 @@ public:
        virtual ~Command() { /* NOTE: derived classes must call drop_references() */ }
 
        virtual void operator() () = 0;
-       
+
        void set_name (const std::string& str) { _name = str; }
        const std::string& name() const { return _name; }
 
        virtual void undo() = 0;
        virtual void redo() { (*this)(); }
-       
+
        virtual XMLNode &get_state();
        virtual int set_state(const XMLNode&, int /*version*/) { /* noop */ return 0; }
 
index 768820b61a6aab474d4f1c724181a9596e3c016a..231afa583e4ba0a53703ff99b2446f9ab75e97c1 100644 (file)
@@ -174,7 +174,7 @@ namespace StringPrivate
          }
 
          ++arg_no;
-       
+
          return *this;
   }
 
@@ -194,7 +194,7 @@ namespace StringPrivate
        else if (is_number(fmt[i + 1])) { // aha! a spec!
          // save string
          output.push_back(fmt.substr(b, i - b));
-       
+
          int n = 1;            // number of digits
          int spec_no = 0;
 
@@ -207,9 +207,9 @@ namespace StringPrivate
          spec_no /= 10;
          output_list::iterator pos = output.end();
          --pos;                // safe since we have just inserted a string>
-       
+
          specs.insert(specification_map::value_type(spec_no, pos));
-       
+
          // jump over spec string
          i += n;
          b = i;
index 257fe8dcabbce14424cecb89182b186e87fcdfd0..235c4ce9042851590a0813f2fa2e6246a9226b4b 100644 (file)
@@ -90,7 +90,7 @@ class LIBPBD_API Controllable : public PBD::StatefulDestructible {
        static PBD::Signal1<void,PBD::Controllable*> StopLearning;
 
        static PBD::Signal1<void,Controllable*> Destroyed;
-       
+
        PBD::Signal0<void> Changed;
 
        int set_state (const XMLNode&, int version);
index d9b80db48cd2ce104a3895b43dac23af3a2e5127..e87879e4a31bb9a36698b1f71cc9548919be8c43 100644 (file)
@@ -50,11 +50,11 @@ public:
         */
        CrossThreadChannel(bool non_blocking);
        ~CrossThreadChannel();
-       
+
        /** Tell the listening thread that is has work to do.
         */
        void wakeup();
-       
+
        /* if the listening thread cares about the precise message
         * it is being sent, then ::deliver() can be used to send
         * a single byte message rather than a simple wakeup. These
index 0d1b4bd47cf2aa00d789dcd7f556d712c7cae83b..43f62bd7daa73110dc1dd6c28118b90e2a17479f 100644 (file)
@@ -34,7 +34,7 @@ LIBPBD_API extern int (*pbd_alloc_allowed) ();
 /** Call this to suspend malloc checking until a call to resume_rt_malloc_checks */
 LIBPBD_API extern void suspend_rt_malloc_checks ();
 
-/** Resume malloc checking after a suspension */       
+/** Resume malloc checking after a suspension */
 LIBPBD_API extern void resume_rt_malloc_checks ();
 
 }
index 0c401a947f1ed7f6c2f251cbd2680e3758511b9b..261697cafa05cbde4d94203b91c38eb9c7e7666e 100644 (file)
@@ -29,7 +29,7 @@ class LIBPBD_API Destructible {
   public:
         Destructible() {}
        virtual ~Destructible () { Destroyed(); }
-       
+
        PBD::Signal0<void> Destroyed;
        PBD::Signal0<void> DropReferences;
 
index 405a18781796cb0b247927937544c692b9da2646..6f2333277de93f4dcc85aa7b54cde42be1987817 100644 (file)
@@ -40,7 +40,7 @@ class LIBPBD_API unknown_enumeration : public std::exception {
        }
 
        ~unknown_enumeration () throw() {}
-       
+
        virtual const char *what() const throw() {
                return _message.c_str();
        }
index 89c085a5bc2e3a28e9a3a44cfb95890878c1aa21..8727fad08e115931475485fa5c0b65ce4e0031fb 100644 (file)
@@ -41,7 +41,7 @@ class LIBPBD_API EnvironmentalProtectionAgency {
 
   private:
         void clear () const;
-               
+
         bool _armed;
         std::string _envname;
         std::map<std::string,std::string> e;
index 21cbfbdce22579524cf45670eba168f69fa0b2a6..80b02e95224893dd7cfe8f413dd5ab977c88fb4f 100644 (file)
@@ -25,9 +25,9 @@ static inline float fast_log2 (float val)
        x &= ~(255 << 23);
        x += 127 << 23;
        *exp_ptr = x;
-       
+
        val = ((-1.0f/3) * t.f + 2) * t.f - 2.0f/3;
-       
+
        return (val + log_2);
 }
 
index 8be9e1a35b3f9507e2556a9c27e37c082725f61c..045b63381255d906063c8c9705633382280e7ade 100644 (file)
@@ -39,13 +39,13 @@ class LIBPBD_API FPU {
 
        static FPU* instance();
        static void destroy();
-       
+
        bool has_flush_to_zero () const { return _flags & HasFlushToZero; }
        bool has_denormals_are_zero () const { return _flags & HasDenormalsAreZero; }
        bool has_sse () const { return _flags & HasSSE; }
        bool has_sse2 () const { return _flags & HasSSE2; }
        bool has_avx () const { return _flags & HasAVX; }
-       
+
   private:
        Flags _flags;
 
index 68092a77bb1a62e43894f4c369a0025154bb8d79..9fc35ee1387d915cc47dc1ada1e70766de6ea7c0 100644 (file)
@@ -71,7 +71,7 @@ class /*LIBPBD_API*/ FunctorCommand : public Command
 
        virtual XMLNode &get_state() {
                std::stringstream ss;
-               
+
                XMLNode *node = new XMLNode("FunctorCommand");
                node->add_property("type_name", typeid(obj_type).name());
                node->add_property("functor", functor_name);
index 05ac69e26df635733e7c8b2391db74bd61cd8833..1f33e6d732cc408ae080da6fec1e063fbd119355 100644 (file)
@@ -56,7 +56,7 @@ class LIBPBD_API ID {
 
        void print (char* buf, uint32_t bufsize) const;
         std::string to_s() const;
-       
+
        static uint64_t counter() { return _counter; }
        static void init_counter (uint64_t val) { _counter = val; }
        static void init ();
index 8a5ee71aab82e0f04b4745fcecef5e9c136a2ad6..a02013eb7276c8e1f32924351289611b39b14973 100644 (file)
@@ -32,14 +32,14 @@ class LIBPBD_API MD5
 {
     public:
        MD5();
-       
+
        // an MD5 digest is a 16-byte number (32 hex digits)
        uint8_t digestRaw[16] ;
-       
+
        // This version of the digest is actually
        // a "printf'd" version of the digest.
        char digestChars[33] ;
-       
+
        void   writeToString ();
        char*  digestFile (char *filename);
        char*  digestMemory (uint8_t const * memchunk, size_t len);
@@ -53,14 +53,14 @@ class LIBPBD_API MD5
        };
 
        context_t context;
-       
+
        void Init ();
        void Transform (uint32_t state[4], uint8_t const * block);
        void Encode (uint8_t *output, uint32_t const *input, size_t len);
        void Decode (uint32_t *output, uint8_t const * input, size_t len);
        void Update (uint8_t const *input, size_t inputLen);
        void Final ();
-       
+
 };
 
 #endif /* __libpbd_md5_h__ */
index 437f58631d8b3b1e0f091b152b1bd92f28e2d3d5..b6e0bc9cf32a7cad61994dedf3ca7542cff7dd93 100644 (file)
@@ -84,7 +84,7 @@ public:
        void add_state (XMLNode* node) {
                node->add_property ("obj_id", _object.id().to_s());
        }
-       
+
        void object_died () {
                /* The object we are binding died, so drop references to ourselves */
                this->drop_references ();
@@ -116,7 +116,7 @@ public:
                /* The binder's object died, so we must die */
                _binder->DropReferences.connect_same_thread (_binder_death_connection, boost::bind (&MementoCommand::binder_dying, this));
        }
-       
+
        ~MementoCommand () {
                drop_references ();
                delete before;
@@ -152,13 +152,13 @@ public:
 
                XMLNode* node = new XMLNode(name);
                _binder->add_state (node);
-               
+
                node->add_property ("type_name", _binder->type_name ());
 
                if (before) {
                        node->add_child_copy(*before);
                }
-               
+
                if (after) {
                        node->add_child_copy(*after);
                }
index 8aff60fb6a6ace9693d3cab3d6f63f418e70ffba..edc247332e2aacb6dd0e603e5f09c5bce52e57d7 100644 (file)
@@ -39,12 +39,12 @@ class LIBPBD_API Pool
 
        virtual void *alloc ();
        virtual void release (void *);
-       
+
        std::string name() const { return _name; }
        guint available() const { return free_list.read_space(); }
        guint used() const { return free_list.bufsize() - available(); }
        guint total() const { return free_list.bufsize(); }
-       
+
   protected:
        RingBuffer<void*> free_list; ///< a list of pointers to free items within block
        std::string _name;
index f67fe50413a281fa3698a940f3117efad4c32daf..0ba42b8e55a623a5a1fab3108c14a3ae7b3b556d 100644 (file)
@@ -99,7 +99,7 @@ public:
 
 
        /* MANAGEMENT OF Stateful State */
-       
+
        bool set_value (XMLNode const & node) {
 
                XMLProperty const* p = node.property (property_name());
@@ -120,9 +120,9 @@ public:
                 node.add_property (property_name(), to_string (_current));
        }
 
-       
+
        /* MANAGEMENT OF HISTORY */
-       
+
        void clear_changes () {
                _have_old = false;
        }
@@ -137,7 +137,7 @@ public:
 
 
        /* TRANSFERRING HISTORY TO / FROM A StatefulDiffCommand */
-       
+
        void get_changes_as_xml (XMLNode* history_node) const {
                XMLNode* node = history_node->add_child (property_name());
                 node->add_property ("from", to_string (_old));
@@ -225,7 +225,7 @@ public:
        Property<T>* clone () const {
                return new Property<T> (this->property_id(), this->_old, this->_current);
        }
-       
+
        Property<T>* clone_from_xml (const XMLNode& node) const {
                XMLNodeList const & children = node.children ();
                XMLNodeList::const_iterator i = children.begin();
@@ -238,11 +238,11 @@ public:
                }
                XMLProperty* from = (*i)->property ("from");
                XMLProperty* to = (*i)->property ("to");
-                               
+
                if (!from || !to) {
                        return 0;
                }
-                       
+
                return new Property<T> (this->property_id(), from_string (from->value()), from_string (to->value ()));
        }
 
@@ -295,7 +295,7 @@ public:
        Property (PropertyDescriptor<std::string> d, std::string const & o, std::string const & c)
                : PropertyTemplate<std::string> (d, o, c)
        {}
-       
+
        Property<std::string>* clone () const {
                return new Property<std::string> (this->property_id(), _old, _current);
        }
@@ -356,12 +356,12 @@ class /*LIBPBD_API*/ SharedStatefulProperty : public PropertyBase
 {
 public:
        typedef boost::shared_ptr<T> Ptr;
-       
+
        SharedStatefulProperty (PropertyID d, Ptr p)
                : PropertyBase (d)
                , _current (p)
        {
-               
+
        }
 
        SharedStatefulProperty (PropertyID d, Ptr o, Ptr c)
@@ -369,7 +369,7 @@ public:
                , _old (o)
                , _current (c)
        {
-               
+
        }
 
        bool set_value (XMLNode const & node) {
index c4e4549ecd7486ad105413ba1fae1d0ac6f0220e..88f94fe211e3f964a9292df0e57708cb1ae3a0b9 100644 (file)
@@ -32,7 +32,7 @@ class Command;
 namespace PBD {
 
 class LIBPBD_API PropertyList;
-class LIBPBD_API StatefulDiffCommand;  
+class LIBPBD_API StatefulDiffCommand;
 
 /** A unique identifier for a property of a Stateful object */
 typedef GQuark PropertyID;
@@ -41,7 +41,7 @@ template<typename T>
 struct LIBPBD_TEMPLATE_API PropertyDescriptor {
        PropertyDescriptor () : property_id (0) {}
        PropertyDescriptor (PropertyID pid) : property_id (pid) {}
-       
+
        PropertyID property_id;
        typedef T value_type;
 };
@@ -121,7 +121,7 @@ public:
 
        /** Invert the changes in this property */
        virtual void invert () = 0;
-       
+
 
        /* TRANSFERRING HISTORY TO / FROM A StatefulDiffCommand */
 
@@ -129,7 +129,7 @@ public:
         *  StatefulDiffCommand node.
         */
        virtual void get_changes_as_xml (XMLNode *) const = 0;
-       
+
         /** If this Property has changed, clone it and add it to a given list.
         *  Used for making StatefulDiffCommands.
         */
@@ -145,7 +145,7 @@ public:
 
 
        /* VARIOUS */
-       
+
        virtual PropertyBase* clone () const = 0;
 
        /** Set this property's current state from another */
@@ -158,12 +158,12 @@ public:
                return _property_id == pid;
        }
 
-protected:     
+protected:
        /* copy construction only by subclasses */
        PropertyBase (PropertyBase const & b)
                : _property_id (b._property_id)
        {}
-       
+
 private:
        PropertyID _property_id;
 
index 28b60b521ecbcfeb03c840567a31005e611e53e0..9373d2c2814b99a4de4d97f7184fa701a9cbc575 100644 (file)
@@ -29,7 +29,7 @@ class XMLNode;
 
 namespace PBD {
 
-/** A list of properties, mapped using their ID */     
+/** A list of properties, mapped using their ID */
 class LIBPBD_API PropertyList : public std::map<PropertyID, PropertyBase*>
 {
 public:
index 2919063cbe2f2c074aef5b3432470495daf20665..e7f3f25b0bedc7eae1effe05bfbfe48b56491645 100644 (file)
@@ -34,7 +34,7 @@ class LIBPBD_API Receiver : public sigc::trackable
   public:
        Receiver ();
        virtual ~Receiver ();
-       
+
        void listen_to (Transmitter &);
        void hangup ();
 
index 935beb0469a4b49a376ed7ccb9382d36167306eb..58c463ecbe5373ea344f0a536a1c17930ffea39a 100644 (file)
@@ -39,7 +39,7 @@ class /*LIBPBD_API*/ RingBuffer
        buf = new T[size];
        reset ();
        }
-       
+
        virtual ~RingBuffer() {
                delete [] buf;
        }
@@ -55,7 +55,7 @@ class /*LIBPBD_API*/ RingBuffer
                g_atomic_int_set (&write_idx, w);
                g_atomic_int_set (&read_idx, r);
        }
-       
+
        guint read  (T *dest, guint cnt);
        guint write (T const * src,  guint cnt);
 
@@ -66,7 +66,7 @@ class /*LIBPBD_API*/ RingBuffer
 
        void get_read_vector (rw_vector *);
        void get_write_vector (rw_vector *);
-       
+
        void decrement_read_idx (guint cnt) {
                g_atomic_int_set (&read_idx, (g_atomic_int_get(&read_idx) - cnt) & size_mask);
        }
@@ -81,10 +81,10 @@ class /*LIBPBD_API*/ RingBuffer
 
        guint write_space () const {
                guint w, r;
-               
+
                w = g_atomic_int_get (&write_idx);
                r = g_atomic_int_get (&read_idx);
-               
+
                if (w > r) {
                        return ((r - w + size) & size_mask) - 1;
                } else if (w < r) {
@@ -93,13 +93,13 @@ class /*LIBPBD_API*/ RingBuffer
                        return size - 1;
                }
        }
-       
+
        guint read_space () const {
                guint w, r;
-               
+
                w = g_atomic_int_get (&write_idx);
                r = g_atomic_int_get (&read_idx);
-               
+
                if (w > r) {
                        return w - r;
                } else {
@@ -206,10 +206,10 @@ RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec)
        guint free_cnt;
        guint cnt2;
        guint w, r;
-       
+
        w = g_atomic_int_get (&write_idx);
        r = g_atomic_int_get (&read_idx);
-       
+
        if (w > r) {
                free_cnt = w - r;
        } else {
@@ -230,9 +230,9 @@ RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec)
                vec->len[1] = cnt2 & size_mask;
 
        } else {
-               
+
                /* Single part vector: just the rest of the buffer */
-               
+
                vec->buf[0] = &buf[r];
                vec->len[0] = free_cnt;
                vec->buf[1] = 0;
@@ -247,10 +247,10 @@ RingBuffer<T>::get_write_vector (typename RingBuffer<T>::rw_vector *vec)
        guint free_cnt;
        guint cnt2;
        guint w, r;
-       
+
        w = g_atomic_int_get (&write_idx);
        r = g_atomic_int_get (&read_idx);
-       
+
        if (w > r) {
                free_cnt = ((r - w + size) & size_mask) - 1;
        } else if (w < r) {
@@ -258,11 +258,11 @@ RingBuffer<T>::get_write_vector (typename RingBuffer<T>::rw_vector *vec)
        } else {
                free_cnt = size - 1;
        }
-       
+
        cnt2 = w + free_cnt;
 
        if (cnt2 > size) {
-               
+
                /* Two part vector: the rest of the buffer after the
                   current write ptr, plus some from the start of
                   the buffer.
index e700e89d2e48c60fed901cba4380ce45b7683698..f01a6f3a16ad08031050f7d24af97525e5f7b486 100644 (file)
@@ -40,7 +40,7 @@ class /*LIBPBD_API*/ RingBufferNPT
                buf = new T[size];
                reset ();
        }
-       
+
        virtual ~RingBufferNPT () {
                delete [] buf;
        }
@@ -56,7 +56,7 @@ class /*LIBPBD_API*/ RingBufferNPT
                g_atomic_int_set (&write_ptr, w);
                g_atomic_int_set (&read_ptr, r);
        }
-       
+
        size_t  read  (T *dest, size_t cnt);
        size_t  write (const T *src, size_t cnt);
 
@@ -67,7 +67,7 @@ class /*LIBPBD_API*/ RingBufferNPT
 
        void get_read_vector (rw_vector *);
        void get_write_vector (rw_vector *);
-       
+
        void decrement_read_ptr (size_t cnt) {
                g_atomic_int_set (&read_ptr, (g_atomic_int_get(&read_ptr) - cnt) % size);
        }
@@ -82,10 +82,10 @@ class /*LIBPBD_API*/ RingBufferNPT
 
        size_t write_space () {
                size_t w, r;
-               
+
                w = g_atomic_int_get (&write_ptr);
                r = g_atomic_int_get (&read_ptr);
-               
+
                if (w > r) {
                        return ((r - w + size) % size) - 1;
                } else if (w < r) {
@@ -94,13 +94,13 @@ class /*LIBPBD_API*/ RingBufferNPT
                        return size - 1;
                }
        }
-       
+
        size_t read_space () {
                size_t w, r;
-               
+
                w = g_atomic_int_get (&write_ptr);
                r = g_atomic_int_get (&read_ptr);
-               
+
                if (w > r) {
                        return w - r;
                } else {
@@ -204,10 +204,10 @@ RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec)
        size_t free_cnt;
        size_t cnt2;
        size_t w, r;
-       
+
        w = g_atomic_int_get (&write_ptr);
        r = g_atomic_int_get (&read_ptr);
-       
+
        if (w > r) {
                free_cnt = w - r;
        } else {
@@ -228,9 +228,9 @@ RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec)
                vec->len[1] = cnt2 % size;
 
        } else {
-               
+
                /* Single part vector: just the rest of the buffer */
-               
+
                vec->buf[0] = &buf[r];
                vec->len[0] = free_cnt;
                vec->buf[1] = 0;
@@ -244,10 +244,10 @@ RingBufferNPT<T>::get_write_vector (typename RingBufferNPT<T>::rw_vector *vec)
        size_t free_cnt;
        size_t cnt2;
        size_t w, r;
-       
+
        w = g_atomic_int_get (&write_ptr);
        r = g_atomic_int_get (&read_ptr);
-       
+
        if (w > r) {
                free_cnt = ((r - w + size) % size) - 1;
        } else if (w < r) {
@@ -255,11 +255,11 @@ RingBufferNPT<T>::get_write_vector (typename RingBufferNPT<T>::rw_vector *vec)
        } else {
                free_cnt = size - 1;
        }
-       
+
        cnt2 = w + free_cnt;
 
        if (cnt2 > size) {
-               
+
                /* Two part vector: the rest of the buffer after the
                   current write ptr, plus some from the start of
                   the buffer.
index 9f0d407751a3c202d3f81164b47dd2bf8ecff85c..41b1ffee55f36fadcbe844267c4bc4d110eb7975 100644 (file)
@@ -86,12 +86,12 @@ public:
         * Add another directory path to the search path.
         */
        LIBPBD_TEMPLATE_MEMBER_API Searchpath& operator+= (const std::string& directory_path);
-       
+
        /**
         * Concatenate another Searchpath onto this.
         */
        LIBPBD_TEMPLATE_MEMBER_API const Searchpath operator+ (const Searchpath& other);
-       
+
        /**
         * Add another path to the search path.
         */
index cb4677cba4978860f079f2b011561f1411a9e2b0..ac8f72aa0de36a5bf24ac0495f4752ff7984bc0b 100644 (file)
@@ -66,7 +66,7 @@ class LIBPBD_API Selectable : public sigc::trackable
                fromPath,
                fromFILE
        };
-               
+
        bool _ok;
        int _type;
        std::string path;
@@ -89,7 +89,7 @@ class LIBPBD_API Selector {
        void multithreaded (bool yn) {
                use_list_lock = yn;
        }
-       
+
        void add (int condition, Selectable *s);
        void remove (Selectable *);
        int select (unsigned long usecs);
index 5ab938b257034689a4bf7dd983007858a9c0c813..4069340e429bb6f6ac7432d825600c1ae83771f4 100644 (file)
@@ -132,7 +132,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase
        bool changed () const {
                return !_changes.added.empty() || !_changes.removed.empty();
        }
-       
+
        void clear_changes () {
                _changes.added.clear ();
                _changes.removed.clear ();
@@ -158,12 +158,12 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase
                if (!changed ()) {
                        return;
                }
-               
+
                /* Create a property with just the changes and not the actual values */
                SequenceProperty<Container>* a = create ();
                a->_changes = _changes;
                changes.add (a);
-               
+
                if (cmd) {
                        /* whenever one of the items emits DropReferences, make sure
                           that the Destructible we've been told to notify hears about
@@ -182,7 +182,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase
                XMLNodeList const children = node.children ();
 
                /* find the node for this property name */
-               
+
                std::string const c = capitalize (property_name ());
                XMLNodeList::const_iterator i = children.begin();
                while (i != children.end() && (*i)->name() != c) {
@@ -194,7 +194,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase
                }
 
                /* create a property with the changes */
-               
+
                SequenceProperty<Container>* p = create ();
 
                XMLNodeList const & grandchildren = (*i)->children ();
@@ -301,7 +301,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase
                }
                _val.clear ();
        }
-       
+
        typename Container::size_type size() const {
                return _val.size();
        }
@@ -355,12 +355,12 @@ protected:
                , _changes (p._changes)
                , _update_callback (p._update_callback)
        {}
-       
+
        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<void(const ChangeRecord&)> _update_callback;
 
-private:       
+private:
        virtual SequenceProperty<Container>* create () const = 0;
 };
 
index cc70d07ca5ecdc5920d3e6641afbe5ddf874bb2e..97cfa65300a1bacab25dda5ebc4c7722b30ed695 100644 (file)
@@ -115,9 +115,9 @@ public:
                return r;
        }
 };
-       
+
 typedef boost::shared_ptr<Connection> UnscopedConnection;
-       
+
 class LIBPBD_API ScopedConnection
 {
 public:
@@ -139,7 +139,7 @@ public:
                if (_c == o) {
                        return *this;
                }
-               
+
                disconnect ();
                _c = o;
                return *this;
@@ -148,13 +148,13 @@ public:
 private:
        UnscopedConnection _c;
 };
-       
+
 class LIBPBD_API ScopedConnectionList  : public boost::noncopyable
 {
   public:
        ScopedConnectionList();
        virtual ~ScopedConnectionList ();
-       
+
        void add_connection (const UnscopedConnection& c);
        void drop_connections ();
 
@@ -168,7 +168,7 @@ class LIBPBD_API ScopedConnectionList  : public boost::noncopyable
           (1) (unlikely) we make a connection involving a callback on the
               same object from 2 threads. (wouldn't that just be appalling
               programming style?)
-       
+
           (2) where we are dropping connections in one thread and adding
               one from another.
         */
@@ -179,8 +179,8 @@ class LIBPBD_API ScopedConnectionList  : public boost::noncopyable
        ConnectionList _list;
 };
 
-#include "pbd/signals_generated.h"     
-       
+#include "pbd/signals_generated.h"
+
 } /* namespace */
 
 #endif /* __pbd_signals_h__ */
index 754501eea7515aeb8aed2422d5d31b28adf9c573..17a719e9ae36d97cc2422aead32eaa43b1e7c385 100644 (file)
@@ -90,9 +90,9 @@ class /*LIBPBD_API*/ thing_with_backtrace
            for (x = all.begin(); x != all.end(); ++x) {
                    char **strings;
                    size_t i;
-               
+
                    strings = backtrace_symbols ((*x)->allocation_backtrace, (*x)->allocation_backtrace_size);
-               
+
                    if (strings) {
                            stream << "--- ALLOCATED SHARED_PTR @ " << (*x) << std::endl;
                            for (i = 0; i < (*x)->allocation_backtrace_size && i < 50U; i++) {
index 48f7f24d9a0bbb108da8c986686f304bac7b2618..0d0074210b3e9f46277eab4ad4a379837824fa37 100644 (file)
@@ -52,7 +52,7 @@ class LIBPBD_API Stateful {
 
        virtual bool apply_changes (PropertyBase const &);
        PropertyChange apply_changes (PropertyList const &);
-       
+
         const OwnedPropertyList& properties() const { return *_properties; }
 
        void add_property (PropertyBase& s);
@@ -101,7 +101,7 @@ class LIBPBD_API Stateful {
        void add_properties (XMLNode &);
 
        PropertyChange set_values (XMLNode const &);
-       
+
        /* derived classes can implement this to do cross-checking
           of property values after either a PropertyList or XML
           driven property change.
index 95ece8732a6ab3a1bd73f94901d5ee244c37c314..ce82b5ee74fad5c562e7b4b5f69bafe331b65bef 100644 (file)
@@ -29,7 +29,7 @@
 namespace PBD
 {
 
-class StatefulDestructible;    
+class StatefulDestructible;
 class PropertyList;
 
 /** A Command which stores its action as the differences between the before and after
index 3e9040bfadbd902e1ccfbc99fc18adc7c49a53da..492e9285f923b39e76b7fc68fedfe254b8ece429 100644 (file)
@@ -29,7 +29,7 @@
 template<class T> /*LIBPBD_API*/ void vector_delete (std::vector<T *> *vec)
 {
        typename std::vector<T *>::iterator i;
-       
+
        for (i = vec->begin(); i != vec->end(); i++) {
                delete *i;
        }
@@ -79,7 +79,7 @@ template<class T> /*LIBPBD_API*/ void slist_delete (std::slist<T *> *l)
 template<class T> void /*LIBPBD_API*/ set_delete (std::set<T *> *sset)
 {
        typename std::set<T *>::iterator i;
-       
+
        for (i = sset->begin(); i != sset->end(); i++) {
                delete *i;
        }
index 797260882a22002c2bf87ad7fed737513bed8f8c..00c58966631246961b210b8f7f76a25f3278a9cc 100644 (file)
@@ -46,7 +46,7 @@ class /*LIBPBD_API*/ DynamicTouchable : public Touchable
        void touch () {
                (object.*method)();
        }
-       
+
   protected:
        T& object;
        void (T::*method)(void);
@@ -62,7 +62,7 @@ class /*LIBPBD_API*/ DynamicTouchable1 : public Touchable
        void touch () {
                (object.*method)(arg);
        }
-       
+
   protected:
        T1& object;
        void (T1::*method)(T2);
@@ -79,12 +79,12 @@ class /*LIBPBD_API*/ DynamicTouchable2 : public Touchable
        void touch () {
                (object.*method)(arg1, arg2);
        }
-       
+
   protected:
        T1& object;
        void (T1::*method)(T2,T3);
        T2 arg1;
        T3 arg2;
 };
-       
+
 #endif // __pbd_touchable_h__
index cf1e587dfd8462ff058dec63b939e7879a59b18b..a765f9e370721b586446a5533ab4496b348ad215 100644 (file)
@@ -94,7 +94,7 @@ endmsg (std::ostream &ostr)
                /* hmm. not a Transmitter, so just put a newline on
                   it and assume that that will be enough.
                */
-               
+
                ostr << std::endl;
        }
 
index f248b8b6574fe22353386fbba665106f94419ed0..01e1972e998aa6f3ba6c51f755b8d99feaee1223 100644 (file)
@@ -71,7 +71,7 @@ class LIBPBD_API UndoTransaction : public Command
        bool                  _clearing;
 
        friend void command_death (UndoTransaction*, Command *);
-       
+
        void about_to_explicitly_delete ();
 };
 
@@ -80,14 +80,14 @@ class LIBPBD_API UndoHistory : public PBD::ScopedConnectionList
   public:
        UndoHistory();
        ~UndoHistory() {}
-       
+
        void add (UndoTransaction* ut);
        void undo (unsigned int n);
        void redo (unsigned int n);
-       
+
        unsigned long undo_depth() const { return UndoList.size(); }
        unsigned long redo_depth() const { return RedoList.size(); }
-       
+
        std::string next_undo() const { return (UndoList.empty() ? std::string() : UndoList.back()->name()); }
        std::string next_redo() const { return (RedoList.empty() ? std::string() : RedoList.back()->name()); }
 
@@ -111,7 +111,7 @@ class LIBPBD_API UndoHistory : public PBD::ScopedConnectionList
        PBD::Signal0<void> Changed;
        PBD::Signal0<void> BeginUndoRedo;
        PBD::Signal0<void> EndUndoRedo;
-       
+
   private:
        bool _clearing;
        uint32_t _depth;
index 1e84d21b298cbdc13f0727094821856517e9888e..d4c43d05bd4e67959bd6118fd4a24215bd4acaa1 100644 (file)
@@ -29,7 +29,7 @@ class /*LIBPBD_API*/ Unwinder {
   public:
     Unwinder (T& var, T new_val) : _var (var), _old_val (var) { var = new_val; }
     ~Unwinder () { _var = _old_val; }
-               
+
   private:
     T& _var;
     T  _old_val;
index 396280921caacde702665831f9228b5c971dd01f..8e0e0158704bd1656d10ce750ad851b27db90ecc 100644 (file)
@@ -85,7 +85,7 @@ public:
 
 private:
        bool read_internal(bool validate);
-       
+
        std::string _filename;
        XMLNode*    _root;
        xmlDocPtr   _doc;
@@ -121,7 +121,7 @@ public:
        XMLProperty*       property(const std::string&);
         const XMLProperty* property(const char* n)   const { return const_cast<XMLNode*>(this)->property(n); }
         const XMLProperty* property(const std::string& n) const { return const_cast<XMLNode*>(this)->property(n); }
-       
+
        XMLProperty* add_property(const char* name, const std::string& value);
        XMLProperty* add_property(const char* name, const char* value = "");
        XMLProperty* add_property(const char* name, const long value);
index ef14cd0a750b487855096a12145237ff8e4dc097..249a31ddb3c36f234c79d8cb922d1a373a695146 100644 (file)
@@ -91,7 +91,7 @@ Pool::alloc ()
 }
 
 /** Release an item's memory by writing its location to the free list */
-void           
+void
 Pool::release (void *ptr)
 {
        free_list.write (&ptr, 1);
@@ -228,7 +228,7 @@ void
 PerThreadPool::add_to_trash (CrossThreadPool* p)
 {
        Glib::Threads::Mutex::Lock lm (_trash_mutex);
-       
+
        if (!_trash) {
                warning << "Pool " << p->name() << " has no trash collector; a memory leak has therefore occurred" << endmsg;
                return;
@@ -237,7 +237,7 @@ PerThreadPool::add_to_trash (CrossThreadPool* p)
        /* we have a lock here so that multiple threads can safely call add_to_trash (even though there
           can only be one writer to the _trash RingBuffer)
        */
-               
+
        _trash->write (&p, 1);
 }
 
@@ -246,7 +246,7 @@ CrossThreadPool::CrossThreadPool  (string n, unsigned long isize, unsigned long
        , pending (nitems)
        , _parent (p)
 {
-       
+
 }
 
 void
@@ -261,10 +261,10 @@ CrossThreadPool::flush_pending ()
 {
        void* ptr;
        bool did_release = false;
-       
+
        DEBUG_TRACE (DEBUG::Pool, string_compose ("%1 %2 has %3 pending free entries waiting, status size %4 free %5 used %6\n", pthread_name(), name(), pending.read_space(),
                                                  total(), available(), used()));
-       
+
        while (pending.read (&ptr, 1) == 1) {
                DEBUG_TRACE (DEBUG::Pool, string_compose ("%1 %2 pushes back a pending free list entry before allocating\n", pthread_name(), name()));
                free_list.write (&ptr, 1);
index c2cf4a0b868eed31b5b0bbc84687e8e816f62ced..ae8674c97b7a1df001a3af9f6c98db0de867cb53 100644 (file)
@@ -27,7 +27,7 @@ using namespace PBD;
 PropertyList::PropertyList()
         : _property_owner (true)
 {
-       
+
 }
 
 PropertyList::PropertyList (PropertyList const & other)
index 190a229fb8ef41563719f2e65d4047fe80c63a8d..1abe6a95fbea6a471c28ad3c2a24ca4fe074147e 100644 (file)
@@ -137,7 +137,7 @@ void
 pthread_set_name (const char *str)
 {
        /* copy string and delete it when exiting */
-       
+
        thread_name.set (strdup (str));
 }
 
@@ -154,7 +154,7 @@ pthread_name ()
 
 void
 pthread_kill_all (int signum)
-{      
+{
        pthread_mutex_lock (&thread_map_lock);
        for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
                if (!pthread_equal ((*i), pthread_self())) {
@@ -167,7 +167,7 @@ pthread_kill_all (int signum)
 
 void
 pthread_cancel_all ()
-{      
+{
        pthread_mutex_lock (&thread_map_lock);
 
        for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ) {
@@ -187,7 +187,7 @@ pthread_cancel_all ()
 
 void
 pthread_cancel_one (pthread_t thread)
-{      
+{
        pthread_mutex_lock (&thread_map_lock);
        for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
                if (pthread_equal ((*i), thread)) {
index 337be399e34108abc22ea7549a13276beb688a6b..d1dc8c39f0c5a8782913695db7d57e498ff8a154 100644 (file)
@@ -159,7 +159,7 @@ Searchpath::add_subdirectory_to_paths (const string& subdir)
                // the search path rather than replace?
                *i = Glib::build_filename (*i, subdir);
        }
-       
+
        return *this;
 }
 
index cf7b54d30e2babd036853a29ebc87d2e284e48f1..5d3ef3d958ce2fb3230dead833f00e35284e7de5 100644 (file)
@@ -34,7 +34,7 @@ ProcessSemaphore::ProcessSemaphore (const char* name, int val)
        }
 
        /* this semaphore does not exist for IPC */
-       
+
        if (sem_unlink (name)) {
                throw failed_constructor ();
        }
index d2d5addc94d296e70b7384f48fdf52b0ded4304a..3d33611b87caccb090ff88c29a34a0b38cefd80a 100644 (file)
@@ -57,7 +57,7 @@ short_path (const Glib::ustring& path, ustring::size_type target_characters)
                        return path;
                }
        }
-       
+
        uint32_t so_far = (len - last_sep);
        uint32_t space_for = target_characters - so_far;
 
@@ -71,6 +71,6 @@ short_path (const Glib::ustring& path, ustring::size_type target_characters)
                res += path.substr (last_sep - space_for, len - last_sep + space_for - 3);
                res += "...";
                return res;
-               
+
        }
 }
index db27fd54df088f74b6b85ae4ad3bb4119cfc1e2d..176c5b8840cd4f3521a55bb3437b581c541afacf 100644 (file)
@@ -51,13 +51,13 @@ symbol_demangle (const std::string& l)
        int status;
 
        try {
-               
+
                char* realname = abi::__cxa_demangle (l.c_str(), 0, 0, &status);
                std::string d (realname);
                free (realname);
                return d;
        } catch (std::exception) {
-               
+
        }
 
        return l;
@@ -80,7 +80,7 @@ PBD::demangle (std::string const & l)
        if ((p - b) <= 1) {
                return symbol_demangle (l);
        }
-       
+
        std::string const fn = l.substr (b + 1, p - b - 1);
 
        return symbol_demangle (fn);
@@ -100,11 +100,11 @@ PBD::stacktrace (std::ostream& out, int levels)
                strings = backtrace_symbols (array, size);
 
                if (strings) {
-                       
+
                        for (i = 0; i < size && (levels == 0 || i < size_t(levels)); i++) {
                                out << "  " << demangle (strings[i]) << std::endl;
                        }
-                       
+
                        free (strings);
                }
        } else {
index 476fdcc28fdc7a83f344bbad847b0408114ee4a1..845d6ba42e9a4d4383109f28a7de2b389c8f0461 100644 (file)
@@ -98,7 +98,7 @@ Stateful::save_extra_xml (const XMLNode& node)
           to by _extra_xml if a new Extra node is found, but not
           otherwise.
        */
-       
+
        const XMLNode* xtra = node.child ("Extra");
 
        if (xtra) {
@@ -125,7 +125,7 @@ Stateful::add_instant_xml (XMLNode& node, const std::string& directory_path)
        _instant_xml->add_child_copy (node);
 
        std::string instant_xml_path = Glib::build_filename (directory_path, "instant.xml");
-       
+
        XMLTree tree;
        tree.set_filename(instant_xml_path);
 
@@ -192,7 +192,7 @@ PropertyList *
 Stateful::get_changes_as_properties (Command* cmd) const
 {
        PropertyList* pl = new PropertyList;
-       
+
        for (OwnedPropertyList::const_iterator i = _properties->begin(); i != _properties->end(); ++i) {
                i->second->get_changes_as_properties (*pl, cmd);
        }
@@ -209,7 +209,7 @@ PropertyChange
 Stateful::set_values (XMLNode const & node)
 {
        PropertyChange c;
-       
+
        for (OwnedPropertyList::iterator i = _properties->begin(); i != _properties->end(); ++i) {
                if (i->second->set_value (node)) {
                        c.add (i->first);
@@ -232,7 +232,7 @@ Stateful::apply_changes (const PropertyList& property_list)
        for (PropertyList::const_iterator pp = property_list.begin(); pp != property_list.end(); ++pp) {
                DEBUG_TRACE (DEBUG::Stateful, string_compose ("in plist: %1\n", pp->second->property_name()));
        }
-       
+
        for (PropertyList::const_iterator i = property_list.begin(); i != property_list.end(); ++i) {
                if ((p = _properties->find (i->first)) != _properties->end()) {
 
@@ -240,7 +240,7 @@ Stateful::apply_changes (const PropertyList& property_list)
                                DEBUG::Stateful,
                                string_compose ("actually setting property %1 using %2\n", p->second->property_name(), i->second->property_name())
                                );
-                       
+
                        if (apply_changes (*i->second)) {
                                c.add (i->first);
                        }
@@ -249,7 +249,7 @@ Stateful::apply_changes (const PropertyList& property_list)
                                                                      i->second->property_name()));
                }
        }
-       
+
        post_set (c);
 
        send_change (c);
index c99b55f0a4901549f2aa7127613f0bef9cf47e10..85f0c5c310552d9d7ef30e0e81403c31dd5dcd48 100644 (file)
@@ -24,7 +24,7 @@ using namespace Glib;
 
 void
 split (string str, vector<string>& result, char splitchar)
-{      
+{
        string::size_type pos;
        string remaining;
        string::size_type len = str.length();
@@ -64,7 +64,7 @@ split (string str, vector<string>& result, char splitchar)
 
 void
 split (ustring str, vector<ustring>& result, char splitchar)
-{      
+{
        ustring::size_type pos;
        ustring remaining;
        ustring::size_type len = str.length();
index f2007a71da1df6e3c57718de6d8db2e5a73b8d21..d92987bf218ef4ce9e1e5e4694dbcea6e5d0bf1b 100644 (file)
@@ -648,7 +648,7 @@ SystemExec::terminate ()
        /* if pid is non-zero, the child task is still executing (i.e. it did
         * not exit in response to stdin being closed). try to kill it.
         */
-       
+
        if (pid) {
                ::kill(pid, SIGTERM);
                ::usleep(250000);
index 3586fc3a957bb7a30244c96aa9e2bb1b33ebfe30..be8ef206555abaeeef4a725851a6e260af4380a2 100644 (file)
@@ -31,7 +31,7 @@ ScalarPropertiesTest::testBasic ()
 
        _fred.clear_changes ();
        CPPUNIT_ASSERT (_fred.changed() == false);
-       
+
        _fred = 5;
        CPPUNIT_ASSERT (_fred == 5);
        CPPUNIT_ASSERT (_fred.changed() == true);
index 6175aeacfe0720d7b12412083be5740e63ea42b0..d3134776599234495e0ae0ceb79a7f2991d874c6 100644 (file)
@@ -13,7 +13,7 @@ public:
        void testBasic ();
 
        static void make_property_quarks ();
-       
+
 private:
        PBD::Property<int> _fred;
 };
index fd845c8be1c0acab1ef6698d48fdbde006959da5..ab70388760c7924f8a07eb50f79a215f6b18240c 100644 (file)
@@ -20,7 +20,7 @@ public:
        void emit () {
                Fred ();
        }
-       
+
        PBD::Signal0<void> Fred;
 };
 
@@ -86,6 +86,6 @@ SignalsTest::testScopedConnectionList ()
        e->emit ();
        delete r;
        e->emit ();
-       
+
        CPPUNIT_ASSERT_EQUAL (1, N);
 }
index 11f60f46a2ddc7b2962be3df5281157cf7936990..92757eb45d8fb0bce66d25f1f26bbea29495d2f7 100644 (file)
@@ -24,19 +24,19 @@ main ()
        text_receiver.listen_to (PBD::warning);
 
        ScalarPropertiesTest::make_property_quarks ();
-       
+
        CppUnit::TestResult testresult;
 
        CppUnit::TestResultCollector collectedresults;
        testresult.addListener (&collectedresults);
-       
+
        CppUnit::BriefTestProgressListener progress;
        testresult.addListener (&progress);
-       
+
        CppUnit::TestRunner testrunner;
        testrunner.addTest (CppUnit::TestFactoryRegistry::getRegistry ().makeTest ());
        testrunner.run (testresult);
-       
+
        CppUnit::CompilerOutputter compileroutputter (&collectedresults, std::cerr);
        compileroutputter.write ();
 
index 70240d3d69e3648b5aa5040206efe3af788f956a..2283c946e4c519ba2892f58059a9c23d5765c1de 100644 (file)
@@ -23,7 +23,7 @@ XPathTest::testMisc ()
        XMLTree  doc(testdata_path);
        // "//bank" gives as last element an empty element libxml bug????
        boost::shared_ptr<XMLSharedNodeList> result = doc.find("//bank[@name]");
-       
+
 //     cout << "Found " << result->size() << " banks" << endl;
        assert(result->size() == 8);
 //     int counter = 1;
@@ -36,19 +36,19 @@ XPathTest::testMisc ()
 //                             " with name: " << (*j)->property("name")->value() << endl;
                }
        }
-       
+
 //     cout << endl << endl << "Test 2: RosegardenPatchFile.xml: Find all programs whose program name contains 'Latin'" << endl;
-       
+
        result = doc.find("/rosegarden-data/studio/device/bank/program[contains(@name, 'Latin')]");
        assert(result->size() == 5);
-       
+
        for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
 //             cout << "\t found program " << (*i)->property("id")->value() <<
 //                     " with name: " << (*i)->property("name")->value() << endl;
        }
 
 //     cout << endl << endl << "Test 3: TestSession.ardour: find all Sources where captured-for contains the string 'Guitar'" << endl;
-       
+
        // We have to allocate a new document here, or we get segfaults
        std::string testsession_path;
        CPPUNIT_ASSERT (find_file (test_search_path (), "TestSession.ardour", testsession_path));
@@ -56,16 +56,16 @@ XPathTest::testMisc ()
        XMLTree doc2(testsession_path);
        result = doc2.find("/Session/Sources/Source[contains(@captured-for, 'Guitar')]");
        assert(result->size() == 16);
-       
+
        for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
 //             cout << "\t found source '" << (*i)->property("name")->value() <<
 //                     "' with id: " << (*i)->property("id")->value() << endl;
        }
-       
+
 //     cout << endl << endl << "Test 4: TestSession.ardour: Find all elements with an 'id' and 'name' attribute" << endl;
-       
+
        result = doc2.find("//*[@id and @name]");
-       
+
        for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
                assert((*i)->property("id"));
                assert((*i)->property("name"));
@@ -73,9 +73,9 @@ XPathTest::testMisc ()
 //                     "' with id: "  << (*i)->property("id")->value() <<
 //                             "' and name: " << (*i)->property("name")->value() << endl;
        }
-       
+
 //     cout << endl << endl << "Test 5: ProtoolsPatchFile.midnam: Get Banks and Patches for 'Name Set 1'" << endl;
-       
+
        std::string testmidnam_path;
        CPPUNIT_ASSERT (find_file (test_search_path (), "ProtoolsPatchFile.midnam", testmidnam_path));
 
@@ -83,7 +83,7 @@ XPathTest::testMisc ()
        XMLTree doc3(testmidnam_path);
        result = doc3.find("/MIDINameDocument/MasterDeviceNames/ChannelNameSet[@Name='Name Set 1']/PatchBank");
        assert(result->size() == 16);
-       
+
        for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
 //             cout << "\t found Patchbank " << (*i)->property("Name")->value() << endl;
                boost::shared_ptr<XMLSharedNodeList> patches = doc3.find ("//Patch[@Name]", i->get());
@@ -95,22 +95,22 @@ XPathTest::testMisc ()
 
 //     cout << endl << endl << "Test 5: ProtoolsPatchFile.midnam: Find attribute nodes" << endl;
        result = doc3.find("//@Value");
-       
+
        for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
                boost::shared_ptr<XMLNode> node = (*i);
 //             cout << "\t found attribute node: " << node->name()
 //                  << " value: " << node->attribute_value() << endl;
-       }       
-       
+       }
+
 //     cout << endl << endl << "Test 6: ProtoolsPatchFile.midnam: Find available channels on 'Name Set 1'" << endl;
        result = doc3.find(
                "//ChannelNameSet[@Name = 'Name Set 1']//AvailableChannel[@Available = 'true']/@Channel");
-       
+
        assert(result->size() == 15);
        for(XMLSharedNodeList::const_iterator i = result->begin(); i != result->end(); ++i) {
                boost::shared_ptr<XMLNode> node = (*i);
 //             cout << "\t found available Channel: " << node->name()
 //                  << " value: " << node->attribute_value() << endl;
-       }       
-       
+       }
+
 }
index 6326a3393428a14be402b8339993db932b408ec6..3d9ce0f4a27f786ab9d03e0ae6a997d40300ab21 100644 (file)
@@ -58,7 +58,7 @@ TextReceiver::receive (Transmitter::Channel chn, const char *str)
        /* note: iostreams are already thread-safe: no external
           lock required.
        */
-       
+
        cout << name << prefix << str << endl;
 
        if (chn == Transmitter::Fatal) {
index 7df370e8034f520c0baf7e280a52454666d3c0af..fccb667b4888415413ef5d8f744a557a6ce1faf1 100644 (file)
@@ -52,7 +52,7 @@ Transmitter::Transmitter (Channel c)
                send = 0;
                break;
        }
-}              
+}
 
 void
 Transmitter::deliver ()
@@ -82,12 +82,12 @@ Transmitter::deliver ()
        seekg (0, ios::beg);
 
        /* do the right thing if this should not return */
-       
+
        if (does_not_return()) {
 #ifndef PLATFORM_WINDOWS
 // TODO !!!! Commented out temporarily (for Windows)
                sigset_t mask;
-               
+
                sigemptyset (&mask);
                sigsuspend (&mask);
                /*NOTREACHED*/
index ee5c56f3a53e321fa9f15d0807ffbf8c9f2a3f83..a11edbda47d674658016dfc3b445f9c413377b81 100644 (file)
@@ -282,7 +282,7 @@ UndoHistory::redo (unsigned int n)
 
        {
                UndoRedoSignaller exception_safe_signaller (*this);
-               
+
                while (n--) {
                        if (RedoList.size() == 0) {
                                return;
index fa4a94b9951c3a0ce82e87e2a2baf4bae168fc84..57c133db26d49672b40b3497d68a6362e8478bb7 100644 (file)
 using namespace std;
 
 namespace PBD {
-       
+
 void
 strip_whitespace_edges (string& str)
 {
     string::size_type i;
     string::size_type len;
     string::size_type s = 0;
-                       
+
     len = str.length();
 
     if (len == 1) {
@@ -37,7 +37,7 @@ strip_whitespace_edges (string& str)
     }
 
     /* strip front */
-                               
+
     for (i = 0; i < len; ++i) {
         if (!isspace (str[i])) {
             break;
@@ -60,7 +60,7 @@ strip_whitespace_edges (string& str)
            if (s == i) {
                    return;
            }
-       
+
            do {
                    if (!isspace (str[i]) || i == 0) {
                            break;
@@ -69,7 +69,7 @@ strip_whitespace_edges (string& str)
                    --i;
 
            } while (true);
-       
+
            str = str.substr (s, (i - s) + 1);
 
     } else {
index d5138050dfdc66d4087a58a494c004f8f86bd871..75ec322353ba6287df2f76155f04f5b99996a003 100644 (file)
@@ -30,7 +30,7 @@ PBD::get_win_special_folder_path (int csidl)
        HRESULT hr;
        LPITEMIDLIST pidl = 0;
        char *utf8_folder_path = 0;
-       
+
        if (S_OK == (hr = SHGetSpecialFolderLocation (0, csidl, &pidl))) {
 
                if (SHGetPathFromIDListW (pidl, path)) {
index 5667e933a5f3c9a759ba7b86d687bc4f348a4925..4e566a78001a2eb13e627e456879749754a9b4c9 100644 (file)
@@ -42,7 +42,7 @@ XMLTree::XMLTree(const XMLTree* from)
        , _doc (xmlCopyDoc (from->_doc, 1))
        , _compression(from->compression())
 {
-       
+
 }
 
 XMLTree::~XMLTree()
@@ -96,7 +96,7 @@ XMLTree::read_internal(bool validate)
        } else {
                _doc = xmlParseFile(_filename.c_str());
        }
-       
+
        /* check if parsing suceeded */
        if (_doc == NULL) {
                if (validate) {
@@ -117,7 +117,7 @@ XMLTree::read_internal(bool validate)
        if (validate) {
                xmlFreeParserCtxt(ctxt);
        }
-       
+
        return true;
 }
 
@@ -271,17 +271,17 @@ XMLNode::operator= (const XMLNode& from)
                XMLPropertyIterator curprop;
                XMLNodeList nodes;
                XMLNodeIterator curnode;
-               
+
                clear_lists ();
 
                _name = from.name();
                set_content(from.content());
-               
+
                props = from.properties();
                for (curprop = props.begin(); curprop != props.end(); ++curprop) {
                        add_property((*curprop)->name().c_str(), (*curprop)->value());
                }
-               
+
                nodes = from.children();
                for (curnode = nodes.begin(); curnode != nodes.end(); ++curnode) {
                        add_child_copy(**curnode);
@@ -380,10 +380,10 @@ XMLTree::find(const string xpath, XMLNode* node) const
        } else {
                ctxt = xmlXPathNewContext(_doc);
        }
-       
+
        boost::shared_ptr<XMLSharedNodeList> result =
                boost::shared_ptr<XMLSharedNodeList>(find_impl(ctxt, xpath));
-       
+
        xmlXPathFreeContext(ctxt);
        if (doc) {
                xmlFreeDoc (doc);
@@ -439,7 +439,7 @@ XMLNode::add_property(const char* n, const string& v)
 {
        string ns(n);
         map<string,XMLProperty*>::iterator iter;
-       
+
         if ((iter = _propmap.find(ns)) != _propmap.end()) {
                 iter->second->set_value (v);
                 return iter->second;
@@ -676,11 +676,11 @@ XMLNode::dump (ostream& s, string p) const
                        s << " " << (*i)->name() << "=\"" << (*i)->value() << "\"";
                }
                s << ">\n";
-               
+
                for (XMLNodeList::const_iterator i = _children.begin(); i != _children.end(); ++i) {
                        (*i)->dump (s, p + "  ");
                }
-               
+
                s << p << "</" << _name << ">\n";
        }
 }
index ac750ecc9948e95f2e8131adcc32156e4dbb643c..f233f51dfa0b864f224837523e76141adb8b22e5 100644 (file)
@@ -667,7 +667,7 @@ PTFFormat::parseaudio5(void) {
                        break;
                }
        }
-       
+
        wavnumber = 0;
        i+=16;
        while (i < len && numberofwavs > 0) {
index 686d023c6b8324fc4e6bdd26d702d883d2ab0971..02ca426d66dd253c1a2871e356b727d46bd5ad75 100644 (file)
@@ -72,53 +72,53 @@ void Window<T>::encache()
     for (i = 0; i < n; ++i) mult[i] = 1.0;
 
     switch (m_type) {
-               
+
     case RectangularWindow:
        for (i = 0; i < n; ++i) {
            mult[i] = mult[i] * 0.5;
        }
        break;
-       
+
     case BartlettWindow:
        for (i = 0; i < n/2; ++i) {
            mult[i] = mult[i] * (i / T(n/2));
            mult[i + n/2] = mult[i + n/2] * (1.0 - (i / T(n/2)));
        }
        break;
-       
+
     case HammingWindow:
        for (i = 0; i < n; ++i) {
            mult[i] = mult[i] * (0.54 - 0.46 * cos(2 * M_PI * i / n));
        }
        break;
-       
+
     case HanningWindow:
        for (i = 0; i < n; ++i) {
            mult[i] = mult[i] * (0.50 - 0.50 * cos(2 * M_PI * i / n));
        }
        break;
-       
+
     case BlackmanWindow:
        for (i = 0; i < n; ++i) {
            mult[i] = mult[i] * (0.42 - 0.50 * cos(2 * M_PI * i / n)
                                 + 0.08 * cos(4 * M_PI * i / n));
        }
        break;
-       
+
     case GaussianWindow:
        for (i = 0; i < n; ++i) {
            mult[i] = mult[i] * exp((-1.0 / (n*n)) * ((T(2*i) - n) *
                                                      (T(2*i) - n)));
        }
        break;
-       
+
     case ParzenWindow:
        for (i = 0; i < n; ++i) {
            mult[i] = mult[i] * (1.0 - fabs((T(2*i) - n) / T(n + 1)));
        }
        break;
     }
-       
+
     m_cache = mult;
 }
 
index 83a6661d1732f5787df0ed33594c1c15705330b4..5901082352c1e6dd7d9c486f49e378ec953d4592 100644 (file)
@@ -27,14 +27,14 @@ Chromagram::Chromagram( ChromaConfig Config ) :
 }
 
 int Chromagram::initialise( ChromaConfig Config )
-{      
+{
     m_FMin = Config.min;               // min freq
     m_FMax = Config.max;               // max freq
     m_BPO  = Config.BPO;               // bins per octave
     m_normalise = Config.normalise;     // if frame normalisation is required
 
     // No. of constant Q bins
-    m_uK = ( unsigned int ) ceil( m_BPO * log(m_FMax/m_FMin)/log(2.0));        
+    m_uK = ( unsigned int ) ceil( m_BPO * log(m_FMax/m_FMin)/log(2.0));
 
     // Create array for chroma result
     m_chromadata = new double[ m_BPO ];
@@ -49,7 +49,7 @@ int Chromagram::initialise( ChromaConfig Config )
     ConstantQConfig.max = m_FMax;
     ConstantQConfig.BPO = m_BPO;
     ConstantQConfig.CQThresh = Config.CQThresh;
-       
+
     // Initialise ConstantQ operator
     m_ConstantQ = new ConstantQ( ConstantQConfig );
 
@@ -57,7 +57,7 @@ int Chromagram::initialise( ChromaConfig Config )
     m_frameSize = m_ConstantQ->getfftlength();
     m_hopSize = m_ConstantQ->gethop();
 
-    // Initialise FFT object   
+    // Initialise FFT object
     m_FFT = new FFTReal(m_frameSize);
 
     m_FFTRe = new double[ m_frameSize ];
@@ -161,7 +161,7 @@ double* Chromagram::process( const double *real, const double *imag )
 
     // Calculate ConstantQ frame
     m_ConstantQ->process( real, imag, m_CQRe, m_CQIm );
-       
+
     // add each octave of cq data into Chromagram
     const unsigned octaves = (int)floor(double( m_uK/m_BPO))-1;
     for (unsigned octave = 0; octave <= octaves; octave++)
index 37af153be314d82324be185cbaabe905647ab130..f04ffda83a612a34123e308866c40fca70d4e4d1 100644 (file)
@@ -32,17 +32,17 @@ struct ChromaConfig{
 class Chromagram
 {
 
-public:        
+public:
     Chromagram( ChromaConfig Config );
     ~Chromagram();
-       
+
     double* process( const double *data ); // time domain
     double* process( const double *real, const double *imag ); // frequency domain
     void unityNormalise( double* src );
 
     // Complex arithmetic
     double kabs( double real, double imag );
-       
+
     // Results
     unsigned int getK() { return m_uK;}
     unsigned int getFrameSize() { return m_frameSize; }
@@ -54,7 +54,7 @@ private:
 
     Window<double> *m_window;
     double *m_windowbuf;
-       
+
     double* m_chromadata;
     double m_FMin;
     double m_FMax;
index 222fd80a36aab825208e0346beadae5e01e25b05..fa6c32c26b9b119ee7bb882f8aa8543b4f21d4d7 100644 (file)
@@ -109,14 +109,14 @@ void ConstantQ::sparsekernel()
     sk->js.reserve( m_FFTLength*2 );
     sk->real.reserve( m_FFTLength*2 );
     sk->imag.reserve( m_FFTLength*2 );
-       
+
     // for each bin value K, calculate temporal kernel, take its fft to
     //calculate the spectral kernel then threshold it to make it sparse and
     //add it to the sparse kernels matrix
     double squareThreshold = m_CQThresh * m_CQThresh;
 
     FFT m_FFT(m_FFTLength);
-       
+
     for (unsigned k = m_uK; k--; )
     {
         for (unsigned u=0; u < m_FFTLength; u++)
@@ -152,13 +152,13 @@ void ConstantQ::sparsekernel()
        //do fft of hammingWindow
        m_FFT.process( 0, hammingWindowRe, hammingWindowIm, transfHammingWindowRe, transfHammingWindowIm );
 
-               
+
        for (unsigned j=0; j<( m_FFTLength ); j++)
        {
            // perform thresholding
            const double squaredBin = squaredModule( transfHammingWindowRe[ j ], transfHammingWindowIm[ j ]);
            if (squaredBin <= squareThreshold) continue;
-               
+
            // Insert non-zero position indexes, doubled because they are floats
            sk->is.push_back(j);
            sk->js.push_back(k);
@@ -266,7 +266,7 @@ double* ConstantQ::process( const double* fftdata )
     const double   *real   = &(sk->real[0]);
     const double   *imag   = &(sk->imag[0]);
     const unsigned int sparseCells = sk->real.size();
-       
+
     for (unsigned i = 0; i<sparseCells; i++)
     {
        const unsigned row = cqbin[i];
@@ -335,7 +335,7 @@ void ConstantQ::process(const double *FFTRe, const double* FFTIm,
     const double   *real   = &(sk->real[0]);
     const double   *imag   = &(sk->imag[0]);
     const unsigned int sparseCells = sk->real.size();
-       
+
     for (unsigned i = 0; i<sparseCells; i++)
     {
        const unsigned row = cqbin[i];
index c06f60a9d010f07a498b9e1654b957a631e53e27..597e3d0087a8626c297f822d33220a192adc468b 100644 (file)
@@ -29,7 +29,7 @@ struct CQConfig{
 };
 
 class ConstantQ {
-       
+
 //public functions incl. sparsekernel so can keep out of loop in main
 public:
     void process( const double* FFTRe, const double* FFTIm,
@@ -46,7 +46,7 @@ public:
        double out = 0.54 - 0.46*cos(2*PI*n/len);
        return(out);
     }
-       
+
     int getnumwin() { return m_numWin;}
     double getQ() { return m_dQ;}
     int getK() {return m_uK ;}
@@ -56,7 +56,7 @@ public:
 private:
     void initialise( CQConfig Config );
     void deInitialise();
-       
+
     double* m_CQdata;
     unsigned int m_FS;
     double m_FMin;
index ae22cfb11d55606b102818c3010208508b7db6ab..af65af8cd28f1f7f23d21da03b5793405b35817b 100644 (file)
@@ -53,7 +53,7 @@ void DetectionFunction::initialise( DFConfig Config )
 
     m_magHistory = new double[ m_halfLength ];
     memset(m_magHistory,0, m_halfLength*sizeof(double));
-               
+
     m_phaseHistory = new double[ m_halfLength ];
     memset(m_phaseHistory,0, m_halfLength*sizeof(double));
 
@@ -152,15 +152,15 @@ double DetectionFunction::runDF()
     case DF_HFC:
        retVal = HFC( m_halfLength, m_magnitude);
        break;
-       
+
     case DF_SPECDIFF:
        retVal = specDiff( m_halfLength, m_magnitude);
        break;
-       
+
     case DF_PHASEDEV:
        retVal = phaseDev( m_halfLength, m_thetaAngle);
        break;
-       
+
     case DF_COMPLEXSD:
        retVal = complexSD( m_halfLength, m_magnitude, m_thetaAngle);
        break;
@@ -169,7 +169,7 @@ double DetectionFunction::runDF()
         retVal = broadband( m_halfLength, m_magnitude);
         break;
     }
-       
+
     return retVal;
 }
 
@@ -195,7 +195,7 @@ double DetectionFunction::specDiff(unsigned int length, double *src)
     for( i = 0; i < length; i++)
     {
        temp = fabs( (src[ i ] * src[ i ]) - (m_magHistory[ i ] * m_magHistory[ i ]) );
-               
+
        diff= sqrt(temp);
 
         // (See note in phaseDev below.)
@@ -230,15 +230,15 @@ double DetectionFunction::phaseDev(unsigned int length, double *srcPhase)
         // does significantly damage its ability to work with quieter
         // music, so I'm removing it and counting the result always.
         // Same goes for the spectral difference measure above.
-               
+
         tmpVal  = fabs(dev);
         val += tmpVal ;
 
        m_phaseHistoryOld[ i ] = m_phaseHistory[ i ] ;
        m_phaseHistory[ i ] = srcPhase[ i ];
     }
-       
-       
+
+
     return val;
 }
 
@@ -259,14 +259,14 @@ double DetectionFunction::complexSD(unsigned int length, double *srcMagnitude, d
     {
        tmpPhase = (srcPhase[ i ]- 2*m_phaseHistory[ i ]+m_phaseHistoryOld[ i ]);
        dev= MathUtilities::princarg( tmpPhase );
-               
+
        meas = m_magHistory[i] - ( srcMagnitude[ i ] * exp( j * dev) );
 
        tmpReal = real( meas );
        tmpImag = imag( meas );
 
        val += sqrt( (tmpReal * tmpReal) + (tmpImag * tmpImag) );
-               
+
        m_phaseHistoryOld[ i ] = m_phaseHistory[ i ] ;
        m_phaseHistory[ i ] = srcPhase[ i ];
        m_magHistory[ i ] = srcMagnitude[ i ];
index 083d0a2a063b89835a48b03dd9d3eadd97b88154..1102ec416d5dda90a131f8bfdda6817332626059 100644 (file)
@@ -55,7 +55,7 @@ private:
     double phaseDev(unsigned int length, double *srcPhase);
     double complexSD(unsigned int length, double *srcMagnitude, double *srcPhase);
     double broadband(unsigned int length, double *srcMagnitude);
-       
+
 private:
     void initialise( DFConfig Config );
     void deInitialise();
index 472897b241a219ae986d447270392ef316cb539b..ea50223e15290bd782244adea4009bae6ffbbaca 100644 (file)
@@ -41,7 +41,7 @@ void PeakPicking::initialise( PPickParams Config )
     Qfilta = Config.QuadThresh.a ;
     Qfiltb = Config.QuadThresh.b ;
     Qfiltc = Config.QuadThresh.c ;
-       
+
     m_DFProcessingParams.length = m_DFLength;
     m_DFProcessingParams.LPOrd = Config.LPOrd;
     m_DFProcessingParams.LPACoeffs = Config.LPACoeffs;
@@ -50,7 +50,7 @@ void PeakPicking::initialise( PPickParams Config )
     m_DFProcessingParams.winPost = Config.WinT.post;
     m_DFProcessingParams.AlphaNormParam = Config.alpha;
     m_DFProcessingParams.isMedianPositive = false;
-       
+
     m_DFSmoothing = new DFProcess( m_DFProcessingParams );
 
     m_workBuffer = new double[ m_DFLength ];
@@ -68,16 +68,16 @@ void PeakPicking::process( double* src, unsigned int len, vector<int> &onsets )
 {
     if (len < 4) return;
 
-    vector <double> m_maxima;  
+    vector <double> m_maxima;
 
     // Signal conditioning
     m_DFSmoothing->process( src, m_workBuffer );
-       
+
     for( unsigned int u = 0; u < len; u++)
     {
-       m_maxima.push_back( m_workBuffer[ u ] );                
+       m_maxima.push_back( m_workBuffer[ u ] );
     }
-       
+
     quadEval( m_maxima, onsets );
 
     for(unsigned int b = 0; b <  m_maxima.size(); b++)
@@ -92,7 +92,7 @@ int PeakPicking::quadEval( vector<double> &src, vector<int> &idx )
 
     vector <int> m_maxIndex;
     vector <int> m_onsetPosition;
-       
+
     vector <double> m_maxFit;
     vector <double> m_poly;
     vector <double> m_err;
@@ -123,7 +123,7 @@ int PeakPicking::quadEval( vector<double> &src, vector<int> &idx )
         for (int k = -2; k <= 2; ++k)
        {
            selMax = src[ m_maxIndex[j] + k ] ;
-           m_maxFit.push_back(selMax);                 
+           m_maxFit.push_back(selMax);
        }
 
        double f = m_poly[0];
@@ -133,7 +133,7 @@ int PeakPicking::quadEval( vector<double> &src, vector<int> &idx )
        {
            idx.push_back(m_maxIndex[j]);
        }
-               
+
        m_maxFit.clear();
     }
 
index be6853ca8f2306e0a196ce10ea7429525f7d076c..931c1c16e28a7e6ccdf19bdbc45ac86528e303e1 100644 (file)
@@ -56,7 +56,7 @@ class PeakPicking
 public:
     PeakPicking( PPickParams Config );
     virtual ~PeakPicking();
-       
+
     void process( double* src, unsigned int len, vector<int> &onsets  );
 
 
@@ -64,7 +64,7 @@ private:
     void initialise( PPickParams Config  );
     void deInitialise();
     int  quadEval( vector<double> &src, vector<int> &idx );
-       
+
     DFProcConfig m_DFProcessingParams;
 
     unsigned int m_DFLength ;
@@ -74,7 +74,7 @@ private:
 
 
     double* m_workBuffer;
-       
+
     DFProcess* m_DFSmoothing;
 };
 
index 26cfcfbabedda88ec80c4934e76a5520a94e2342..cd52f5240aa2d5ad3121a4a3ee5c9dd4774b6f49 100644 (file)
@@ -49,7 +49,7 @@ void PhaseVocoder::FFTShift(unsigned int size, double *src)
 void PhaseVocoder::process(double *src, double *mag, double *theta)
 {
     FFTShift( m_n, src);
-       
+
     m_fft->process(0, src, m_realOut, m_imagOut);
 
     getMagnitude( m_n/2, mag, m_realOut, m_imagOut);
@@ -57,7 +57,7 @@ void PhaseVocoder::process(double *src, double *mag, double *theta)
 }
 
 void PhaseVocoder::getMagnitude(unsigned int size, double *mag, double *real, double *imag)
-{      
+{
     unsigned int j;
 
     for( j = 0; j < size; j++)
@@ -75,5 +75,5 @@ void PhaseVocoder::getPhase(unsigned int size, double *theta, double *real, doub
     for( k = 0; k < size; k++)
     {
        theta[ k ] = atan2( -imag[ k ], real[ k ]);
-    }  
+    }
 }
index 1ed49fd3970b37f263650c46abf7ab1eba0be5e5..f8a113a0dbe790d12359f57aefb11e6ada22aa13 100644 (file)
@@ -55,7 +55,7 @@ private:
 
     double a[ 9 ];
     double b[ 9 ];
-       
+
     double* decBuffer;
 };
 
index 7643691cd3996bdfcbd7ce1b1782afa676165416..ce5f370436923028c61f0849fdd289072e4cbd57 100644 (file)
@@ -212,7 +212,7 @@ void ClusterMeltSegmenter::extractFeaturesConstQ(const double* samples, int nsam
         fft->process(false, frame, real, imag);
 
         constq->process(real, imag, cqre, cqim);
-       
+
         for (int i = 0; i < ncoeff; ++i) {
             cq[i] += sqrt(cqre[i] * cqre[i] + cqim[i] * cqim[i]);
         }
@@ -287,7 +287,7 @@ void ClusterMeltSegmenter::extractFeaturesMFCC(const double* samples, int nsampl
         }
 
         mfcc->process(frame, ccout);
-       
+
         for (int i = 0; i < ncoeff; ++i) {
             cc[i] += ccout[i];
         }
@@ -335,22 +335,22 @@ void ClusterMeltSegmenter::segment()
               << " features with " << features[0].size() << " coefficients (ncoeff = " << ncoeff << ", ncomponents = " << ncomponents << ")" << std::endl;
 */
     // copy the features to a native array and use the existing C segmenter...
-    double** arrFeatures = new double*[features.size()];       
+    double** arrFeatures = new double*[features.size()];
     for (int i = 0; i < features.size(); i++)
     {
         if (featureType == FEATURE_TYPE_UNKNOWN) {
             arrFeatures[i] = new double[features[0].size()];
             for (int j = 0; j < features[0].size(); j++)
-                arrFeatures[i][j] = features[i][j];    
+                arrFeatures[i][j] = features[i][j];
         } else {
             arrFeatures[i] = new double[ncoeff+1];     // allow space for the normalised envelope
             for (int j = 0; j < ncoeff; j++)
-                arrFeatures[i][j] = features[i][j];    
+                arrFeatures[i][j] = features[i][j];
         }
     }
-       
+
     q = new int[features.size()];
-       
+
     if (featureType == FEATURE_TYPE_UNKNOWN ||
         featureType == FEATURE_TYPE_MFCC)
         cluster_segment(q, arrFeatures, features.size(), features[0].size(), nHMMStates, histogramLength,
@@ -358,16 +358,16 @@ void ClusterMeltSegmenter::segment()
     else
         constq_segment(q, arrFeatures, features.size(), nbins, ncoeff, featureType,
                        nHMMStates, histogramLength, nclusters, neighbourhoodLimit);
-       
+
     // convert the cluster assignment sequence to a segmentation
-    makeSegmentation(q, features.size());              
-       
+    makeSegmentation(q, features.size());
+
     // de-allocate arrays
     delete [] q;
     for (int i = 0; i < features.size(); i++)
         delete [] arrFeatures[i];
     delete [] arrFeatures;
-       
+
     // clear the features
     clear();
 }
@@ -377,11 +377,11 @@ void ClusterMeltSegmenter::makeSegmentation(int* q, int len)
     segmentation.segments.clear();
     segmentation.nsegtypes = nclusters;
     segmentation.samplerate = samplerate;
-       
+
     Segment segment;
     segment.start = 0;
     segment.type = q[0];
-       
+
     for (int i = 1; i < len; i++)
     {
         if (q[i] != q[i-1])
index 528c09cb5563308995d3f5f35103695556d74a46..8f3130871e96eb26cd7bf9d0987b88bdc940a354 100644 (file)
@@ -72,7 +72,7 @@ public:
 
 protected:
     void makeSegmentation(int* q, int len);
-       
+
     void extractFeaturesConstQ(const double *, int);
     void extractFeaturesMFCC(const double *, int);
 
@@ -82,9 +82,9 @@ protected:
     MFCC* mfcc;
     model_t* model;                            // the HMM
     int* q;                                    // the decoded HMM state sequence
-    vector<vector<double> > histograms;        
+    vector<vector<double> > histograms;
 
-    feature_types featureType; 
+    feature_types featureType;
     double hopSize;            // in seconds
     double windowSize; // in seconds
 
index 120a6617f53b64d19fccb8817a81a069bfbde14a..b60fb58162c12cbebe13b99c4a2ebd28bd070923 100644 (file)
 ostream& operator<<(ostream& os, const Segmentation& s)
 {
        os << "structure_name : begin_time end_time\n";
-       
+
        for (int i = 0; i < s.segments.size(); i++)
        {
                Segment seg = s.segments[i];
                os << std::fixed << seg.type << ':' << '\t' << std::setprecision(6) << seg.start / static_cast<double>(s.samplerate)
                        << '\t' << std::setprecision(6) << seg.end / static_cast<double>(s.samplerate) << "\n";
        }
-       
+
        return os;
 }
index 9a77d703720441ad7624d1ae5c99ed624511cd11..fd2f39b85023a1ac490f94708b24282ee0044c13 100644 (file)
@@ -35,7 +35,7 @@ class Segmentation
 public:
        int nsegtypes;          // number of segment types, so possible types are {0,1,...,nsegtypes-1}
        int samplerate;
-       vector<Segment> segments;       
+       vector<Segment> segments;
 };
 
 ostream& operator<<(ostream& os, const Segmentation& s);
index 05094808073943650a10748aca3837eb6f966530..092bc7f0789319faf81a018ed3c2b5a6adefc46c 100644 (file)
@@ -25,7 +25,7 @@ double kldist(double* a, double* b, int n) {
        because a, b represent probability distributions */
        double q, d;
        int i;
-       
+
        d = 0;
        for (i = 0; i < n; i++)
        {
@@ -38,8 +38,8 @@ double kldist(double* a, double* b, int n) {
                                d += b[i] * log(b[i] / q);
                }
        }
-       return d;               
-}      
+       return d;
+}
 
 void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l, int *c) {
        double lambda, sum, beta, logsumexp, maxlp;
@@ -48,9 +48,9 @@ void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l,
        int** nc;       /* neighbour counts for each histogram */
        double** lp;    /* soft assignment probs for each histogram */
        int* oldc;      /* previous hard assignments (to check convergence) */
-       
+
        /* NB h is passed as a 1d row major array */
-       
+
        /* parameter values */
        lambda = DEFAULT_LAMBDA;
        if (l > 0)
@@ -60,22 +60,22 @@ void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l,
        B = 2 * limit + 1;
        maxiter0 = 20;  /* number of iterations at initial temperature */
        maxiter1 = 5;   /* number of iterations at subsequent temperatures */
-       
-       /* allocate memory */   
+
+       /* allocate memory */
        cl = (double**) malloc(k*sizeof(double*));
        for (i= 0; i < k; i++)
                cl[i] = (double*) malloc(m*sizeof(double));
-       
+
        nc = (int**) malloc(n*sizeof(int*));
        for (i= 0; i < n; i++)
                nc[i] = (int*) malloc(k*sizeof(int));
-       
+
        lp = (double**) malloc(n*sizeof(double*));
        for (i= 0; i < n; i++)
                lp[i] = (double*) malloc(k*sizeof(double));
-       
+
        oldc = (int*) malloc(n * sizeof(int));
-       
+
        /* initialise */
        for (i = 0; i < k; i++)
        {
@@ -90,40 +90,40 @@ void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l,
                {
                        cl[i][j] /= sum;        /* normalise */
                }
-       }       
+       }
        //print_array(cl, k, m);
-       
+
        for (i = 0; i < n; i++)
                c[i] = 1;       /* initially assign all histograms to cluster 1 */
-       
+
        for (a = 0; a < t; a++)
        {
                beta = Bsched[a];
-               
+
                if (a == 0)
                        maxiter = maxiter0;
                else
                        maxiter = maxiter1;
-               
+
                for (it = 0; it < maxiter; it++)
                {
                        //if (it == maxiter - 1)
                        //      mexPrintf("hasn't converged after %d iterations\n", maxiter);
-                       
+
                        for (i = 0; i < n; i++)
                        {
                                /* save current hard assignments */
                                oldc[i] = c[i];
-                               
+
                                /* calculate soft assignment logprobs for each cluster */
                                sum = 0;
                                for (j = 0; j < k; j++)
                                {
                                        lp[i][ j] = -beta * kldist(cl[j], &h[i*m], m);
-                                       
+
                                        /* update matching neighbour counts for this histogram, based on current hard assignments */
                                        /* old version:
-                                       nc[i][j] = 0;   
+                                       nc[i][j] = 0;
                                        if (i >= limit && i <= n - 1 - limit)
                                        {
                                                        for (b = i - limit; b <= i + limit; b++)
@@ -144,14 +144,14 @@ void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l,
                                        for (b = b0; b <= b1; b++)
                                                if (c[b] == j+1)
                                                        nc[i][j]--;
-                                       
+
                                        sum += exp(lp[i][j]);
                                }
-                               
+
                                /* normalise responsibilities and add duration logprior */
                                logsumexp = log(sum);
                                for (j = 0; j < k; j++)
-                                       lp[i][j] -= logsumexp + lambda * nc[i][j];                              
+                                       lp[i][j] -= logsumexp + lambda * nc[i][j];
                        }
                        //print_array(lp, n, k);
                        /*
@@ -162,8 +162,8 @@ void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l,
                                 mexPrintf("\n");
                        }
                        */
-                       
-                       
+
+
                        /* update the assignments now that we know the duration priors
                        based on the current assignments */
                        for (i = 0; i < n; i++)
@@ -177,14 +177,14 @@ void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l,
                                                c[i] = j+1;
                                        }
                        }
-                               
+
                        /* break if assignments haven't changed */
                        i = 0;
                        while (i < n && oldc[i] == c[i])
                                i++;
                        if (i == n)
                                break;
-                       
+
                        /* update reference histograms now we know new responsibilities */
                        for (j = 0; j < k; j++)
                        {
@@ -194,21 +194,21 @@ void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l,
                                        for (i = 0; i < n; i++)
                                        {
                                                cl[j][b] += exp(lp[i][j]) * h[i*m+b];
-                                       }       
+                                       }
                                }
-                               
-                               sum = 0;                                
+
+                               sum = 0;
                                for (i = 0; i < n; i++)
                                        sum += exp(lp[i][j]);
                                for (b = 0; b < m; b++)
                                        cl[j][b] /= sum;        /* normalise */
-                       }       
-                       
+                       }
+
                        //print_array(cl, k, m);
                        //mexPrintf("\n\n");
                }
        }
-               
+
        /* free memory */
        for (i = 0; i < k; i++)
                free(cl[i]);
@@ -219,7 +219,7 @@ void cluster_melt(double *h, int m, int n, double *Bsched, int t, int k, int l,
        for (i = 0; i < n; i++)
                free(lp[i]);
        free(lp);
-       free(oldc);     
+       free(oldc);
 }
 
 
index 0d2762ee7f1e140e802ccfc87b1392d8bb17a4b1..c9f115c205b68e5ee938372161e8d28f67ed9af2 100644 (file)
@@ -25,7 +25,7 @@ void cq2chroma(double** cq, int nframes, int ncoeff, int bins, double** chroma)
        int t, b, oct, ix;
        //double maxchroma;     /* max chroma value at each time, for normalisation */
        //double sum;           /* for normalisation */
-       
+
        for (t = 0; t < nframes; t++)
        {
                for (b = 0; b < bins; b++)
@@ -50,7 +50,7 @@ void cq2chroma(double** cq, int nframes, int ncoeff, int bins, double** chroma)
                                maxchroma = chroma[t][b];
                if (maxchroma > 0)
                        for (b = 0; b < bins; b++)
-                               chroma[t][b] /= maxchroma;      
+                               chroma[t][b] /= maxchroma;
                */
        }
 }
@@ -62,13 +62,13 @@ void mpeg7_constq(double** features, int nframes, int ncoeff)
        double ss;
        double env;
        double maxenv = 0;
-       
+
        /* convert const-Q features to dB scale */
        for (i = 0; i < nframes; i++)
                for (j = 0; j < ncoeff; j++)
                        features[i][j] = 10.0 * log10(features[i][j]+DBL_EPSILON);
-       
-       /* normalise each feature vector and add the norm as an extra feature dimension */      
+
+       /* normalise each feature vector and add the norm as an extra feature dimension */
        for (i = 0; i < nframes; i++)
        {
                ss = 0;
@@ -83,7 +83,7 @@ void mpeg7_constq(double** features, int nframes, int ncoeff)
        }
        /* normalise the envelopes */
        for (i = 0; i < nframes; i++)
-               features[i][ncoeff] /= maxenv;  
+               features[i][ncoeff] /= maxenv;
 }
 
 /* return histograms h[nx*m] of data x[nx] into m bins using a sliding window of length h_len (MUST BE ODD) */
@@ -109,7 +109,7 @@ void create_histograms(int* x, int nx, int m, int hlen, double* h)
                for (j = 0; j < m; j++)
                        h[i*m+j] /= norm;
        }
-       
+
        /* duplicate histograms at beginning and end to create one histogram for each data value supplied */
        for (i = 0; i < hlen/2; i++)
                for (j = 0; j < m; j++)
@@ -124,7 +124,7 @@ void cluster_segment(int* q, double** features, int frames_read, int feature_len
                                         int histogram_length, int nclusters, int neighbour_limit)
 {
        int i, j;
-       
+
        /*****************************/
        if (0) {
        /* try just using the predominant bin number as a 'decoded state' */
@@ -141,44 +141,44 @@ void cluster_segment(int* q, double** features, int frames_read, int feature_len
                        {
                                maxval = features[i][j];
                                maxbin = j;
-                       }                               
+                       }
                }
                if (maxval > chroma_thresh)
                        q[i] = maxbin;
                else
                        q[i] = feature_length;
        }
-       
+
        }
        if (1) {
        /*****************************/
-               
-       
+
+
        /* scale all the features to 'balance covariances' during HMM training */
        double scale = 10;
        for (i = 0; i < frames_read; i++)
                for (j = 0; j < feature_length; j++)
                        features[i][j] *= scale;
-       
+
        /* train an HMM on the features */
-       
+
        /* create a model */
        model_t* model = hmm_init(features, frames_read, feature_length, nHMM_states);
-       
+
        /* train the model */
        hmm_train(features, frames_read, model);
-/*     
+/*
        printf("\n\nafter training:\n");
        hmm_print(model);
-*/     
+*/
        /* decode the hidden state sequence */
        viterbi_decode(features, frames_read, model, q);
        hmm_close(model);
-       
+
        /*****************************/
        }
        /*****************************/
-       
+
 
 /*
        fprintf(stderr, "HMM state sequence:\n");
@@ -186,11 +186,11 @@ void cluster_segment(int* q, double** features, int frames_read, int feature_len
                fprintf(stderr, "%d ", q[i]);
        fprintf(stderr, "\n\n");
 */
-       
+
        /* create histograms of states */
        double* h = (double*) malloc(frames_read*nHMM_states*sizeof(double));   /* vector in row major order */
        create_histograms(q, frames_read, nHMM_states, histogram_length, h);
-       
+
        /* cluster the histograms */
        int nbsched = 20;       /* length of inverse temperature schedule */
        double* bsched = (double*) malloc(nbsched*sizeof(double));      /* inverse temperature schedule */
@@ -200,9 +200,9 @@ void cluster_segment(int* q, double** features, int frames_read, int feature_len
        for (i = 1; i < nbsched; i++)
                bsched[i] = alpha * bsched[i-1];
        cluster_melt(h, nHMM_states, frames_read, bsched, nbsched, nclusters, neighbour_limit, q);
-       
+
        /* now q holds a sequence of cluster assignments */
-       
+
        free(h);
        free(bsched);
 }
@@ -214,25 +214,25 @@ void constq_segment(int* q, double** features, int frames_read, int bins, int nc
        int feature_length;
        double** chroma;
        int i;
-       
+
        if (feature_type == FEATURE_TYPE_CONSTQ)
        {
 /*             fprintf(stderr, "Converting to dB and normalising...\n");
- */            
+ */
                mpeg7_constq(features, frames_read, ncoeff);
-/*             
+/*
                fprintf(stderr, "Running PCA...\n");
-*/             
+*/
                /* do PCA on the features (but not the envelope) */
                int ncomponents = 20;
                pca_project(features, frames_read, ncoeff, ncomponents);
-               
+
                /* copy the envelope so that it immediatly follows the chosen components */
                for (i = 0; i < frames_read; i++)
-                       features[i][ncomponents] = features[i][ncoeff]; 
-               
+                       features[i][ncomponents] = features[i][ncoeff];
+
                feature_length = ncomponents + 1;
-               
+
                /**************************************
                //TEST
                // feature file name
@@ -241,7 +241,7 @@ void constq_segment(int* q, double** features, int frames_read, int bins, int nc
                strcpy(file_name, dir);
                strcat(file_name, trackname);
                strcat(file_name, "_features_c20r8h0.2f0.6.mat");
-               
+
                // get the features from Matlab from mat-file
                int frames_in_file;
                readmatarray_size(file_name, 2, &frames_in_file, &feature_length);
@@ -254,27 +254,27 @@ void constq_segment(int* q, double** features, int frames_read, int bins, int nc
                                features[frames_read-missing_frames][i] = features[frames_read-missing_frames-1][i];
                        --missing_frames;
                }
-               
+
                free(file_name);
                ******************************************/
-       
+
                cluster_segment(q, features, frames_read, feature_length, nHMM_states, histogram_length, nclusters, neighbour_limit);
        }
-       
+
        if (feature_type == FEATURE_TYPE_CHROMA)
        {
 /*
                fprintf(stderr, "Converting to chroma features...\n");
-*/             
+*/
                /* convert constant-Q to normalised chroma features */
                chroma = (double**) malloc(frames_read*sizeof(double*));
                for (i = 0; i < frames_read; i++)
                        chroma[i] = (double*) malloc(bins*sizeof(double));
                cq2chroma(features, frames_read, ncoeff, bins, chroma);
                feature_length = bins;
-               
+
                cluster_segment(q, chroma, frames_read, feature_length, nHMM_states, histogram_length, nclusters, neighbour_limit);
-       
+
                for (i = 0; i < frames_read; i++)
                        free(chroma[i]);
                free(chroma);
index 971f5fac8e15a968e4df93b90e6ab5db22f2cb79..4b93cb0e12f2d6aaa1a793d8cd304245f8fd6a99 100644 (file)
@@ -25,7 +25,7 @@
 DFProcess::DFProcess( DFProcConfig Config )
 {
     filtSrc = NULL;
-    filtDst = NULL;    
+    filtDst = NULL;
     m_filtScratchIn = NULL;
     m_filtScratchOut = NULL;
 
@@ -51,13 +51,13 @@ void DFProcess::initialise( DFProcConfig Config )
     filtSrc = new double[ m_length ];
     filtDst = new double[ m_length ];
 
-       
+
     //Low Pass Smoothing Filter Config
     m_FilterConfigParams.ord = Config.LPOrd;
     m_FilterConfigParams.ACoeffs = Config.LPACoeffs;
     m_FilterConfigParams.BCoeffs = Config.LPBCoeffs;
-       
-    m_FiltFilt = new FiltFilt( m_FilterConfigParams ); 
+
+    m_FiltFilt = new FiltFilt( m_FilterConfigParams );
 }
 
 void DFProcess::deInitialise()
@@ -115,7 +115,7 @@ void DFProcess::medianFilter(double *src, double *dst)
     {
         if (index >= m_length) break;
 
-                       
+
        l = 0;
        for(  j  = i; j < ( i + m_winPost + m_winPre + 1); j++)
        {
@@ -139,7 +139,7 @@ void DFProcess::medianFilter(double *src, double *dst)
 
            l++;
        }
-               
+
        scratch[ index++ ] = MathUtilities::median( y, l);
     }
 
@@ -147,7 +147,7 @@ void DFProcess::medianFilter(double *src, double *dst)
     for( i = 0; i < m_length; i++ )
     {
        val = src[ i ] - scratch[ i ];// - 0.033;
-               
+
        if( m_isMedianPositive )
        {
            if( val > 0 )
@@ -164,7 +164,7 @@ void DFProcess::medianFilter(double *src, double *dst)
            dst[ i ]  = val;
        }
     }
-       
+
     delete [] y;
     delete [] scratch;
 }
index 3af80743f5f1219de7205ffb4e1ebfca89c278c0..ad40f846b9aed4e02829cb221200ca8534f05ca2 100644 (file)
@@ -38,7 +38,7 @@ public:
 
     void process( double* src, double* dst );
 
-       
+
 private:
     void initialise( DFProcConfig Config );
     void deInitialise();
index 5a9e2c95494307754223b1d11acf30129071c6a0..13dbda0e82edc7a4cf5922cde8e5e4c11d50ee81 100644 (file)
@@ -24,7 +24,7 @@ FiltFilt::FiltFilt( FiltFiltConfig Config )
     m_filtScratchIn = NULL;
     m_filtScratchOut = NULL;
     m_ord = 0;
-       
+
     initialise( Config );
 }
 
@@ -39,7 +39,7 @@ void FiltFilt::initialise( FiltFiltConfig Config )
     m_filterConfig.ord = Config.ord;
     m_filterConfig.ACoeffs = Config.ACoeffs;
     m_filterConfig.BCoeffs = Config.BCoeffs;
-       
+
     m_filter = new Filter( m_filterConfig );
 }
 
@@ -50,7 +50,7 @@ void FiltFilt::deInitialise()
 
 
 void FiltFilt::process(double *src, double *dst, unsigned int length)
-{      
+{
     unsigned int i;
 
     if (length == 0) return;
@@ -62,7 +62,7 @@ void FiltFilt::process(double *src, double *dst, unsigned int length)
     m_filtScratchIn = new double[ nExt ];
     m_filtScratchOut = new double[ nExt ];
 
-       
+
     for( i = 0; i< nExt; i++ )
     {
        m_filtScratchIn[ i ] = 0.0;
@@ -89,11 +89,11 @@ void FiltFilt::process(double *src, double *dst, unsigned int length)
     {
        m_filtScratchIn[ i + nFact ] = src[ i ];
     }
-       
+
     ////////////////////////////////
     // Do  0Ph filtering
     m_filter->process( m_filtScratchIn, m_filtScratchOut, nExt);
-       
+
     // reverse the series for FILTFILT
     for ( i = 0; i < nExt; i++)
     {
@@ -102,7 +102,7 @@ void FiltFilt::process(double *src, double *dst, unsigned int length)
 
     // do FILTER again
     m_filter->process( m_filtScratchIn, m_filtScratchOut, nExt);
-       
+
     // reverse the series back
     for ( i = 0; i < nExt; i++)
     {
@@ -117,7 +117,7 @@ void FiltFilt::process(double *src, double *dst, unsigned int length)
     for( i = 0; i < length; i++ )
     {
        dst[ index++ ] = m_filtScratchOut[ i + nFact ];
-    }  
+    }
 
     delete [] m_filtScratchIn;
     delete [] m_filtScratchOut;
index 8533ed05020d40de3a332e8378c739696950b774..b1c20d506aaaf9e55efb043ce5537c0ab85de015 100644 (file)
@@ -35,7 +35,7 @@ public:
     void reset();
 
     void process( double *src, double *dst, unsigned int length );
-       
+
 
 private:
     void initialise( FilterConfig Config );
index 80ea67f72c2e6294784b7317b60fbf933c98248f..7357d2417ae440f69ed49252f7f1932e96e3a163 100644 (file)
@@ -44,14 +44,14 @@ void Framer::configure( unsigned int frameLength, unsigned int hop )
 
     if( m_dataFrame != NULL )
     {
-       delete [] m_dataFrame;  
+       delete [] m_dataFrame;
        m_dataFrame = NULL;
     }
     m_dataFrame = new double[ m_frameLength ];
 
     if( m_strideFrame != NULL )
     {
-       delete [] m_strideFrame;        
+       delete [] m_strideFrame;
        m_strideFrame = NULL;
     }
     m_strideFrame = new double[ m_stepSize ];
@@ -65,7 +65,7 @@ void Framer::getFrame(double *dst)
        for( unsigned int u = 0; u < m_frameLength; u++)
        {
            dst[ u ] = m_srcBuffer[ m_ulSrcIndex++ ];
-       }       
+       }
        m_ulSrcIndex -= ( m_frameLength - m_stepSize );
     }
     else
@@ -77,7 +77,7 @@ void Framer::getFrame(double *dst)
        {
            dst[ u ] = m_srcBuffer[ m_ulSrcIndex++ ];
        }
-               
+
        for( unsigned int u = 0; u < zero; u++ )
        {
            dst[ rem + u ] = 0;
index b2183b51ed79ebd32f42db0eadaa6164a24ed5a3..1167bc6ea98f3d279d6a15f9b9cef5531550ac2c 100644 (file)
@@ -293,7 +293,7 @@ DownBeat::measureSpecDiff(d_vec_t oldspec, d_vec_t newspec)
         }
 
         // JENSEN-SHANNON CALCULATION
-        sd1 = 0.5*oldspec[i] + 0.5*newspec[i]; 
+        sd1 = 0.5*oldspec[i] + 0.5*newspec[i];
         SD = SD + (-sd1*log(sd1)) + (0.5*(oldspec[i]*log(oldspec[i]))) + (0.5*(newspec[i]*log(newspec[i])));
     }
 
index acaa8ff7cdd7c2520f314f9480c577ff54eee773..a2c2a24b0abdc48581c27cc3c633db5fa15539a9 100644 (file)
@@ -177,7 +177,7 @@ TempoTrackV2::get_rcf(const d_vec_t &dfframe_in, const d_vec_t &wv, d_vec_t &rcf
 
     // now apply comb filtering
     int numelem = 4;
-       
+
     for (unsigned int i = 2;i < rcf.size();i++) // max beat period
     {
         for (int a = 1;a <= numelem;a++) // number of comb elements
@@ -218,7 +218,7 @@ TempoTrackV2::viterbi_decode(const d_mat_t &rcfmat, const d_vec_t &wv, d_vec_t &
     {
         tmat.push_back ( d_vec_t() ); // adds a new column
         for (unsigned int j=0; j<wv.size(); j++)
-        {      
+        {
             tmat[i].push_back(0.); // fill with zeros initially
         }
     }
@@ -230,7 +230,7 @@ TempoTrackV2::viterbi_decode(const d_mat_t &rcfmat, const d_vec_t &wv, d_vec_t &
     for (unsigned int i=20;i <wv.size()-20; i++)
     {
         for (unsigned int j=20; j<wv.size()-20; j++)
-        {      
+        {
             double mu = static_cast<double>(i);
             tmat[i][j] = exp( (-1.*pow((j-mu),2.)) / (2.*pow(sigma,2.)) );
         }
@@ -246,7 +246,7 @@ TempoTrackV2::viterbi_decode(const d_mat_t &rcfmat, const d_vec_t &wv, d_vec_t &
         delta.push_back( d_vec_t());
         psi.push_back( i_vec_t());
         for (unsigned int j=0; j<rcfmat[i].size(); j++)
-        {      
+        {
             delta[i].push_back(0.); // fill with zeros initially
             psi[i].push_back(0); // fill with zeros initially
         }
index bcc661dd1d7854474e137ceb4ba39569d09de865..a572da6ee81b56915252d2dc6626cd34c68fc3d6 100644 (file)
@@ -34,20 +34,20 @@ ChangeDetectionFunction::~ChangeDetectionFunction()
 void ChangeDetectionFunction::setFilterWidth(const int iWidth)
 {
        m_iFilterWidth = iWidth*2+1;
-       
+
        // it is assumed that the gaussian is 0 outside of +/- FWHM
        // => filter width = 2*FWHM = 2*2.3548*sigma
        m_dFilterSigma = double(m_iFilterWidth) / double(2*2.3548);
        m_vaGaussian.resize(m_iFilterWidth);
-       
+
        double dScale = 1.0 / (m_dFilterSigma*sqrt(2*PI));
-       
+
        for (int x = -(m_iFilterWidth-1)/2; x <= (m_iFilterWidth-1)/2; x++)
        {
                double w = dScale * std::exp ( -(x*x)/(2*m_dFilterSigma*m_dFilterSigma) );
                m_vaGaussian[x + (m_iFilterWidth-1)/2] = w;
        }
-       
+
 #ifdef DEBUG_CHANGE_DETECTION_FUNCTION
        std::cerr << "Filter sigma: " << m_dFilterSigma << std::endl;
        std::cerr << "Filter width: " << m_iFilterWidth << std::endl;
@@ -59,37 +59,37 @@ ChangeDistance ChangeDetectionFunction::process(const TCSGram& rTCSGram)
 {
        ChangeDistance retVal;
        retVal.resize(rTCSGram.getSize(), 0.0);
-       
+
        TCSGram smoothedTCSGram;
 
        for (int iPosition = 0; iPosition < rTCSGram.getSize(); iPosition++)
        {
                int iSkipLower = 0;
-       
+
                int iLowerPos = iPosition - (m_iFilterWidth-1)/2;
                int iUpperPos = iPosition + (m_iFilterWidth-1)/2;
-       
+
                if (iLowerPos < 0)
                {
                        iSkipLower = -iLowerPos;
                        iLowerPos = 0;
                }
-       
+
                if (iUpperPos >= rTCSGram.getSize())
                {
                        int iMaxIndex = rTCSGram.getSize() - 1;
                        iUpperPos = iMaxIndex;
                }
-       
+
                TCSVector smoothedVector;
 
                // for every bin of the vector, calculate the smoothed value
                for (int iPC = 0; iPC < 6; iPC++)
-               {       
+               {
                        size_t j = 0;
                        double dSmoothedValue = 0.0;
                        TCSVector rCV;
-               
+
                        for (int i = iLowerPos; i <= iUpperPos; i++)
                        {
                                rTCSGram.getTCSVector(i, rCV);
@@ -98,7 +98,7 @@ ChangeDistance ChangeDetectionFunction::process(const TCSGram& rTCSGram)
 
                        smoothedVector[iPC] = dSmoothedValue;
                }
-               
+
                smoothedTCSGram.addTCSVector(smoothedVector);
        }
 
@@ -109,10 +109,10 @@ ChangeDistance ChangeDetectionFunction::process(const TCSGram& rTCSGram)
                        if the current estimate is not confident enough, look further into the future/the past
                        e.g., High frequency content, zero crossing rate, spectral flatness
                */
-               
+
                TCSVector nextTCS;
                TCSVector previousTCS;
-               
+
                int iWindow = 1;
 
                // while (previousTCS.magnitude() < 0.1 && (iPosition-iWindow) > 0)
@@ -121,9 +121,9 @@ ChangeDistance ChangeDetectionFunction::process(const TCSGram& rTCSGram)
                        // std::cout << previousTCS.magnitude() << std::endl;
                        iWindow++;
                }
-               
+
                iWindow = 1;
-               
+
                // while (nextTCS.magnitude() < 0.1 && (iPosition+iWindow) < (rTCSGram.getSize()-1) )
                {
                        smoothedTCSGram.getTCSVector(iPosition+iWindow, nextTCS);
@@ -136,7 +136,7 @@ ChangeDistance ChangeDetectionFunction::process(const TCSGram& rTCSGram)
                {
                        distance += std::pow(nextTCS[j] - previousTCS[j], 2.0);
                }
-       
+
                retVal[iPosition] = std::pow(distance, 0.5);
        }
 
index 3a84b3096f991afec8fe888e8c2289826c42af54..5d041ad769c4d31a84066d6c9f0a7507f440d6e9 100644 (file)
@@ -38,7 +38,7 @@ public:
        ChangeDistance process(const TCSGram& rTCSGram);
 private:
        void setFilterWidth(const int iWidth);
-       
+
 private:
        valarray<double> m_vaGaussian;
        double m_dFilterSigma;
index c226c81402b6326b88499f967b7436276f258720..954ba03e9bdbf324768811fb9f8918dc39be61fb 100644 (file)
@@ -55,7 +55,7 @@ void TCSGram::addTCSVector(const TCSVector& rTCSVector)
        std::pair<long, TCSVector> p;
        p.first = lMilliSeconds;
        p.second = rTCSVector;
-       
+
        m_VectorList.push_back(p);
 }
 
@@ -68,7 +68,7 @@ long TCSGram::getDuration() const
 void TCSGram::printDebug()
 {
        vectorlist_t::iterator vectorIterator = m_VectorList.begin();
-       
+
        while (vectorIterator != m_VectorList.end())
        {
                vectorIterator->second.printDebug();
index 83e8c93f8ba560993bab87c3224eff5fc16f3092..f4825a996a9fe34fc107ee3f10c933ed7d954a5c 100644 (file)
@@ -26,7 +26,7 @@ typedef std::vector<std::pair<long, TCSVector> > vectorlist_t;
 
 class TCSGram
 {
-public:        
+public:
        TCSGram();
        ~TCSGram();
        void getTCSVector(int, TCSVector&) const;
index 16d1aa89956f8a827db2f0a4fce9401ccce990a0..72b6f85c83ff0a695dd3d58b235ab38e1a4e8843 100644 (file)
@@ -27,15 +27,15 @@ TonalEstimator::TonalEstimator()
        m_Basis.resize(6);
 
        int i = 0;
-       
-       
+
+
        // circle of fifths
        m_Basis[i].resize(12);
        for (int iP = 0; iP < 12; iP++)
        {
                m_Basis[i][iP] = std::sin( (7.0 / 6.0) * iP * PI);
        }
-       
+
        i++;
 
        m_Basis[i].resize(12);
@@ -43,17 +43,17 @@ TonalEstimator::TonalEstimator()
        {
                m_Basis[i][iP] = std::cos( (7.0 / 6.0) * iP * PI);
        }
-       
+
        i++;
-       
-       
+
+
        // circle of major thirds
        m_Basis[i].resize(12);
        for (int iP = 0; iP < 12; iP++)
        {
                m_Basis[i][iP] = 0.6 * std::sin( (2.0 / 3.0) * iP * PI);
        }
-       
+
        i++;
 
        m_Basis[i].resize(12);
@@ -71,7 +71,7 @@ TonalEstimator::TonalEstimator()
        {
                m_Basis[i][iP] = 1.1 * std::sin( (3.0 / 2.0) * iP * PI);
        }
-       
+
        i++;
 
        m_Basis[i].resize(12);
@@ -90,7 +90,7 @@ TCSVector TonalEstimator::transform2TCS(const ChromaVector& rVector)
 {
        TCSVector vaRetVal;
        vaRetVal.resize(6, 0.0);
-               
+
        for (int i = 0; i < 6; i++)
        {
                for (int iP = 0; iP < 12; iP++)
@@ -98,6 +98,6 @@ TCSVector TonalEstimator::transform2TCS(const ChromaVector& rVector)
                        vaRetVal[i] += m_Basis[i][iP] * rVector[iP];
                }
        }
-       
+
        return vaRetVal;
 }
index 5753dff050f93208df9927f5e16174b33e69c757..cfb8bba5b61e1e1f94f832257cca3e3a0ccdd1af 100644 (file)
@@ -27,24 +27,24 @@ class ChromaVector : public std::valarray<double>
 public:
        ChromaVector(size_t uSize = 12) : std::valarray<double>()
        { resize(uSize, 0.0f); }
-       
+
        virtual ~ChromaVector() {};
-       
+
        void printDebug()
        {
                for (int i = 0; i < size(); i++)
                {
                        std::cout <<  (*this)[i] << ";";
                }
-               
+
                std::cout << std::endl;
        }
-       
+
        void normalizeL1()
        {
                // normalize the chroma vector (L1 norm)
                double dSum = 0.0;
-       
+
                for (size_t i = 0; i < 12; (dSum += std::abs((*this)[i++]))) ;
                for (size_t i = 0; i < 12; dSum > 0.0000001?((*this)[i] /= dSum):(*this)[i]=0.0, i++) ;
 
@@ -55,7 +55,7 @@ public:
         for (size_t i = 0; i < 12; ++i) (*this)[i] = 0.0;
     }
 
-       
+
 };
 
 class TCSVector : public std::valarray<double>
@@ -63,7 +63,7 @@ class TCSVector : public std::valarray<double>
 public:
        TCSVector() : std::valarray<double>()
        { resize(6, 0.0f); }
-       
+
        virtual ~TCSVector() {};
 
        void printDebug()
@@ -72,19 +72,19 @@ public:
                {
                        std::cout <<  (*this)[i] << ";";
                }
-               
+
                std::cout << std::endl;
        }
-       
+
        double magnitude() const
        {
                double dMag = 0.0;
-               
+
                for (size_t i = 0; i < 6; i++)
                {
                        dMag += std::pow((*this)[i], 2.0);
                }
-               
+
                return std::sqrt(dMag);
        }
 
index 454cfb1422ec6660b195c0f83c2e14e28cbc0de4..0ca618f40b36db79b9918a4c8fdbb5429d3381f5 100644 (file)
@@ -54,7 +54,7 @@ FFTReal::process(bool inverse,
 }
 
 static unsigned int numberOfBitsNeeded(unsigned int p_nSamples)
-{      
+{
     int i;
 
     if( p_nSamples < 2 )
index d3e1fa1baf45bbce33cd35444459527a34fb589a..57d63377190dbe3f6b99f9ebfc3f10a697671caf 100644 (file)
@@ -82,7 +82,7 @@ Wavelet::createDecompositionFilters(Type wavelet,
     hpd.clear();
 
     unsigned int flength = 0;
-       
+
     switch (wavelet) {
 
     case Haar:
@@ -103,7 +103,7 @@ Wavelet::createDecompositionFilters(Type wavelet,
         hpd.push_back(-0.22414386804186);
         hpd.push_back(-0.12940952255092);
         flength = 4;
-        break;         
+        break;
 
     case Daubechies_3:
         lpd.push_back(0.03522629188210);
@@ -592,7 +592,7 @@ Wavelet::createDecompositionFilters(Type wavelet,
         hpd.push_back(-0.00000000000000);
         flength = 80;
         break;
-                       
+
     case Symlet_2:
         lpd.push_back(-0.12940952255092);
         lpd.push_back(0.22414386804186);
@@ -692,7 +692,7 @@ Wavelet::createDecompositionFilters(Type wavelet,
         hpd.push_back(0.01540410932703);
         flength = 12;
         break;
-                       
+
     case Symlet_7:
         lpd.push_back(0.00268181456826);
         lpd.push_back(-0.00104738488868);
index 69eee02b66ebb5c4698e91ade65c8830b8c78dcb..6642e4e1dbcf1d80f2c2c6bcc701ec5e36d5da0f 100644 (file)
@@ -46,11 +46,11 @@ model_t* hmm_init(double** x, int T, int L, int N)
 {
        int i, j, d, e, t;
        double s, ss;
-       
+
        model_t* model;
        model = (model_t*) malloc(sizeof(model_t));
        model->N = N;
-       model->L = L;   
+       model->L = L;
        model->p0 = (double*) malloc(N*sizeof(double));
        model->a = (double**) malloc(N*sizeof(double*));
        model->mu = (double**) malloc(N*sizeof(double*));
@@ -62,10 +62,10 @@ model_t* hmm_init(double** x, int T, int L, int N)
        model->cov = (double**) malloc(L*sizeof(double*));
        for (i = 0; i < L; i++)
                model->cov[i] = (double*) malloc(L*sizeof(double));
-       
+
        srand(time(0));
        double* global_mean = (double*) malloc(L*sizeof(double));
-       
+
        /* find global mean */
        for (d = 0; d < L; d++)
        {
@@ -74,7 +74,7 @@ model_t* hmm_init(double** x, int T, int L, int N)
                        global_mean[d] += x[t][d];
                global_mean[d] /= T;
        }
-       
+
        /* calculate global diagonal covariance */
        for (d = 0; d < L; d++)
        {
@@ -84,7 +84,7 @@ model_t* hmm_init(double** x, int T, int L, int N)
                        model->cov[d][d] += (x[t][d] - global_mean[d]) * (x[t][d] - global_mean[d]);
                model->cov[d][d] /= T-1;
        }
-       
+
        /* set all means close to global mean */
        for (i = 0; i < N; i++)
        {
@@ -94,8 +94,8 @@ model_t* hmm_init(double** x, int T, int L, int N)
                        /* ideally the random number would be Gaussian(0,1), as a hack we make it uniform on [-0.25,0.25] */
                        model->mu[i][d] = global_mean[d] + (0.5 * rand() / (double) RAND_MAX - 0.25) * sqrt(model->cov[d][d]);
                }
-       }       
-       
+       }
+
        /* random intial and transition probs */
        s = 0;
        for (i = 0; i < N; i++)
@@ -115,16 +115,16 @@ model_t* hmm_init(double** x, int T, int L, int N)
        }
        for (i = 0; i < N; i++)
                model->p0[i] /= s;
-       
+
        free(global_mean);
-       
+
        return model;
 }
 
 void hmm_close(model_t* model)
 {
        int i;
-       
+
        for (i = 0; i < model->N; i++)
        {
                free(model->a[i]);
@@ -134,23 +134,23 @@ void hmm_close(model_t* model)
        free(model->mu);
        for (i = 0; i < model->L; i++)
                free(model->cov[i]);
-       free(model->cov);       
-       free(model);    
+       free(model->cov);
+       free(model);
 }
 
 void hmm_train(double** x, int T, model_t* model)
 {
        int i, t;
        double loglik;  /* overall log-likelihood at each iteration */
-       
+
        int N = model->N;
        int L = model->L;
        double* p0 = model->p0;
        double** a = model->a;
        double** mu = model->mu;
        double** cov = model->cov;
-       
-       /* allocate memory */   
+
+       /* allocate memory */
        double** gamma = (double**) malloc(T*sizeof(double*));
        double*** xi = (double***) malloc(T*sizeof(double**));
        for (t = 0; t < T; t++)
@@ -160,45 +160,45 @@ void hmm_train(double** x, int T, model_t* model)
                for (i = 0; i < N; i++)
                        xi[t][i] = (double*) malloc(N*sizeof(double));
        }
-       
+
        /* temporary memory */
        double* gauss_y = (double*) malloc(L*sizeof(double));
-       double* gauss_z = (double*) malloc(L*sizeof(double));   
-                       
+       double* gauss_z = (double*) malloc(L*sizeof(double));
+
        /* obs probs P(j|{x}) */
        double** b = (double**) malloc(T*sizeof(double*));
        for (t = 0; t < T; t++)
                b[t] = (double*) malloc(N*sizeof(double));
-       
+
        /* inverse covariance and its determinant */
        double** icov = (double**) malloc(L*sizeof(double*));
        for (i = 0; i < L; i++)
                icov[i] = (double*) malloc(L*sizeof(double));
        double detcov;
-       
+
        double thresh = 0.0001;
-       int niter = 50; 
+       int niter = 50;
        int iter = 0;
        double loglik1, loglik2;
        int foundnan = 0;
 
-       while (iter < niter && !foundnan && !(iter > 1 && (loglik - loglik1) < thresh * (loglik1 - loglik2)))   
+       while (iter < niter && !foundnan && !(iter > 1 && (loglik - loglik1) < thresh * (loglik1 - loglik2)))
        {
                ++iter;
-/*             
+/*
                fprintf(stderr, "calculating obsprobs...\n");
                fflush(stderr);
-*/             
+*/
                /* precalculate obs probs */
                invert(cov, L, icov, &detcov);
-               
+
                for (t = 0; t < T; t++)
                {
                        //int allzero = 1;
                        for (i = 0; i < N; i++)
                        {
                                b[t][i] = exp(loggauss(x[t], L, mu[i], icov, detcov, gauss_y, gauss_z));
-               
+
                                //if (b[t][i] != 0)
                                //      allzero = 0;
                        }
@@ -213,13 +213,13 @@ void hmm_train(double** x, int T, model_t* model)
                        }
                        */
                }
-/*             
+/*
                fprintf(stderr, "forwards-backwards...\n");
                fflush(stderr);
-*/             
+*/
                forward_backwards(xi, gamma, &loglik, &loglik1, &loglik2, iter, N, T, p0, a, b);
-/*             
-               fprintf(stderr, "iteration %d: loglik = %f\n", iter, loglik);           
+/*
+               fprintf(stderr, "iteration %d: loglik = %f\n", iter, loglik);
                fprintf(stderr, "re-estimation...\n");
                fflush(stderr);
 */
@@ -227,9 +227,9 @@ void hmm_train(double** x, int T, model_t* model)
                    foundnan = 1;
                    continue;
                }
-               
+
                baum_welch(p0, a, mu, cov, N, T, L, x, xi, gamma);
-                       
+
                /*
                printf("a:\n");
                for (i = 0; i < model->N; i++)
@@ -242,7 +242,7 @@ void hmm_train(double** x, int T, model_t* model)
                 */
                //hmm_print(model);
        }
-       
+
        /* deallocate memory */
        for (t = 0; t < T; t++)
        {
@@ -254,12 +254,12 @@ void hmm_train(double** x, int T, model_t* model)
        }
        free(gamma);
        free(xi);
-       free(b);        
-       
+       free(b);
+
        for (i = 0; i < L; i++)
                free(icov[i]);
        free(icov);
-       
+
        free(gauss_y);
        free(gauss_z);
 }
@@ -267,27 +267,27 @@ void hmm_train(double** x, int T, model_t* model)
 void mlss_reestimate(double* p0, double** a, double** mu, double** cov, int N, int T, int L, int* q, double** x)
 {
        /* fit a single Gaussian to observations in each state */
-       
+
        /* calculate the mean observation in each state */
-       
+
        /* calculate the overall covariance */
-       
+
        /* count transitions */
-       
+
        /* estimate initial probs from transitions (???) */
 }
 
 void baum_welch(double* p0, double** a, double** mu, double** cov, int N, int T, int L, double** x, double*** xi, double** gamma)
 {
        int i, j, t;
-       
+
        double* sum_gamma = (double*) malloc(N*sizeof(double));
-       
+
        /* temporary memory */
        double* u = (double*) malloc(L*L*sizeof(double));
        double* yy = (double*) malloc(T*L*sizeof(double));
-       double* yy2 = (double*) malloc(T*L*sizeof(double));     
-       
+       double* yy2 = (double*) malloc(T*L*sizeof(double));
+
        /* re-estimate transition probs */
        for (i = 0; i < N; i++)
        {
@@ -295,7 +295,7 @@ void baum_welch(double* p0, double** a, double** mu, double** cov, int N, int T,
                for (t = 0; t < T-1; t++)
                        sum_gamma[i] += gamma[t][i];
        }
-       
+
        for (i = 0; i < N; i++)
        {
                if (sum_gamma[i] == 0)
@@ -310,7 +310,7 @@ void baum_welch(double* p0, double** a, double** mu, double** cov, int N, int T,
                        for (t = 0; t < T-1; t++)
                                a[i][j] += xi[t][i][j];
                        //s += a[i][j];
-                       a[i][j] /= sum_gamma[i];        
+                       a[i][j] /= sum_gamma[i];
                }
                /*
                 for (j = 0; j < N; j++)
@@ -319,21 +319,21 @@ void baum_welch(double* p0, double** a, double** mu, double** cov, int N, int T,
                 }
                 */
        }
-       
+
        /* NB: now we need to sum gamma over all t */
        for (i = 0; i < N; i++)
                sum_gamma[i] += gamma[T-1][i];
-       
+
        /* re-estimate initial probs */
        for (i = 0; i < N; i++)
                p0[i] = gamma[0][i];
-       
+
        /* re-estimate covariance */
        int d, e;
        double sum_sum_gamma = 0;
        for (i = 0; i < N; i++)
-               sum_sum_gamma += sum_gamma[i];          
-       
+               sum_sum_gamma += sum_gamma[i];
+
        /*
         for (d = 0; d < L; d++)
         {
@@ -343,9 +343,9 @@ void baum_welch(double* p0, double** a, double** mu, double** cov, int N, int T,
                         for (t = 0; t < T; t++)
                                 for (j = 0; j < N; j++)
                                         cov[d][e] += gamma[t][j] * (x[t][d] - mu[j][d]) * (x[t][e] - mu[j][e]);
-                       
+
                         cov[d][e] /= sum_sum_gamma;
-                       
+
                         if (ISNAN(cov[d][e]))
                         {
                                 printf("cov[%d][%d] was nan\n", d, e);
@@ -365,12 +365,12 @@ void baum_welch(double* p0, double** a, double** mu, double** cov, int N, int T,
         for (e = 0; e < d; e++)
         cov[d][e] = cov[e][d];
         */
-       
+
        /* using BLAS */
        for (d = 0; d < L; d++)
                for (e = 0; e < L; e++)
                        cov[d][e] = 0;
-       
+
        for (j = 0; j < N; j++)
        {
                for (d = 0; d < L; d++)
@@ -379,20 +379,20 @@ void baum_welch(double* p0, double** a, double** mu, double** cov, int N, int T,
                                yy[d*T+t] = x[t][d] - mu[j][d];
                                yy2[d*T+t] = gamma[t][j] * (x[t][d] - mu[j][d]);
                        }
-                               
+
                                cblas_dgemm(CblasColMajor, CblasTrans, CblasNoTrans, L, L, T, 1.0, yy, T, yy2, T, 0, u, L);
-               
+
                for (e = 0; e < L; e++)
                        for (d = 0; d < L; d++)
                                cov[d][e] += u[e*L+d];
        }
-       
+
        for (d = 0; d < L; d++)
                for (e = 0; e < L; e++)
-                       cov[d][e] /= T; /* sum_sum_gamma; */                    
-       
+                       cov[d][e] /= T; /* sum_sum_gamma; */
+
        //printf("sum_sum_gamma = %f\n", sum_sum_gamma); /* fine, = T IS THIS ALWAYS TRUE with pooled cov?? */
-       
+
        /* re-estimate means */
        for (j = 0; j < N; j++)
        {
@@ -404,7 +404,7 @@ void baum_welch(double* p0, double** a, double** mu, double** cov, int N, int T,
                        mu[j][d] /= sum_gamma[j];
                }
        }
-       
+
        /* deallocate memory */
        free(sum_gamma);
        free(yy);
@@ -416,7 +416,7 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
 {
        /* forwards-backwards with scaling */
        int i, j, t;
-       
+
        double** alpha = (double**) malloc(T*sizeof(double*));
        double** beta = (double**) malloc(T*sizeof(double*));
        for (t = 0; t < T; t++)
@@ -424,34 +424,34 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
                alpha[t] = (double*) malloc(N*sizeof(double));
                beta[t] = (double*) malloc(N*sizeof(double));
        }
-       
+
        /* scaling coefficients */
        double* c = (double*) malloc(T*sizeof(double));
-       
+
        /* calculate forward probs and scale coefficients */
        c[0] = 0;
        for (i = 0; i < N; i++)
        {
                alpha[0][i] = p0[i] * b[0][i];
                c[0] += alpha[0][i];
-               
+
                //printf("p0[%d] = %f, b[0][%d] = %f\n", i, p0[i], i, b[0][i]);
        }
        c[0] = 1 / c[0];
        for (i = 0; i < N; i++)
        {
-               alpha[0][i] *= c[0];            
-               
+               alpha[0][i] *= c[0];
+
                //printf("alpha[0][%d] = %f\n", i, alpha[0][i]);        /* OK agrees with Matlab */
        }
-       
+
        *loglik1 = *loglik;
        *loglik = -log(c[0]);
        if (iter == 2)
                *loglik2 = *loglik;
-       
+
        for (t = 1; t < T; t++)
-       {                       
+       {
                c[t] = 0;
                for (j = 0; j < N; j++)
                {
@@ -459,10 +459,10 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
                        for (i = 0; i < N; i++)
                                alpha[t][j] += alpha[t-1][i] * a[i][j];
                        alpha[t][j] *= b[t][j];
-                       
+
                        c[t] += alpha[t][j];
                }
-               
+
                /*
                 if (c[t] == 0)
                 {
@@ -477,16 +477,16 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
                         exit(-1);
                 }
                 */
-               
+
                c[t] = 1 / c[t];
                for (j = 0; j < N; j++)
                        alpha[t][j] *= c[t];
-               
+
                //printf("c[%d] = %e\n", t, c[t]);
-               
+
                *loglik -= log(c[t]);
        }
-       
+
        /* calculate backwards probs using same coefficients */
        for (i = 0; i < N; i++)
                beta[T-1][i] = 1;
@@ -495,20 +495,20 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
        {
                for (i = 0; i < N; i++)
                        beta[t][i] *= c[t];
-               
+
                if (t == 0)
                        break;
-               
+
                for (i = 0; i < N; i++)
                {
                        beta[t-1][i] = 0;
                        for (j = 0; j < N; j++)
                                beta[t-1][i] += a[i][j] * b[t][j] * beta[t][j];
                }
-               
+
                t--;
        }
-       
+
        /*
         printf("alpha:\n");
         for (t = 0; t < T; t++)
@@ -526,7 +526,7 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
         }
         printf("\n\n");
         */
-       
+
        /* calculate posterior probs */
        double tot;
        for (t = 0; t < T; t++)
@@ -539,12 +539,12 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
                }
                for (i = 0; i < N; i++)
                {
-                       gamma[t][i] /= tot;                             
-                       
-                       //printf("gamma[%d][%d] = %f\n", t, i, gamma[t][i]);                            
+                       gamma[t][i] /= tot;
+
+                       //printf("gamma[%d][%d] = %f\n", t, i, gamma[t][i]);
                }
-       }               
-       
+       }
+
        for (t = 0; t < T-1; t++)
        {
                tot = 0;
@@ -560,7 +560,7 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
                        for (j = 0; j < N; j++)
                                xi[t][i][j] /= tot;
        }
-       
+
        /*
         // CHECK - fine
         // gamma[t][i] = \sum_j{xi[t][i][j]}
@@ -568,8 +568,8 @@ void forward_backwards(double*** xi, double** gamma, double* loglik, double* log
         for (j = 0; j < N; j++)
         tot += xi[3][1][j];
         printf("gamma[3][1] = %f, sum_j(xi[3][1][j]) = %f\n", gamma[3][1], tot);
-        */     
-       
+        */
+
        for (t = 0; t < T; t++)
        {
                free(alpha[t]);
@@ -585,20 +585,20 @@ void viterbi_decode(double** x, int T, model_t* model, int* q)
        int i, j, t;
        double max;
        int havemax;
-       
+
        int N = model->N;
        int L = model->L;
        double* p0 = model->p0;
        double** a = model->a;
        double** mu = model->mu;
        double** cov = model->cov;
-       
+
        /* inverse covariance and its determinant */
        double** icov = (double**) malloc(L*sizeof(double*));
        for (i = 0; i < L; i++)
                icov[i] = (double*) malloc(L*sizeof(double));
        double detcov;
-       
+
        double** logb = (double**) malloc(T*sizeof(double*));
        double** phi = (double**) malloc(T*sizeof(double*));
        int** psi = (int**) malloc(T*sizeof(int*));
@@ -608,24 +608,24 @@ void viterbi_decode(double** x, int T, model_t* model, int* q)
                phi[t] = (double*) malloc(N*sizeof(double));
                psi[t] = (int*) malloc(N*sizeof(int));
        }
-       
+
        /* temporary memory */
        double* gauss_y = (double*) malloc(L*sizeof(double));
-       double* gauss_z = (double*) malloc(L*sizeof(double));   
-       
+       double* gauss_z = (double*) malloc(L*sizeof(double));
+
        /* calculate observation logprobs */
        invert(cov, L, icov, &detcov);
        for (t = 0; t < T; t++)
                for (i = 0; i < N; i++)
                        logb[t][i] = loggauss(x[t], L, mu[i], icov, detcov, gauss_y, gauss_z);
-       
+
        /* initialise */
        for (i = 0; i < N; i++)
        {
                phi[0][i] = log(p0[i]) + logb[0][i];
                psi[0][i] = 0;
        }
-       
+
        for (t = 1; t < T; t++)
        {
                for (j = 0; j < N; j++)
@@ -646,7 +646,7 @@ void viterbi_decode(double** x, int T, model_t* model, int* q)
                        }
                }
        }
-       
+
        /* find maximising state at time T-1 */
        max = phi[T-1][0];
        q[T-1] = 0;
@@ -659,7 +659,7 @@ void viterbi_decode(double** x, int T, model_t* model, int* q)
                }
        }
 
-       
+
        /* track back */
        t = T - 2;
        while (t >= 0)
@@ -667,7 +667,7 @@ void viterbi_decode(double** x, int T, model_t* model, int* q)
                q[t] = psi[t+1][q[t+1]];
                t--;
        }
-       
+
        /* de-allocate memory */
        for (i = 0; i < L; i++)
                free(icov[i]);
@@ -681,7 +681,7 @@ void viterbi_decode(double** x, int T, model_t* model, int* q)
        free(logb);
        free(phi);
        free(psi);
-       
+
        free(gauss_y);
        free(gauss_z);
 }
@@ -695,11 +695,11 @@ void invert(double** cov, int L, double** icov, double* detcov)
        for(j=0; j < L; j++)
                for (i=0; i < L; i++)
                        a[j*L+i] = cov[i][j];
-       
-       int M = (int) L;        
+
+       int M = (int) L;
        int* ipiv = (int *) malloc(L*L*sizeof(int));
        int ret;
-       
+
        /* LU decomposition */
        ret = dgetrf_(&M, &M, a, &M, ipiv, &ret);       /* ret should be zero, negative if cov is singular */
        if (ret < 0)
@@ -707,7 +707,7 @@ void invert(double** cov, int L, double** icov, double* detcov)
                fprintf(stderr, "Covariance matrix was singular, couldn't invert\n");
                exit(-1);
        }
-       
+
        /* find determinant */
        double det = 1;
        for(i = 0; i < L; i++)
@@ -723,27 +723,27 @@ void invert(double** cov, int L, double** icov, double* detcov)
        if (det < 0)
                det = -det;
        *detcov = det;
-       
+
        /* allocate required working storage */
 #ifndef HAVE_ATLAS
        int lwork = -1;
        double lwbest = 0.0;
        dgetri_(&M, a, &M, ipiv, &lwbest, &lwork, &ret);
-       lwork = (int) lwbest;   
+       lwork = (int) lwbest;
        double* work  = (double*) malloc(lwork*sizeof(double));
 #endif
-       
+
        /* find inverse */
        dgetri_(&M, a, &M, ipiv, work, &lwork, &ret);
 
        for(j=0; j < L; j++)
                for (i=0; i < L; i++)
-                       icov[i][j] = a[j*L+i];  
-       
-#ifndef HAVE_ATLAS     
+                       icov[i][j] = a[j*L+i];
+
+#ifndef HAVE_ATLAS
        free(work);
 #endif
-       free(a);        
+       free(a);
 }
 
 /* probability of multivariate Gaussian given mean, inverse and determinant of covariance */
@@ -762,8 +762,8 @@ double gauss(double* x, int L, double* mu, double** icov, double detcov, double*
        }
        s = cblas_ddot(L, z, 1, y, 1);
        //for (i = 0; i < L; i++)
-       //      s += z[i] * y[i];       
-       
+       //      s += z[i] * y[i];
+
        return exp(-s/2.0) / (pow(2*PI, L/2.0) * sqrt(detcov));
 }
 
@@ -784,10 +784,10 @@ double loggauss(double* x, int L, double* mu, double** icov, double detcov, doub
        }
        s = cblas_ddot(L, z, 1, y, 1);
        //for (i = 0; i < L; i++)
-       //      s += z[i] * y[i];       
-       
+       //      s += z[i] * y[i];
+
        ret = -0.5 * (s + L * log(2*PI) + log(detcov));
-       
+
        /*
        // TEST
        if (ISINF(ret) > 0)
@@ -795,9 +795,9 @@ double loggauss(double* x, int L, double* mu, double** icov, double detcov, doub
        if (ISINF(ret) < 0)
                printf("loggauss returning -infinity\n");
        if (ISNAN(ret))
-               printf("loggauss returning nan\n");     
+               printf("loggauss returning nan\n");
        */
-       
+
        return ret;
 }
 
index 2249c53a95643c99957ea3535ef4a1cc383ab581..a55252b3650ec801269279ff2ce4f7ee39067443 100644 (file)
@@ -41,11 +41,11 @@ void MathUtilities::getAlphaNorm(const double *data, unsigned int len, unsigned
     unsigned int i;
     double temp = 0.0;
     double a=0.0;
-       
+
     for( i = 0; i < len; i++)
     {
        temp = data[ i ];
-               
+
        a  += ::pow( fabs(temp), double(alpha) );
     }
     a /= ( double )len;
@@ -60,11 +60,11 @@ double MathUtilities::getAlphaNorm( const std::vector <double> &data, unsigned i
     unsigned int len = data.size();
     double temp = 0.0;
     double a=0.0;
-       
+
     for( i = 0; i < len; i++)
     {
        temp = data[ i ];
-               
+
        a  += ::pow( fabs(temp), double(alpha) );
     }
     a /= ( double )len;
@@ -143,7 +143,7 @@ double MathUtilities::mean(const double *src, unsigned int len)
     double retVal =0.0;
 
     double s = sum( src, len );
-       
+
     retVal =  s  / (double)len;
 
     return retVal;
@@ -154,7 +154,7 @@ double MathUtilities::mean(const std::vector<double> &src,
                            unsigned int count)
 {
     double sum = 0.;
-       
+
     for (unsigned int i = 0; i < count; ++i)
     {
         sum += src[start + i];
@@ -172,7 +172,7 @@ void MathUtilities::getFrameMinMax(const double *data, unsigned int len, double
         *min = *max = 0;
         return;
     }
-       
+
     *min = data[0];
     *max = data[0];
 
@@ -188,7 +188,7 @@ void MathUtilities::getFrameMinMax(const double *data, unsigned int len, double
        {
            *max =  temp ;
        }
-               
+
     }
 }
 
@@ -197,7 +197,7 @@ int MathUtilities::getMax( double* pData, unsigned int Length, double* pMax )
        unsigned int index = 0;
        unsigned int i;
        double temp = 0.0;
-       
+
        double max = pData[0];
 
        for( i = 0; i < Length; i++)
@@ -209,7 +209,7 @@ int MathUtilities::getMax( double* pData, unsigned int Length, double* pMax )
                        max =  temp ;
                        index = i;
                }
-               
+
        }
 
        if (pMax) *pMax = max;
@@ -223,7 +223,7 @@ int MathUtilities::getMax( const std::vector<double> & data, double* pMax )
        unsigned int index = 0;
        unsigned int i;
        double temp = 0.0;
-       
+
        double max = data[0];
 
        for( i = 0; i < data.size(); i++)
@@ -235,7 +235,7 @@ int MathUtilities::getMax( const std::vector<double> & data, double* pMax )
                        max =  temp ;
                        index = i;
                }
-               
+
        }
 
        if (pMax) *pMax = max;
@@ -344,7 +344,7 @@ void MathUtilities::adaptiveThreshold(std::vector<double> &data)
     if (sz == 0) return;
 
     std::vector<double> smoothed(sz);
-       
+
     int p_pre = 8;
     int p_post = 7;
 
index 1d3395e8add61ab8ee2f4b682d29b0f35d6e0ab0..85774756d4ad2b9200c3d3e87c5e3d24f7801928 100644 (file)
@@ -22,7 +22,7 @@
 
 class MathUtilities
 {
-public:        
+public:
     static double round( double x );
 
     static void          getFrameMinMax( const double* data, unsigned int len,  double* min, double* max );
index 288ec4d2e488fa225dfe893dcf3f966202084d08..d2b2f11c47f5ac158dc1bfa1be4c4f3f330e1430 100644 (file)
@@ -110,7 +110,7 @@ void tred2(double** a, int n, double* d, double* e)
 {
        int l, k, j, i;
        double scale, hh, h, g, f;
-       
+
        for (i = n-1; i >= 1; i--)
     {
                l = i - 1;
@@ -188,7 +188,7 @@ void tqli(double* d, double* e, int n, double** z)
 {
        int m, l, iter, i, k;
        double s, r, p, g, f, dd, c, b;
-       
+
        for (i = 1; i < n; i++)
                e[i-1] = e[i];
        e[n-1] = 0.0;
@@ -253,19 +253,19 @@ void pca_project(double** data, int n, int m, int ncomponents)
 {
        int  i, j, k, k2;
        double  **symmat, **symmat2, *evals, *interm;
-       
+
        //TODO: assert ncomponents < m
-       
+
        symmat = (double**) malloc(m*sizeof(double*));
        for (i = 0; i < m; i++)
                symmat[i] = (double*) malloc(m*sizeof(double));
-               
+
        covcol(data, n, m, symmat);
-       
+
        /*********************************************************************
                Eigen-reduction
                **********************************************************************/
-       
+
     /* Allocate storage for dummy and new vectors. */
     evals = (double*) malloc(m*sizeof(double));     /* Storage alloc. for vector of eigenvalues */
     interm = (double*) malloc(m*sizeof(double));    /* Storage alloc. for 'intermediate' vector */
@@ -278,7 +278,7 @@ void pca_project(double** data, int n, int m, int ncomponents)
     tred2(symmat, m, evals, interm);  /* Triangular decomposition */
 tqli(evals, interm, m, symmat);   /* Reduction of sym. trid. matrix */
 /* evals now contains the eigenvalues,
-columns of symmat now contain the associated eigenvectors. */  
+columns of symmat now contain the associated eigenvectors. */
 
 /*
        printf("\nEigenvalues:\n");
@@ -289,7 +289,7 @@ columns of symmat now contain the associated eigenvectors. */
        printf("Eigenvalues are often expressed as cumulative\n");
        printf("percentages, representing the 'percentage variance\n");
        printf("explained' by the associated axis or principal component.)\n");
-       
+
        printf("\nEigenvectors:\n");
        printf("(First three; their definition in terms of original vbes.)\n");
        for (j = 0; j < m; j++) {
@@ -310,7 +310,7 @@ for (i = 0; i < n; i++) {
         }
 }
 
-/*     
+/*
 printf("\nProjections of row-points on first 3 prin. comps.:\n");
  for (i = 0; i < n; i++) {
         for (j = 0; j < 3; j++)  {
index de50235ee983df7712409aa3e222628f03a8c42e..0d13c8f2642a842cfbb6fe4b684bc14547606c9d 100644 (file)
@@ -44,7 +44,7 @@ BasicUI::BasicUI ()
 
 BasicUI::~BasicUI ()
 {
-       
+
 }
 
 void
@@ -148,7 +148,7 @@ BasicUI::transport_play (bool from_last_start)
        if (session->get_play_range ()) {
                session->request_play_range (0);
        }
-       
+
        if (from_last_start && rolling) {
                session->request_locate (session->last_transport_start(), true);
 
@@ -186,7 +186,7 @@ void
 BasicUI::prev_marker ()
 {
        framepos_t pos = session->locations()->first_mark_before (session->transport_frame());
-       
+
        if (pos >= 0) {
                session->request_locate (pos, session->transport_rolling());
        } else {
@@ -330,26 +330,26 @@ BasicUI::solo_press (boost::shared_ptr<Route> r, bool momentary, bool global, bo
        if (momentary) {
                _solo_release = new SoloMuteRelease (_route->soloed());
        }
-       
+
        if (global) {
-               
+
                if (_solo_release) {
                        _solo_release->routes = _session->get_routes ();
                }
-               
+
                if (Config->get_solo_control_is_listen_control()) {
                        _session->set_listen (_session->get_routes(), !_route->listening(),  Session::rt_cleanup, true);
                } else {
                        _session->set_solo (_session->get_routes(), !_route->soloed(),  Session::rt_cleanup, true);
                }
-               
+
        } else if (exclusive) {
-               
+
                if (_solo_release) {
                        _solo_release->exclusive = true;
-                       
+
                        boost::shared_ptr<RouteList> routes = _session->get_routes();
-                       
+
                        for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
                                if ((*i)->soloed ()) {
                                        _solo_release->routes_on->push_back (*i);
@@ -358,51 +358,51 @@ BasicUI::solo_press (boost::shared_ptr<Route> r, bool momentary, bool global, bo
                                }
                        }
                }
-               
+
                if (Config->get_solo_control_is_listen_control()) {
                        /* ??? we need a just_one_listen() method */
                } else {
                        _session->set_just_one_solo (_route, true);
                }
-               
+
        } else if (isolate) {
-               
+
                // shift-click: toggle solo isolated status
-               
+
                _route->set_solo_isolated (!_route->solo_isolated(), this);
                delete _solo_release;
                _solo_release = 0;
-               
+
        } else if (solo_group) {
-               
+
                /* Primary-button1: solo mix group.
                   NOTE: Primary-button2 is MIDI learn.
                */
-               
+
                if (_route->route_group()) {
-                       
+
                        if (_solo_release) {
                                _solo_release->routes = _route->route_group()->route_list();
                        }
-                       
+
                        if (Config->get_solo_control_is_listen_control()) {
                                _session->set_listen (_route->route_group()->route_list(), !_route->listening(),  Session::rt_cleanup, true);
                        } else {
                                _session->set_solo (_route->route_group()->route_list(), !_route->soloed(),  Session::rt_cleanup, true);
                        }
                }
-               
+
        } else {
-               
+
                /* click: solo this route */
-               
+
                boost::shared_ptr<RouteList> rl (new RouteList);
                rl->push_back (route());
-               
+
                if (_solo_release) {
                        _solo_release->routes = rl;
                }
-               
+
                if (Config->get_solo_control_is_listen_control()) {
                        _session->set_listen (rl, !_route->listening());
                } else {
index b91308c7bee5c04c91f3c736941bed60879b2ef9..7a218e85328b86c6c96b1d372daaae3b1032a84c 100644 (file)
@@ -166,7 +166,7 @@ ControlProtocol::set_route_table (uint32_t table_index, boost::shared_ptr<ARDOUR
        if (table_index >= route_table.size()) {
                return;
        }
-       
+
        route_table[table_index] = r;
 
        // XXX SHAREDPTR need to handle r->GoingAway
@@ -245,7 +245,7 @@ ControlProtocol::route_set_gain (uint32_t table_index, float gain)
        }
 
        boost::shared_ptr<Route> r = route_table[table_index];
-       
+
        if (r != 0) {
                r->set_gain (gain, this);
        }
index d62a5da5adf307fd49c5692bee5a85f1c3c5bcf6..4c8a8ba28f3d111e319981a412f9dab94c373960 100644 (file)
@@ -41,7 +41,7 @@ class LIBCONTROLCP_API BasicUI {
   public:
        BasicUI (ARDOUR::Session&);
        virtual ~BasicUI ();
-       
+
        void add_marker (const std::string& = std::string());
 
        void register_thread (std::string name);
index 3a0eb41509aa8f4a62cfab85400357f388a703a8..8edb3f39a7576f78650ad26294085461107a73c8 100644 (file)
@@ -88,7 +88,7 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
           respond. Typically this will always be GUI->"others" - the GUI pays
           no attention to these signals.
        */
-       
+
        static PBD::Signal1<void,RouteNotificationListPtr> TrackSelectionChanged;
 
        /* the model here is as follows:
@@ -163,7 +163,7 @@ extern "C" {
            bool             (*probe)(ControlProtocolDescriptor*);
            ControlProtocol* (*initialize)(ControlProtocolDescriptor*,Session*);
            void             (*destroy)(ControlProtocolDescriptor*,ControlProtocol*);
-       
+
        };
 }
 
index 8c05953320821d431c40ed18bebf37aa0140eb40..1d46753e512256fa0706b313b11bb60d6128624c 100644 (file)
@@ -26,7 +26,7 @@
 
 namespace ARDOUR {
        class Route;
-       
+
        typedef std::vector<boost::weak_ptr<ARDOUR::Route> >    RouteNotificationList;
        typedef boost::shared_ptr<RouteNotificationList>        RouteNotificationListPtr;
 
index 96bc3f95efeffed3fb5c649052a71d9c0e07ad2f..480c49c7b6107368e07571e5cc05c757ac51b995 100644 (file)
@@ -110,7 +110,7 @@ tranzport_t *open_tranzport_core()
 
 tranzport_t *open_tranzport()
 {
-return open_tranzport_core();  
+return open_tranzport_core();
 }
 
 void close_tranzport(tranzport_t *z)
@@ -191,7 +191,7 @@ int tranzport_read(tranzport_t *z, uint8_t *status, uint32_t *buttons, uint8_t *
 {
        uint8_t buf[8];
        int val;
-       
+
        memset(buf, 0xff, 8);
        val = read(z->udev, buf, 8);
        if (val < 0) {
index 4096ee680d243ee3b71a98233ccfb1412259a158..f116c50a7429bfd83c5a820ea21a580f99687575 100644 (file)
@@ -109,7 +109,7 @@ tranzport_t *open_tranzport_core()
 
 tranzport_t *open_tranzport()
 {
-return open_tranzport_core();  
+return open_tranzport_core();
 }
 
 void close_tranzport(tranzport_t *z)
@@ -190,7 +190,7 @@ int tranzport_read(tranzport_t *z, uint8_t *status, uint32_t *buttons, uint8_t *
 {
        uint8_t buf[8];
        int val;
-       
+
        memset(buf, 0xff, 8);
        val = read(z->udev, buf, 8);
        if (val < 0) {
index 951be979d0c12441ae88e37251da3f7dc1816b49..e7377cc65b0ceb4779cf33a17a5498ea12e6ce99 100644 (file)
@@ -235,7 +235,7 @@ struct usb_tranzport {
     unsigned char  LightPunch;
     unsigned char  last_cmd[8];
     unsigned char  screen[40]; // We'll also have cells
-       
+
 };
 
 /* prevent races between open() and disconnect() */
@@ -405,12 +405,12 @@ static void usb_tranzport_interrupt_in_callback(struct urb *urb)
 /* Always pass one offline event up the stack */
                if(dev->offline > 0 && dev->interrupt_in_buffer[1] != 0xff) { dev->offline = 0; }
                if(dev->offline == 0 && dev->interrupt_in_buffer[1] == 0xff) { dev->offline = 1; }
-                       
+
 #endif
                dbg_info(&dev->intf->dev, "%s: head, tail are %x, %x\n", __FUNCTION__,dev->ring_head,dev->ring_tail);
 
                next_ring_head = (dev->ring_head+1) % ring_buffer_size;
-       
+
                if (next_ring_head != dev->ring_tail) {
                        memcpy(&((*dev->ring_buffer)[dev->ring_head]), dev->interrupt_in_buffer, urb->actual_length);
                        dev->ring_head = next_ring_head;
@@ -687,7 +687,7 @@ static ssize_t usb_tranzport_read(struct file *file, char __user *buffer, size_t
        dbg_info(&dev->intf->dev, "%s: trying to compress: %02x%02x%02x%02x%02x %02x %02x %02x\n",
                         __FUNCTION__, (*dev->ring_buffer)[dev->ring_tail].cmd[0],(*dev->ring_buffer)[dev->ring_tail].cmd[1],(*dev->ring_buffer)[dev->ring_tail].cmd[2],(*dev->ring_buffer)[dev->ring_tail].cmd[3],(*dev->ring_buffer)[dev->ring_tail].cmd[4],(*dev->ring_buffer)[dev->ring_tail].cmd[5],(*dev->ring_buffer)[dev->ring_tail].cmd[6],(*dev->ring_buffer)[dev->ring_tail].cmd[7]);
 
-                       
+
                        if(((*dev->ring_buffer)[dev->ring_tail].cmd[6] != 0 &&
                            (*dev->ring_buffer)[next_tail].cmd[6] != 0 ) &&
                                ((newwheel > 0 && oldwheel > 0) ||
@@ -723,13 +723,13 @@ static ssize_t usb_tranzport_read(struct file *file, char __user *buffer, size_t
                        retval = -EFAULT;
                        goto unlock_exit;
                }
-               
+
                dev->ring_tail = (dev->ring_tail+1) % ring_buffer_size;
                c+=8;
                dbg_info(&dev->intf->dev, "%s: head, tail are %x, %x\n", __FUNCTION__,dev->ring_head,dev->ring_tail);
           }
           retval = c;
-       
+
 #else
        if (copy_to_user(buffer, &(*dev->ring_buffer)[dev->ring_tail], 8)) {
                retval = -EFAULT;
index 28a8462d846acd829083ed6f7bd9594623d7ff2a..07867d6dd0ae6494c3beef85a54a40ae6b047e02 100644 (file)
@@ -109,7 +109,7 @@ tranzport_t *open_tranzport_core()
 
 tranzport_t *open_tranzport()
 {
-return open_tranzport_core();  
+return open_tranzport_core();
 }
 
 void close_tranzport(tranzport_t *z)
@@ -190,7 +190,7 @@ int tranzport_read(tranzport_t *z, uint8_t *status, uint32_t *buttons, uint8_t *
 {
        uint8_t buf[8];
        int val;
-       
+
        memset(buf, 0xff, 8);
        val = read(z->udev, buf, 8);
        if (val < 0) {
index e60524d24c971dda2f1eb9677608ea3236431dfd..f019c02f450924456831d37ce22db4674978a6fe 100644 (file)
@@ -33,7 +33,7 @@ new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s)
        }
 
        return tcp;
-       
+
 }
 
 void
@@ -59,7 +59,7 @@ static ControlProtocolDescriptor tranzport_descriptor = {
        initialize : new_tranzport_protocol,
        destroy : delete_tranzport_protocol
 };
-       
+
 
 extern "C" {
 ControlProtocolDescriptor*
index 773ac2d5a17ee123c97efa7d97af477aa03a6ef8..f093287f507ef364185f17696bb54c9540d403f6 100644 (file)
@@ -273,7 +273,7 @@ TranzportControlProtocol::screen_flush ()
                                        printf("usb screen update failed for some reason... why? \ncmd and data were %02x %02x %02x %02x %02x %02x %02x %02x\n",
                                                        cmd[0],cmd[1],cmd[2], cmd[3], cmd[4], cmd[5],cmd[6],cmd[7]);
 #endif
-                                       pending += 1;   
+                                       pending += 1;
                                        // Shouldn't need to do this
                                        // screen_invalid[row][col_base] = screen_invalid[row][col_base+1] =
                                        // screen_invalid[row][col_base+2] = screen_invalid[row][col_base+3] = true;
@@ -592,7 +592,7 @@ void
 TranzportControlProtocol::show_transport_time ()
 {
        show_bbt (session->transport_frame ());
-}      
+}
 
 void
 TranzportControlProtocol::show_smpte (framepos_t where)
@@ -689,7 +689,7 @@ TranzportControlProtocol::open_core (struct usb_device* dev)
                error << _("Tranzport: cannot open USB transport") << endmsg;
                return -1;
        }
-       
+
        if (usb_claim_interface (udev, 0) < 0) {
                error << _("Tranzport: cannot claim USB interface") << endmsg;
                usb_close (udev);
@@ -737,7 +737,7 @@ int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
        return val;
 }
 
-       
+
 int
 TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override)
 {
@@ -762,7 +762,7 @@ TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override
 
        return 0;
 
-}      
+}
 
 int
 TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override)
@@ -771,7 +771,7 @@ TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override)
        int val;
        int retry = 0;
        if(inflight > MAX_TRANZPORT_INFLIGHT) { return (-1); }
-       
+
        while((val = usb_interrupt_write (udev, WRITE_ENDPOINT, (char*) cmd, 8, timeout_override ? timeout_override : timeout))!=8 && retry++ < MAX_RETRY) {
                printf("usb_interrupt_write failed, retrying: %d\n", val);
        }
@@ -794,7 +794,7 @@ TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override)
        return (write_noretry(cmd,timeout_override));
 #endif
 
-}      
+}
 
 #else
 #error Kernel API not defined yet for Tranzport
@@ -863,7 +863,7 @@ bool TranzportControlProtocol::lcd_isdamaged ()
        for(int r = 0; r < 2; r++) {
                for(int c = 0; c < 20; c++) {
                        if(screen_invalid[r][c]) {
-#if DEBUG_TRANZPORT > 5        
+#if DEBUG_TRANZPORT > 5
                                printf("row: %d,col: %d is damaged, should redraw it\n", r,c);
 #endif
                                return true;
@@ -881,7 +881,7 @@ bool TranzportControlProtocol::lcd_isdamaged (int row, int col, int length)
        if((row >= 0 && row < 2) && (col >=0 && col < 20)) {
                for(int c = col; c < endcol; c++) {
                        if(screen_invalid[row][c]) {
-#if DEBUG_TRANZPORT > 5        
+#if DEBUG_TRANZPORT > 5
                                printf("row: %d,col: %d is damaged, should redraw it\n", row,c);
 #endif
                                return true;
@@ -1007,7 +1007,7 @@ int TranzportControlProtocol::rtpriority_unset(int priority)
        struct sched_param rtparam;
        int err;
        memset (&rtparam, 0, sizeof (rtparam));
-       rtparam.sched_priority = priority;      
+       rtparam.sched_priority = priority;
        if ((err = pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam)) != 0) {
                PBD::info << string_compose (_("%1: can't stop realtime scheduling (%2)"), name(), strerror (errno)) << endmsg;
                return 1;
@@ -1731,7 +1731,7 @@ TranzportControlProtocol::step_gain_up ()
        if (gain_fraction > 2.0) {
                gain_fraction = 2.0;
        }
-       
+
        route_set_gain (0, slider_position_to_gain (gain_fraction));
 }
 
@@ -1747,7 +1747,7 @@ TranzportControlProtocol::step_gain_down ()
        if (gain_fraction < 0.0) {
                gain_fraction = 0.0;
        }
-       
+
        route_set_gain (0, slider_position_to_gain (gain_fraction));
 }
 
@@ -1866,7 +1866,7 @@ TranzportControlProtocol::print_noretry (int row, int col, const char *text)
        uint32_t left = strlen (text);
        char tmp[5];
        int base_col;
-       
+
        if (row < 0 || row > 1) {
                return;
        }
@@ -1899,24 +1899,24 @@ TranzportControlProtocol::print_noretry (int row, int col, const char *text)
                int offset = col % 4;
 
                /* copy current cell contents into tmp */
-               
+
                memcpy (tmp, &screen_pending[row][base_col], 4);
-               
+
                /* overwrite with new text */
-               
+
                uint32_t tocopy = min ((4U - offset), left);
-               
+
                memcpy (tmp+offset, text, tocopy);
-               
+
                /* copy it back to pending */
-               
+
                memcpy (&screen_pending[row][base_col], tmp, 4);
-               
+
                text += tocopy;
                left -= tocopy;
                col  += tocopy;
        }
-}      
+}
 
 XMLNode&
 TranzportControlProtocol::get_state ()
index 39addbbaca808537f039160d867370762782413a..13df6915a211fb80c7322c6d4bb623cf3eb2c8af 100644 (file)
@@ -76,7 +76,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol
                WheelShiftMaster,
                WheelShiftMarker
        };
-               
+
        enum WheelMode {
                WheelTimeline,
                WheelScrub,
@@ -94,7 +94,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol
               WheelIncrSecond,
               WheelIncrMinute
        };
-       
+
        enum DisplayMode {
                DisplayNormal,
                DisplayRecording,
@@ -113,7 +113,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol
                BlingRows,
                BlingFlashAll
        };
-       
+
        pthread_t       thread;
        uint32_t        buttonmask;
        uint32_t        timeout;
@@ -246,7 +246,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol
        void show_current_track ();
        void show_track_gain ();
        void show_transport_time ();
-       void show_bbt (framepos_t where);       
+       void show_bbt (framepos_t where);
        void show_smpte (framepos_t where);
        void show_wheel_mode ();
        void show_gain ();
index f05e138f057f7e50b547e56b1aaedebe8945303f..4b59151079f118d5da4d778553361aa2258eefe4 100644 (file)
@@ -168,11 +168,11 @@ GenericMidiControlProtocol::reload_maps ()
 
                mi.name = prop->value ();
                mi.path = fullpath;
-               
+
                map_info.push_back (mi);
        }
 }
-       
+
 void
 GenericMidiControlProtocol::drop_all ()
 {
@@ -258,7 +258,7 @@ GenericMidiControlProtocol::send_feedback ()
        }
 
        _send_feedback ();
-       
+
        last_feedback_time = now;
 }
 
@@ -282,7 +282,7 @@ GenericMidiControlProtocol::_send_feedback ()
        if (!lm.locked ()) {
                return;
        }
-       
+
        for (MIDIControllables::iterator r = controllables.begin(); r != controllables.end(); ++r) {
                MIDI::byte* end = (*r)->write_feedback (buf, bsize);
                if (end != buf) {
@@ -314,7 +314,7 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
 
        {
                Glib::Threads::Mutex::Lock lm (pending_lock);
-               
+
                MIDIPendingControllables::iterator ptmp;
                for (MIDIPendingControllables::iterator i = pending_controllables.begin(); i != pending_controllables.end(); ) {
                        ptmp = i;
@@ -341,7 +341,7 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
        if (!mc) {
                mc = new MIDIControllable (this, *_input_port->parser(), *c, false);
        }
-       
+
        {
                Glib::Threads::Mutex::Lock lm (pending_lock);
 
@@ -360,7 +360,7 @@ GenericMidiControlProtocol::learning_stopped (MIDIControllable* mc)
 {
        Glib::Threads::Mutex::Lock lm (pending_lock);
        Glib::Threads::Mutex::Lock lm2 (controllables_lock);
-       
+
        MIDIPendingControllables::iterator tmp;
 
        for (MIDIPendingControllables::iterator i = pending_controllables.begin(); i != pending_controllables.end(); ) {
@@ -401,7 +401,7 @@ GenericMidiControlProtocol::stop_learning (Controllable* c)
                        break;
                }
        }
-       
+
        delete dptr;
 }
 
@@ -410,17 +410,17 @@ GenericMidiControlProtocol::delete_binding (PBD::Controllable* control)
 {
        if (control != 0) {
                Glib::Threads::Mutex::Lock lm2 (controllables_lock);
-               
+
                for (MIDIControllables::iterator iter = controllables.begin(); iter != controllables.end();) {
                        MIDIControllable* existingBinding = (*iter);
-                       
+
                        if (control == (existingBinding->get_controllable())) {
                                delete existingBinding;
                                iter = controllables.erase (iter);
                        } else {
                                ++iter;
                        }
-                       
+
                }
        }
 }
@@ -431,10 +431,10 @@ GenericMidiControlProtocol::create_binding (PBD::Controllable* control, int pos,
 {
        if (control != NULL) {
                Glib::Threads::Mutex::Lock lm2 (controllables_lock);
-               
+
                MIDI::channel_t channel = (pos & 0xf);
                MIDI::byte value = control_number;
-               
+
                // Create a MIDIControllable
                MIDIControllable* mc = new MIDIControllable (this, *_input_port->parser(), *control, false);
 
@@ -442,19 +442,19 @@ GenericMidiControlProtocol::create_binding (PBD::Controllable* control, int pos,
                // Note:  can't use delete_binding() here because we don't know the specific controllable we want to remove, only the midi information
                for (MIDIControllables::iterator iter = controllables.begin(); iter != controllables.end();) {
                        MIDIControllable* existingBinding = (*iter);
-                       
+
                        if ((existingBinding->get_control_channel() & 0xf ) == channel &&
                            existingBinding->get_control_additional() == value &&
                            (existingBinding->get_control_type() & 0xf0 ) == MIDI::controller) {
-                               
+
                                delete existingBinding;
                                iter = controllables.erase (iter);
                        } else {
                                ++iter;
                        }
-                       
+
                }
-               
+
                // Update the MIDI Controllable based on the the pos param
                // Here is where a table lookup for user mappings could go; for now we'll just wing it...
                mc->bind_midi(channel, MIDI::controller, value);
@@ -593,7 +593,7 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
        }
 
        boost::shared_ptr<Controllable> c;
-       
+
        {
                Glib::Threads::Mutex::Lock lm (pending_lock);
                for (MIDIPendingControllables::iterator i = pending_controllables.begin(); i != pending_controllables.end(); ++i) {
@@ -625,20 +625,20 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
 
                        if (!nlist.empty()) {
                                for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
-                                       
+
                                        if ((prop = (*niter)->property ("id")) != 0) {
-                                               
+
                                                ID id = prop->value ();
                                                DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Relearned binding for session: Control ID: %1\n", id.to_s()));
                                                Controllable* c = Controllable::by_id (id);
-                                               
+
                                                if (c) {
                                                        MIDIControllable* mc = new MIDIControllable (this, *_input_port->parser(), *c, false);
-                                                       
+
                                                        if (mc->set_state (**niter, version) == 0) {
                                                                controllables.push_back (mc);
                                                        }
-                                                       
+
                                                } else {
                                                        warning << string_compose (
                                                                _("Generic MIDI control: controllable %1 not found in session (ignored)"),
@@ -697,7 +697,7 @@ GenericMidiControlProtocol::load_bindings (const string& xmlpath)
                sscanf (prop->value().c_str(), "%d.%d.%d", &major, &minor, &micro);
                Stateful::loading_state_version = (major * 1000) + minor;
        }
-       
+
        const XMLNodeList& children (root->children());
        XMLNodeConstIterator citer;
        XMLNodeConstIterator gciter;
@@ -708,7 +708,7 @@ GenericMidiControlProtocol::load_bindings (const string& xmlpath)
 
        DEBUG_TRACE (DEBUG::GenericMidi, "Loading bindings\n");
        for (citer = children.begin(); citer != children.end(); ++citer) {
-               
+
                if ((*citer)->name() == "DeviceInfo") {
                        const XMLProperty* prop;
 
@@ -736,7 +736,7 @@ GenericMidiControlProtocol::load_bindings (const string& xmlpath)
 
                        if (child->property ("uri")) {
                                /* controllable */
-                               
+
                                if ((mc = create_binding (*child)) != 0) {
                                        Glib::Threads::Mutex::Lock lm2 (controllables_lock);
                                        controllables.push_back (mc);
@@ -760,7 +760,7 @@ GenericMidiControlProtocol::load_bindings (const string& xmlpath)
                         }
                }
        }
-       
+
        if ((prop = root->property ("name")) != 0) {
                _current_binding = prop->value ();
        }
@@ -805,17 +805,17 @@ GenericMidiControlProtocol::create_binding (const XMLNode& node)
        } else {
                return 0;
        }
-       
+
        if (sscanf (prop->value().c_str(), "%d", &intval) != 1) {
                return 0;
        }
-       
+
        detail = (MIDI::byte) intval;
 
        if ((prop = node.property (X_("channel"))) == 0) {
                return 0;
        }
-       
+
        if (sscanf (prop->value().c_str(), "%d", &intval) != 1) {
                return 0;
        }
@@ -830,7 +830,7 @@ GenericMidiControlProtocol::create_binding (const XMLNode& node)
        } else {
                momentary = false;
        }
-       
+
        prop = node.property (X_("uri"));
        uri = prop->value();
 
@@ -918,7 +918,7 @@ GenericMidiControlProtocol::create_function (const XMLNode& node)
                        cnt = 0;
                        stringstream ss (prop->value());
                        ss << hex;
-                       
+
                        while (ss >> val) {
                                cnt++;
                        }
@@ -930,12 +930,12 @@ GenericMidiControlProtocol::create_function (const XMLNode& node)
 
                data = new MIDI::byte[cnt];
                data_size = cnt;
-               
+
                {
                        stringstream ss (prop->value());
                        ss << hex;
                        cnt = 0;
-                       
+
                        while (ss >> val) {
                                data[cnt++] = (MIDI::byte) val;
                        }
@@ -950,13 +950,13 @@ GenericMidiControlProtocol::create_function (const XMLNode& node)
                if (sscanf (prop->value().c_str(), "%d", &intval) != 1) {
                        return 0;
                }
-               
+
                detail = (MIDI::byte) intval;
 
                if ((prop = node.property (X_("channel"))) == 0) {
                        return 0;
                }
-       
+
                if (sscanf (prop->value().c_str(), "%d", &intval) != 1) {
                        return 0;
                }
@@ -972,9 +972,9 @@ GenericMidiControlProtocol::create_function (const XMLNode& node)
        }
 
        prop = node.property (X_("function"));
-       
+
        MIDIFunction* mf = new MIDIFunction (*_input_port->parser());
-       
+
        if (mf->setup (*this, prop->value(), argument, data, data_size)) {
                delete mf;
                return 0;
@@ -1018,7 +1018,7 @@ GenericMidiControlProtocol::create_action (const XMLNode& node)
                        cnt = 0;
                        stringstream ss (prop->value());
                        ss << hex;
-                       
+
                        while (ss >> val) {
                                cnt++;
                        }
@@ -1030,12 +1030,12 @@ GenericMidiControlProtocol::create_action (const XMLNode& node)
 
                data = new MIDI::byte[cnt];
                data_size = cnt;
-               
+
                {
                        stringstream ss (prop->value());
                        ss << hex;
                        cnt = 0;
-                       
+
                        while (ss >> val) {
                                data[cnt++] = (MIDI::byte) val;
                        }
@@ -1050,13 +1050,13 @@ GenericMidiControlProtocol::create_action (const XMLNode& node)
                if (sscanf (prop->value().c_str(), "%d", &intval) != 1) {
                        return 0;
                }
-               
+
                detail = (MIDI::byte) intval;
 
                if ((prop = node.property (X_("channel"))) == 0) {
                        return 0;
                }
-       
+
                if (sscanf (prop->value().c_str(), "%d", &intval) != 1) {
                        return 0;
                }
@@ -1068,7 +1068,7 @@ GenericMidiControlProtocol::create_action (const XMLNode& node)
        }
 
        prop = node.property (X_("action"));
-       
+
        MIDIAction* ma = new MIDIAction (*_input_port->parser());
 
        if (ma->init (*this, prop->value(), data, data_size)) {
index c9d11c3e096754b23c736ceb42ade1d22bbf6889..f09c8e488382d1ba39215d27fcbf9f8a0c81b531 100644 (file)
@@ -30,7 +30,7 @@
 namespace PBD {
        class Controllable;
        class ControllableDescriptor;
-}      
+}
 
 namespace ARDOUR {
        class Session;
@@ -73,7 +73,7 @@ class GenericMidiControlProtocol : public ARDOUR::ControlProtocol {
        void drop_bindings ();
 
        void check_used_event (int, int);
-       
+
        std::string current_binding() const { return _current_binding; }
 
        struct MapInfo {
@@ -89,7 +89,7 @@ class GenericMidiControlProtocol : public ARDOUR::ControlProtocol {
        void prev_bank ();
 
        void set_motorised (bool);
-       
+
        bool motorised () const {
                return _motorised;
        }
index 773cf36772462659db9dad2dd9127acce3e4bfc0..710b61be8e8b86e7b5e834a31e818ba5c3a6721d 100644 (file)
@@ -40,7 +40,7 @@ class GMCPGUI : public Gtk::VBox
 public:
        GMCPGUI (GenericMidiControlProtocol&);
        ~GMCPGUI ();
-       
+
 private:
        GenericMidiControlProtocol& cp;
        Gtk::ComboBoxText map_combo;
@@ -110,7 +110,7 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p)
        }
 
        set_popdown_strings (map_combo, popdowns);
-       
+
        if (cp.current_binding().empty()) {
                map_combo.set_active_text (popdowns[0]);
        } else {
@@ -126,7 +126,7 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p)
        table->set_row_spacings (6);
        table->set_col_spacings (6);
        table->show ();
-       
+
        int n = 0;
 
        Label* label = manage (new Label (_("MIDI Bindings:")));
@@ -134,10 +134,10 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p)
        table->attach (*label, 0, 1, n, n + 1);
        table->attach (map_combo, 1, 2, n, n + 1);
        ++n;
-       
+
        map_combo.show ();
        label->show ();
-       
+
        bank_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &GMCPGUI::bank_changed));
 
        label = manage (new Label (_("Current Bank:")));
@@ -145,7 +145,7 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p)
        table->attach (*label, 0, 1, n, n + 1);
        table->attach (bank_spinner, 1, 2, n, n + 1);
        ++n;
-       
+
        bank_spinner.show ();
        label->show ();
 
index b9b0e36a4de368478343d87d21bb4d44a5492659..b7e7b63dd7582da5435f03143805475c409c3663 100644 (file)
@@ -28,13 +28,13 @@ static ControlProtocol*
 new_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s)
 {
        GenericMidiControlProtocol* gmcp;
-               
+
        try {
                gmcp =  new GenericMidiControlProtocol (*s);
        } catch (failed_constructor& err) {
                return 0;
        }
-       
+
        if (gmcp->set_active (true)) {
                delete gmcp;
                return 0;
@@ -67,6 +67,6 @@ static ControlProtocolDescriptor generic_midi_descriptor = {
        /*initialize :        */   new_generic_midi_protocol,
        /*destroy :           */   delete_generic_midi_protocol
 };
-       
+
 extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &generic_midi_descriptor; }
 
index 4a9b89de80b7d2800a799cfe401e17f3d2b95321..9dca702e686c7424f01b5aab94a39e506a190eb6 100644 (file)
@@ -71,7 +71,7 @@ MIDIControllable::MIDIControllable (GenericMidiControlProtocol* s, MIDI::Parser&
        , _momentary (m)
 {
        set_controllable (&c);
-       
+
        _learned = true; /* from controllable */
        _encoder = No_enc;
        setting = false;
@@ -123,7 +123,7 @@ MIDIControllable::set_controllable (Controllable* c)
        if (c == controllable) {
                return;
        }
-       
+
        controllable_death_connection.disconnect ();
 
        controllable = c;
@@ -478,7 +478,7 @@ MIDIControllable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional)
                }
                _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));
                snprintf (buf, sizeof (buf), "MIDI control: Controller %d", control_additional);
@@ -507,7 +507,7 @@ MIDIControllable::write_feedback (MIDI::byte* buf, int32_t& bufsize, bool /*forc
        if (!controllable || control_type == none || !feedback || bufsize <= 2) {
                return buf;
        }
-       
+
        int const gm = control_to_midi (controllable->get_value());
 
        if (gm == last_value) {
@@ -611,7 +611,7 @@ int
 MIDIControllable::max_value_for_type () const
 {
        /* XXX: this is not complete */
-       
+
        if (control_type == MIDI::pitchbend) {
                return 16383;
        }
index 5a4a76208953ab9397c7910bb72caa89286c2d8c..2e5d41c5d6624e8cf09b32865102a9e99f050604 100644 (file)
@@ -68,7 +68,7 @@ class MIDIControllable : public PBD::Stateful
        };
 
        MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, bool force = false);
-       
+
        void midi_rebind (MIDI::channel_t channel=-1);
        void midi_forget ();
        void learn_about_external_control ();
@@ -104,7 +104,7 @@ class MIDIControllable : public PBD::Stateful
        MIDI::byte get_control_additional () { return control_additional; }
 
         int lookup_controllable();
-       
+
   private:
 
        int max_value_for_type () const;
index 48d8497ce34362bc9f67be852d9dfc260043eca7..9d679b1e8e8882cf35819f9fa2cea7e4b570d0aa 100644 (file)
@@ -141,7 +141,7 @@ MIDIInvokable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional)
        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));
                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));
                break;
index bde59b64de7ad958ccada75b4775bc65e0a783e6..dee87ed09c4141378dce18b259c5277473b44fdc 100644 (file)
@@ -50,7 +50,7 @@ class MIDIInvokable : public PBD::Stateful
        MIDI::channel_t get_control_channel () { return control_channel; }
        MIDI::eventType get_control_type () { return control_type; }
        MIDI::byte get_control_additional () { return control_additional; }
-       
+
   protected:
        GenericMidiControlProtocol* _ui;
        std::string     _invokable_name;
index c9ae1f5d717f2f4a3192456e0b728acd8a79780f..53a43de5baae33ba4a1d07b06acd74bc2ede9dc4 100644 (file)
@@ -104,9 +104,9 @@ Button::name_to_id (const std::string& name)
        if (!g_ascii_strcasecmp (name.c_str(), "Scrub")) { return Scrub; }
        if (!g_ascii_strcasecmp (name.c_str(), "User A")) { return UserA; }
        if (!g_ascii_strcasecmp (name.c_str(), "User B")) { return UserB; }
-               
+
                /* Strip buttons */
-               
+
        if (!g_ascii_strcasecmp (name.c_str(), "Record Enable")) { return RecEnable; }
        if (!g_ascii_strcasecmp (name.c_str(), "Solo")) { return Solo; }
        if (!g_ascii_strcasecmp (name.c_str(), "Mute")) { return Mute; }
index 61f09d7a038bad5dfe54827224248dbeb8fd99c3..42d2ec45b1a9563d3d7bea5038d9d87c7c288954 100644 (file)
@@ -39,7 +39,7 @@ public:
 
        enum ID {
                /* Global Buttons */
-               
+
                Track,
                Send,
                Pan,
@@ -111,7 +111,7 @@ public:
                CmdAlt,
 
                /* Strip buttons */
-               
+
                RecEnable,
                Solo,
                Mute,
@@ -129,12 +129,12 @@ public:
                : Control (did, name, group)
                , _bid (bid)
                , _led  (did, name + "_led", group) {}
-       
+
        MidiByteArray zero() { return _led.zero (); }
        MidiByteArray set_state (LedState ls) { return _led.set_state (ls); }
-       
+
        ID bid() const { return _bid; }
-       
+
        static Control* factory (Surface& surface, Button::ID bid, int id, const std::string&, Group& group);
        static int name_to_id (const std::string& name);
        static std::string id_to_name (Button::ID);
index 4955098225f58b2f6ec9f08d97409d2e0e116fa3..e79a60f42f455473a8db2936abbd35789407e845 100644 (file)
@@ -19,21 +19,21 @@ public:
                : _name (name) {}
 
        virtual ~Group() {}
-       
+
        virtual bool is_strip() const { return false; }
        virtual bool is_master() const { return false; }
-       
+
        virtual void add (Control & control);
-       
+
        const std::string & name() const { return _name; }
        void set_name (const std::string & rhs) { _name = rhs; }
-       
+
        typedef std::vector<Control*> Controls;
        const Controls & controls() const { return _controls; }
-       
+
 protected:
        Controls _controls;
-       
+
 private:
        std::string _name;
 };
index 1c88c2b74cfa1a285b8333cbcda5825d399dd5e8..bbe1029f30080389740991e4ebe46302cea936ae 100644 (file)
@@ -101,7 +101,7 @@ Control::start_touch (double when)
                return normal_ac->start_touch (when);
        }
 }
-       
+
 void
 Control::stop_touch (bool mark, double when)
 {
@@ -109,7 +109,7 @@ Control::stop_touch (bool mark, double when)
                return normal_ac->stop_touch (mark, when);
        }
 }
-       
+
 ostream & operator <<  (ostream & os, const ArdourSurface::Mackie::Control & control)
 {
        os << typeid (control).name();
@@ -120,7 +120,7 @@ ostream & operator <<  (ostream & os, const ArdourSurface::Mackie::Control & con
        os << ", ";
        os << "group: " << control.group().name();
        os << " }";
-       
+
        return os;
 }
 
index e8098ccf7ebf5abc58e9ed72e9598d2227a61fe8..38eb30fb65d7a1f7598876a146ea3e7e10665e32 100644 (file)
@@ -48,14 +48,14 @@ class Control {
 public:
        Control (int id, std::string name, Group& group);
        virtual ~Control() {}
-       
+
        int id() const { return _id; }
        const std::string & name() const  { return _name; }
        Group & group() const { return _group; }
 
        bool in_use () const;
        void set_in_use (bool);
-       
+
        // Keep track of the timeout so it can be updated with more incoming events
        sigc::connection in_use_connection;
 
@@ -71,7 +71,7 @@ public:
 
        float get_value ();
        void set_value (float val);
-       
+
        virtual void start_touch (double when);
        virtual void stop_touch (bool mark, double when);
 
index 365ff1db9f3be0837b3d40222e58a39986e3df62..b0ce131e003d991ea55abfffd9b4ee6d55e86a1d 100644 (file)
@@ -377,7 +377,7 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
                                                        }
                                                }
                                        }
-                                       
+
                                }
 
                        } else if ((*i)->name() == "StripButton") {
@@ -393,9 +393,9 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
                                                        }
                                                }
                                        }
-                                       
+
                                }
-                               
+
                        }
                }
        }
index c4cbd071c5093f2a04dc2f1de2e82188430557fb..2f4f769127f35d86da34c981c8e276a8cdf31148 100644 (file)
@@ -62,7 +62,7 @@ class DeviceInfo
                LCXT = 0x11,
                HUI = 0x5
        };
-       
+
        DeviceInfo();
        ~DeviceInfo();
 
@@ -85,7 +85,7 @@ class DeviceInfo
 
        static std::map<std::string,DeviceInfo> device_info;
        static void reload_device_info();
-       
+
        std::string& get_global_button_name(Button::ID);
        GlobalButtonInfo& get_global_button(Button::ID);
 
@@ -94,7 +94,7 @@ class DeviceInfo
 
        const GlobalButtonsInfo& global_buttons() const { return _global_buttons; }
        const StripButtonsInfo& strip_buttons() const { return _strip_buttons; }
-       
+
                                         private:
        uint32_t _strip_cnt;
        uint32_t _extenders;
index c4cd9bf1a8f953885e2dd2b234718ffe4dcdfa7b..2b9cbd5edb2d462a933fd5d2d61cfabdd7d5db39 100644 (file)
@@ -339,7 +339,7 @@ DeviceProfile::save ()
        }
 
        fullpath = Glib::build_filename (fullpath, legalize_for_path (_name) + ".profile");
-       
+
        XMLTree tree;
        tree.set_root (&get_state());
 
index 15702a688672404fd2b70376ff80d0ed4a43a831..ab1e645e56f1ecbe06c319a9847a01dcccbbdfd1 100644 (file)
@@ -37,16 +37,16 @@ class DeviceProfile
   public:
        DeviceProfile (const std::string& name = "");
        ~DeviceProfile();
-       
+
        std::string get_button_action (Button::ID, int modifier_state) const;
        void set_button_action (Button::ID, int modifier_state, const std::string&);
-       
+
        const std::string& name() const;
        void set_path (const std::string&);
 
        static void reload_device_profiles ();
        static std::map<std::string,DeviceProfile> device_profiles;
-       
+
   private:
        struct ButtonActions {
            std::string plain;
@@ -56,13 +56,13 @@ class DeviceProfile
            std::string cmdalt;
            std::string shiftcontrol;
        };
-       
+
        typedef std::map<Button::ID,ButtonActions> ButtonActionMap;
-       
+
        std::string _name;
        std::string _path;
        ButtonActionMap _button_map;
-       
+
        int set_state (const XMLNode&, int version);
        XMLNode& get_state () const;
 
index 5e40538096b6ee8863a75b4cd211bd5226143b65..33e1e4c29faf34d8df107f56b57073c6c0d4da79 100644 (file)
@@ -66,7 +66,7 @@ Fader::update_message ()
        }
 
        last_update_position = posi;
-       
+
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("generate fader message for position %1 (%2)\n", position, posi));
        return MidiByteArray  (3, 0xe0 + id(), posi & 0x7f, posi >> 7);
 }
index e83e657e68c3c7979e466160913a8f079deda1ea..dae022c690eec428b7b69e3977366200f2b0f135 100644 (file)
@@ -10,7 +10,7 @@ namespace Mackie {
 class Fader : public Control
 {
   public:
-       
+
        Fader (int id, std::string name, Group & group)
                : Control (id, name, group)
                , position (0.0)
@@ -20,11 +20,11 @@ class Fader : public Control
 
        MidiByteArray set_position (float);
        MidiByteArray zero() { return set_position (0.0); }
-       
+
        MidiByteArray update_message ();
 
        static Control* factory (Surface&, int id, const char*, Group&);
-       
+
   private:
        float position;
        int   last_update_position;
index 48bfa6cd8aeed7e1e57bdeffdcf53fad34e59326..156070dbc89d6072e4258a05fe877585f9221876 100644 (file)
@@ -89,7 +89,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        Gtk::Label* l;
        Gtk::Alignment* align;
        int row = 0;
-       
+
        set_border_width (12);
 
        Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 12));
@@ -102,9 +102,9 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        table->attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
        table->attach (_surface_combo, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
        row++;
-               
+
        vector<string> surfaces;
-       
+
        for (std::map<std::string,DeviceInfo>::iterator i = DeviceInfo::device_info.begin(); i != DeviceInfo::device_info.end(); ++i) {
                surfaces.push_back (i->first);
        }
@@ -127,7 +127,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
                send_string = _("Surface sends via:");
                receive_string = _("Surface receives via:");
        }
-       
+
        l = manage (new Gtk::Label (send_string));
        l->set_alignment (1.0, 0.5);
        table->attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
@@ -149,10 +149,10 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        table->attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        table->attach (ipmidi_base_port_spinner, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        row++;
-       
+
        ipmidi_base_port_spinner.set_sensitive (_cp.device_info().uses_ipmidi());
        ipmidi_base_port_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::ipmidi_spinner_changed));
-       
+
        /* leave an extra blank row */
        row++;
 
@@ -164,7 +164,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
 
        touch_sensitivity_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::touch_sensitive_change));
        touch_sensitivity_scale.set_update_policy (Gtk::UPDATE_DISCONTINUOUS);
-       
+
        l = manage (new Gtk::Label (_("Button click")));
        l->set_alignment (1.0, 0.5);
        table->attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
@@ -173,7 +173,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        align->add (relay_click_button);
        table->attach (*align, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        row++;
-       
+
        l = manage (new Gtk::Label (_("Backlight")));
        l->set_alignment (1.0, 0.5);
        table->attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
@@ -182,7 +182,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        align->add (backlight_button);
        table->attach (*align, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        row++;
-               
+
        l = manage (new Gtk::Label (_("Send Fader Position Only When Touched")));
        l->set_alignment (1.0, 0.5);
        table->attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
@@ -191,7 +191,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        align->add (absolute_touch_mode_button);
        table->attach (*align, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        row++;
-       
+
        l = manage (new Gtk::Label (_("Send Fader Position When Moved")));
        l->set_alignment (1.0, 0.5);
        table->attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
@@ -200,7 +200,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        align->add (touch_move_mode_button);
        table->attach (*align, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        row++;
-       
+
        l = manage (new Gtk::Label (_("Fader Touch Sense Sensitivity")));
        l->set_alignment (1.0, 0.5);
        table->attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
@@ -209,14 +209,14 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        table->attach (touch_sensitivity_scale, 1, 2, 5, 6, AttachOptions(FILL|EXPAND), AttachOptions (0));
        table->attach (recalibrate_fader_button, row, row+1, 6, 7, AttachOptions(FILL|EXPAND), AttachOptions (0));
        row++;
-       
+
 
        table->attach (discover_button, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        discover_button.signal_clicked().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::discover_clicked));
        row++;
-       
+
        vector<string> profiles;
-       
+
        profiles.push_back ("default");
 
        for (std::map<std::string,DeviceProfile>::iterator i = DeviceProfile::device_profiles.begin(); i != DeviceProfile::device_profiles.end(); ++i) {
@@ -234,13 +234,13 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        VBox* fkey_packer = manage (new VBox);
        HBox* profile_packer = manage (new HBox);
        HBox* observation_packer = manage (new HBox);
-       
+
        l = manage (new Gtk::Label (_("Profile/Settings:")));
        profile_packer->pack_start (*l, false, false);
        profile_packer->pack_start (_profile_combo, true, true);
        profile_packer->set_spacing (12);
        profile_packer->set_border_width (12);
-       
+
        l = manage (new Gtk::Label (_("* Button available at the original Mackie MCU PRO or current device if enabled (NOT implemented yet). Device specific name presented.")));
        observation_packer->pack_start (*l, false, false);
 
@@ -322,7 +322,7 @@ MackieControlProtocolGUI::build_available_action_menu ()
        parent = *(rowp);
        parent[available_action_columns.name] = _("CmdAlt");
 
-       
+
        for (l = labels.begin(), k = keys.begin(), p = paths.begin(), t = tooltips.begin(); l != labels.end(); ++k, ++p, ++t, ++l) {
 
                TreeModel::Row row;
@@ -395,7 +395,7 @@ MackieControlProtocolGUI::build_function_key_editor ()
        col = manage (new TreeViewColumn (_("Plain"), *renderer));
        col->add_attribute (renderer->property_text(), function_key_columns.plain);
        function_key_editor.append_column (*col);
-       
+
        renderer = make_action_renderer (available_action_model, function_key_columns.shift);
        col = manage (new TreeViewColumn (_("Shift"), *renderer));
        col->add_attribute (renderer->property_text(), function_key_columns.shift);
@@ -461,7 +461,7 @@ MackieControlProtocolGUI::refresh_function_key_editor ()
                                /* Probably a key alias */
                                row[function_key_columns.plain] = action;
                        } else {
-                               
+
                                act = ActionManager::get_action (action.c_str());
                                if (act) {
                                        row[function_key_columns.plain] = act->get_label();
@@ -569,7 +569,7 @@ MackieControlProtocolGUI::action_changed (const Glib::ustring &sPath, const Glib
        if (row) {
 
                std::map<std::string,std::string>::iterator i = action_map.find (text);
-               
+
                if (i == action_map.end()) {
                        if (!remove) {
                                return;
index 7927d106b006aedc7a6aea905218f9cb1bd3dc55..2bc17d306bd79be13bbd20b53b536528b198fb5c 100644 (file)
@@ -41,14 +41,14 @@ class MackieControlProtocolGUI : public Gtk::Notebook
 {
    public:
        MackieControlProtocolGUI (MackieControlProtocol &);
-       
+
    private:
        MackieControlProtocol& _cp;
        Gtk::ComboBoxText _surface_combo;
        Gtk::ComboBoxText _profile_combo;
        Gtk::ComboBoxText _input_port_combo;
        Gtk::ComboBoxText _output_port_combo;
-       
+
        struct AvailableActionColumns : public Gtk::TreeModel::ColumnRecord {
                AvailableActionColumns() {
                        add (name);
index bb0a4d0509b38d1484e5ed0d220ee493174b370c..1a9760bcbea7461428a9ffccc5d7869a2ef3c2a8 100644 (file)
@@ -35,7 +35,7 @@ static ControlProtocol*
 new_mackie_protocol (ControlProtocolDescriptor*, Session* s)
 {
        MackieControlProtocol* mcp = 0;
-       
+
        try {
                mcp = new MackieControlProtocol (*s);
                /* do not set active here - wait for set_state() */
@@ -45,7 +45,7 @@ new_mackie_protocol (ControlProtocolDescriptor*, Session* s)
                delete mcp;
                mcp = 0;
        }
-       
+
        return mcp;
 }
 
@@ -90,6 +90,6 @@ static ControlProtocolDescriptor mackie_descriptor = {
        /*initialize :        */   new_mackie_protocol,
        /*destroy :           */   delete_mackie_protocol
 };
-       
+
 
 extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &mackie_descriptor; }
index 568589e54d9aa2542f84b7625fde554613f20163..f54e3efeb310a3a46fbcef601cb925b0932d600e 100644 (file)
@@ -18,7 +18,7 @@ class JogWheel
 {
   public:
        enum Mode { scroll };
-       
+
        JogWheel (MackieControlProtocol & mcp);
 
        /// As the wheel turns...
index d103829a77bc8b476549b89a196b1d67ae02a074..59b9f6cb20a9026ac99b1e648dfb6b709f70c69c 100644 (file)
@@ -48,18 +48,18 @@ Led::set_state (LedState new_state)
        MIDI::byte msg = 0;
 
        switch  (state.state()) {
-       case LedState::on:                      
+       case LedState::on:
                msg = 0x7f;
                break;
-       case LedState::off:                     
+       case LedState::off:
                msg = 0x00;
                break;
-       case LedState::flashing:        
+       case LedState::flashing:
                msg = 0x01;
                break;
-       case LedState::none:                    
+       case LedState::none:
                return MidiByteArray ();
        }
-       
+
        return MidiByteArray  (3, 0x90, id(), msg);
 }
index 8361c4bb8df9d0d44ee86a021ce83e50903deeee..19c48cb6a867f1ae89ae0c2cb49741a4bbe787da 100644 (file)
@@ -42,12 +42,12 @@ public:
                , state (off)
        {
        }
-       
+
        Led & led() { return *this; }
        MidiByteArray set_state (LedState);
 
        MidiByteArray zero() { return set_state (off); }
-       
+
        static Control* factory (Surface&, int id, const char*, Group&);
 
   private:
index b40c5c3915e6eb9b753bd9ca0f6b67b83eb3ea3e..6dcca3dd39ed9fe87dbd26cc6024a9db2435e5eb 100644 (file)
@@ -30,14 +30,14 @@ public:
        : _msg( msg )
        {
        }
-       
+
        virtual ~MackieControlException() throw () {}
-       
+
        const char * what() const throw ()
        {
                return _msg.c_str();
        }
-       
+
 private:
        std::string _msg;
 };
index ac1ba53896396d173be015323e770891a11ea306..0536a0c76474ac72c2e10e13ad0d973eeb378b04 100644 (file)
@@ -118,12 +118,12 @@ class MackieControlProtocol
                Swap,   /* fader controls secondary, vpot controls primary */
                Zero,   /* fader controls primary, but doesn't move, vpot controls secondary */
        };
-       
+
        MackieControlProtocol(ARDOUR::Session &);
        virtual ~MackieControlProtocol();
 
        static MackieControlProtocol* instance() { return _instance; }
-       
+
        const Mackie::DeviceInfo& device_info() const { return _device_info; }
        Mackie::DeviceProfile& device_profile() { return _device_profile; }
 
@@ -148,9 +148,9 @@ class MackieControlProtocol
           we do not implement get/set_feedback() since this aspect of
           support for the protocol is not optional.
        */
-       
+
        static bool probe();
-       
+
         Glib::Threads::Mutex surfaces_lock;
        typedef std::list<boost::shared_ptr<Mackie::Surface> > Surfaces;
        Surfaces surfaces;
@@ -159,9 +159,9 @@ class MackieControlProtocol
 
        void set_master_on_surface_strip (uint32_t surface, uint32_t strip);
        void set_monitor_on_surface_strip (uint32_t surface, uint32_t strip);
-       
+
        uint32_t n_strips (bool with_locked_strips = true) const;
-       
+
        bool has_editor () const { return true; }
        void* get_gui () const;
        void tear_down_gui ();
@@ -174,7 +174,7 @@ class MackieControlProtocol
        void recalibrate_faders ();
        void toggle_backlight ();
        void set_touch_sensitivity (int);
-       
+
        /// rebuild the current bank. Called on route added/removed and
        /// remote id changed.
        void refresh_current_bank();
@@ -191,7 +191,7 @@ class MackieControlProtocol
        /// Turn timecode on and beats off, or vice versa, depending
        /// on state of _timecode_type
        void update_timecode_beats_led();
-       
+
        /// this is called to generate the midi to send in response to a button press.
        void update_led(Mackie::Surface&, Mackie::Button & button, Mackie::LedState);
 
@@ -209,7 +209,7 @@ class MackieControlProtocol
        void add_down_button (ARDOUR::AutomationType, int surface, int strip);
        void remove_down_button (ARDOUR::AutomationType, int surface, int strip);
        ControlList down_controls (ARDOUR::AutomationType);
-       
+
        void add_down_select_button (int surface, int strip);
        void remove_down_select_button (int surface, int strip);
        void select_range ();
@@ -221,7 +221,7 @@ class MackieControlProtocol
        void not_session_load () { _session_load = false; }
 
        void midi_connectivity_established ();
-       
+
   protected:
        // shut down the surface
        void close();
@@ -229,14 +229,14 @@ class MackieControlProtocol
        // This sets up the notifications and sets the
        // controls to the correct values
        void update_surfaces();
-       
+
        // connects global (not strip) signals from the Session to here
        // so the surface can be notified of changes from the other UIs.
        void connect_session_signals();
-       
+
        // set all controls to their zero position
        void zero_all();
-       
+
        /**
           Fetch the set of routes to be considered for control by the
           surface. Excluding master, hidden and control routes, and inactive routes
@@ -254,7 +254,7 @@ class MackieControlProtocol
 
        std::string format_bbt_timecode (ARDOUR::framepos_t now_frame);
        std::string format_timecode_timecode (ARDOUR::framepos_t now_frame);
-       
+
        void do_request (MackieControlUIRequest*);
        int stop ();
 
@@ -267,7 +267,7 @@ class MackieControlProtocol
        struct ButtonHandlers {
            Mackie::LedState (MackieControlProtocol::*press) (Mackie::Button&);
            Mackie::LedState (MackieControlProtocol::*release) (Mackie::Button&);
-       
+
            ButtonHandlers (Mackie::LedState (MackieControlProtocol::*p) (Mackie::Button&),
                            Mackie::LedState (MackieControlProtocol::*r) (Mackie::Button&))
            : press (p)
@@ -277,7 +277,7 @@ class MackieControlProtocol
        typedef std::map<Mackie::Button::ID,ButtonHandlers> ButtonMap;
 
        static MackieControlProtocol* _instance;
-       
+
        Mackie::DeviceInfo       _device_info;
        Mackie::DeviceProfile    _device_profile;
        sigc::connection          periodic_connection;
index c2d3680ff0300cac0a6d2ae6b83690514dab1345..5bf52ce4c4cf771c140a13ba771dade1db764328 100644 (file)
@@ -189,7 +189,7 @@ LedState
 MackieControlProtocol::cursor_right_press (Button& )
 {
        if (zoom_mode()) {
-               
+
                if (main_modifier_state() & MODIFIER_OPTION) {
                        /* reset selected tracks to default vertical zoom */
                } else {
@@ -209,7 +209,7 @@ MackieControlProtocol::cursor_right_press (Button& )
 
                ScrollTimeline (page_fraction);
        }
-                       
+
        return off;
 }
 
@@ -223,7 +223,7 @@ LedState
 MackieControlProtocol::cursor_up_press (Button&)
 {
        if (zoom_mode()) {
-               
+
                if (main_modifier_state() & MODIFIER_CONTROL) {
                        VerticalZoomInSelected (); /* EMIT SIGNAL */
                } else {
index 91de8d6ef69899074ea785c9c71848577a18357d..27171aff16da500f873e0fea9457bf8a2a269281 100644 (file)
@@ -43,24 +43,24 @@ Meter::factory (Surface& surface, int id, const char* name, Group& group)
 
 void
 Meter::notify_metering_state_changed(Surface& surface, bool transport_is_rolling, bool metering_active)
-{      
+{
        MidiByteArray msg;
-               
+
        // sysex header
        msg << surface.sysex_hdr();
-               
+
        // code for Channel Meter Enable Message
        msg << 0x20;
-               
+
        // Channel identification
        msg << id();
-               
+
        // Enable (0x07) / Disable (0x00) level meter on LCD, peak hold display on horizontal meter and signal LED
        msg << ((transport_is_rolling && metering_active) ? 0x07 : 0x00);
-               
+
        // sysex trailer
        msg << MIDI::eox;
-               
+
        surface.write (msg);
 }
 
@@ -70,7 +70,7 @@ Meter::send_update (Surface& surface, float dB)
        float def = 0.0f; /* Meter deflection %age */
 
        // DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Meter ID %1 dB %2\n", id(), dB));
-       
+
        if (dB < -70.0f) {
                def = 0.0f;
        } else if (dB < -60.0f) {
@@ -88,19 +88,19 @@ Meter::send_update (Surface& surface, float dB)
        } else {
                def = 115.0f;
        }
-       
+
        /* 115 is the deflection %age that would be
           when dB=6.0. this is an arbitrary
           endpoint for our scaling.
        */
 
        MidiByteArray msg;
-       
+
        if (def > 100.0f) {
                if (!overload_on) {
                        overload_on = true;
                        surface.write (MidiByteArray (2, 0xd0, (id() << 4) | 0xe));
-                       
+
                }
        } else {
                if (overload_on) {
@@ -108,11 +108,11 @@ Meter::send_update (Surface& surface, float dB)
                        surface.write (MidiByteArray (2, 0xd0, (id() << 4) | 0xf));
                }
        }
-       
+
        /* we can use up to 13 segments */
 
        int segment = lrintf ((def/115.0) * 13.0);
-       
+
        surface.write (MidiByteArray (2, 0xd0, (id()<<4) | segment));
 }
 
index 1cbeeac0afc7522d39c328c357a59b2814008cf8..9a5d88ed23e97b4933c83716bd0bf3bdf0fefebd 100644 (file)
@@ -35,7 +35,7 @@ public:
        Meter (int id, std::string name, Group & group)
                : Control  (id, name, group)
                , overload_on (false) {}
-       
+
        void send_update (Surface&, float dB);
 
        MidiByteArray zero();
index 1e94e781c0a6b49ecaf4dade253da3ad5bdbf4cf..ffb94a03a9cf04862ed847e7fe626db7f62a400c 100644 (file)
@@ -34,7 +34,7 @@ MidiByteArray::MidiByteArray (size_t size, MIDI::byte array[])
        for  (size_t i = 0; i < size; ++i)
        {
                push_back (array[i]);
-       }                       
+       }
 }
 
 MidiByteArray::MidiByteArray (size_t count, MIDI::byte first, ...)
index 372e48ab90b59764c5afbf9ef235016b46c6a673..3d3bcecd28d1688f09e487b180992c6dda7d8277 100644 (file)
@@ -49,14 +49,14 @@ class MidiByteArray : public std::vector<MIDI::byte>
 {
 public:
        MidiByteArray() : std::vector<MIDI::byte>() {}
-       
+
        MidiByteArray( size_t count, MIDI::byte array[] );
 
        /**
                Accepts a preceding count, and then a list of bytes
        */
        MidiByteArray( size_t count, MIDI::byte first, ... );
-       
+
        /// copy the given number of bytes from the given array
        void copy( size_t count, MIDI::byte arr[] );
 };
index e1ddae82f8056af43f648eda4aa7cf5219e89695..3ac991116f2153aa19982d1c8ecd5232015dca99 100644 (file)
@@ -45,7 +45,7 @@ Pot::set (float val, bool onoff, Mode mode)
 
        // center on if val is "very close" to 0.50
        MIDI::byte msg =  (val > 0.48 && val < 0.58 ? 1 : 0) << 6;
-       
+
        // Pot/LED mode
        msg |=  (mode << 4);
 
@@ -57,7 +57,7 @@ Pot::set (float val, bool onoff, Mode mode)
        if (val < 0){
          val = val * -1;
        }
-       
+
        // val, but only if off hasn't explicitly been set
        if (onoff) {
                if (mode == spread) {
@@ -73,4 +73,4 @@ Pot::set (float val, bool onoff, Mode mode)
        return MidiByteArray (3, 0xb0, 0x20 + id(), msg);
 
 }
-       
+
index ca5c79e9e012ce1757124324a51b309f2e482edb..4528e7b1551be64e655febd509888b53d860741a 100644 (file)
@@ -111,7 +111,7 @@ Strip::Strip (Surface& s, const std::string& name, int index, const map<Button::
                                                                   _surface->number(), index, Button::id_to_name (bb->bid()),
                                                                   bb->id(), b->second.base_id));
        }
-}      
+}
 
 Strip::~Strip ()
 {
@@ -161,7 +161,7 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
        }
 
        route_connections.drop_connections ();
-       
+
        _solo->set_control (boost::shared_ptr<AutomationControl>());
        _mute->set_control (boost::shared_ptr<AutomationControl>());
        _select->set_control (boost::shared_ptr<AutomationControl>());
@@ -181,12 +181,12 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
 
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface %1 strip %2 now mapping route %3\n",
                                                           _surface->number(), _index, _route->name()));
-       
+
        _solo->set_control (_route->solo_control());
        _mute->set_control (_route->mute_control());
 
        set_vpot_parameter (PanAzimuthAutomation);
-       
+
        _route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
        _route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
 
@@ -200,28 +200,28 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
        }
        _route->gain_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_gain_changed, this, false), ui_context());
        _route->PropertyChanged.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context());
-       
+
        boost::shared_ptr<Track> trk = boost::dynamic_pointer_cast<ARDOUR::Track>(_route);
-       
+
        if (trk) {
                _recenable->set_control (trk->rec_enable_control());
                trk->rec_enable_control()->Changed .connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_record_enable_changed, this), ui_context());
 
-               
+
        }
-       
+
        // TODO this works when a currently-banked route is made inactive, but not
        // when a route is activated which should be currently banked.
-       
+
        _route->active_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_active_changed, this), ui_context());
        _route->DropReferences.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_route_deleted, this), ui_context());
-       
+
        /* Update */
-       
+
        notify_all ();
 
        /* setup legal VPot modes for this route */
-       
+
        build_input_list (_route->input()->n_ports());
        build_output_list (_route->output()->n_ports());
 
@@ -232,11 +232,11 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
                if (panner) {
                        set<Evoral::Parameter> automatable = panner->what_can_be_automated ();
                        set<Evoral::Parameter>::iterator a;
-                       
+
                        if ((a = automatable.find (PanAzimuthAutomation)) != automatable.end()) {
                                possible_pot_parameters.push_back (PanAzimuthAutomation);
                        }
-                       
+
                        if ((a = automatable.find (PanWidthAutomation)) != automatable.end()) {
                                possible_pot_parameters.push_back (PanWidthAutomation);
                        }
@@ -305,7 +305,7 @@ void
 Strip::notify_gain_changed (bool force_update)
 {
        if (_route) {
-               
+
                Control* control;
 
                if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
@@ -315,13 +315,13 @@ Strip::notify_gain_changed (bool force_update)
                }
 
                boost::shared_ptr<AutomationControl> ac = _route->gain_control();
-               
+
                float gain_coefficient = ac->get_value();
                float normalized_position = ac->internal_to_interface (gain_coefficient);
 
 
                if (force_update || normalized_position != _last_gain_position_written) {
-                       
+
                        if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
                                if (!control->in_use()) {
                                        _surface->write (_vpot->set (normalized_position, true, Pot::wrap));
@@ -350,13 +350,13 @@ Strip::notify_property_changed (const PropertyChange& what_changed)
        if (_route) {
                string line1;
                string fullname = _route->name();
-               
+
                if (fullname.length() <= 6) {
                        line1 = fullname;
                } else {
                        line1 = PBD::short_version (fullname, 6);
                }
-               
+
                _surface->write (display (0, line1));
        }
 }
@@ -382,7 +382,7 @@ Strip::notify_panner_azi_changed (bool force_update)
                }
 
                double pos = pannable->pan_azimuth_control->internal_to_interface (pannable->pan_azimuth_control->get_value());
-               
+
                if (force_update || pos != _last_pan_azi_position_written) {
 
                        if (control == _fader) {
@@ -392,7 +392,7 @@ Strip::notify_panner_azi_changed (bool force_update)
                        } else if (control == _vpot) {
                                _surface->write (_vpot->set (pos, true, Pot::dot));
                        }
-                       
+
                        queue_parameter_display (PanAzimuthAutomation, pos);
                        queue_display_reset (2000);
                        _last_pan_azi_position_written = pos;
@@ -419,12 +419,12 @@ Strip::notify_panner_width_changed (bool force_update)
 
                if (!control) {
                        return;
-               }       
-                       
+               }
+
                double pos = pannable->pan_width_control->internal_to_interface (pannable->pan_width_control->get_value());
-               
+
                if (force_update || pos != _last_pan_azi_position_written) {
-                       
+
                        if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
 
                                if (control == _fader) {
@@ -436,7 +436,7 @@ Strip::notify_panner_width_changed (bool force_update)
                        } else if (control == _vpot) {
                                _surface->write (_vpot->set (pos, true, Pot::spread));
                        }
-                       
+
                        queue_parameter_display (PanWidthAutomation, pos);
                        queue_display_reset (2000);
                        _last_pan_azi_position_written = pos;
@@ -448,9 +448,9 @@ void
 Strip::select_event (Button&, ButtonState bs)
 {
        DEBUG_TRACE (DEBUG::MackieControl, "select button\n");
-       
+
        if (bs == press) {
-               
+
                int ms = _surface->mcp().main_modifier_state();
 
                if (ms & MackieControlProtocol::MODIFIER_CMDALT) {
@@ -459,7 +459,7 @@ Strip::select_event (Button&, ButtonState bs)
                        queue_display_reset (1000);
                        return;
                }
-               
+
                if (ms & MackieControlProtocol::MODIFIER_SHIFT) {
                        /* reset to default */
                        boost::shared_ptr<AutomationControl> ac = _fader->control ();
@@ -468,14 +468,14 @@ Strip::select_event (Button&, ButtonState bs)
                        }
                        return;
                }
-               
+
                DEBUG_TRACE (DEBUG::MackieControl, "add select button on press\n");
-               _surface->mcp().add_down_select_button (_surface->number(), _index);                    
+               _surface->mcp().add_down_select_button (_surface->number(), _index);
                _surface->mcp().select_range ();
-               
+
        } else {
                DEBUG_TRACE (DEBUG::MackieControl, "remove select button on release\n");
-               _surface->mcp().remove_down_select_button (_surface->number(), _index);                 
+               _surface->mcp().remove_down_select_button (_surface->number(), _index);
        }
 }
 
@@ -485,13 +485,13 @@ Strip::vselect_event (Button&, ButtonState bs)
        if (bs == press) {
 
                int ms = _surface->mcp().main_modifier_state();
-                               
+
                if (ms & MackieControlProtocol::MODIFIER_SHIFT) {
 
                        boost::shared_ptr<AutomationControl> ac = _vpot->control ();
-                               
+
                        if (ac) {
-                               
+
                                /* reset to default/normal value */
                                ac->set_value (ac->normal());
                        }
@@ -509,7 +509,7 @@ void
 Strip::fader_touch_event (Button&, ButtonState bs)
 {
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("fader touch, press ? %1\n", (bs == press)));
-       
+
        if (bs == press) {
 
                boost::shared_ptr<AutomationControl> ac = _fader->control ();
@@ -522,20 +522,20 @@ Strip::fader_touch_event (Button&, ButtonState bs)
 
                        _fader->set_in_use (true);
                        _fader->start_touch (_surface->mcp().transport_frame());
-                       
+
                        if (ac) {
                                queue_parameter_display ((AutomationType) ac->parameter().type(), ac->internal_to_interface (ac->get_value()));
                                queue_display_reset (2000);
                        }
                }
-                       
+
        } else {
-               
+
                _fader->set_in_use (false);
                _fader->stop_touch (_surface->mcp().transport_frame(), true);
-               
+
        }
-}      
+}
 
 
 void
@@ -550,12 +550,12 @@ Strip::handle_button (Button& button, ButtonState bs)
        }
 
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("strip %1 handling button %2 press ? %3\n", _index, button.bid(), (bs == press)));
-       
+
        switch (button.bid()) {
        case Button::Select:
                select_event (button, bs);
                break;
-               
+
        case Button::VSelect:
                vselect_event (button, bs);
                break;
@@ -569,34 +569,34 @@ Strip::handle_button (Button& button, ButtonState bs)
                        if (bs == press) {
                                DEBUG_TRACE (DEBUG::MackieControl, "add button on press\n");
                                _surface->mcp().add_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index);
-                               
+
                                float new_value;
                                int ms = _surface->mcp().main_modifier_state();
-                               
+
                                if (ms & MackieControlProtocol::MODIFIER_SHIFT) {
                                        /* reset to default/normal value */
                                        new_value = control->normal();
                                } else {
                                        new_value = control->get_value() ? 0.0 : 1.0;
                                }
-                               
+
                                /* get all controls that either have their
                                 * button down or are within a range of
                                 * several down buttons
                                 */
-                               
+
                                MackieControlProtocol::ControlList controls = _surface->mcp().down_controls ((AutomationType) control->parameter().type());
-                               
-                               
+
+
                                DEBUG_TRACE (DEBUG::MackieControl, string_compose ("there are %1 buttons down for control type %2, new value = %3\n",
                                                                            controls.size(), control->parameter().type(), new_value));
 
                                /* apply change */
-                               
+
                                for (MackieControlProtocol::ControlList::iterator c = controls.begin(); c != controls.end(); ++c) {
                                        (*c)->set_value (new_value);
                                }
-                               
+
                        } else {
                                DEBUG_TRACE (DEBUG::MackieControl, "remove button on release\n");
                                _surface->mcp().remove_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index);
@@ -629,7 +629,7 @@ Strip::do_parameter_display (AutomationType type, float val)
                        float dB = accurate_coefficient_to_dB (val);
                        snprintf (buf, sizeof (buf), "%6.1f", dB);
                        _surface->write (display (1, buf));
-               }               
+               }
                break;
 
        case PanAzimuthAutomation:
@@ -691,7 +691,7 @@ Strip::handle_pot (Pot& pot, float delta)
        /* Pots only emit events when they move, not when they
           stop moving. So to get a stop event, we need to use a timeout.
        */
-       
+
        boost::shared_ptr<AutomationControl> ac = pot.control();
        double p = pot.get_value ();
        p += delta;
@@ -786,12 +786,12 @@ Strip::display (uint32_t line_number, const std::string& line)
 
        // sysex header
        retval << _surface->sysex_hdr();
-       
+
        // code for display
        retval << 0x12;
        // offset (0 to 0x37 first line, 0x38 to 0x6f for second line)
        retval << (_index * 7 + (line_number * 0x38));
-       
+
        // ascii data to display. @param line is UTF-8
        string ascii = Glib::convert_with_fallback (line, "UTF-8", "ISO-8859-1", "_");
        string::size_type len = ascii.length();
@@ -804,7 +804,7 @@ Strip::display (uint32_t line_number, const std::string& line)
        for (int i = len; i < 6; ++i) {
                retval << ' ';
        }
-       
+
        // column spacer, unless it's the right-hand column
        if (_index < 7) {
                retval << ' ';
@@ -812,7 +812,7 @@ Strip::display (uint32_t line_number, const std::string& line)
 
        // sysex trailer
        retval << MIDI::eox;
-       
+
        return retval;
 }
 
@@ -845,7 +845,7 @@ string
 Strip::vpot_mode_string () const
 {
        boost::shared_ptr<AutomationControl> ac = _vpot->control();
-       
+
        if (!ac) {
                return string();
        }
@@ -900,10 +900,10 @@ Strip::queue_display_reset (uint32_t msecs)
        struct timeval delta;
        struct timeval when;
        gettimeofday (&now, 0);
-       
+
        delta.tv_sec = msecs/1000;
        delta.tv_usec = (msecs - ((msecs/1000) * 1000)) * 1000;
-       
+
        timeradd (&now, &delta, &when);
 
        _reset_display_at = (when.tv_sec * 1000000) + when.tv_usec;
@@ -923,10 +923,10 @@ Strip::reset_display ()
        } else {
                _surface->write (blank_display (1));
        }
-               
+
        clear_display_reset ();
 }
-                       
+
 struct RouteCompareByName {
        bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
                return a->name().compare (b->name()) < 0;
@@ -951,19 +951,19 @@ Strip::build_input_list (const ChanCount& channels)
        input_bundles.clear ();
 
        /* give user bundles first chance at being in the menu */
-       
+
        for (ARDOUR::BundleList::iterator i = b->begin(); i != b->end(); ++i) {
                if (boost::dynamic_pointer_cast<UserBundle> (*i)) {
                        maybe_add_to_bundle_map (input_bundles, *i, true, channels);
                }
        }
-       
+
        for (ARDOUR::BundleList::iterator i = b->begin(); i != b->end(); ++i) {
                if (boost::dynamic_pointer_cast<UserBundle> (*i) == 0) {
                        maybe_add_to_bundle_map (input_bundles, *i, true, channels);
                }
        }
-       
+
        boost::shared_ptr<ARDOUR::RouteList> routes = _surface->mcp().get_session().get_routes ();
        RouteList copy = *routes;
        copy.sort (RouteCompareByName ());
@@ -982,19 +982,19 @@ Strip::build_output_list (const ChanCount& channels)
        output_bundles.clear ();
 
        /* give user bundles first chance at being in the menu */
-       
+
        for (ARDOUR::BundleList::iterator i = b->begin(); i != b->end(); ++i) {
                if (boost::dynamic_pointer_cast<UserBundle> (*i)) {
                        maybe_add_to_bundle_map (output_bundles, *i, false, channels);
                }
        }
-       
+
        for (ARDOUR::BundleList::iterator i = b->begin(); i != b->end(); ++i) {
                if (boost::dynamic_pointer_cast<UserBundle> (*i) == 0) {
                        maybe_add_to_bundle_map (output_bundles, *i, false, channels);
                }
        }
-       
+
        boost::shared_ptr<ARDOUR::RouteList> routes = _surface->mcp().get_session().get_routes ();
        RouteList copy = *routes;
        copy.sort (RouteCompareByName ());
@@ -1141,21 +1141,21 @@ Strip::notify_metering_state_changed()
        if (!_route || !_meter) {
                return;
        }
-       
+
        bool transport_is_rolling = (_surface->mcp().get_transport_speed () != 0.0f);
        bool metering_active = _surface->mcp().metering_active ();
-       
+
        if ((_transport_is_rolling == transport_is_rolling) && (_metering_active == metering_active)) {
                return;
        }
-       
+
        _meter->notify_metering_state_changed (*_surface, transport_is_rolling, metering_active);
-       
+
        if (!transport_is_rolling || !metering_active) {
                notify_property_changed (PBD::PropertyChange (ARDOUR::Properties::name));
                notify_panner_azi_changed (true);
        }
-       
+
        _transport_is_rolling = transport_is_rolling;
        _metering_active = metering_active;
 }
index 4099dce8afa9bb1e0f9112642ee8ef0978d44567..c2cbfc2ee6d3d1d622d8df93318d1224f26272db 100644 (file)
@@ -56,7 +56,7 @@ public:
 
        void add (Control & control);
        int index() const { return _index; } // zero based
-       
+
        void set_route (boost::shared_ptr<ARDOUR::Route>, bool with_messages = true);
 
        // call all signal handlers manually
@@ -117,7 +117,7 @@ private:
        void notify_panner_width_changed (bool force_update = true);
        void notify_active_changed ();
        void notify_route_deleted ();
-       
+
        void update_automation ();
        void update_meter ();
 
@@ -136,7 +136,7 @@ private:
 
        void do_parameter_display (ARDOUR::AutomationType, float val);
        void queue_parameter_display (ARDOUR::AutomationType, float val);
-       
+
        typedef std::map<std::string,boost::shared_ptr<ARDOUR::Bundle> > BundleMap;
        BundleMap input_bundles;
        BundleMap output_bundles;
index 51b03f86a3273fc09932a978aba5442eb7a3e142..5bbb08148797a75c78cdb15b68eade4155f4ecb6 100644 (file)
@@ -90,7 +90,7 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui
        , _last_master_gain_written (-0.0f)
 {
        DEBUG_TRACE (DEBUG::MackieControl, "Surface::Surface init\n");
-       
+
        try {
                _port = new SurfacePort (*this);
        } catch (...) {
@@ -114,12 +114,12 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui
        }
 
        uint32_t n = _mcp.device_info().strip_cnt();
-       
+
        if (n) {
                init_strips (n);
                DEBUG_TRACE (DEBUG::MackieControl, "init_strips done\n");
        }
-       
+
        connect_to_signals ();
 
        DEBUG_TRACE (DEBUG::MackieControl, "Surface::Surface done\n");
@@ -135,12 +135,12 @@ Surface::~Surface ()
        for (Groups::iterator it = groups.begin(); it != groups.end(); ++it) {
                delete it->second;
        }
-       
+
        // delete controls
        for (Controls::iterator it = controls.begin(); it != controls.end(); ++it) {
                delete *it;
        }
-       
+
        delete _jog_wheel;
        delete _port;
 
@@ -205,7 +205,7 @@ void
 Surface::init_controls()
 {
        Group* group;
-       
+
        DEBUG_TRACE (DEBUG::MackieControl, "Surface::init_controls: creating groups\n");
        groups["assignment"] = new Group  ("assignment");
        groups["automation"] = new Group  ("automation");
@@ -220,7 +220,7 @@ Surface::init_controls()
        groups["transport"] = new Group  ("transport");
        groups["user"] = new Group  ("user");
        groups["utilities"] = new Group  ("utilities");
-               
+
        DEBUG_TRACE (DEBUG::MackieControl, "Surface::init_controls: creating jog wheel\n");
        if (_mcp.device_info().has_jog_wheel()) {
                _jog_wheel = new Mackie::JogWheel (_mcp);
@@ -251,11 +251,11 @@ Surface::init_strips (uint32_t n)
        for (uint32_t i = 0; i < n; ++i) {
 
                char name[32];
-               
+
                snprintf (name, sizeof (name), "strip_%d", (8* _number) + i);
 
                Strip* strip = new Strip (*this, name, i, strip_buttons);
-               
+
                groups[name] = strip;
                strips.push_back (strip);
        }
@@ -265,17 +265,17 @@ void
 Surface::setup_master ()
 {
        boost::shared_ptr<Route> m;
-       
+
        if ((m = _mcp.get_session().monitor_out()) == 0) {
                m = _mcp.get_session().master_out();
        }
-       
+
        if (!m) {
                return;
        }
 
        _master_fader = dynamic_cast<Fader*> (Fader::factory (*this, _mcp.device_info().strip_cnt(), "master", *groups["master"]));
-       
+
        _master_fader->set_control (m->gain_control());
        m->gain_control()->Changed.connect (*this, MISSING_INVALIDATOR, boost::bind (&Surface::master_gain_changed, this), ui_context());
 
@@ -384,7 +384,7 @@ Surface::connect_to_signals ()
                }
                // 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()));
-               
+
                _connected = true;
        }
 }
@@ -402,7 +402,7 @@ Surface::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, uin
 
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface::handle_midi_pitchbend_message on port %3, fader = %1 value = %2 (%4)\n",
                                                           fader_id, pb, _number, pb/16384.0));
-       
+
        if (_mcp.device_info().no_handshake()) {
                turn_it_on ();
        }
@@ -437,7 +437,7 @@ void
 Surface::handle_midi_note_on_message (MIDI::Parser &, MIDI::EventTwoBytes* ev)
 {
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface::handle_midi_note_on_message %1 = %2\n", (int) ev->note_number, (int) ev->velocity));
-       
+
        if (_mcp.device_info().no_handshake()) {
                turn_it_on ();
        }
@@ -445,7 +445,7 @@ Surface::handle_midi_note_on_message (MIDI::Parser &, MIDI::EventTwoBytes* ev)
        if (_mcp.device_info().device_type() == DeviceInfo::HUI && ev->note_number == 0 && ev->velocity == 127) {
                turn_it_on ();
        }
-       
+
        /* fader touch sense is given by "buttons" 0xe..0xe7 and 0xe8 for the
         * master.
         */
@@ -516,7 +516,7 @@ Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev
        } else {
                delta = sign * (ticks / (float) 0x3f);
        }
-       
+
        if (!pot) {
                if (ev->controller_number == Jog::ID && _jog_wheel) {
 
@@ -595,16 +595,16 @@ calculate_challenge_response (MidiByteArray::iterator begin, MidiByteArray::iter
        MidiByteArray l;
        back_insert_iterator<MidiByteArray> back  (l);
        copy (begin, end, back);
-       
+
        MidiByteArray retval;
-       
+
        // this is how to calculate the response to the challenge.
        // from the Logic docs.
        retval <<  (0x7f &  (l[0] +  (l[1] ^ 0xa) - l[3]));
        retval <<  (0x7f &  ( (l[2] >> l[3]) ^  (l[0] + l[3])));
        retval <<  (0x7f &  ((l[3] -  (l[2] << 2)) ^  (l[0] | l[1])));
        retval <<  (0x7f &  (l[1] - l[2] +  (0xf0 ^  (l[3] << 4))));
-       
+
        return retval;
 }
 
@@ -613,7 +613,7 @@ MidiByteArray
 Surface::host_connection_query (MidiByteArray & bytes)
 {
        MidiByteArray response;
-       
+
        if (bytes[4] != 0x10 && bytes[4] != 0x11) {
                /* not a Logic Control device - no response required */
                return response;
@@ -621,7 +621,7 @@ Surface::host_connection_query (MidiByteArray & bytes)
 
        // handle host connection query
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("host connection query: %1\n", bytes));
-       
+
        if  (bytes.size() != 18) {
                cerr << "expecting 18 bytes, read " << bytes << " from " << _port->input_port().name() << endl;
                return response;
@@ -639,14 +639,14 @@ MidiByteArray
 Surface::host_connection_confirmation (const MidiByteArray & bytes)
 {
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("host_connection_confirmation: %1\n", bytes));
-       
+
        // decode host connection confirmation
        if  (bytes.size() != 14) {
                ostringstream os;
                os << "expecting 14 bytes, read " << bytes << " from " << _port->input_port().name();
                throw MackieControlException (os.str());
        }
-       
+
        // send version request
        return MidiByteArray (2, 0x13, 0x00);
 }
@@ -725,7 +725,7 @@ Surface::zero_all ()
        if (_mcp.device_info().has_timecode_display ()) {
                display_timecode (string (10, '0'), string (10, ' '));
        }
-       
+
        if (_mcp.device_info().has_two_character_display()) {
                show_two_char_display (string (2, '0'), string (2, ' '));
        }
@@ -839,13 +839,13 @@ Surface::show_two_char_display (const std::string & msg, const std::string & dot
        if (_stype != mcu || !_mcp.device_info().has_two_character_display() || msg.length() != 2 || dots.length() != 2) {
                return;
        }
-       
+
        MidiByteArray right (3, 0xb0, 0x4b, 0x00);
        MidiByteArray left (3, 0xb0, 0x4a, 0x00);
-       
+
        right[2] = translate_seven_segment (msg[0]) +  (dots[0] == '.' ? 0x40 : 0x00);
        left[2] = translate_seven_segment (msg[1]) +  (dots[1] == '.' ? 0x40 : 0x00);
-       
+
        _port->write (right);
        _port->write (left);
 }
@@ -866,7 +866,7 @@ Surface::display_timecode (const std::string & timecode, const std::string & las
        }
        // if there's no change, send nothing, not even sysex header
        if  (timecode == last_timecode) return;
-       
+
        // length sanity checking
        string local_timecode = timecode;
 
@@ -879,7 +879,7 @@ Surface::display_timecode (const std::string & timecode, const std::string & las
        while  (local_timecode.length() < 10) {
                local_timecode += " ";
        }
-       
+
        // translate characters.
        // Only the characters that actually changed are sent.
        int position = 0x3f;
@@ -949,7 +949,7 @@ Surface::update_view_mode_display ()
        }
 
        if (id >= 0) {
-               
+
                /* we are attempting to turn a global button/LED on */
 
                map<int,Control*>::iterator x = controls_by_device_independent_id.find (id);
@@ -999,7 +999,7 @@ Surface::next_jog_mode ()
 void
 Surface::set_jog_mode (JogWheel::Mode)
 {
-}      
+}
 
 bool
 Surface::route_is_locked_to_strip (boost::shared_ptr<Route> r) const
@@ -1065,13 +1065,13 @@ Surface::recalibrate_faders ()
                msg[4] = 0x11; /* reset Logic Control XT */
                _port->write (msg);
        }
-}      
+}
 
 void
 Surface::set_touch_sensitivity (int sensitivity)
 {
        /* NOTE: assumed called from GUI code, hence sleep() */
-       
+
        /* sensitivity already clamped by caller */
 
        if (_port) {
index 7ca620d3b68b4375654262e0cca92e9e90ac2e75..1c989ec518be45d9bef8191d3791dd187022ffa1 100644 (file)
@@ -62,7 +62,7 @@ public:
        std::map<int,Led*> leds;
        std::map<int,Meter*> meters;
        std::map<int,Control*> controls_by_device_independent_id;
-       
+
        Mackie::JogWheel* jog_wheel() const { return _jog_wheel; }
        Fader* master_fader() const { return _master_fader; }
 
@@ -88,7 +88,7 @@ public:
        void periodic (uint64_t now_usecs);
        void redisplay ();
        void hui_heartbeat ();
-       
+
        void handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t, uint32_t channel_id);
        void handle_midi_controller_message (MIDI::Parser&, MIDI::EventTwoBytes*);
        void handle_midi_note_on_message (MIDI::Parser&, MIDI::EventTwoBytes*);
@@ -105,7 +105,7 @@ public:
 
        /// display an indicator of the first switched-in Route. Do nothing by default.
        void display_bank_start (uint32_t /*current_bank*/);
-               
+
        /// called from MackieControlProtocol::zero_all to turn things off
        void zero_all ();
        void zero_controls ();
@@ -122,7 +122,7 @@ public:
        void recalibrate_faders ();
        void toggle_backlight ();
        void set_touch_sensitivity (int);
-       
+
        /**
                This is used to calculate the clicks per second that define
                a transport speed of 1.0 for the jog wheel. 100.0 is 10 clicks
@@ -144,7 +144,7 @@ public:
        // be two characters
        void show_two_char_display (const std::string & msg, const std::string & dots = "  ");
        void show_two_char_display (unsigned int value, const std::string & dots = "  ");
-       
+
        void update_view_mode_display ();
        void update_flip_mode_display ();
 
@@ -162,7 +162,7 @@ public:
        int set_state (const XMLNode&, int version);
 
   protected:
-       
+
   private:
        MackieControlProtocol& _mcp;
        SurfacePort*           _port;
index 4a8cff6e1606e4382e1cefa2a20cdb702299f1f0..3129b5a1fd4303d1de4280d7ceda78d639fe7057 100644 (file)
@@ -57,7 +57,7 @@ SurfacePort::SurfacePort (Surface& s)
                _output_port = _input_port;
 
        } else {
-               
+
                _async_in  = AudioEngine::instance()->register_input_port (DataType::MIDI, string_compose (_("%1 in"),  _surface->name()), true);
                _async_out = AudioEngine::instance()->register_output_port (DataType::MIDI, string_compose (_("%1 out"),  _surface->name()), true);
 
@@ -81,7 +81,7 @@ SurfacePort::~SurfacePort()
                        AudioEngine::instance()->unregister_port (_async_in);
                        _async_in.reset ((ARDOUR::Port*) 0);
                }
-               
+
                if (_async_out) {
                        _output_port->drain (10000);
                        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("unregistering output port %1\n", _async_out->name()));
@@ -106,7 +106,7 @@ SurfacePort::get_state ()
        child = new XMLNode (X_("Input"));
        child->add_child_nocopy (_async_in->get_state());
        node->add_child_nocopy (*child);
-       
+
 
        child = new XMLNode (X_("Output"));
        child->add_child_nocopy (_async_out->get_state());
@@ -150,7 +150,7 @@ string fetch_errmsg (int error_number)
        char * msg = strerror (error_number);
        return msg;
 }
-       
+
 int
 SurfacePort::write (const MidiByteArray & mba)
 {
@@ -164,7 +164,7 @@ SurfacePort::write (const MidiByteArray & mba)
        if (mba[0] != 0xf0 && mba.size() > 3) {
                std::cerr << "TOO LONG WRITE: " << mba << std::endl;
        }
-               
+
        /* this call relies on std::vector<T> using contiguous storage. not
         * actually guaranteed by the standard, but way, way beyond likely.
         */
index d22e46f4bf158b2d84f4cfa64de03aae8f58cfa2..2c78e692a7f7adaaea9f08272107c16bb417001d 100644 (file)
@@ -58,7 +58,7 @@ public:
 
     /// an easier way to output bytes via midi
     int write (const MidiByteArray&);
-       
+
     MIDI::Port& input_port() const { return *_input_port; }
     MIDI::Port& output_port() const { return *_output_port; }
 
@@ -73,7 +73,7 @@ private:
     MIDI::Port* _output_port;
     boost::shared_ptr<ARDOUR::Port> _async_in;
     boost::shared_ptr<ARDOUR::Port> _async_out;
-};     
+};
 
 std::ostream& operator <<  (std::ostream& , const SurfacePort& port);
 
index 31470a92c36bb273c23845cf755af584752af676..423b962ce849b85114b0573bcdda884a92c7757d 100644 (file)
@@ -36,7 +36,7 @@ namespace Mackie
 class Timer
 {
 public:
-       
+
        /**
                start the timer running if true, or just create the
                object if false.
@@ -46,7 +46,7 @@ public:
                if ( shouldStart )
                        start();
        }
-       
+
        /**
                Start the timer running. Return the current timestamp, in milliseconds
        */
@@ -81,7 +81,7 @@ public:
                        return (_stop - _start) / 1000;
                }
        }
-       
+
        /**
                Call stop and then start. Return the value from stop.
        */
index fd1b225c65182c988a335039fe6a70a541b214aa..87676ae0f6c8fbeba640bdd3f4dbfc37823daeec 100644 (file)
@@ -41,19 +41,19 @@ public:
        LedState (state_t state): _state (state) {}
 
        LedState& operator= (state_t s) { _state = s; return *this;  }
-               
+
        bool operator ==  (const LedState & other) const
        {
                return state() == other.state();
        }
-       
+
        bool operator !=  (const LedState & other) const
        {
                return state() != other.state();
        }
-       
+
        state_t state() const { return _state; }
-       
+
 private:
        state_t _state;
 };
@@ -72,27 +72,27 @@ enum ButtonState { neither = -1, release = 0, press = 1 };
 struct ControlState
 {
        ControlState(): pos(0.0), sign(0), delta(0.0), ticks(0), led_state(off), button_state(neither) {}
-       
+
        ControlState (LedState ls): pos(0.0), delta(0.0), led_state(ls), button_state(neither) {}
-       
+
        // Note that this sets both pos and delta to the flt value
        ControlState (LedState ls, float flt): pos(flt), delta(flt), ticks(0), led_state(ls), button_state(neither) {}
        ControlState (float flt): pos(flt), delta(flt), ticks(0), led_state(none), button_state(neither) {}
        ControlState (float flt, unsigned int tcks): pos(flt), delta(flt), ticks(tcks), led_state(none), button_state(neither) {}
        ControlState (ButtonState bs): pos(0.0), delta(0.0), ticks(0), led_state(none), button_state(bs) {}
-       
+
        /// For faders. Between 0 and 1.
        float pos;
-               
+
        /// For pots. Sign. Either -1 or 1;
        int sign;
 
        /// For pots. Signed value of total movement. Between 0 and 1
        float delta;
-               
+
        /// For pots. Unsigned number of ticks. Usually between 1 and 16.
        unsigned int ticks;
-               
+
        LedState led_state;
        ButtonState button_state;
 };
index 568e03edffd477498acb70c6bb283364428c783a..d26a31788e877144c9b84baf21d348a8d10b6325 100644 (file)
@@ -28,7 +28,7 @@ static ControlProtocol*
 new_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s)
 {
        OSC* osc = new OSC (*s, Config->get_osc_port());
-       
+
        osc->set_active (true);
 
        return osc;
index f046053091d7e48dfb4e3c771c9cc6aa29865f7b..38aad2945fac0f4c2ef5f455d266f004b8a19698 100644 (file)
@@ -44,7 +44,7 @@ namespace ARDOUR {
 class Session;
 class Route;
 }
-       
+
 /* this is mostly a placeholder because I suspect that at some
    point we will want to add more members to accomodate
    certain types of requests to the OSC UI
@@ -85,7 +85,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
 
        GSource* local_server;
        GSource* remote_server;
-       
+
        bool osc_input_handler (Glib::IOCondition, lo_server);
 
   private:
@@ -102,7 +102,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        void register_callbacks ();
 
        void route_added (ARDOUR::RouteList&);
-               
+
        // Handlers for "Application Hook" signals
        void session_loaded (ARDOUR::Session&);
        void session_exported (std::string, std::string);
@@ -114,9 +114,9 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
 
        void send_current_value (const char* path, lo_arg** argv, int argc, lo_message msg);
        void current_value_query (const char* path, size_t len, lo_arg **argv, int argc, lo_message msg);
-       
+
        int current_value (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data);
-       
+
        int catchall (const char *path, const char *types, lo_arg **argv, int argc, void *data);
        static int _catchall (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data);
 
@@ -131,10 +131,10 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
                name (data);            \
                return 0;               \
        }
-       
+
        PATH_CALLBACK_MSG(routes_list);
        PATH_CALLBACK_MSG(transport_frame);
-       
+
 #define PATH_CALLBACK(name) \
         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
                return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
@@ -238,18 +238,18 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        int route_set_send_gain_dB (int rid, int sid, float val);
        int route_plugin_parameter (int rid, int piid,int par, float val);
        int route_plugin_parameter_print (int rid, int piid,int par);
-       
+
        void listen_to_route (boost::shared_ptr<ARDOUR::Route>, lo_address);
        void end_listen (boost::shared_ptr<ARDOUR::Route>, lo_address);
        void drop_route (boost::weak_ptr<ARDOUR::Route>);
-       
+
        void route_name_changed (const PBD::PropertyChange&, boost::weak_ptr<ARDOUR::Route> r, lo_address addr);
-       
+
        void update_clock ();
 
 
        typedef std::list<OSCRouteObserver*> RouteObservers;
-       
+
        RouteObservers route_observers;
 
        static OSC* _instance;
index ce86c8aee78a98c445e8460b914ef8a449263885..2cd4c310808c115df9d7cbd98d5851109cee0ec2 100644 (file)
@@ -63,7 +63,7 @@ void
 OSCControllable::send_change_message ()
 {
        lo_message msg = lo_message_new ();
-       
+
        lo_message_add_float (msg, (float) controllable->get_value());
 
        /* XXX thread issues */
@@ -72,7 +72,7 @@ OSCControllable::send_change_message ()
        lo_message_free (msg);
 }
 
-/*------------------------------------------------------------*/       
+/*------------------------------------------------------------*/
 
 OSCRouteControllable::OSCRouteControllable (lo_address a, const std::string& p,
                                            boost::shared_ptr<Controllable> c, boost::shared_ptr<Route> r)
index b7075e1d2746dae6c67a78b231b241f073d5177a..8bb511b94fe56eabd27e758ac165e7bd357b7022 100644 (file)
@@ -37,7 +37,7 @@ OSCRouteObserver::OSCRouteObserver (boost::shared_ptr<Route> r, lo_address a)
        : _route (r)
 {
        addr = lo_address_new (lo_address_get_hostname(a) , lo_address_get_port(a));
-       
+
        _route->PropertyChanged.connect (name_changed_connection, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::name_changed, this, boost::lambda::_1), OSC::instance());
 
        if (boost::dynamic_pointer_cast<AudioTrack>(_route) || boost::dynamic_pointer_cast<MidiTrack>(_route)) {
@@ -47,7 +47,7 @@ OSCRouteObserver::OSCRouteObserver (boost::shared_ptr<Route> r, lo_address a)
 
                rec_controllable->Changed.connect (rec_changed_connection, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/route/rec"), track->rec_enable_control()), OSC::instance());
        }
-       
+
        boost::shared_ptr<Controllable> mute_controllable = boost::dynamic_pointer_cast<Controllable>(_route->mute_control());
        mute_controllable->Changed.connect (mute_changed_connection, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/route/mute"), _route->mute_control()), OSC::instance());
 
@@ -75,11 +75,11 @@ OSCRouteObserver::name_changed (const PBD::PropertyChange& what_changed)
        if (!what_changed.contains (ARDOUR::Properties::name)) {
            return;
        }
-       
+
        if (!_route) {
                return;
        }
-       
+
        lo_message msg = lo_message_new ();
 
        lo_message_add_int32 (msg, _route->remote_control_id());
index b83b0f1e645831011ff3b74ee97c509d4350fcd1..7153da73297abac84125250e895f481d1f3783f2 100644 (file)
@@ -42,13 +42,13 @@ class OSCRouteObserver
   private:
        boost::shared_ptr<ARDOUR::Route> _route;
        //boost::shared_ptr<Controllable> _controllable;
-       
+
        PBD::ScopedConnection name_changed_connection;
        PBD::ScopedConnection rec_changed_connection;
        PBD::ScopedConnection mute_changed_connection;
        PBD::ScopedConnection solo_changed_connection;
        PBD::ScopedConnection gain_changed_connection;
-       
+
        lo_address addr;
        std::string path;
 
index ea2ef56d42c225cdae6fdbaf4ebd57d75fc14500..308430af68c83955fafe0dddabe478db9d07e517 100644 (file)
@@ -109,7 +109,7 @@ bling::scrollmsg() {
 
 // Based on the current bling mode, do whatever it is you are going to do
 bling::run() {
-       
+
 }
 
 // etc
index 99bcccc902259085d1150a062742de3f3809006f..a35f025489d67dc8fccec9061a7f0e9297eb8ec3 100644 (file)
@@ -55,7 +55,7 @@ TranzportControlProtocol::process (uint8_t* buf)
        this_button_mask |= buf[4] << 8;
        this_button_mask |= buf[5];
        _datawheel = buf[6];
-       
+
 #if DEBUG_TRANZPORT_STATE > 1
        // Is the state machine incomplete?
        const unsigned int knownstates = 0x00004000|0x00008000|
index d051b36d1d931f7cf6e8580348d67dd13ee860a6..35d2f2bb3bccd13e60dfaef70eac6da300b8a5b6 100644 (file)
@@ -76,7 +76,7 @@ int TranzportControlProtocol::lights_show_bling()
        case BlingPairs: break; // Show pairs of lights
        case BlingRows: break; // light each row in sequence
        case BlingFlashAll: break; // Flash everything randomly
-       case BlingEnter: lights_on(); // Show intro     
+       case BlingEnter: lights_on(); // Show intro
        case BlingExit:
                lights_off();
                break;
@@ -93,7 +93,7 @@ int TranzportControlProtocol::screen_show_bling()
        case BlingPairs: break; // Show pairs of lights
        case BlingRows: break; // light each row in sequence
        case BlingFlashAll: break; // Flash everything randomly
-       case BlingEnter: // Show intro  
+       case BlingEnter: // Show intro
                print(0,0,"!!Welcome to Ardour!");
                print(1,0,"Peace through Music!");
                break;
@@ -182,7 +182,7 @@ void
 TranzportControlProtocol::prev_marker ()
 {
        Location *location = session->locations()->first_location_before (session->transport_frame());
-       
+
        if (location) {
                session->request_locate (location->start(), session->transport_rolling());
                notify(location->name().c_str());
@@ -242,7 +242,7 @@ TranzportControlProtocol::step_gain (float increment)
        if (fabsf(gain_fraction) > 2.0) {
                gain_fraction = 2.0*sign(gain_fraction);
        }
-       
+
        route_set_gain (0, slider_position_to_gain (gain_fraction));
 }
 #endif
@@ -259,7 +259,7 @@ TranzportControlProtocol::step_gain_up ()
        if (gain_fraction > 2.0) {
                gain_fraction = 2.0;
        }
-       
+
        route_set_gain (0, slider_position_to_gain (gain_fraction));
 }
 
@@ -275,7 +275,7 @@ TranzportControlProtocol::step_gain_down ()
        if (gain_fraction < 0.0) {
                gain_fraction = 0.0;
        }
-       
+
        route_set_gain (0, slider_position_to_gain (gain_fraction));
 }
 
index 3a01185407e8636feda85cf5ad9cf0de84a5d3ba..459da81cbc1041c55008ca62a0225b163286abe0 100644 (file)
@@ -65,7 +65,7 @@ int TranzportControlProtocol::rtpriority_unset(int priority)
        struct sched_param rtparam;
        int err;
        memset (&rtparam, 0, sizeof (rtparam));
-       rtparam.sched_priority = priority;      
+       rtparam.sched_priority = priority;
        if ((err = pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam)) != 0) {
                PBD::info << string_compose (_("%1: can't stop realtime scheduling (%2)"), name(), strerror (errno)) << endmsg;
                return 1;
@@ -208,7 +208,7 @@ TranzportControlProtocol::monitor_work ()
                case 3: val = read(buf,DEFAULT_USB_TIMEOUT*2); break; // Hoo, boy, we're in trouble
                default: break; // not reached
                }
-       
+
 #if DEBUG_TRANZPORT_BITS > 9
                if(_device_status != STATUS_OFFLINE && _device_status != STATUS_ONLINE && _device_status != STATUS_OK) {
                        printf("The device has more status bits than off or online: %d\n",_device_status);
@@ -265,7 +265,7 @@ TranzportControlProtocol::monitor_work ()
                                printf("OFFLINE  : %02x %02x %02x %02x %02x %02x %02x %02x\n",
                                       buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
                        }
-       
+
                        if(_device_status == STATUS_OK) {
                                printf("OK       : %02x %02x %02x %02x %02x %02x %02x %02x\n",
                                       buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
index ac4341cde8bf029e9c3628f713e77845887b689d..514cfbe4fb1253a8e1585cb71b1fc26e941eb887 100644 (file)
@@ -34,7 +34,7 @@ new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s)
        }
 
        return tcp;
-       
+
 }
 
 static void
@@ -60,7 +60,7 @@ static ControlProtocolDescriptor tranzport_descriptor = {
        initialize : new_tranzport_protocol,
        destroy : delete_tranzport_protocol
 };
-       
+
 
 extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &tranzport_descriptor; }
 
index 39be2c2e5182b529f6ad550d635ecdbf81024556..3fe1b554ca6a590bd4f83473868f380bb369ff0e 100644 (file)
@@ -67,10 +67,10 @@ TranzportControlProtocol::lights_flush ()
        printf("LPEND   : %s\n", lights_pending.to_string().c_str());
        printf("LCURR   : %s\n", lights_current.to_string().c_str());
 #endif
-               
+
        // if ever we thread reads/writes STATUS_OK will have to move into the loop
        int i;
-               
+
        if ( _device_status == STATUS_OK || _device_status == STATUS_ONLINE) {
                for (i = 0; i<LIGHTS; i++) {
                        if(light_state[i]) {
@@ -90,6 +90,6 @@ TranzportControlProtocol::lights_flush ()
 #if DEBUG_TRANZPORT_LIGHTS > 2
        printf("Did %d light writes, left: %d\n",i, light_state.count());
 #endif
-               
+
        return light_state.count();
 }
index 0532ee7e6b335bf9cd8adcf3de65c94d358b661f..6c2bc37922e9035b4e2eef095527ffe615dc98a8 100644 (file)
@@ -92,7 +92,7 @@ int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
        return last_read_error;
 }
 
-       
+
 int
 TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override)
 {
@@ -131,13 +131,13 @@ TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override
 
        return 0;
 
-}      
+}
 
 int
 TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override)
 {
        return (write_noretry(cmd,timeout_override));
-}      
+}
 
 // FIXME - install poll semantics
 #endif /* HAVE_TRANZPORT_KERNEL_DRIVER */
index 5d4e75f7d15a590a8970713ec377da21370bdda7..56d270b62a60061719aac1f00c90db6f325e4bb1 100644 (file)
@@ -97,7 +97,7 @@ TranzportControlProtocol::open_core (struct usb_device* dev)
                cerr << _("Tranzport: cannot open USB transport") << endmsg;
                return -1;
        }
-       
+
        if (usb_claim_interface (udev, 0) < 0) {
                cerr << _("Tranzport: cannot claim USB interface") << endmsg;
                usb_close (udev);
@@ -158,7 +158,7 @@ int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
        return last_read_error;
 }
 
-       
+
 int
 TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override)
 {
@@ -195,7 +195,7 @@ TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override
 
        return 0;
 
-}      
+}
 
 int
 TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override)
@@ -204,7 +204,7 @@ TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override)
        int val;
        int retry = 0;
        if(inflight > MAX_TRANZPORT_INFLIGHT) { return (-1); }
-       
+
        while((val = usb_interrupt_write (udev, WRITE_ENDPOINT, (char*) cmd, 8, timeout_override ? timeout_override : timeout))!=8 && retry++ < MAX_RETRY) {
                printf("usb_interrupt_write failed, retrying: %d\n", val);
        }
@@ -227,6 +227,6 @@ TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override)
        return (write_noretry(cmd,timeout_override));
 #endif
 
-}      
+}
 
 #endif
index 592bf7cf00cd0848a4fb95e45437accacbd74017..7e9e03c8f2cbb3a0b2504b8c4ab8742106ba5909 100644 (file)
@@ -44,7 +44,7 @@ bool TranzportControlProtocol::lcd_damage (int row, int col, int length)
 bool TranzportControlProtocol::lcd_isdamaged ()
 {
        if(screen_invalid.any()) {
-#if DEBUG_TRANZPORT > 5        
+#if DEBUG_TRANZPORT > 5
                printf("LCD is damaged somewhere, should redraw it\n");
 #endif
                return true;
@@ -60,7 +60,7 @@ bool TranzportControlProtocol::lcd_isdamaged (int row, int col, int length)
        std::bitset<ROWS*COLUMNS> mask(mask1 << (row*COLUMNS+col));
        mask &= screen_invalid;
        if(mask.any()) {
-#if DEBUG_TRANZPORT > 5        
+#if DEBUG_TRANZPORT > 5
                printf("row: %d,col: %d is damaged, should redraw it\n", row,col);
 #endif
                return true;
index 6d97abf43a3529f32f2845610034ce3dbe62d596..544bb3df96689755df1c27086c9258202fbb376a 100644 (file)
@@ -169,7 +169,7 @@ void TranzportControlProtocol::show_mini_meter()
        }
 
        last_meter_fill_l = fill_left;  last_meter_fill_r = fill_right;
-       
+
        // give some feedback when overdriving - override yellow and red lights
 
        if (fraction_l > 0.96 || fraction_r > 0.96) {
@@ -179,7 +179,7 @@ void TranzportControlProtocol::show_mini_meter()
        if (fraction_l == 1.0 || fraction_r == 1.0) {
                light_on (LightTrackrec);
        }
-       
+
        const uint8_t char_map[16] = { ' ', TRANZ_UL,
                                       TRANZ_U, TRANZ_U,
                                       TRANZ_BL, TRANZ_Q2,
@@ -196,7 +196,7 @@ void TranzportControlProtocol::show_mini_meter()
                        ((fill_right >=j) << 2) | ((fill_right >= j+1) << 3);
                buf[i] = char_map[val];
        }
-               
+
        /* print() requires this */
 
        buf[meter_size/2] = '\0';
@@ -204,11 +204,11 @@ void TranzportControlProtocol::show_mini_meter()
        print (1, 0, buf);
 
        /* Add a peak bar, someday do falloff */
-               
+
        //              char peak[2]; peak[0] = ' '; peak[1] = '\0';
        //              if(fraction_l == 1.0 || fraction_r == 1.0) peak[0] = 'P';
        //              print (1,8,peak); // Put a peak meter - P in if we peaked.
-               
+
 }
 
 void
@@ -261,7 +261,7 @@ TranzportControlProtocol::show_meter ()
        for (i = 0; i < fill; ++i) {
                buf[i] = 0x07; /* tranzport special code for 4 quadrant LCD block */
        }
-       
+
        /* add a possible half-step */
 
        if (i < 20 && add_single_level) {
@@ -349,7 +349,7 @@ void
 TranzportControlProtocol::show_transport_time ()
 {
        show_bbt (session->transport_frame ());
-}      
+}
 
 void
 TranzportControlProtocol::show_timecode (framepos_t where)
index f5718174be5613d9a410202e4c3fb149eab805d7..59eaef0460fe9ea3f63d024add749c6f6a28609c 100644 (file)
@@ -60,7 +60,7 @@ TranzportControlProtocol::set_state (const XMLNode& node)
        int retval = 0;
 
 // I think I want to make these strings rather than numbers
-#if 0          
+#if 0
        // fetch current display mode
        if ( node.property( X_("display_mode") ) != 0 )
        {
index aa60d5399f4af867c964b9e0b34b42a2b226cb24..32d88aaf5e9a431b75f424ea38bf92f24367f6ca 100644 (file)
@@ -106,7 +106,7 @@ private:
                WheelShiftMaster,
                WheelShiftMarker
        };
-               
+
        enum WheelMode {
                WheelTimeline,
                WheelScrub,
@@ -124,7 +124,7 @@ private:
                WheelIncrSecond,
                WheelIncrMinute
        };
-       
+
        enum DisplayMode {
                DisplayNormal,
                DisplayRecording,
@@ -301,7 +301,7 @@ private:
        void show_current_track ();
        void show_track_gain ();
        void show_transport_time ();
-       void show_bbt (framepos_t where);       
+       void show_bbt (framepos_t where);
        void show_timecode (framepos_t where);
        void show_wheel_mode ();
        void show_gain ();
index 8122b8a77dac8671925e9c7bd76400b806ba627d..d90e0e2b6edd1214f3087c00d490a67fe74d69c3 100644 (file)
@@ -55,7 +55,7 @@ TranzportControlProtocol::datawheel ()
        if ((buttonmask & ButtonTrackRight) || (buttonmask & ButtonTrackLeft)) {
 
                /* track scrolling */
-               
+
                if (_datawheel < WheelDirectionThreshold) {
                        next_track ();
                } else {
@@ -63,7 +63,7 @@ TranzportControlProtocol::datawheel ()
                }
 
                last_wheel_motion = 0;
-               
+
        } else if ((buttonmask & ButtonPrev) || (buttonmask & ButtonNext)) {
 
                if (_datawheel < WheelDirectionThreshold) {
@@ -71,13 +71,13 @@ TranzportControlProtocol::datawheel ()
                } else {
                        prev_marker ();
                }
-               
+
                last_wheel_motion = 0;
-               
+
        } else if (buttonmask & ButtonShift) {
-               
+
                /* parameter control */
-               
+
                if (route_table[0]) {
                        switch (wheel_shift_mode) {
                        case WheelShiftGain:
@@ -94,29 +94,29 @@ TranzportControlProtocol::datawheel ()
                                        step_pan_left ();
                                }
                                break;
-                               
+
                        case WheelShiftMarker:
                                break;
-                               
+
                        case WheelShiftMaster:
                                break;
-                               
+
                        }
                }
-               
+
                last_wheel_motion = 0;
-               
+
        } else {
-               
+
                switch (wheel_mode) {
                case WheelTimeline:
                        scroll ();
                        break;
-                       
+
                case WheelScrub:
                        scrub ();
                        break;
-                       
+
                case WheelShuttle:
                        shuttle ();
                        break;
@@ -151,35 +151,35 @@ TranzportControlProtocol::scrub ()
        float speed;
        uint64_t now;
        int dir;
-       
+
        now = g_get_monotonic_time();
-       
+
        if (_datawheel < WheelDirectionThreshold) {
                dir = 1;
        } else {
                dir = -1;
        }
-       
+
        if (dir != last_wheel_dir) {
                /* changed direction, start over */
                speed = 0.1f;
        } else {
                if (last_wheel_motion != 0) {
                        /* 10 clicks per second => speed == 1.0 */
-                       
+
                        speed = 100000.0f / (float) (now - last_wheel_motion)
-                       
+
                } else {
-                       
+
                        /* start at half-speed and see where we go from there */
-                       
+
                        speed = 0.5f;
                }
        }
-       
+
        last_wheel_motion = now;
        last_wheel_dir = dir;
-       
+
        set_transport_speed (speed * dir);
 }
 
index 565a68de20fd2caaf09f4aca974c4cf240458ddd..6880218ff02ce60ab7675d1ae928855e6da93a1f 100644 (file)
@@ -102,7 +102,7 @@ TranzportControlProtocol::show_wheel_mode ()
        if(session->transport_speed() != 0) {
                show_mini_meter();
        } else {
-               
+
                switch (wheel_mode) {
                case WheelTimeline:
                        text = "Time";
@@ -114,25 +114,25 @@ TranzportControlProtocol::show_wheel_mode ()
                        text = "Shtl";
                        break;
                }
-               
+
                switch (wheel_shift_mode) {
                case WheelShiftGain:
                        text += ":Gain";
                        break;
-                                       
+
                case WheelShiftPan:
                        text += ":Pan ";
                        break;
-                                       
+
                case WheelShiftMaster:
                        text += ":Mstr";
                        break;
-                                       
+
                case WheelShiftMarker:
                        text += ":Mrkr";
                        break;
                }
-               
+
                print (1, 0, text.c_str());
        }
 }
index 421accfdd15c97d48b5a2741c62d6c6f251f6e35..494e6e114558d3e04083d54fac56f2bbdb53189c 100644 (file)
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2006-2010 Paul Davis
-       
+
   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2 of the License, or (at your
@@ -161,7 +161,7 @@ decrement (Time& timecode, uint32_t subframes_per_frame)
                                timecode.frames = 29;
                                wrap = SECONDS;
                        }
-                       
+
                } else {
                        if (timecode.frames == 0) {
                                timecode.frames = 29;
index 31e62f23bf4d19fb8051d030782da30733563949..8b92f6efa94eaa3e53f56103aeb42a47649e8b02 100644 (file)
@@ -34,15 +34,15 @@ struct LIBTIMECODE_API BBT_Time {
        uint32_t bars;
        uint32_t beats;
        uint32_t ticks;
-       
+
        BBT_Time ()
                : bars (1), beats (1), ticks (0) {}
-       
+
        BBT_Time (uint32_t ba, uint32_t be, uint32_t t)
                : bars (ba), beats (be), ticks (t) {}
 
         BBT_Time (double beats);
-       
+
        bool operator< (const BBT_Time& other) const {
                return bars < other.bars ||
                        (bars == other.bars && beats < other.beats) ||
@@ -66,7 +66,7 @@ struct LIBTIMECODE_API BBT_Time {
                        (bars >= other.bars && beats >= other.beats) ||
                        (bars >= other.bars && beats >= other.beats && ticks >= other.ticks);
        }
-       
+
        bool operator== (const BBT_Time& other) const {
                return bars == other.bars && beats == other.beats && ticks == other.ticks;
        }
@@ -75,7 +75,7 @@ struct LIBTIMECODE_API BBT_Time {
                return bars != other.bars || beats != other.beats || ticks != other.ticks;
        }
 };
-       
+
 }
 
 inline std::ostream&
index 5ee763d33e9d3090bae279bd1cf387797647733a..100b5d30d8285bb0b84999a2cb8dfa29257f9f6f 100644 (file)
@@ -1,16 +1,16 @@
 /*
        Copyright (C) 2006-2010 Paul Davis
-       
+
        This program is free software; you can redistribute it and/or modify it
        under the terms of the GNU Lesser General Public License as published
        by the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
-       
+
        This program is distributed in the hope that it will be useful, but WITHOUT
        ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
        FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
        for more details.
-       
+
        You should have received a copy of the GNU General Public License along
        with this program; if not, write to the Free Software Foundation, Inc.,
        675 Mass Ave, Cambridge, MA 02139, USA.
@@ -71,7 +71,7 @@ struct LIBTIMECODE_API Time {
                rate = a_rate;
                drop = (lrintf(100.f * (float)a_rate) == (long)2997);
        }
-       
+
        bool operator== (const Time& other) const {
                return negative == other.negative && hours == other.hours &&
                       minutes == other.minutes && seconds == other.seconds &&
index c4b2e56b6260c0c3e4138a7ed39ed63c26fe0f8b..3b8744255202af10abd26c70a77a14430ad384c5 100644 (file)
@@ -108,7 +108,7 @@ AmplitudeFollower::initialise(size_t channels, size_t stepSize, size_t blockSize
        channels > getMaxChannelCount()) return false;
 
     m_stepSize = std::min(stepSize, blockSize);
-       
+
     // Translate the coefficients
     // from their "convenient" 60dB convergence-time values
     // to real coefficients
@@ -148,7 +148,7 @@ AmplitudeFollower::ParameterList
 AmplitudeFollower::getParameterDescriptors() const
 {
     ParameterList list;
-       
+
     ParameterDescriptor att;
     att.identifier = "attack";
     att.name = "Attack time";
@@ -210,14 +210,14 @@ AmplitudeFollower::process(const float *const *inputBuffers,
     float previn = m_previn;
 
     FeatureSet returnFeatures;
-       
+
     float val;
     float peak = 0.0f;
 
     for (size_t i = 0; i < m_stepSize; ++i) {
 
         val = fabs(inputBuffers[0][i]);
-               
+
         if (val < previn) {
             val = val + (previn - val) * m_relaxcoef;
         } else {
index dc69b67bf8bd6df9d131e883ab3172764c853218..ef7edcff69e8c2d80e5c23fff0231149ec7e8334 100644 (file)
@@ -61,9 +61,9 @@ public:
     std::string getMaker() const;
     int getPluginVersion() const;
     std::string getCopyright() const;
-       
+
     OutputList getOutputDescriptors() const;
-       
+
     ParameterList getParameterDescriptors() const;
     float getParameter(std::string paramid) const;
     void setParameter(std::string paramid, float newval);
index dc494ec574fc8cd50b3aa0d29636da0a600ce578..62a6a083760f526287326cfbda96f94c82fd6de0 100644 (file)
@@ -36,11 +36,11 @@ process (jack_nframes_t nframes, void *arg)
        out = jack_port_get_buffer (output_port, nframes);
 
        memcpy (out, in, sizeof (jack_default_audio_sample_t) * nframes);
-       
+
        for (i = 0; i < loopsize; ++i) {
                fooey (nframes);
        }
-       
+
        last_load = jack_cpu_load (client);
 
        if ((at_loop += nframes) >= at_loop_size) {
@@ -182,7 +182,7 @@ main (int argc, char *argv[])
        }
 
        free (ports);
-       
+
        ports = jack_get_ports (client, NULL, NULL,
                                JackPortIsPhysical|JackPortIsInput);
        if (ports == NULL) {
index c0e5b969027ed8fb526f703df3ea6bbbae726e77..961bc9a6d24bcbafc014579da9163ead54547418 100644 (file)
@@ -112,7 +112,7 @@ OMF::name_types ()
        sqlite3_exec(db, "INSERT INTO lookup VALUES (40, '(Type 40)')", 0, 0, 0);
        sqlite3_exec(db, "INSERT INTO lookup VALUES (41, '(Type 41)')", 0, 0, 0);
        sqlite3_exec(db, "INSERT INTO lookup VALUES (42, '(Type 42)')", 0, 0, 0);
-       
+
        /* Assign type and property values to names */
        sqlite3_exec(db, "UPDATE data SET property = (SELECT name FROM lookup WHERE property = key), type = (SELECT name FROM lookup WHERE type = key)", 0, 0, 0);
        sqlite3_exec(db, "DROP TABLE lookup", 0, 0, 0);
@@ -286,7 +286,7 @@ OMF::load (const string& path)
                                        }
                                        DEBUG("   offset: %d\n", dataOffset);
                                        DEBUG("   length: %d\n", dataLength);
-               
+
                                        if (currentType == 21) {
                                                char* string = (char*) malloc((uint32_t) dataLength);
                                                fseek(file, dataOffset, SEEK_SET);
index 5214c2076ab7459432f6ceaae5cef0d064799114..68fc6bd83c653e87d7e46efb51c6f1e23263c5f7 100644 (file)
@@ -84,11 +84,11 @@ OMF::OMF ()
        options = new XMLNode ("RouteGroups");
 
        /* add master, default 2in/2out */
-       
+
        XMLNode* master = new_route_node ();
        master->add_property ("name", "master");
        set_route_node_channels (master, 2, 2, false);
-       
+
        XMLNode* tempo_map = new XMLNode ("TempoMap");
        XMLNode* tempo = new XMLNode ("Tempo");
        tempo->add_property ("start", "1|1|0");
@@ -125,7 +125,7 @@ OMF::OMF ()
        connection = new XMLNode ("Connection");
        connection->add_property ("other", "system:playback_2");
        port->add_child_nocopy (*connection);
-               
+
        session->add_child_nocopy (*options);
        session->add_child_nocopy (*sources);
        session->add_child_nocopy (*regions);
@@ -175,7 +175,7 @@ OMF::init ()
        audiofile_path_vector.push_back ("interchange");
        audiofile_path_vector.push_back (session_name);
        audiofile_path_vector.push_back ("audiofiles");
-       
+
        dir = Glib::build_filename (audiofile_path_vector);
        g_mkdir_with_parents (dir.c_str(), 0775);
 
@@ -253,7 +253,7 @@ OMF::new_playlist_node ()
        add_id (playlist);
        playlist->add_property ("type", "audio");
        playlist->add_property ("frozen", "no");
-       
+
        return playlist;
 }
 
@@ -266,7 +266,7 @@ OMF::new_diskstream_node ()
        diskstream->add_property ("flags", "Recordable");
        diskstream->add_property ("speed", "1");
        diskstream->add_property ("channels", "1");
-       
+
        return diskstream;
 }
 void
@@ -302,7 +302,7 @@ OMF::set_route_node_channels (XMLNode* route, int in, int out, bool send_to_mast
        XMLNode* output_io;
        char sbuf[256];
        string name = route->property ("name")->value();
-       
+
        legalize_name (name);
 
        output_io = new XMLNode ("IO");
@@ -311,7 +311,7 @@ OMF::set_route_node_channels (XMLNode* route, int in, int out, bool send_to_mast
        add_id (output_io);
        output_io->add_property ("direction", "Output");
        output_io->add_property ("default-type", "audio");
-       
+
        input_io = new XMLNode ("IO");
        route->add_child_nocopy (*input_io);
        input_io->add_property ("name", name);
@@ -323,9 +323,9 @@ OMF::set_route_node_channels (XMLNode* route, int in, int out, bool send_to_mast
                XMLNode* port = new XMLNode ("Port");
                output_io->add_child_nocopy (*port);
                port->add_property ("type", "audio");
-               
+
                snprintf (sbuf, sizeof (sbuf), "%s/audio_out %d", name.c_str(), i+1);
-               
+
                port->add_property ("name", sbuf);
                XMLNode* connection = new XMLNode ("Connection");
 
@@ -342,7 +342,7 @@ OMF::set_route_node_channels (XMLNode* route, int in, int out, bool send_to_mast
                                snprintf (sbuf, sizeof (sbuf), "system:playback_1");
                        }
                }
-                               
+
                connection->add_property ("other", sbuf);
                port->add_child_nocopy (*connection);
        }
@@ -351,9 +351,9 @@ OMF::set_route_node_channels (XMLNode* route, int in, int out, bool send_to_mast
                XMLNode* port = new XMLNode ("Port");
                input_io->add_child_nocopy (*port);
                port->add_property ("type", "audio");
-               
+
                snprintf (sbuf, sizeof (sbuf), "%s/audio_out %d", name.c_str(), i+1);
-               
+
                port->add_property ("name", sbuf);
                XMLNode* connection = new XMLNode ("Connection");
 
@@ -379,12 +379,12 @@ OMF::set_route_node_channels (XMLNode* route, int in, int out, bool send_to_mast
        outs->add_property ("output", name);
        outs->add_property ("type", "main-outs");
        outs->add_property ("role", "Main");
-       
+
        /* Panner setup */
 
        XMLNode* panner = new XMLNode ("Panner");
        outs->add_child_nocopy (*panner);
-       
+
        panner->add_property ("linked", "no");
        panner->add_property ("link-direction", "SameDirection");
        panner->add_property ("bypassed", "no");
@@ -403,7 +403,7 @@ OMF::set_route_node_channels (XMLNode* route, int in, int out, bool send_to_mast
                spanner->add_property ("type", "Equal Power Stereo");
                spanner->add_property ("muted", "no");
                spanner->add_property ("mono", "no");
-               
+
                XMLNode* spc = new XMLNode ("Controllable");
                spanner->add_child_nocopy (*spc);
                add_id (spc);
@@ -488,9 +488,9 @@ OMF::new_region_node ()
 
        region_extra->add_child_nocopy (*gui_extra);
        region->add_child_nocopy (*region_extra);
-       
+
        /* boilerplate */
-       
+
        region->add_property ("ancestral-start", "0");
        region->add_property ("ancestral-start", "0");
        region->add_property ("ancestral-length", "0");
@@ -520,9 +520,9 @@ OMF::new_source_node ()
        add_id (source);
        source->add_property ("type", "audio");
        source->add_property ("flags", "CanRename");
-               
+
        sources->add_child_nocopy (*source);
-       
+
        return source;
 }
 
@@ -585,7 +585,7 @@ OMF::create_xml ()
        int major;
        int minor;
        int micro;
-       
+
        major = version / 1000;
        minor = version - (major * 1000);
        micro = version - (major * 1000) - (minor * 100);
@@ -594,7 +594,7 @@ OMF::create_xml ()
 
        session->add_property ("version", sbuf);
        session->add_property ("name", session_name);
-       
+
        char **tracks;
        int numtracks;
        sqlite3_get_table(db, "SELECT value FROM data WHERE object IN (SELECT value FROM data WHERE object IN (SELECT object FROM data WHERE property = 'OMFI:OOBJ:ObjClass' AND value = 'CMOB' LIMIT 1) AND property = 'OMFI:MOBJ:Slots')", &tracks, &numtracks, 0, 0);
@@ -690,7 +690,7 @@ OMF::create_xml ()
                }
 
                sqlite3_free_table(rate);
-               
+
                char **items;
                int itemCount;
                //sqlite3_get_table(db, sqlite3_mprintf("SELECT d3.value FROM data d1, data d2, data d3 WHERE d1.object LIKE '%s' AND d1.property LIKE 'OMFI:MSLT:Segment' AND d2.object LIKE d1.value AND d2.property LIKE 'OMFI:SEQU:Components' AND d3.object LIKE d2.value", tracks[i]), &items, &itemCount, 0, 0);
@@ -707,7 +707,7 @@ OMF::create_xml ()
                        int lenCount;
                        double length = 0.0;
                        int lenFrames = 0;
-                       
+
                        region = 0;
 
                        sqlite3_get_table(db, sqlite3_mprintf("SELECT value FROM data WHERE object = %s AND property = 'OMFI:CPNT:Length' LIMIT 1", items[j]), &len, &lenCount, 0, 0);
@@ -730,7 +730,7 @@ OMF::create_xml ()
 
                        lenFrames = atoi(len[1]);
                        length = lenFrames * frame_rate;
-                       
+
                        if (!strcmp(type[1], "TRAN")) {
 
                                position -= length;
@@ -796,15 +796,15 @@ OMF::create_xml ()
                                if (sourceFileCount > 0) {
                                        uint32_t sfOffs;
                                        uint32_t sfLen;
-       
+
                                        if (get_offset_and_length (sourceFile[2], sourceFile[3], sfOffs, sfLen)) {
                                                char *sfBuf = read_name (sfOffs, sfLen);
-                                                                       
+
                                                if ((sinfo = get_known_source (sfBuf)) == 0) {
                                                        cerr << "Reference to unknown source [" << sfBuf << "]1" << endl;
                                                        return -1;
                                                }
-                                                                       
+
                                                free (sfBuf);
                                        } else {
                                                cerr << "offs/len illegal\n";
@@ -819,7 +819,7 @@ OMF::create_xml ()
                                                        cerr << "Reference to unknown source [" << fallbackFile[1] << "]2" << endl;
                                                        return -1;
                                                }
-                                                                       
+
                                        } else {
                                                cerr << "no fallback file\n";
                                        }
@@ -827,12 +827,12 @@ OMF::create_xml ()
                                        sqlite3_free_table(fallbackFile);
                                }
 
-                                       
+
                                if (sinfo) {
-                                       
+
                                        region = new_region_node ();
                                        playlist->add_child_nocopy (*region);
-                                       
+
                                        snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (position * sample_rate));
                                        region->add_property ("position", sbuf);
                                        snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (length * sample_rate));
@@ -840,7 +840,7 @@ OMF::create_xml ()
                                        snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (start * frame_rate * sample_rate));
                                        region->add_property ("start", sbuf);
                                        set_region_sources (region, sinfo);
-                                       
+
                                        route_max_channels = max (route_max_channels, sinfo->channels);
                                }
 
@@ -879,7 +879,7 @@ OMF::create_xml ()
                                        if (get_offset_and_length (sourceFile[2], sourceFile[3], sfOffs, sfLen)) {
                                                cerr << "get source file from " << sfOffs << " + " << sfLen << endl;
                                                char *sfBuf = read_name (sfOffs, sfLen);
-                                                                       
+
                                                if ((sinfo = get_known_source (sfBuf)) == 0) {
                                                        cerr << "Reference to unknown source [" << sfBuf << ']' << endl;
                                                        return -1;
@@ -908,7 +908,7 @@ OMF::create_xml ()
 
                                        region = new_region_node ();
                                        playlist->add_child_nocopy (*region);
-                                       
+
                                        snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (position * sample_rate));
                                        region->add_property ("position", sbuf);
                                        snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (length * sample_rate));
@@ -916,7 +916,7 @@ OMF::create_xml ()
                                        snprintf (sbuf, sizeof (sbuf), "%" PRId64, llrintf (start * frame_rate * sample_rate));
                                        region->add_property ("start", sbuf);
                                        set_region_sources (region, sinfo);
-                                       
+
                                        route_max_channels = max (route_max_channels, sinfo->channels);
                                }
 
@@ -930,9 +930,9 @@ OMF::create_xml ()
                }
 
                /* finalize route information */
-               
+
                cerr << "Set up track with " << route_max_channels << " channels" << endl;
-               set_route_node_channels (route, route_max_channels, route_max_channels, true);          
+               set_route_node_channels (route, route_max_channels, route_max_channels, true);
                sqlite3_free_table(items);
        }
 
@@ -986,7 +986,7 @@ main (int argc, char* argv[])
                { "version", 1, 0, 'v' },
                { "help", 0, 0, 'h' },
                { 0, 0, 0, 0 }
-       };      
+       };
 
 
        int option_index = 0;
@@ -1023,7 +1023,7 @@ main (int argc, char* argv[])
                print_help (execname);
                /*NOTREACHED*/
        }
-       
+
        OMF omf;
 
        if (version) {
index 4b794d94b48c7dd3b787d33bac651704c1007246..9f16aec94f5e4e88074e8dabfce603b43b0a5110 100644 (file)
@@ -52,16 +52,16 @@ private:
        XMLNode* diskstreams;
        XMLNode* locations;
        XMLNode* options;
-       
+
        XMLNode* new_region_node ();
        XMLNode* new_source_node ();
        XMLNode* new_route_node ();
        XMLNode* new_playlist_node ();
        XMLNode* new_diskstream_node ();
-       
+
        typedef std::map<std::string,SourceInfo*> KnownSources;
        KnownSources known_sources;
-       
+
        SourceInfo* get_known_source (const char*);
        char* read_name (size_t offset, size_t length);
        bool get_offset_and_length (const char* offstr, const char* lenstr, uint32_t& offset, uint32_t& len);
@@ -80,7 +80,7 @@ private:
                else
                        return x;
        }
-       
+
        uint32_t e32(uint32_t x)
        {
                if (bigEndian)
@@ -91,7 +91,7 @@ private:
                else
                        return x;
        }
-       
+
        uint64_t e64(uint64_t x)
        {
                if (bigEndian)
@@ -106,7 +106,7 @@ private:
                else
                        return x;
        }
-       
+
 };
 
 #endif /* __ardour_omftool__ */
index aa98b76f3872df827f5efb4e8d63daeda7d5d1df..9a431fd2fbdd5b284495670bbaf4beefb123a619 100644 (file)
@@ -61,7 +61,7 @@ main (int argc, char* argv[])
        int n = 0;
        int nfiles = 0;
        int quiet = 0;
-       
+
        while (1) {
                if ((c = getopt_long (argc, argv, optstring, longopts, &option_index)) == -1) {
                        break;
@@ -97,7 +97,7 @@ main (int argc, char* argv[])
                        return 0;
                }
        }
-       
+
        if (optind < argc) {
                name_template = argv[optind];
        } else {
@@ -129,7 +129,7 @@ main (int argc, char* argv[])
        if (!quiet) {
                printf ("# Discovered %d files using %s\n", n, name_template);
        }
-       
+
        nfiles = n;
        files = (int *) malloc (sizeof (int) * nfiles);
 #ifdef HAVE_MMAP
@@ -233,7 +233,7 @@ main (int argc, char* argv[])
                if (!quiet) {
                        printf ("# BW @ %lu %.3f seconds bandwidth %.4f MB/sec\n", (long unsigned int)_read, elapsed/1000000.0, bandwidth);
                }
-               
+
                total_time += elapsed;
 
                ++cnt;
index 2572aa4c94ba358f805b019187bffb60b138ce78..29245cd37a96f7e94ae1b79a5e7a23ee22cf3af8 100644 (file)
@@ -34,7 +34,7 @@ typedef struct
 } testRecord;
 
 static vector<testRecord>      gTestSet;
-       
+
 static vector<string>          gValidSwitchList;
 static vector<string>          gSwitchDescriptionList;
 
@@ -52,7 +52,7 @@ ExecuteAll()
        }
 
        OK &= !(system_memlock_amount() == 0);
-       
+
        return OK;
 }
 
@@ -97,15 +97,15 @@ PrintUsage()
        printf("  Options are as follows:\n");
        printf("\n");
        printf("\n");
-       
+
        vector<testRecord>::iterator            itr;
-       
+
        for (itr = gTestSet.begin(); itr != gTestSet.end(); ++itr) {
                printf("%20s %s :\t%s\n", (*itr).switchText.c_str(), (*itr).swOptionText.c_str(), (*itr).descriptionText.c_str());
        }
 
        printf("\n");
-       
+
        return true;
 }
 
@@ -113,7 +113,7 @@ void
 DefineSwitches()
 {
        testRecord rec;
-       
+
        // Global switches
        rec.switchText = "-a";
        rec.swOptionText = "";
@@ -217,7 +217,7 @@ ParseSwitches(
        vector<testRecord>::iterator    itr;
        bool    OK = true;
        int     i;
-       
+
        if (argc == 1) {
                gSwitchesReceived.push_back("-a");
        }
@@ -249,7 +249,7 @@ ParseSwitches(
                                        break;
                                }
                        }
-                       
+
                        if (OK && itr != gTestSet.end()) {
                                // Known option switch found
                                gSwitchesReceived.push_back(tmp);
@@ -264,7 +264,7 @@ ParseSwitches(
        if (OK) {
                // All switches are at least valid, now check to make sure they are all valid to
                // be used together.
-               
+
                if (gSwitchesReceived.size() > 1) {
                        // make sure help is not mixed with other options
                        vector<string>::iterator        swItr;
@@ -304,14 +304,14 @@ Execute()
        bool OK = true;
        vector<string>::iterator        itr;
        vector<testRecord>::iterator    testItr;
-       
+
        for (itr = gSwitchesReceived.begin(); itr != gSwitchesReceived.end(); ++itr) {
                for (testItr = gTestSet.begin(); testItr != gTestSet.end(); ++testItr) {
                        if ((*itr) == (*testItr).switchText) {
                                break;
                        }
                }
-               
+
                bool result;
                if ((*testItr).hasOption) {
                        result = ((*testItr).opFunctionPtr((*testItr).optionArg) != 0);
@@ -329,7 +329,7 @@ Execute()
 
                OK &= result;
        }
-       
+
        return OK;
 }
 
@@ -339,7 +339,7 @@ main(
        char    **argv)
 {
        int status = 0;
-       
+
        DefineSwitches();
 
        if (ParseSwitches(argc, argv)) {
index dc37f32e97a6128a3240838c97746f783d6f337b..96a8b44e2bc83806ba7fb0443e02bc6d40758669 100644 (file)
@@ -61,7 +61,7 @@ main (int argc, char* argv[])
        int c = 0;
        char const * name_template = 0;
        int samplerate;
-       
+
        while (1) {
                if ((c = getopt_long (argc, argv, optstring, longopts, &option_index)) == -1) {
                        break;
@@ -99,7 +99,7 @@ main (int argc, char* argv[])
                if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) {
                        break;
                }
-               
+
                 int flags = O_RDONLY;
                 int fd = open (path, flags, 0644);
 
@@ -126,15 +126,15 @@ main (int argc, char* argv[])
                }
 
                samplerate = format_info.samplerate;
-               
+
                sndfiles.push_back (sf);
        }
 
        cout << "Discovered " << sndfiles.size() << " files using " << name_template << endl;
-               
+
        data = new float[block_size];
        uint64_t read = 0;
-       
+
        while (true) {
                gint64 before;
                before = g_get_monotonic_time();
@@ -147,7 +147,7 @@ main (int argc, char* argv[])
                read += block_size;
                gint64 elapsed = g_get_monotonic_time() - before;
                 double bandwidth = ((sndfiles.size() * block_size * sample_size)/1048576.0) / (elapsed/1000000.0);
-               
+
                 printf ("BW @ %Lu %.3f seconds bandwidth %.4f MB/sec\n", read, elapsed/1000000.0, bandwidth);
        }
 
index a498f8159c7c61bdb207bb2c57351810083e5819..0823277c60e87a19d1659f8a8f7ab40168b66a0a 100644 (file)
@@ -108,7 +108,7 @@ main (int argc, char* argv[])
 
        int option_index = 0;
        int c = 0;
-       
+
        while (1) {
                if ((c = getopt_long (argc, argv, optstring, longopts, &option_index)) == -1) {
                        break;
@@ -170,7 +170,7 @@ main (int argc, char* argv[])
 
        format_info.samplerate = samplerate;
        format_info.channels = channels;
-       
+
        if (strcasecmp (header_format, "wav") == 0) {
                format_info.format |= SF_FORMAT_WAV;
                suffix = ".wav";
@@ -201,7 +201,7 @@ main (int argc, char* argv[])
                usage ();
                return 0;
        }
-       
+
        string tmpdirname = Glib::build_filename (dirname, "sftest");
        if (g_mkdir_with_parents (tmpdirname.c_str(), 0755)) {
                cerr << "Cannot create output directory\n";
@@ -216,7 +216,7 @@ main (int argc, char* argv[])
                ss << "sf-";
                ss << n;
                ss << suffix;
-               
+
                path = Glib::build_filename (tmpdirname, ss.str());
 
                 int flags = O_RDWR|O_CREAT|O_TRUNC;
@@ -254,7 +254,7 @@ main (int argc, char* argv[])
                cout << endl;
                cout << "Format is " << suffix << ' ' << channels << " channel" << (channels > 1 ? "s" : "") << " written in chunks of " << block_size << " frames, synced ? " << (with_sync ? "yes" : "no") << endl;
        }
-       
+
        data = new float[block_size*channels];
        uint64_t written = 0;
 
@@ -284,7 +284,7 @@ main (int argc, char* argv[])
 
                max_bandwidth = max (max_bandwidth, bandwidth);
                min_bandwidth = min (min_bandwidth, bandwidth);
-               
+
                if (!quiet) {
                        cout << "BW @ " << written << " frames (" << ds.str() << " minutes) = " << (bandwidth/1048576.0) <<  " MB/sec " << bandwidth / data_rate << " x faster than necessary " << endl;
                }
@@ -300,7 +300,7 @@ main (int argc, char* argv[])
                }
                cout << "Done.\n";
        }
-       
+
        return 0;
 }