diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-02-11 02:34:03 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-02-11 02:34:03 +0000 |
commit | cf0da62ff0e4ef7dfcf0730f1af057edd34dc15a (patch) | |
tree | f32b38dad9f06bb1d803b699acc816edfefd1e5f /gtk2_ardour/streamview.cc | |
parent | 9ab70fb55284537228577d575f15aa03949bd678 (diff) |
miscellaneous fixes post-jesse's 24 bit file format changes
git-svn-id: svn://localhost/trunk/ardour2@317 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/streamview.cc')
-rw-r--r-- | gtk2_ardour/streamview.cc | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index dda5f0ef51..91a34de755 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -13,6 +13,7 @@ #include "streamview.h" #include "regionview.h" +#include "taperegionview.h" #include "audio_time_axis.h" #include "canvas-waveview.h" #include "canvas-simplerect.h" @@ -46,31 +47,15 @@ StreamView::StreamView (AudioTimeAxisView& tv) /* set_position() will position the group */ - //GTK2FIX -- how to get the group? is the canvas display really a group? - //canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), - // gnome_canvas_group_get_type (), - // NULL); canvas_group = new ArdourCanvas::Group(*_trackview.canvas_display); - //canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group), - // gnome_canvas_simplerect_get_type(), - // "x1", 0.0, - // "y1", 0.0, - // "x2", 1000000.0, - // "y2", (double) tv.height, - // "outline_color_rgba", color_map[cAudioTrackOutline], - // /* outline ends and bottom */ - // "outline_what", (guint32) (0x1|0x2|0x8), - // "fill_color_rgba", stream_base_color, - // ] NULL); canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group); canvas_rect->property_x1() = 0.0; canvas_rect->property_y1() = 0.0; canvas_rect->property_x2() = 1000000.0; canvas_rect->property_y2() = (double) tv.height; canvas_rect->property_outline_color_rgba() = color_map[cAudioTrackOutline]; - /* outline ends and bottom */ - canvas_rect->property_outline_what() = (guint32) (0x1|0x2|0x8); + canvas_rect->property_outline_what() = (guint32) (0x1|0x2|0x8); // outline ends and bottom canvas_rect->property_fill_color_rgba() = stream_base_color; canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview)); @@ -222,15 +207,19 @@ StreamView::add_region_view_internal (Region *r, bool wait_for_waves) return; } } + + switch (_trackview.audio_track()->mode()) { + case Normal: + region_view = new AudioRegionView (canvas_group, _trackview, *region, + _samples_per_unit, region_color); + break; + case Destructive: + region_view = new TapeAudioRegionView (canvas_group, _trackview, *region, + _samples_per_unit, region_color); + break; + } - region_view = new AudioRegionView (canvas_group, - _trackview, - *region, - _samples_per_unit, - _amplitude_above_axis, - region_color, - wait_for_waves); - + region_view->init (_amplitude_above_axis, region_color, wait_for_waves); region_views.push_front (region_view); /* follow global waveform setting */ |