BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bsebus.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BSE_BUS_H__
00003 #define __BSE_BUS_H__
00004 
00005 #include <bse/bsesubsynth.hh>
00006 
00007 G_BEGIN_DECLS
00008 
00009 /* --- object type macros --- */
00010 #define BSE_TYPE_BUS               (BSE_TYPE_ID (BseBus))
00011 #define BSE_BUS(object)            (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_BUS, BseBus))
00012 #define BSE_BUS_CLASS(class)       (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_BUS, BseBusClass))
00013 #define BSE_IS_BUS(object)         (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_BUS))
00014 #define BSE_IS_BUS_CLASS(class)    (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_BUS))
00015 #define BSE_BUS_GET_CLASS(object)  (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_BUS, BseBusClass))
00016 
00017 
00018 /* --- BseBus source --- */
00019 struct BseBus : BseSubSynth {
00020   SfiRing      *inputs;
00021   double        left_volume;
00022   double        right_volume;
00023   guint         muted : 1;
00024   guint         synced : 1;
00025   guint         saved_sync : 1;
00026   guint         solo_muted : 1;
00027   BseSource    *summation;
00028   BseSource    *vin;
00029   BseSource    *bmodule;        /* implicitely vout */
00030   guint         n_effects;      /* # of slots */
00031   BseSource   **effects;        /* slot maybe NULL */
00032   SfiRing      *bus_outputs;    /* maintained by bsebus.[hc] */
00033 };
00034 struct BseBusClass : BseSubSynthClass
00035 {};
00036 
00037 /* --- API --- */
00038 BseErrorType    bse_bus_connect                 (BseBus         *self,
00039                                                  BseItem        *item);
00040 BseErrorType    bse_bus_connect_unchecked       (BseBus         *self,
00041                                                  BseItem        *item);
00042 BseErrorType    bse_bus_disconnect              (BseBus         *self,
00043                                                  BseItem        *item);
00044 SfiRing*        bse_bus_list_inputs             (BseBus         *self);
00045 SfiRing*        bse_bus_list_outputs            (BseBus         *self);
00046 gboolean        bse_bus_get_stack               (BseBus         *self,
00047                                                  BseContainer  **snet,
00048                                                  BseSource     **vin,
00049                                                  BseSource     **vout);
00050 BseErrorType    bse_bus_insert_slot             (BseBus         *self,
00051                                                  guint           slot);
00052 BseErrorType    bse_bus_delete_slot             (BseBus         *self,
00053                                                  guint           slot);
00054 BseErrorType    bse_bus_replace_effect          (BseBus         *self,
00055                                                  guint           slot,
00056                                                  const gchar    *etype);
00057 void            bse_bus_change_solo             (BseBus         *self,
00058                                                  gboolean        solo_muted);
00059 #define         bse_bus_create_stack(b)         bse_bus_get_stack (b,0,0,0)
00060 void    bse_bus_or_track_list_output_candidates (BseItem        *trackbus,
00061                                                  BseItemSeq     *iseq);
00062 void    bse_bus_or_track_set_outputs            (BseItem        *trackbus,
00063                                                  BseItemSeq     *iseq);
00064 
00065 /* --- channels --- */
00066 enum
00067 {
00068   BSE_BUS_ICHANNEL_LEFT,
00069   BSE_BUS_ICHANNEL_RIGHT,
00070   BSE_BUS_N_ICHANNELS
00071 };
00072 enum
00073 {
00074   BSE_BUS_OCHANNEL_LEFT,
00075   BSE_BUS_OCHANNEL_RIGHT,
00076   BSE_BUS_N_OCHANNELS
00077 };
00078 
00079 
00080 G_END_DECLS
00081 
00082 #endif /* __BSE_BUS_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines