man bse (Fonctions bibliothèques) - BSE Function Reference

NAME

BSE-Functions - BSE Function Reference

Document Revised: Wed May 25 23:38:22 2005

SYNOPSIS

CBBseEngineAccessFunc(CImodule, CIdata);

CBBseEnginePollFunc(CIdata, CIn_values, CItimeout_p, CIn_fds, CIfds, CIrevents_filled);

CBBseEngineProbeFunc(CIdata, CItick_stamp, CIn_values, CIoblocks);

CBBseGlueBoxedToRec(CIboxed);

CBBseGlueBoxedToSeq(CIboxed);

CBBseStorageRestoreLink(CIdata, CIstorage, CIfrom_item, CIto_item, CIerror);

CBbse_approx2_exp2(CIex);

CBbse_approx2_tanh(CIx);

CBbse_approx3_exp2(CIex);

CBbse_approx3_tanh(CIx);

CBbse_approx4_exp2(CIex);

CBbse_approx4_tanh(CIx);

CBbse_approx5_exp2(CIex);

CBbse_approx5_tanh(CIx);

CBbse_approx6_exp2(CIex);

CBbse_approx6_tanh(CIx);

CBbse_approx7_exp2(CIex);

CBbse_approx7_tanh(CIx);

CBbse_approx8_exp2(CIex);

CBbse_approx8_tanh(CIx);

CBbse_approx9_exp2(CIex);

CBbse_approx9_tanh(CIx);

CBbse_approx_atan1(CIx);

CBbse_approx_atan1_prescale(CIboost_amount);

CBbse_approx_qcircle1(CIx);

CBbse_approx_qcircle2(CIx);

CBbse_approx_qcircle3(CIx);

CBbse_approx_qcircle4(CIx);

CBbse_engine_add_user_callback(CIdata, CIfree_func);

CBbse_engine_configure(CIlatency_ms, CIsample_freq, CIcontrol_freq);

CBbse_engine_constrain(CIlatency_ms, CIsample_freq, CIcontrol_freq, CIblock_size_p, CIcontrol_raster_p);

CBbse_engine_dispatch();

CBbse_engine_garbage_collect();

CBbse_engine_init(CIrun_threaded);

CBbse_engine_tick_stamp_from_systime(CIsystime);

CBbse_engine_wait_on_trans();

CBbse_glue_boxed_to_value(CIboxed_type, CIboxed);

CBbse_idle_notify(CIfunction, CIdata);

CBbse_idle_now(CIfunction, CIdata);

CBbse_idle_remove(CIid);

CBbse_idle_timed(CIusec_delay, CIfunction, CIdata);

CBbse_item_cross_link(CIowner, CIlink, CIuncross_func);

CBbse_item_cross_unlink(CIowner, CIlink, CIuncross_func);

CBbse_item_gather_items(CIitem, CIiseq, CIbase_type, CIccheck, CIpcheck, CIdata);

CBbse_item_gather_items_typed(CIitem, CIiseq, CIproxy_type, CIcontainer_type, CIallow_ancestor);

CBbse_item_set_internal(CIitem, CIinternal);

CBbse_item_uncross_links(CIowner, CIlink);

CBbse_job_access(CImodule, CIaccess_func, CIdata, CIfree_func);

CBbse_job_add_poll(CIpoll_func, CIdata, CIfree_func, CIn_fds, CIfds);

CBbse_job_add_timer(CItimer_func, CIdata, CIfree_func);

CBbse_job_boundary_access(CImodule, CItick_stamp, CIaccess_func, CIdata, CIfree_func);

CBbse_job_boundary_discard(CImodule);

CBbse_job_connect(CIsrc_module, CIsrc_ostream, CIdest_module, CIdest_istream);

CBbse_job_debug(CIdebug);

CBbse_job_discard(CImodule);

CBbse_job_disconnect(CIdest_module, CIdest_istream);

CBbse_job_flow_access(CImodule, CItick_stamp, CIaccess_func, CIdata, CIfree_func);

CBbse_job_force_reset(CImodule);

CBbse_job_integrate(CImodule);

CBbse_job_jconnect(CIsrc_module, CIsrc_ostream, CIdest_module, CIdest_jstream);

CBbse_job_jdisconnect(CIdest_module, CIdest_jstream, CIsrc_module, CIsrc_ostream);

CBbse_job_kill_inputs(CImodule);

CBbse_job_kill_outputs(CImodule);

CBbse_job_nop();

CBbse_job_remove_poll(CIpoll_func, CIdata);

CBbse_job_request_probe(CImodule, CIn_delay_samples, CIn_probe_values, CIochannel_bytemask, CIprobe_func, CIdata);

CBbse_job_resume_at(CImodule, CItick_stamp);

CBbse_job_suspend_now(CImodule);

CBbse_midi_free_event(CIevent);

CBbse_midi_signal_default(CItype);

CBbse_module_has_source(CImodule, CIistream);

CBbse_module_is_scheduled(CImodule);

CBbse_module_new(CIklass, CIuser_data);

CBbse_module_new_virtual(CIn_iostreams, CIuser_data, CIfree_data);

CBbse_module_tick_stamp(CImodule);

CBbse_msg_handler(CIlmsg);

CBbse_object_strdup_debug_handle(CIobject);

CBbse_procedure_collect_input_args(CIproc, CIfirst_value, CIvar_args, CIivalues);

CBbse_procedure_marshal_valist(CIproc_type, CIfirst_value, CImarshal, CImarshal_data, CIskip_ovalues, CIvar_args);

CBbse_saturate_branching(CIvalue, CIlimit);

CBbse_saturate_hard(CIvalue, CIlimit);

CBbse_server_get();

CBbse_snet_intern_child(CIself, CIchild);

CBbse_storage_parse_item_link(CIself, CIfrom_item, CIrestore_link, CIdata);

CBbse_trans_add(CItrans, CIjob);

CBbse_trans_commit(CItrans);

CBbse_trans_commit_delayed(CItrans, CItick_stamp);

CBbse_trans_dismiss(CItrans);

CBbse_trans_merge(CItrans1, CItrans2);

CBbse_trans_open();

CBbse_transact(CIjob, CI...);

CBgsl_data_clip_sample(CIdhandle, CIcconfig, CIresult);

CBgsl_data_find_block(CIhandle, CIn_values, CIvalues, CIepsilon);

CBgsl_data_handle_new_crop(CIsrc_handle, CIn_head_cut, CIn_tail_cut);

CBgsl_data_handle_new_cut(CIsrc_handle, CIcut_offset, CIn_cut_values);

CBgsl_data_make_fade_ramp(CIdhandle, CImin_pos, CImax_pos, CIlength_p);

CBgsl_filter_butter_bp(CIiorder, CIfreq1, CIfreq2, CIepsilon, CIa, CIb);

CBgsl_filter_butter_bs(CIiorder, CIfreq1, CIfreq2, CIepsilon, CIa, CIb);

CBgsl_filter_butter_hp(CIiorder, CIfreq, CIepsilon, CIa, CIb);

CBgsl_filter_butter_lp(CIiorder, CIfreq, CIepsilon, CIa, CIb);

CBgsl_filter_fir_approx(CIiorder, CIfreq, CIvalue);

CBgsl_filter_sine_scan(CIorder, CIa, CIb, CIfreq, CIn_values);

CBgsl_filter_tscheb1_bp(CIiorder, CIfreq1, CIfreq2, CIepsilon, CIa, CIb);

CBgsl_filter_tscheb1_bs(CIiorder, CIfreq1, CIfreq2, CIepsilon, CIa, CIb);

CBgsl_filter_tscheb1_hp(CIiorder, CIfreq, CIepsilon, CIa, CIb);

CBgsl_filter_tscheb1_lp(CIiorder, CIfreq, CIepsilon, CIa, CIb);

CBgsl_filter_tscheb2_bp(CIiorder, CIfreq1, CIfreq2, CIsteepness, CIepsilon, CIa, CIb);

CBgsl_filter_tscheb2_bs(CIiorder, CIfreq1, CIfreq2, CIsteepness, CIepsilon, CIa, CIb);

CBgsl_filter_tscheb2_hp(CIiorder, CIfreq, CIsteepness, CIepsilon, CIa, CIb);

CBgsl_filter_tscheb2_lp(CIiorder, CIfreq, CIsteepness, CIepsilon, CIa, CIb);

CBgsl_filter_tscheb2_steepness(CIiorder, CIc_freq, CIepsilon, CIresidue);

CBgsl_filter_tscheb2_steepness_db(CIiorder, CIc_freq, CIepsilon, CIstopband_db);

CBgsl_hfile_close(CIhfile);

CBgsl_hfile_open(CIfile_name);

CBgsl_hfile_pread(CIhfile, CIoffset, CIn_bytes, CIbytes);

CBgsl_hfile_zoffset(CIhfile);

