BEAST/BSE - Better Audio System and Sound Engine
0.8.2
|
00001 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html 00002 #ifndef __BSE_ENGINE_UTIL_H__ 00003 #define __BSE_ENGINE_UTIL_H__ 00004 00005 #include <bse/bseenginenode.hh> 00006 00007 G_BEGIN_DECLS 00008 00009 /* --- UserThread --- */ 00010 void _engine_free_trans (BseTrans *trans); 00011 BseOStream* _engine_alloc_ostreams (guint n); 00012 #if 0 /* bseengine.hh: */ 00013 void bse_engine_user_thread_collect (void); 00014 gfloat* bse_engine_const_values (gfloat value); 00015 #endif 00016 00017 00018 /* --- MasterThread --- */ 00019 void _engine_recycle_const_values (gboolean nuke_all); 00020 void _engine_node_collect_jobs (EngineNode *node); 00021 /* master node list */ 00022 void _engine_mnl_remove (EngineNode *node); 00023 void _engine_mnl_node_changed (EngineNode *node); 00024 void _engine_mnl_integrate (EngineNode *node); 00025 #define BSE_ENGINE_MNL_UNSCHEDULED_TJOB_NODE(node) (!(node)->sched_tag && ((node)->flow_jobs || (node)->probe_jobs)) 00026 EngineNode* _engine_mnl_head (void); 00027 00028 /* communication routines for threads: 00029 * UserThread - main application 00030 * MasterThread - op engine control thread 00031 * SlaveThread - op engine calculation threads 00032 * 00033 * these functions are for _internal_ use of bseengine*.cc implementations 00034 */ 00035 00036 /* --- job transactions --- */ 00037 /* UserThread */ 00038 guint64 _engine_enqueue_trans (BseTrans *trans); 00039 BseTrans* _engine_collect_trans (void); 00040 void _engine_wait_on_trans (void); 00041 /* MasterThread */ 00042 BseJob* _engine_pop_job (gboolean update_commit_stamp); 00043 gboolean _engine_job_pending (void); 00044 00045 00046 /* --- node processing queue --- */ 00047 void _engine_set_schedule (EngineSchedule *schedule); 00048 void _engine_unset_schedule (EngineSchedule *schedule); 00049 EngineNode* _engine_pop_unprocessed_node (void); 00050 void _engine_push_processed_node (EngineNode *node); 00051 SfiRing* _engine_pop_unprocessed_cycle (void); 00052 void _engine_push_processed_cycle (SfiRing *cycle); 00053 void _engine_wait_on_unprocessed (void); 00054 00055 G_END_DECLS 00056 00057 #endif /* __BSE_ENGINE_UTIL_H__ */