[beast: 2/7] BSE: add Track.outputs property to bseapi.idl



commit bfa685dc0bbcbc0fef879a747e46121c410eb0bc
Author: Tim Janik <timj gnu org>
Date:   Sat Oct 7 13:42:45 2017 +0200

    BSE: add Track.outputs property to bseapi.idl
    
    Signed-off-by: Tim Janik <timj gnu org>

 bse/bseapi.idl  |    2 +-
 bse/bsetrack.cc |   20 ++++++++++++++++++++
 bse/bsetrack.hh |    4 +++-
 3 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/bse/bseapi.idl b/bse/bseapi.idl
index 32bf447..35d2b01 100644
--- a/bse/bseapi.idl
+++ b/bse/bseapi.idl
@@ -935,7 +935,7 @@ interface Track : ContextMerger {
   // property int32 midi_channel;  ///< _("Midi channel assigned to this track, 0 uses internal per-track 
channel.")
   // property int32 n_voices;      ///< _("Maximum number of voices for simultaneous playback.")
   // property CSynth pnet;         ///< _("Synthesis network to be used as postprocessor.")
-  // property ItemSeq outputs;     ///< _("Mixer busses used as output for this track.")
+  ItemSeq outputs;      ///< _("Mixer busses used as output for this track.")
 };
 
 /// Record representing the use of a Part within a Track at a specific position.
diff --git a/bse/bsetrack.cc b/bse/bsetrack.cc
index 6e20ceb..b53e147 100644
--- a/bse/bsetrack.cc
+++ b/bse/bsetrack.cc
@@ -1281,4 +1281,24 @@ TrackImpl::get_output_source ()
   return child->as<SourceIfaceP>();
 }
 
+ItemSeq
+TrackImpl::outputs () const
+{
+  BseTrack *self = const_cast<TrackImpl*> (this)->as<BseTrack*>();
+  ItemSeq items;
+  for (SfiRing *ring = self->bus_outputs; ring; ring = sfi_ring_walk (ring, self->bus_outputs))
+    {
+      BseItem *item = (BseItem*) ring->data;
+      items.push_back (item->as<ItemIfaceP>());
+    }
+  return items;
+}
+
+void
+TrackImpl::outputs (const ItemSeq &newoutputs)
+{
+  BseTrack *self = as<BseTrack*>();
+  bse_bus_or_track_set_outputs (self, newoutputs);
+}
+
 } // Bse
diff --git a/bse/bsetrack.hh b/bse/bsetrack.hh
index 310e0cc..a8da582 100644
--- a/bse/bsetrack.hh
+++ b/bse/bsetrack.hh
@@ -95,8 +95,10 @@ public:
   virtual TrackPartSeq list_parts        () override;
   virtual PartIfaceP   get_part          (int tick) override;
   virtual int          get_last_tick     () override;
-  virtual Error    ensure_output     () override;
+  virtual Error        ensure_output     () override;
   virtual SourceIfaceP get_output_source () override;
+  virtual ItemSeq      outputs           () const override;
+  virtual void         outputs           (const ItemSeq &newoutputs) override;
 };
 
 } // Bse


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]