CBgsl_power2_fftac(CIn_values, CIri_values_in, CIri_values_out);

CBgsl_power2_fftar(CIn_values, CIr_values_in, CIri_values_out);

CBgsl_power2_fftsc(CIn_values, CIri_values_in, CIri_values_out);

CBgsl_power2_fftsr(CIn_values, CIri_values_in, CIr_values_out);

CBgsl_rfile_close(CIrfile);

CBgsl_rfile_length(CIrfile);

CBgsl_rfile_name(CIrfile);

CBgsl_rfile_open(CIfile_name);

CBgsl_rfile_position(CIrfile);

CBgsl_rfile_pread(CIrfile, CIoffset, CIn_bytes, CIbytes);

CBgsl_rfile_read(CIrfile, CIn_bytes, CIbytes);

CBgsl_rfile_seek_set(CIrfile, CIoffset);

CBgsl_thread_awake_before(CItick_stamp);

CBgsl_tick_stamp();

CBgsl_tick_stamp_last();

DESCRIPTION

CBBseEngineAccessFunc(CImodule, CIdata); nokeep; l l l. CImodule; T{ Module to operate on T} CIdata; T{ Accessor data T}

The BseEngineAccessFunc is a user supplied callback function which can access a module in times it is not processing. Accessors are usually used to either read out a module's current state, or to modify its state. An accessor may only operate on the CIdata and the CImodule passed in to it.

CBBseEnginePollFunc(CIdata, CIn_values, CItimeout_p, CIn_fds, CIfds, CIrevents_filled); nokeep; l l l. CIdata; T{ Data of poll function T} CIn_values; T{ Minimum number of values the engine wants to process T} CItimeout_p; T{ Location of timeout value T} CIn_fds; T{ Number of file descriptors used for polling T} CIfds; T{ File descriptors to be used for polling T} CIrevents_filled; T{ Indicates whether CIfds actually have their ->revents field filled with valid data. T} h'-2m'CIRETURNS: T{ A boolean value indicating whether the engine should process data right now T}

The BseEnginePollFunc is a user supplied callback function which can be hooked into the BSE Engine. The engine uses the poll functions to determine whether processing of CIn_values in its module network is necessary. In order for the poll functions to react to extern events, such as device driver status changes, the engine will CBpoll(2) the CIfds of the poll function and invoke the callback with CIrevents_filled==TRUE if any of its CIfds changed state. The callback may also be invoked at other random times with CIrevents_filled=FALSE. It is supposed to return TRUE if network processing is currently necessary, and FALSE if not. If FALSE is returned, CItimeout_p may be filled with the number of milliseconds the engine should use for polling at maximum.

CBBseEngineProbeFunc(CIdata, CItick_stamp, CIn_values, CIoblocks); nokeep; l l l. CIdata; T{ user data passed in to CBbse_job_probe_request() T} CItick_stamp; T{ engine time in microseconds of the probe T} CIn_values; T{ number of values probed T} CIoblocks; T{ array of probe value block per output channel T}

A CBBseEngineProbeFunc() is provided by users as a means to be notified about a completed probe. This function is executed in the user thread. Per each output channel that a probe has been requested through CBbse_job_request_probe(), a block of probe values is supplied as CIoblocks[channel-index]. These blocks are allocate via CBg_new() and may be "stolen" by assigning NULL to the respective pointer (the caller then is responsible to CBg_free() the block). Note that n_values may be 0 in case the module to be probed was inactive. The blocks still contain CBbse_engine_block_size() values regardless.

CBBseGlueBoxedToRec(CIboxed); nokeep; l l l. CIboxed; T{ the boxed value to be converted into a record T} h'-2m'CIRETURNS: T{ a GC owned SfiRec* T}

Construct a new CISfiRec from a boxed value.

CBBseGlueBoxedToSeq(CIboxed); nokeep; l l l. CIboxed; T{ the boxed value to be converted into a sequence T} h'-2m'CIRETURNS: T{ a GC owned SfiSeq* T}

Construct a new CISfiSeq from a boxed value.

CBBseStorageRestoreLink(CIdata, CIstorage, CIfrom_item, CIto_item, CIerror); nokeep; l l l. CIdata; T{ user data T} CIstorage; T{ CIBseStorage instance T} CIfrom_item; T{ link owner T} CIto_item; T{ link target or NULL T} CIerror; T{ error string describing failing link lookups T}

CBBseStorageRestoreLink() is a user supplied handler to be called at the end of a parsing stage, once object references could be resolved. Failing resolutions are indicated by non NULLCIerror strings.

CBbse_approx2_exp2(CIex); nokeep; l l l. CIfloat CIex; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating 2^ex T}

Fast approximation of 2 raised to the power of ex. Within -1..+1, the error stays below 0.01275 which corresponds to a sample precision of 6.2 bit, the average error amounts to 0.001914. For integer values of CIex (i.e. CIex - floor (CIex) -> 0), the error approaches zero. On a 2GHz machine, execution takes roughly 12.81 ns.

CBbse_approx2_tanh(CIx); nokeep; l l l. CIfloat CIx; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating CBtanh(x) T}

Fast approximation of the hyperbolic tangent of x. Within -1..+1, the error stays below 0.00436 which corresponds to a sample precision of 7.8 bit, the average error amounts to 0.00069220. On a 2GHz machine, execution takes roughly 24.48 ns.

CBbse_approx3_exp2(CIex); nokeep; l l l. CIfloat CIex; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating 2^ex T}

Fast approximation of 2 raised to the power of ex. Within -1..+1, the error stays below 0.001123415 which corresponds to a sample precision of 9.7 bit, the average error amounts to 0.000133. For integer values of CIex (i.e. CIex - floor (CIex) -> 0), the error approaches zero. On a 2GHz machine, execution takes roughly 13.74 ns.

CBbse_approx3_tanh(CIx); nokeep; l l l. CIfloat CIx; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating CBtanh(x) T}

Fast approximation of the hyperbolic tangent of x. Within -1..+1, the error stays below 0.0003857 which corresponds to a sample precision of 7.8 bit, the average error amounts to 0.00004827. On a 2GHz machine, execution takes roughly 25.78 ns.

CBbse_approx4_exp2(CIex); nokeep; l l l. CIfloat CIex; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating 2^ex T}

Fast approximation of 2 raised to the power of ex. Within -1..+1, the error stays below 7.876055e-05 which corresponds to a sample precision of 13.6 bit, the average error amounts to 7.7012792e-06. For integer values of CIex (i.e. CIex - floor (CIex) -> 0), the error approaches zero. On a 2GHz machine, execution takes roughly 16.46 ns.

CBbse_approx4_tanh(CIx); nokeep; l l l. CIfloat CIx; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating CBtanh(x) T}

Fast approximation of the hyperbolic tangent of x. Within -1..+1, the error stays below 2.7017507e-05 which corresponds to a sample precision of 15.1 bit, the average error amounts to 2.799594e-06. On a 2GHz machine, execution takes roughly 28.41 ns.

CBbse_approx5_exp2(CIex); nokeep; l l l. CIfloat CIex; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating 2^ex T}

Fast approximation of 2 raised to the power of ex. Within -1..+1, the error stays below 4.60807023e-06 which corresponds to a sample precision of 17.7 bit, the average error amounts to 3.842199e-07. For integer values of CIex (i.e. CIex - floor (CIex) -> 0), the error approaches zero. On a 2GHz machine, execution takes roughly 18.51 ns.

CBbse_approx5_tanh(CIx); nokeep; l l l. CIfloat CIx; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating CBtanh(x) T}

Fast approximation of the hyperbolic tangent of x. Within -1..+1, the error stays below 1.582042006e-06 which corresponds to a sample precision of 19.2 bit, the average error amounts to 1.42780810e-07. On a 2GHz machine, execution takes roughly 30.35 ns.

CBbse_approx6_exp2(CIex); nokeep; l l l. CIfloat CIex; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating 2^ex T}

Fast approximation of 2 raised to the power of ex. Within -1..+1, the error stays below 2.5505813e-07 which corresponds to a sample precision of 21.9 bit, the average error amounts to 2.1028377e-08. For integer values of CIex (i.e. CIex - floor (CIex) -> 0), the error approaches zero. On a 2GHz machine, execution takes roughly 21.84 ns.

CBbse_approx6_tanh(CIx); nokeep; l l l. CIfloat CIx; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating CBtanh(x) T}

Fast approximation of the hyperbolic tangent of x. Within -1..+1, the error stays below 9.7878796e-08 which corresponds to a sample precision of 23.2 bit, the average error amounts to 1.3016999e-08. On a 2GHz machine, execution takes roughly 34.29 ns.

CBbse_approx7_exp2(CIex); nokeep; l l l. CIfloat CIex; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating 2^ex T}

Fast approximation of 2 raised to the power of ex. Within -1..+1, the error stays below 4.1074325e-08 which corresponds to a sample precision of 24.5 bit, the average error amounts to 7.7448985e-09. For integer values of CIex (i.e. CIex - floor (CIex) -> 0), the error approaches zero. On a 2GHz machine, execution takes roughly 23.79 ns.

CBbse_approx7_tanh(CIx); nokeep; l l l. CIfloat CIx; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating CBtanh(x) T}

Fast approximation of the hyperbolic tangent of x. Within -1..+1, the error stays below 4.4375671e-08 which corresponds to a sample precision of 24.4 bit, the average error amounts to 9.5028421e-09. On a 2GHz machine, execution takes roughly 36.86 ns.

CBbse_approx8_exp2(CIex); nokeep; l l l. CIfloat CIex; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating 2^ex T}

Fast approximation of 2 raised to the power of ex. Within -1..+1, the error stays below 4.1074325e-08 which corresponds to a sample precision of 24.5 bit, the average error amounts to 7.6776048e-09. Note that there is no significant precision increment over CBbse_approx7_exp2(). For integer values of CIex (i.e. CIex - floor (CIex) -> 0), the error approaches zero. On a 2GHz machine, execution takes roughly 26.59 ns.

CBbse_approx8_tanh(CIx); nokeep; l l l. CIfloat CIx; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating CBtanh(x) T}

Fast approximation of the hyperbolic tangent of x. Within -1..+1, the error stays below 4.4375671e-08 which corresponds to a sample precision of 24.4 bit, the average error amounts to 9.49155722e-09. Note that there is no significant precision increment over CBbse_approx7_tanh(). On a 2GHz machine, execution takes roughly 42.03 ns.

CBbse_approx9_exp2(CIex); nokeep; l l l. CIfloat CIex; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating 2^ex T}

Fast approximation of 2 raised to the power of ex. Within -1..+1, the error stays below 4.1074325e-08 which corresponds to a sample precision of 24.5 bit, the average error amounts to 7.677515903e-09. Note that there is no significant precision increment over CBbse_approx7_exp2(). For integer values of CIex (i.e. CIex - floor (CIex) -> 0), the error approaches zero. On a 2GHz machine, execution takes roughly 29.40 ns.

CBbse_approx9_tanh(CIx); nokeep; l l l. CIfloat CIx; T{ exponent within [-127..+127] T} h'-2m'CIRETURNS: T{ y approximating CBtanh(x) T}

Fast approximation of the hyperbolic tangent of x. Within -1..+1, the error stays below 4.4375671e-08 which corresponds to a sample precision of 24.4 bit, the average error amounts to 9.49141881e-09. Note that there is no significant precision increment over CBbse_approx7_tanh(). On a 2GHz machine, execution takes roughly 43.83 ns.

CBbse_approx_atan1(CIx); nokeep; l l l. CIregister double CIx; T{ x as in CBatan(x) T}

Fast CBatan(x)/(PI/2) approximation, with maximum error < 0.01 and CBbse_approx_atan1(0)==0, according to the formula: n1 = -0.41156875521951602506487246309908; n2 = -1.0091272542790025586079663559158; d1 = 0.81901156857081841441890603235599; d2 = 1.0091272542790025586079663559158; CBpositive_atan1(x) = 1 + (n1 * x + n2) / ((1 + d1 * x) * x + d2);

CBbse_approx_atan1_prescale(CIboost_amount); nokeep; l l l. CIboost_amount; T{ boost amount between [0..1] T} h'-2m'CIRETURNS: T{ prescale factor for CBbse_approx_atan1() T}

Calculate the prescale factor for CBbse_approx_atan1(x*prescale) from a linear boost factor, where 0.5 amounts to prescale=1.0, 1.0 results in maximum boost and 0.0 results in maximum attenuation.

CBbse_approx_qcircle1(CIx); nokeep; l l l. CIregister double CIx; T{ x within [0..1] T} h'-2m'CIRETURNS: T{ y for circle approximation within [0..1] T}

Fast approximation of the upper right quadrant of a circle. Errors at x=0 and x=1 are zero, for the rest of the curve, the error wasn't minimized, but distributed to best fit the curverture of a quarter circle. The maximum error is below 0.092.

CBbse_approx_qcircle2(CIx); nokeep; l l l. CIregister double CIx; T{ x within [0..1] T} h'-2m'CIRETURNS: T{ y for circle approximation within [0..1] T}

Fast approximation of the upper left quadrant of a circle. Errors at x=0 and x=1 are zero, for the rest of the curve, the error wasn't minimized, but distributed to best fit the curverture of a quarter circle. The maximum error is below 0.092.

CBbse_approx_qcircle3(CIx); nokeep; l l l. CIregister double CIx; T{ x within [0..1] T} h'-2m'CIRETURNS: T{ y for circle approximation within [0..1] T}

Fast approximation of the lower left quadrant of a circle. Errors at x=0 and x=1 are zero, for the rest of the curve, the error wasn't minimized, but distributed to best fit the curverture of a quarter circle. The maximum error is below 0.092.

CBbse_approx_qcircle4(CIx); nokeep; l l l. CIregister double CIx; T{ x within [0..1] T} h'-2m'CIRETURNS: T{ y for circle approximation within [0..1] T}

Fast approximation of the lower right quadrant of a circle. Errors at x=0 and x=1 are zero, for the rest of the curve, the error wasn't minimized, but distributed to best fit the curverture of a quarter circle. The maximum error is below 0.092.

CBbse_engine_add_user_callback(CIdata, CIfree_func); nokeep; l l l. CIgpointer CIdata; T{ Data passed in to the free_func T} CIBseFreeFunc CIfree_func; T{ Function to free CIdata (executed in user thread) T}

Queues data to be collected by CBbse_engine_garbage_collect(), so CIfree_func() will be called with CIdata as argument during the next garbage collection cycle in the user thread. This function is MT-safe and may be called from any thread.

CBbse_engine_configure(CIlatency_ms, CIsample_freq, CIcontrol_freq); nokeep; l l l. CIguint CIlatency_ms; T{ calculation latency in milli seconds T} CIguint CIsample_freq; T{ mixing frequency T} CIguint CIcontrol_freq; T{ frequency at which to check control values or 0 T} h'-2m'CIRETURNS: T{ whether reconfiguration was successful T}

Reconfigure engine parameters. This function may only be called after engine initialization and can only succeed if no modules are currently integrated.

CBbse_engine_constrain(CIlatency_ms, CIsample_freq, CIcontrol_freq, CIblock_size_p, CIcontrol_raster_p); nokeep; l l l. CIguint CIlatency_ms; T{ calculation latency in milli seconds T} CIguint CIsample_freq; T{ mixing frequency T} CIguint CIcontrol_freq; T{ frequency at which to check control values or 0 T} CIguint* CIblock_size_p; T{ location of number of values to process block wise T} CIguint* CIcontrol_raster_p; T{ location of number of values to skip between control values T}

Calculate a suitable block size and control raster for a CIsample_freq at a specific CIlatency_ms (the latency should be > 0). The CIcontrol_freq if specified should me much smaller than the CIsample_freq. It determines how often control values are to be checked when calculating blocks of sample values. The block size determines the amount by which the global tick stamp (see CBgsl_tick_stamp()) is updated everytime the whole module network completed processing block size values. This function is MT-safe and may be called prior to engine initialization.

CBbse_engine_dispatch(); Perform necessary work the engine has to handle in the user thread. This function may only be called from the user thread, since it will invoke CBBseFreeFunc() functions (see CBbse_engine_garbage_collect()) and do other things which are guranteed to be executed in the user thread.
CBbse_engine_garbage_collect(); BSE Engine user thread function. Collects processed jobs and transactions from the engine and frees them. This involves callback invocation of CBBseFreeFunc() functions, e.g. from CBbse_job_access() or CBbse_job_flow_access() jobs. This function may only be called from the user thread, as CBBseFreeFunc() functions are guranteed to be executed in the user thread.
CBbse_engine_init(CIrun_threaded); nokeep; l l l. CIgboolean CIrun_threaded; T{ whether the engine should be run threaded T}

Initialize the BSE Engine, this function must be called prior to any other engine related function and can only be invoked once.

CBbse_engine_tick_stamp_from_systime(CIsystime); nokeep; l l l. CIguint64 CIsystime; T{ System time in micro seconds. T} h'-2m'CIRETURNS: T{ Engine tick stamp value T}

Depending on the engine's sample frequency and the time of the last global tick stamp update, calculate the corresponding engine tick stamp from a given system time. This function is MT-safe and may be called from any thread.

CBbse_engine_wait_on_trans(); Wait until all pending transactions have been processed by the BSE Engine. This function, when done waiting, will run a garbage collection cycle before returning. See CBbse_engine_garbage_collect(), the same restrictions apply to invokations of this function.
CBbse_glue_boxed_to_value(CIboxed_type, CIboxed); nokeep; l l l. CIGType CIboxed_type; T{ type of the boxed value T} CIgpointer CIboxed; T{ the boxed value T}

Covert a boxed value into a CISfiGlueValue (usually holding either a sequence or a record). The returned value is owned by the GC.

CBbse_idle_notify(CIfunction, CIdata); nokeep; l l l. CIGSourceFunc CIfunction; T{ user function T} CIgpointer CIdata; T{ user data T} h'-2m'CIRETURNS: T{ idle handler id, suitable for CBbse_idle_remove() T}

Queue CIfunction(CIdata) for execution inside the main BSE thread, similar to CBbse_idle_now(), albeit with a lower priority. This funciton is intended to be used by code which emits asyncronous notifications. This funciton is MT-safe and may be called from any thread.

CBbse_idle_now(CIfunction, CIdata); nokeep; l l l. CIGSourceFunc CIfunction; T{ user function T} CIgpointer CIdata; T{ user data T} h'-2m'CIRETURNS: T{ idle handler id, suitable for CBbse_idle_remove() T}

Execute CIfunction(CIdata) inside the main BSE thread as soon as possible. This funciton is intended to be used by code which for some reason has to be executed asyncronously. This funciton is MT-safe and may be called from any thread.

CBbse_idle_remove(CIid); nokeep; l l l. CIguint CIid; T{ idle handler id T}

Remove or unqueue an idle handler queued by CBbse_idle_now() or one of its variants. This funciton is MT-safe and may be called from any thread.

CBbse_idle_timed(CIusec_delay, CIfunction, CIdata); nokeep; l l l. CIguint64 CIusec_delay; T{ microsecond delay T} CIGSourceFunc CIfunction; T{ user function T} CIgpointer CIdata; T{ user data T} h'-2m'CIRETURNS: T{ idle handler id, suitable for CBbse_idle_remove() T}

Execute CIfunction(CIdata) with the main BSE thread, similar to CBbse_idle_now(), after a delay period of CIusec_delay has passed. This funciton is MT-safe and may be called from any thread.

CBbse_item_cross_link(CIowner, CIlink, CIuncross_func); nokeep; l l l. CIBseItem* CIowner; T{ reference owner T} CIBseItem* CIlink; T{ item to be referenced by CIowner T} CIBseItemUncross CIuncross_func; T{ notifier to be executed on uncrossing T}

Install a weak cross reference from CIowner to CIlink. The two items must have a common ancestor when the cross link is installed. Once their ancestry changes so that they don't have a common ancestor anymore, CIuncross_func() is executed.

CBbse_item_cross_unlink(CIowner, CIlink, CIuncross_func); nokeep; l l l. CIBseItem* CIowner; T{ reference owner T} CIBseItem* CIlink; T{ item referenced by CIowner T} CIBseItemUncross CIuncross_func; T{ notifier queued to be executed on uncrossing T}

Removes a cross link previously installed via CBbse_item_cross_link() without executing CIuncross_func().

CBbse_item_gather_items(CIitem, CIiseq, CIbase_type, CIccheck, CIpcheck, CIdata); nokeep; l l l. CIBseItem* CIitem; T{ valid CIBseItem from which to start gathering T} CIBseItemSeq* CIiseq; T{

T} CIGType CIbase_type; T{ base type of the items to gather T} CIBseItemCheckContainer CIccheck; T{ container filter function T} CIBseItemCheckProxy CIpcheck; T{ proxy filter function T} CIgpointer CIdata; T{ CIdata pointer to CIccheck and CIpcheck T} h'-2m'CIRETURNS: T{ returns CIitems T}

This function gathers items from an object hirachy, walking upwards, starting out with CIitem. For each container passing CIccheck(), all immediate children are tested for addition with CIpcheck.

CBbse_item_gather_items_typed(CIitem, CIiseq, CIproxy_type, CIcontainer_type, CIallow_ancestor); nokeep; l l l. CIBseItem* CIitem; T{ valid CIBseItem from which to start gathering T} CIBseItemSeq* CIiseq; T{

T} CIGType CIproxy_type; T{ base type of the items to gather T} CIGType CIcontainer_type; T{ base type of the containers to check for items T} CIgboolean CIallow_ancestor; T{ if FALSE, ancestors of CIitem are omitted T} h'-2m'CIRETURNS: T{ returns CIitems T}

Variant of CBbse_item_gather_items(), the containers and items are simply filtered by checking derivation from CIcontainer_type and CIproxy_type respectively. Gathered items may not be ancestors of CIitem if CIallow_ancestor is FALSE.

CBbse_item_set_internal(CIitem, CIinternal); nokeep; l l l. CIgpointer CIitem; T{ valid CIBseItem T} CIgboolean CIinternal; T{ TRUE or FALSE T}

Set whether an item should be considered internal to the BSE implementation (or implementation of another BSE object). Internal items are not stored with their parents and undo is not recorded for internal items either. Marking containers internal also affects any children they contain, in effect, the whole posterity spawned by the container is considered internal.

CBbse_item_uncross_links(CIowner, CIlink); nokeep; l l l. CIBseItem* CIowner; T{ reference owner T} CIBseItem* CIlink; T{ item referenced by CIowner T}

Destroys all existing cross links from CIowner to CIlink by executing the associated notifiers.

CBbse_job_access(CImodule, CIaccess_func, CIdata, CIfree_func); nokeep; l l l. CIBseModule* CImodule; T{ The module to access T} CIBseEngineAccessFunc CIaccess_func; T{ The accessor function (executed in master thread) T} CIgpointer CIdata; T{ Data passed in to the accessor T} CIBseFreeFunc CIfree_func; T{ Function to free CIdata (executed in user thread) T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which will invoke CIaccess_func on CImodule with CIdata when the transaction queue is processed to modify the module's state. This function is MT-safe and may be called from any thread.

CBbse_job_add_poll(CIpoll_func, CIdata, CIfree_func, CIn_fds, CIfds); nokeep; l l l. CIBseEnginePollFunc CIpoll_func; T{ Poll function to add T} CIgpointer CIdata; T{ Data of poll function T} CIBseFreeFunc CIfree_func; T{ Function to free CIdata T} CIguint CIn_fds; T{ Number of poll file descriptors T} CIconst GPollFD* CIfds; T{ File descriptors to CBselect(2) or CBpoll(2) on T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which adds a poll function to the engine. The poll function is used by the engine to determine whether processing is currently necessary. This function is MT-safe and may be called from any thread.

CBbse_job_add_timer(CItimer_func, CIdata, CIfree_func); nokeep; l l l. CIBseEngineTimerFunc CItimer_func; T{ Timer function to add T} CIgpointer CIdata; T{ Data of timer function T} CIBseFreeFunc CIfree_func; T{ Function to free CIdata T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which adds a timer function to the engine. The timer function is called after the engine caused new tick stamp updates. This function is MT-safe and may be called from any thread.

CBbse_job_boundary_access(CImodule, CItick_stamp, CIaccess_func, CIdata, CIfree_func); nokeep; l l l. CIBseModule* CImodule; T{ The module to access T} CIguint64 CItick_stamp; T{ Engine time stamp T} CIBseEngineAccessFunc CIaccess_func; T{ The accessor function T} CIgpointer CIdata; T{ Data passed in to the accessor T} CIBseFreeFunc CIfree_func; T{ Function to free CIdata T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which inserts CIaccess_func with CIdata into the boundary job queue of CImodule. Boundary jobs are executed at block boundaries, after all ordinary jobs have been processed and before global time stamp counter passed CItick_stamp. Boundary jobs queued for executaion after a node's destruction will not be executed but destroyed together with the node. This function is MT-safe and may be called from any thread.

CBbse_job_boundary_discard(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ The module to access T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Discard CImodule at block boundaries, after all ordinary jobs have been processed. This job type should be used instead of jobs from CBbse_job_discard() in situations where queueing of past-discard jobs before the next block boundary is hard to avoid (such as queing disconnection/suspend jobs from within CBprocess()). This function is MT-safe and may be called from any thread.

CBbse_job_connect(CIsrc_module, CIsrc_ostream, CIdest_module, CIdest_istream); nokeep; l l l. CIBseModule* CIsrc_module; T{ Module with output stream T} CIguint CIsrc_ostream; T{ Index of output stream of CIsrc_module T} CIBseModule* CIdest_module; T{ Module with unconnected input stream T} CIguint CIdest_istream; T{ Index of input stream of CIdest_module T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which connects the ouput stream CIsrc_ostream of module CIsrc_module to the input stream CIdest_istream of module CIdest_module (it is an error if the input stream is already connected by the time the job is executed). This function is MT-safe and may be called from any thread.

CBbse_job_debug(CIdebug); nokeep; l l l. CIconst gchar* CIdebug; T{ Debug message T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which issues CIdebug message when the job is executed. This function is meant for debugging purposes during development phase only and shouldn't be used in production code. This function is MT-safe and may be called from any thread.

CBbse_job_discard(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ The module to discard T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which removes CImodule from the engine and destroys it. This function is MT-safe and may be called from any thread.

CBbse_job_disconnect(CIdest_module, CIdest_istream); nokeep; l l l. CIBseModule* CIdest_module; T{ Module with connected input stream T} CIguint CIdest_istream; T{ Index of input stream of CIdest_module T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which causes the input stream CIdest_istream of CIdest_module to be disconnected (it is an error if the input stream isn't connected by the time the job is executed). This function is MT-safe and may be called from any thread.

CBbse_job_flow_access(CImodule, CItick_stamp, CIaccess_func, CIdata, CIfree_func); nokeep; l l l. CIBseModule* CImodule; T{ The module to access T} CIguint64 CItick_stamp; T{ Engine time stamp T} CIBseEngineAccessFunc CIaccess_func; T{ The accessor function T} CIgpointer CIdata; T{ Data passed in to the accessor T} CIBseFreeFunc CIfree_func; T{ Function to free CIdata T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which inserts CIaccess_func with CIdata into the flow job queue of CImodule. Flow jobs are jobs with limited impact on modules, which are executed during flow system progress at specific times. Once the time stamp counter of CImodule passed CItick_stamp, CIaccess_func is called to modify the module's state. Flow jobs queued for executaion after a node's destruction will not be executed but destroyed together with the node. This function is MT-safe and may be called from any thread.

CBbse_job_force_reset(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ The module to be reset T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Forces a reset of CImodule before its next call to CBprocess(), if its class provides a CBreset() implementation. This is usually not a good idea, as forcing an immediate reset can lead to multiple unnecessary CBreset() invocations. The logic used to invoke CBreset() automatically is usually good enough to cover all required cases. This function is MT-safe and may be called from any thread.

CBbse_job_integrate(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ The module to integrate T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job to integrate CImodule into the engine. This function is MT-safe and may be called from any thread.

CBbse_job_jconnect(CIsrc_module, CIsrc_ostream, CIdest_module, CIdest_jstream); nokeep; l l l. CIBseModule* CIsrc_module; T{ Module with output stream T} CIguint CIsrc_ostream; T{ Index of output stream of CIsrc_module T} CIBseModule* CIdest_module; T{ Module with unconnected joint input stream T} CIguint CIdest_jstream; T{ Index of joint input stream of CIdest_module T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which connects the ouput stream CIsrc_ostream of module CIsrc_module to the joint input stream CIdest_istream of module CIdest_module. This function is MT-safe and may be called from any thread.

CBbse_job_jdisconnect(CIdest_module, CIdest_jstream, CIsrc_module, CIsrc_ostream); nokeep; l l l. CIBseModule* CIdest_module; T{ Module with connected input stream T} CIguint CIdest_jstream; T{ Index of input stream of CIdest_module T} CIBseModule* CIsrc_module; T{ Module with output stream T} CIguint CIsrc_ostream; T{ Index of output stream of CIsrc_module T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which causes the joint input stream CIdest_jstream of CIdest_module to be disconnected from the output stream CIsrc_ostream of CIsrc_module (it is an error if this connection isn't established by the time the job is executed). Beware, the order of CIdest_module and CIsrc_module is different from CBbse_job_jconnect(). This function is MT-safe and may be called from any thread.

CBbse_job_kill_inputs(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ Module with input streams T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which causes all connected input streams of CImodule to be disconnected, like it's done upon discarding the module. This function is MT-safe and may be called from any thread.

CBbse_job_kill_outputs(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ Module with output streams T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which causes all connected output streams of CImodule to be disconnected, like it's done upon discarding the module. This function is MT-safe and may be called from any thread.

CBbse_job_nop(); nokeep; l l l. h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which does nothing. The job enforces a roundtrip to the engine's master thread however, which may be relevant when comitting otherwise empty transactions and calling CBbse_engine_wait_on_trans(). This function is MT-safe and may be called from any thread.

CBbse_job_remove_poll(CIpoll_func, CIdata); nokeep; l l l. CIBseEnginePollFunc CIpoll_func; T{ Poll function to remove T} CIgpointer CIdata; T{ Data of poll function T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which removes a previously inserted poll function from the engine. This function is MT-safe and may be called from any thread.

CBbse_job_request_probe(CImodule, CIn_delay_samples, CIn_probe_values, CIochannel_bytemask, CIprobe_func, CIdata); nokeep; l l l. CImodule; T{ The module to access T} CIn_delay_samples; T{ Number of samples to wait before taking probes T} CIn_probe_values; T{ Number of probe values to take T} CIochannel_bytemask; T{ One byte per ochannel, bytes != 0 indicate a probe request T} CIprobe_func; T{ Function invoked with CIdata in the user thread T} CIdata; T{ Data passed in to the accessor T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which inserts CIprobe_func with CIdata into the job queue of CImodule. Probe jobs are jobs which collect data from a given set of output channels of a module as probe data. The job then returns to the user thread before the next block boundary, and CIprobe_func() will be invoked as early as possible. There's no CBfree_func() supplied to delete CIdata, because such a function would always be called immediately after CIprobe_func(). So instead, any CIdata specific release handling should be integrated into CIprobe_func(). The CIochannel_bytemask must point to an array of bytes with a size equal to the number of output channels of CImodule. This function is MT-safe and may be called from any thread.

CBbse_job_resume_at(CImodule, CItick_stamp); nokeep; l l l. CIBseModule* CImodule; T{ Module to resume T} CIguint64 CItick_stamp; T{ Sample tick at which to resume CImodule T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which inserts a resumption event into the job queue of CImodule. Once the time stamp counter of CImodule passed CItick_stamp, if it is supended, its CBreset() method is called and the module is resumed, causing it's CBprocess() method to be called again. Resuming a module also resumes all input modules it has, unless those were explicitely suspended via CBbse_job_suspend_now(). This function is MT-safe and may be called from any thread.

CBbse_job_suspend_now(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ Module not currently suspended T} h'-2m'CIRETURNS: T{ New job suitable for CBbse_trans_add() T}

Create a new transaction job which suspends the CImodule and all it's input modules which don't have other non-suspended output connections. Suspension of a module prevents it's CBprocess() method from being called, it's outputs are simply filled with zero's instead. This function is MT-safe and may be called from any thread.

CBbse_midi_free_event(CIevent); nokeep; l l l. CIBseMidiEvent* CIevent; T{ BseMidiEvent structure T}

Free the CIevent and all data associated with it. This function is MT-safe and may be called from any thread.

CBbse_midi_signal_default(CItype); nokeep; l l l. CIBseMidiSignalType CItype; T{ BseMidiSignalType type T}

Get the initial default value for a midi signal. This function is MT-safe and may be called from any thread.

CBbse_module_has_source(CImodule, CIistream); nokeep; l l l. CIBseModule* CImodule; T{ a BSE Engine Module T} CIguint CIistream; T{ Index of input stream T} h'-2m'CIRETURNS: T{ whether the module has a possible input T}

Check whether CIistream may be disconnected via CBbse_job_disconnect(). This is not an indication for whether BSE_MODULE_ISTREAM (CImodule, CIistream).connected will be TRUE during CBprocess(), as the source may be a dangling virtual module, resulting in BSE_MODULE_ISTREAM (CImodule, CIistream).connected being FALSE. See also CBbse_module_new_virtual(). This function is MT-safe and may be called from any thread.

CBbse_module_is_scheduled(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ a BSE Engine Module T} h'-2m'CIRETURNS: T{ whether the module is scheduled T}

Check whether CImodule is part of the schedule required to calculate the signal flow up to the consumer modules. This state may frequently change with for instance connection changes of other modules. This function is MT-safe and may be called from any thread.

CBbse_module_new(CIklass, CIuser_data); nokeep; l l l. CIconst BseModuleClass* CIklass; T{ the BseModuleClass which determines the module's behaviour T} CIgpointer CIuser_data; T{ user data pointer T} h'-2m'CIRETURNS: T{ a newly created module T}

Create a new module with methods specified in CIklass and a user_data field set to CIuser_data. The returned module can then be integrated into the engine with CBbse_job_integrate(). This function is MT-safe and may be called from any thread.

CBbse_module_new_virtual(CIn_iostreams, CIuser_data, CIfree_data); nokeep; l l l. CIguint CIn_iostreams; T{ number of input and output streams T} CIgpointer CIuser_data; T{ user data, stored in module->user_data T} CIBseFreeFunc CIfree_data; T{ function to free user_data when the module is discarded T} h'-2m'CIRETURNS: T{ a newly created module T}

Create a new virtual module which has CIn_iostreams input streams and CIn_iostreams output streams. Simply put, virtual modules just pass all input stream signals through to the corresponsding output stream. However, they are cheaper to compute than a literal module implementation that just passes through all data in its CBprogress() method, because the connections can be virtualized in a connection optimization stage during scheduling, so that they don't end up in the list of modules which need to be processed during calculation phase. Beware though, flow jobs may not be scheduled on virtual modules (thusly, suspend jobs cannot be queued on them either), as virtual modules are ignored during calculation phase. They do, however, work just like ordinary modules with regards to suspension propagation, so the suspension state from output modules does only propagate across the virtual module to its input modules, if all its outputs are suspended. Instead of a single virtual module with multiple input/output streams, multiple virtual modules can be used if suspension is desired to propagate per stream. This function is MT-safe and may be called from any thread.

CBbse_module_tick_stamp(CImodule); nokeep; l l l. CIBseModule* CImodule; T{ a BSE Engine Module T} h'-2m'CIRETURNS: T{ the module's tick stamp, indicating its process status T}

Any thread may call this function on a valid engine module. The module specific tick stamp is updated to CBgsl_tick_stamp() + CIn_values every time its CBBseProcessFunc() function was called. See also CBgsl_tick_stamp(). This function is MT-safe and may be called from any thread.

CBbse_msg_handler(CIlmsg); nokeep; l l l. CIconst SfiMessage* CIlmsg; T{

T}

BSE log handler, suitable for CBsfi_msg_set_thread_handler(). This function is MT-safe and may be called from any thread.

CBbse_object_strdup_debug_handle(CIobject); nokeep; l l l. CIgpointer CIobject; T{ supposedly valid CIGObject pointer T} h'-2m'CIRETURNS: T{ newly allocated string T}

Construct a debugging identifier for CIobject. No mutable object members are accessed, so as long as the caller keeps CIobject alive for the duration of the function call, this function is MT-safe and may be called from any thread.

CBbse_procedure_collect_input_args(CIproc, CIfirst_value, CIvar_args, CIivalues); nokeep; l l l. CIproc; T{ valid CIBseProcedureClass T} CIfirst_value; T{ the first input argument if not to be collected T} CIvar_args; T{ CIva_list to collect input args from T} CIivalues; T{ uninitialized GValue array with at least proc->n_in_pspecs members T} h'-2m'CIRETURNS: T{ CIBseErrorType value of error if any occoured during collection T}

Collect input arguments for a procedure call from a CIva_list. The first value may be supplied as CIfirst_value and will then not be collected. CIivalues must be at least CIproc->n_in_pspecs elements long and all elements will be initialized after the function returns (even in error cases). CIfirst_value may be the same adress as CIivalues, in whic hcase the first argument is entirely ignored and collection simply starts out with the second argument.

CBbse_procedure_marshal_valist(CIproc_type, CIfirst_value, CImarshal, CImarshal_data, CIskip_ovalues, CIvar_args); nokeep; l l l. CIGType CIproc_type; T{ a type derived from BSE_TYPE_PROCEDURE T} CIconst GValue* CIfirst_value; T{ the first input argument if not to be collected T} CIBseProcedureMarshal CImarshal; T{ function marshalling the procedure call or NULL T} CIgpointer CImarshal_data; T{ data passed in to CImarshal T} CIgboolean CIskip_ovalues; T{ whether return value locations should be collected and filled in T} CIva_list CIvar_args; T{ CIva_list to collect input args from T} h'-2m'CIRETURNS: T{ CIBseErrorType value of error if any occoured T}

Collect input arguments for a procedure call from a CIva_list and call the procedure, optionally via CImarshal. If CIskip_ovalues is FALSE, the procedure return values will be stored in return value locations also collected from CIvar_args.

CBbse_saturate_branching(CIvalue, CIlimit); nokeep; l l l. CIdouble CIvalue; T{ value to saturate T} CIdouble CIlimit; T{ limit not to be exceeded by value T} h'-2m'CIRETURNS: T{ CIvalue bounded by -CIlimit and CIlimit T}

Clamp CIvalue within -CIlimit and +CIlimit. Limiting is performed by executing conditions and branches, so it will probably run slower than CBbse_saturate_hard() on many machines. On a 2GHz machine, execution takes roughly 8.29 ns.

CBbse_saturate_hard(CIvalue, CIlimit); nokeep; l l l. CIdouble CIvalue; T{ value to saturate T} CIdouble CIlimit; T{ limit not to be exceeded by value T} h'-2m'CIRETURNS: T{ CIvalue bounded by -CIlimit and CIlimit T}

Clamp CIvalue within -CIlimit and +CIlimit. Limiting is performed by floating point operations only, thus executing faster than condition based branching code on most modern architectures. On a 2GHz machine, execution takes roughly 6.86 ns.

CBbse_server_get(); nokeep; l l l. h'-2m'CIRETURNS: T{ Global BSE Server T}

Retrieve the global BSE server object.

CBbse_snet_intern_child(CIself, CIchild); nokeep; l l l. CIBseSNet* CIself; T{ valid CIBseSNet T} CIgpointer CIchild; T{ valid CIBseItem, which is a child of CIself T}

Mark CIchild as internal via CBbse_item_set_internal() and add special protection so to not destroy it automatically upon CBg_object_dispose().

CBbse_storage_parse_item_link(CIself, CIfrom_item, CIrestore_link, CIdata); nokeep; l l l. CIBseStorage* CIself; T{

T} CIBseItem* CIfrom_item; T{ link owner T} CIBseStorageRestoreLink CIrestore_link; T{ BseStorageRestoreLink handler to be called once the link was resolved T} CIgpointer CIdata; T{ user data passed into CIrestore_link() T} h'-2m'CIRETURNS: T{ expected token in case of a parsing error (G_TOKEN_NONE on success) T}

Parse an item link statement and return the expected token if a parsing error occours. Item links are resolved at the end of the parsing stage by calling the user supplied handler CIrestore_link() with the link target amongst its arguments (see CBBseStorageRestoreLink()).

CBbse_trans_add(CItrans, CIjob); nokeep; l l l. CIBseTrans* CItrans; T{ Opened transaction T} CIBseJob* CIjob; T{ Job to add T}

Append a job to an opened transaction. This function is MT-safe and may be called from any thread.

CBbse_trans_commit(CItrans); nokeep; l l l. CIBseTrans* CItrans; T{ open transaction T} h'-2m'CIRETURNS: T{ tick stamp of job execution T}

Close the transaction and commit it to the engine. The engine will execute the jobs contained in this transaction as soon as it has completed its current processing cycle, at which point CBgsl_tick_stamp() matches the returned tick stamp. The jobs will be executed in the exact order they were added to the transaction. This function is MT-safe and may be called from any thread.

CBbse_trans_commit_delayed(CItrans, CItick_stamp); nokeep; l l l. CIBseTrans* CItrans; T{ open transaction T} CIguint64 CItick_stamp; T{ earliest stamp T}

Commit the transaction like CBbse_trans_commit(), but make sure that the commit happens no earlier than CItick_stamp. This function will block until the commit occoured, so it will not return any earlier than CItick_stamp. This function is MT-safe and may be called from any thread.

CBbse_trans_dismiss(CItrans); nokeep; l l l. CIBseTrans* CItrans; T{ Opened transaction T}

Close and discard the transaction, causes destruction of all jobs currently contained in it and prevents their execution. This function is MT-safe and may be called from any thread.

CBbse_trans_merge(CItrans1, CItrans2); nokeep; l l l. CIBseTrans* CItrans1; T{ open transaction T} CIBseTrans* CItrans2; T{ open transaction T} h'-2m'CIRETURNS: T{ open transaction T}

Merge two open transactions by appending the jobs of CItrans2 to the jobs of CItrans1, returning the resulting transaction. This function is MT-safe and may be called from any thread.

CBbse_trans_open(); nokeep; l l l. h'-2m'CIRETURNS: T{ Newly opened empty transaction T}

Open up a new transaction to commit jobs to the BSE Engine. While the distinct functions to operate on a transaction are MT-safe, the caller has to take measures himself, to assure that only one function operates on the transaction at a time. This function is MT-safe and may be called from any thread.

CBbse_transact(CIjob, CI...); nokeep; l l l. CIjob; T{ First job T} CI...; T{ NULL terminated job list T}

Convenience function which openes up a new transaction, collects the NULL terminated job list passed to the function, and commits the transaction. This function is MT-safe and may be called from any thread.

CBgsl_data_clip_sample(CIdhandle, CIcconfig, CIresult); nokeep; l l l. CIGslDataHandle* CIdhandle; T{ valid and opened CIGslDataHandle T} CIGslDataClipConfig* CIcconfig; T{ clip configuration T} CIGslDataClipResult* CIresult; T{ clip result T} h'-2m'CIRETURNS: T{ error code as stored in CIresult T}

Clip silence at head and/or tail of a data handle according to a given threshold and optionally produce a fade ramp.

CBgsl_data_find_block(CIhandle, CIn_values, CIvalues, CIepsilon); nokeep; l l l. CIGslDataHandle* CIhandle; T{ an open GslDataHandle T} CIguint CIn_values; T{ amount of values to look for T} CIconst gfloat* CIvalues; T{ values to find T} CIgfloat CIepsilon; T{ maximum difference upon comparisions T} h'-2m'CIRETURNS: T{ position of values in data handle or -1 T}

Find the position of a block of values within a data handle, where all values compare to the reference values with a delta smaller than epsilon.

CBgsl_data_handle_new_crop(CIsrc_handle, CIn_head_cut, CIn_tail_cut); nokeep; l l l. CIGslDataHandle* CIsrc_handle; T{ source GslDataHandle T} CIGslLong CIn_head_cut; T{ number of values to cut at data handle head T} CIGslLong CIn_tail_cut; T{ number of values to cut at data handle tail T} h'-2m'CIRETURNS: T{ a newly created data handle T}

Create a new data handle containing the contents of CIsrc_handle minus CIn_head_cut values at the start and CIn_tail_cut values at the end.

CBgsl_data_handle_new_cut(CIsrc_handle, CIcut_offset, CIn_cut_values); nokeep; l l l. CIGslDataHandle* CIsrc_handle; T{ source GslDataHandle T} CIGslLong CIcut_offset; T{ offset of gap into CIsrc_handle T} CIGslLong CIn_cut_values; T{ length of gap in CIsrc_handle T} h'-2m'CIRETURNS: T{ a newly created data handle T}

Create a new data handle containing the contents of CIsrc_handle minus CIn_cut_values at offset CIcut_offset.

CBgsl_data_make_fade_ramp(CIdhandle, CImin_pos, CImax_pos, CIlength_p); nokeep; l l l. CIdhandle; T{ valid and opened CIGslDataHandle T} CImin_pos; T{ position within CIdhandle T} CImax_pos; T{ position within CIdhandle T} CIlength_p; T{ location to store the length of the fade ramp in T} h'-2m'CIRETURNS: T{ newly allocated float block with fade ramp T}

Create a float value block of abs (CImax_pos - CImin_pos) values, which contain a fade ramp of values from CIdhandle, with CImin_pos indicating the minimum of the fade ramp and CImax_pos indicating its maximum.

CBgsl_filter_butter_bp(CIiorder, CIfreq1, CIfreq2, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order (must be even) T} CIfreq1; T{ stopband end frequency (0..pi) T} CIfreq2; T{ passband end frequency (0..pi) T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Butterworth bandpass filter.

CBgsl_filter_butter_bs(CIiorder, CIfreq1, CIfreq2, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order (must be even) T} CIfreq1; T{ passband end frequency (0..pi) T} CIfreq2; T{ stopband end frequency (0..pi) T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Butterworth bandstop filter.

CBgsl_filter_butter_hp(CIiorder, CIfreq, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order T} CIfreq; T{ passband frequency (0..pi) T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Butterworth highpass filter.

CBgsl_filter_butter_lp(CIiorder, CIfreq, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order T} CIfreq; T{ cutoff frequency (0..pi) T} CIepsilon; T{ fall off at cutoff frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Butterworth lowpass filter.

CBgsl_filter_fir_approx(CIiorder, CIfreq, CIvalue); nokeep; l l l. CIiorder; T{ order of the filter (must be oven, >= 2) T} CIfreq; T{ the frequencies of the transfer function T} CIvalue; T{ the desired value of the transfer function T}

Approximates a given transfer function with an iorder-coefficient FIR filter. It is recommended to provide enough frequency values, so that CIn_points >= CIiorder.

CBgsl_filter_sine_scan(CIorder, CIa, CIb, CIfreq, CIn_values); nokeep; l l l. CIguint CIorder; T{ order of the iir filter T} CIconst gdouble* CIa; T{ root polynomial coefficients of the filter a[0..order] T} CIconst gdouble* CIb; T{ pole polynomial coefficients of the filter b[0..order] T} CIgdouble CIfreq; T{ frequency to test T} CIguint CIn_values; T{ number of samples T}

This function sends a sine signal of the desired frequency through an IIR filter, to test the value of the transfer function at a given point. It uses gsl_iir_filter_eval to do so. Compared to a "mathematical approach" of finding the transfer function, this function makes it possible to see the effects of finite arithmetic during filter evaluation. The first half of the output signal is not considered, since a lot of IIR filters have a transient phase where also overshoot is possible. For n_values, you should specify a reasonable large value. It should be a lot larger than the filter order, and large enough to let the input signal become (close to) 1.0 multiple times.

CBgsl_filter_tscheb1_bp(CIiorder, CIfreq1, CIfreq2, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order (must be even) T} CIfreq1; T{ stopband end frequency (0..pi) T} CIfreq2; T{ passband end frequency (0..pi) T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Tschebyscheff type 1 bandpass filter.

CBgsl_filter_tscheb1_bs(CIiorder, CIfreq1, CIfreq2, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order (must be even) T} CIfreq1; T{ passband end frequency (0..pi) T} CIfreq2; T{ stopband end frequency (0..pi) T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Tschebyscheff type 1 bandstop filter.

CBgsl_filter_tscheb1_hp(CIiorder, CIfreq, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order T} CIfreq; T{ passband frequency (0..pi) T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Tschebyscheff type 1 highpass filter.

CBgsl_filter_tscheb1_lp(CIiorder, CIfreq, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order T} CIfreq; T{ cutoff frequency (0..pi) T} CIepsilon; T{ fall off at cutoff frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Tschebyscheff type 1 lowpass filter.

CBgsl_filter_tscheb2_bp(CIiorder, CIfreq1, CIfreq2, CIsteepness, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order (must be even) T} CIfreq1; T{ stopband end frequency (0..pi) T} CIfreq2; T{ passband end frequency (0..pi) T} CIsteepness; T{ frequency steepness factor T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Tschebyscheff type 2 bandpass filter.

CBgsl_filter_tscheb2_bs(CIiorder, CIfreq1, CIfreq2, CIsteepness, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order (must be even) T} CIfreq1; T{ passband end frequency (0..pi) T} CIfreq2; T{ stopband end frequency (0..pi) T} CIsteepness; T{ frequency steepness factor T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Tschebyscheff type 2 bandstop filter.

CBgsl_filter_tscheb2_hp(CIiorder, CIfreq, CIsteepness, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order T} CIfreq; T{ stopband frequency (0..pi) T} CIsteepness; T{ frequency steepness T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Tschebyscheff type 2 highpass filter.

CBgsl_filter_tscheb2_lp(CIiorder, CIfreq, CIsteepness, CIepsilon, CIa, CIb); nokeep; l l l. CIiorder; T{ filter order T} CIfreq; T{ passband cutoff frequency (0..pi) T} CIsteepness; T{ frequency steepness (c_freq * steepness < pi) T} CIepsilon; T{ fall off at passband frequency (0..1) T} CIa; T{ root polynomial coefficients a[0..iorder] T} CIb; T{ pole polynomial coefficients b[0..iorder] T}

Tschebyscheff type 2 lowpass filter. To gain a transition band between freq1 and freq2, pass arguements CIfreq=freq1 and CIsteepness=freq2/freq1. To specify the transition band width in fractions of octaves, pass CIsteepness=2^octave_fraction.

CBgsl_filter_tscheb2_steepness(CIiorder, CIc_freq, CIepsilon, CIresidue); nokeep; l l l. CIunsigned int CIiorder; T{ filter order T} CIdouble CIc_freq; T{ passband cutoff frequency (0..pi) T} CIdouble CIepsilon; T{ fall off at passband frequency (0..1) T} CIdouble CIresidue; T{ maximum of transfer function in stopband (0..1) T}

Calculates the steepness parameter for Tschebyscheff type 2 lowpass filter, based on ripple residue in the stop band.

CBgsl_filter_tscheb2_steepness_db(CIiorder, CIc_freq, CIepsilon, CIstopband_db); nokeep; l l l. CIunsigned int CIiorder; T{ filter order T} CIdouble CIc_freq; T{ passband cutoff frequency (0..pi) T} CIdouble CIepsilon; T{ fall off at passband frequency (0..1) T} CIdouble CIstopband_db; T{ reduction in stopband in dB (>= 0) T}

Calculates the steepness parameter for Tschebyscheff type 2 lowpass filter, based on the ripple residue in the stop band.

CBgsl_hfile_close(CIhfile); nokeep; l l l. CIGslHFile* CIhfile; T{ valid CIGslHFile T}

Close and destroy a CIGslHFile. This function is MT-safe and may be called from any thread.

CBgsl_hfile_open(CIfile_name); nokeep; l l l. CIconst gchar* CIfile_name; T{ name of the file to open T} h'-2m'CIRETURNS: T{ a new opened CIGslHFile or NULL if an error occoured (errno set) T}

Open a file for reading and return the associated GSL hashed file. The motivation for using a CIGslHFile over normal unix file descriptors is to reduce the amount of opened unix file descriptors and to ensure thread safety upon reading offset relative byte blocks. Multiple open CIGslHFiles with equal file names will share a single unix file descriptor as long as the file wasn't modified meanwhile. This function is MT-safe and may be called from any thread.

CBgsl_hfile_pread(CIhfile, CIoffset, CIn_bytes, CIbytes); nokeep; l l l. CIGslHFile* CIhfile; T{ valid GslHFile T} CIGslLong CIoffset; T{ offset in bytes within 0 and file end T} CIGslLong CIn_bytes; T{ number of bytes to read T} CIgpointer CIbytes; T{ buffer to store read bytes T} h'-2m'CIRETURNS: T{ amount of bytes read or -1 if an error occoured (errno set) T}

Read a block of bytes from a GslHFile. This function is MT-safe and may be called from any thread.

CBgsl_hfile_zoffset(CIhfile); nokeep; l l l. CIGslHFile* CIhfile; T{ valid GslHFile T} h'-2m'CIRETURNS: T{ offset of first zero byte or -1 T}

Find the offset of the first zero byte in a GslHFile. This function is MT-safe and may be called from any thread.

CBgsl_power2_fftac(CIn_values, CIri_values_in, CIri_values_out); nokeep; l l l. CIn_values; T{ Number of complex values T} CIri_values_in; T{ Complex sample values [0..n_values*2-1] T} CIri_values_out; T{ Complex frequency values [0..n_values*2-1] T}

This function performs a decimation in time fourier transformation in forward direction, where the input values are equidistant sampled data, and the output values contain the frequency proportions of the input. The input and output arrays are complex values with real and imaginery portions interleaved, adressable in the range [0..2*n_values-1], where n_values must be a power of two. Frequencies are stored in-order, the K-th output corresponds to the frequency K/n_values. (If you want to interpret negative frequencies, note that the frequencies -K/n_values and (n_values-K)/n_values are equivalent). Note that the transformation is performed out of place, the input array is not modified, and may not overlap with the output array.

CBgsl_power2_fftar(CIn_values, CIr_values_in, CIri_values_out); nokeep; l l l. CIn_values; T{ Number of complex values T} CIr_values_in; T{ Real sample values [0..n_values-1] T} CIri_values_out; T{ Complex frequency values [0..n_values-1] T}

Real valued variant of CBgsl_power2_fftac(), the input array contains real valued equidistant sampled data [0..n_values-1], and the output array contains the positive frequency half of the complex valued fourier transform. Note, that the complex valued fourier transform H of a purely real valued set of data, satisfies CBH(-f) = Conj(CBH(f)), where CBConj() denotes the complex conjugate, so that just the positive frequency half suffices to describe the entire frequency spectrum. Even so, the resulting n_values/2 complex frequencies are one value off in storage size, but the resulting frequencies CBH(0) and CBH(n_values/2) are both real valued, so the real portion of CBH(n_values/2) is stored in ri_values_out[1] (the imaginery part of CBH(0)), so that both r_values_in and ri_values_out can be of size n_values. Note that the transformation is performed out of place, the input array is not modified, and may not overlap with the output array.

CBgsl_power2_fftsc(CIn_values, CIri_values_in, CIri_values_out); nokeep; l l l. CIn_values; T{ Number of complex values T} CIri_values_in; T{ Complex frequency values [0..n_values*2-1] T} CIri_values_out; T{ Complex sample values [0..n_values*2-1] T}

This function performs a decimation in time fourier transformation in backwards direction with normalization. As such, this function represents the counterpart to CBgsl_power2_fftac(), that is, a value array which is transformed into the frequency domain with CBgsl_power2_fftac() can be reconstructed by issuing CBgsl_power2_fftsc() on the transform. Note that the transformation is performed out of place, the input array is not modified, and may not overlap with the output array.

CBgsl_power2_fftsr(CIn_values, CIri_values_in, CIr_values_out); nokeep; l l l. CIn_values; T{ Number of complex values T} CIri_values_in; T{ Complex frequency values [0..n_values-1] T} CIr_values_out; T{ Real sample values [0..n_values-1] T}

Real valued variant of CBgsl_power2_fftsc(), counterpart to CBgsl_power2_fftar(), using the same frequency storage format. A real valued data set transformed into the frequency domain with CBgsl_power2_fftar() can be reconstructed using this function. Note that the transformation is performed out of place, the input array is not modified, and may not overlap with the output array.

CBgsl_rfile_close(CIrfile); nokeep; l l l. CIGslRFile* CIrfile; T{ valid CIGslRFile T}

Close and destroy a CIGslRFile.

CBgsl_rfile_length(CIrfile); nokeep; l l l. CIGslRFile* CIrfile; T{ valid CIGslRFile T} h'-2m'CIRETURNS: T{ total length of the CIGslRFile in bytes T}

Retrieve the file length of CIrfile in bytes.

CBgsl_rfile_name(CIrfile); nokeep; l l l. CIGslRFile* CIrfile; T{ valid CIGslRFile T} h'-2m'CIRETURNS: T{ the file name used to open this file T}

Retrieve the file name used to open CIrfile.

CBgsl_rfile_open(CIfile_name); nokeep; l l l. CIconst gchar* CIfile_name; T{ name of the file to open T} h'-2m'CIRETURNS: T{ a new opened CIGslRFile or NULL if an error occoured (errno set) T}

Open a file for reading and create a GSL read only file handle for it. The motivation for using a CIGslRFile over normal unix files is to reduce the amount of opened unix file descriptors by using a CIGslHFile for the actual IO.

CBgsl_rfile_position(CIrfile); nokeep; l l l. CIGslRFile* CIrfile; T{ valid CIGslRFile T} h'-2m'CIRETURNS: T{ current position within 0 and CBgsl_rfile_length() T}

Retrieve the current CIGslRFile seek position.

CBgsl_rfile_pread(CIrfile, CIoffset, CIn_bytes, CIbytes); nokeep; l l l. CIGslRFile* CIrfile; T{ valid GslRFile T} CIGslLong CIoffset; T{ offset in bytes within 0 and CBgsl_rfile_length() T} CIGslLong CIn_bytes; T{ number of bytes to read T} CIgpointer CIbytes; T{ buffer to store read bytes T} h'-2m'CIRETURNS: T{ amount of bytes read or -1 if an error occoured (errno set) T}

Read a block of bytes from a GslRFile at a specified position.

CBgsl_rfile_read(CIrfile, CIn_bytes, CIbytes); nokeep; l l l. CIGslRFile* CIrfile; T{ valid GslRFile T} CIGslLong CIn_bytes; T{ number of bytes to read T} CIgpointer CIbytes; T{ buffer to store read bytes T} h'-2m'CIRETURNS: T{ amount of bytes read or -1 if an error occoured (errno set) T}

Read a block of bytes from a GslRFile from the current seek position and advance the seek position.

CBgsl_rfile_seek_set(CIrfile, CIoffset); nokeep; l l l. CIGslRFile* CIrfile; T{ valid CIGslRFile T} CIGslLong CIoffset; T{ new seek position within 0 and CBgsl_rfile_length()+1 T} h'-2m'CIRETURNS: T{ resulting position within 0 and CBgsl_rfile_length()+1 T}

Set the current CIGslRFile seek position.

CBgsl_thread_awake_before(CItick_stamp); nokeep; l l l. CIguint64 CItick_stamp; T{ tick stamp update to trigger wakeup T}

Wakeup the currently running thread upon the last global tick stamp update (see CBgsl_tick_stamp()) that happens prior to updating the global tick stamp to CItick_stamp. (If the moment of wakeup has already passed by, the thread is woken up at the next global tick stamp update.)

CBgsl_tick_stamp(); nokeep; l l l. h'-2m'CIRETURNS: T{ GSL's execution tick stamp as unsigned 64bit integer T}

Retrieve the global GSL tick counter stamp. GSL increments its global tick stamp at certain intervals, by specific amounts (refer to CBbse_engine_init() for further details). The tick stamp is a non-wrapping, unsigned 64bit integer greater than 0. Threads can schedule sleep interruptions at certain tick stamps with CBsfi_thread_awake_after() and CBsfi_thread_awake_before(). Tick stamp updating occours at GSL engine block processing boundaries, so code that can guarantee to not run across those boundaries (for instance CBBseProcessFunc() functions) may use the macro GSL_TICK_STAMP to retrieve the current tick in a faster manner (not involving mutex locking). See also CBbse_module_tick_stamp(). This function is MT-safe and may be called from any thread.

CBgsl_tick_stamp_last(); nokeep; l l l. h'-2m'CIRETURNS: T{ Current tick stamp and system time in micro seconds T}

Get the system time of the last GSL global tick stamp update. This function is MT-safe and may be called from any thread.

SEE ALSO

BSE Procedures (bse-procs(3))

Document Revised: Wed May 25 23:38:22 2005