BEAST/BSE - Better Audio System and Sound Engine
0.8.2
|
#include <bse/bseutils.hh>
Go to the source code of this file.
Classes | |
struct | GslDataHandleSetup |
struct | GslDataHandle |
struct | GslDataHandleFuncs |
Defines | |
#define | GSL_DATA_HANDLE_OPENED(handle) |
#define | GSL_DATA_HANDLE_READ_LINEAR(handle) |
#define | gsl_data_handle_n_values(dh) |
#define | GSL_WAVE_FORMAT_IS_LAW(f) |
Typedefs | |
typedef void(* | GslDataHandleRecurse )(GslDataHandle *data_handle, gpointer data) |
Enumerations | |
enum | GslWaveFormatType { GSL_WAVE_FORMAT_NONE, GSL_WAVE_FORMAT_UNSIGNED_8, GSL_WAVE_FORMAT_SIGNED_8, GSL_WAVE_FORMAT_ALAW, GSL_WAVE_FORMAT_ULAW, GSL_WAVE_FORMAT_UNSIGNED_12, GSL_WAVE_FORMAT_SIGNED_12, GSL_WAVE_FORMAT_UNSIGNED_16, GSL_WAVE_FORMAT_SIGNED_16, GSL_WAVE_FORMAT_SIGNED_24, GSL_WAVE_FORMAT_SIGNED_24_PAD4, GSL_WAVE_FORMAT_SIGNED_32, GSL_WAVE_FORMAT_FLOAT, GSL_WAVE_FORMAT_LAST } |
Functions | |
GslDataHandle * | gsl_data_handle_ref (GslDataHandle *dhandle) |
void | gsl_data_handle_unref (GslDataHandle *dhandle) |
BseErrorType | gsl_data_handle_open (GslDataHandle *dhandle) |
void | gsl_data_handle_close (GslDataHandle *dhandle) |
int64 | gsl_data_handle_length (GslDataHandle *data_handle) |
guint | gsl_data_handle_n_channels (GslDataHandle *data_handle) |
guint | gsl_data_handle_bit_depth (GslDataHandle *data_handle) |
gfloat | gsl_data_handle_mix_freq (GslDataHandle *data_handle) |
gfloat | gsl_data_handle_osc_freq (GslDataHandle *data_handle) |
gfloat | gsl_data_handle_volume (GslDataHandle *data_handle) |
gfloat | gsl_data_handle_fine_tune (GslDataHandle *data_handle) |
const gchar * | gsl_data_handle_name (GslDataHandle *data_handle) |
int64 | gsl_data_handle_read (GslDataHandle *data_handle, int64 value_offset, int64 n_values, gfloat *values) |
int64 | gsl_data_handle_get_state_length (GslDataHandle *dhandle) |
GslDataHandle * | gsl_data_handle_get_source (GslDataHandle *dhandle) |
GslDataHandle * | gsl_data_handle_new_scale (GslDataHandle *src_handle, double factor) |
GslDataHandle * | gsl_data_handle_new_cut (GslDataHandle *src_handle, int64 cut_offset, int64 n_cut_values) |
GslDataHandle * | gsl_data_handle_new_crop (GslDataHandle *src_handle, int64 n_head_cut, int64 n_tail_cut) |
GslDataHandle * | gsl_data_handle_new_reverse (GslDataHandle *src_handle) |
GslDataHandle * | gsl_data_handle_new_insert (GslDataHandle *src_handle, guint pasted_bit_depth, int64 insertion_offset, int64 n_paste_values, const gfloat *paste_values, void(*free)(gpointer values)) |
GslDataHandle * | gsl_data_handle_new_mem (guint n_channels, guint bit_depth, gfloat mix_freq, gfloat osc_freq, int64 n_values, const gfloat *values, void(*free)(gpointer values)) |
GslDataHandle * | gsl_data_handle_new_dcached (GslDataCache *dcache) |
GslDataHandle * | gsl_data_handle_new_looped (GslDataHandle *src_handle, int64 loop_first, int64 loop_last) |
GslDataHandle * | bse_data_handle_new_upsample2 (GslDataHandle *src_handle, int precision_bits) |
GslDataHandle * | bse_data_handle_new_downsample2 (GslDataHandle *src_handle, int precision_bits) |
GslDataHandle * | bse_data_handle_new_fir_highpass (GslDataHandle *src_handle, gdouble cutoff_freq, guint order) |
GslDataHandle * | bse_data_handle_new_fir_lowpass (GslDataHandle *src_handle, gdouble cutoff_freq, guint order) |
gdouble | bse_data_handle_fir_response_db (GslDataHandle *fir_handle, gdouble freq) |
GslDataHandle * | gsl_data_handle_new_add_xinfos (GslDataHandle *src_handle, gchar **xinfos) |
GslDataHandle * | gsl_data_handle_new_remove_xinfos (GslDataHandle *src_handle, gchar **xinfos) |
GslDataHandle * | gsl_data_handle_new_clear_xinfos (GslDataHandle *src_handle) |
const gchar * | gsl_wave_format_to_string (GslWaveFormatType format) |
GslWaveFormatType | gsl_wave_format_from_string (const gchar *string) |
GslDataHandle * | gsl_wave_handle_new (const gchar *file_name, guint n_channels, GslWaveFormatType format, guint byte_order, gfloat mix_freq, gfloat osc_freq, int64 byte_offset, int64 n_values, gchar **xinfos) |
GslDataHandle * | gsl_wave_handle_new_zoffset (const gchar *file_name, guint n_channels, GslWaveFormatType format, guint byte_order, gfloat mix_freq, gfloat osc_freq, int64 byte_offset, int64 byte_size, gchar **xinfos) |
guint | gsl_wave_format_bit_depth (GslWaveFormatType format) |
guint | gsl_wave_format_byte_width (GslWaveFormatType format) |
gboolean | gsl_data_handle_needs_cache (GslDataHandle *data_handle) |
gboolean | gsl_data_handle_common_init (GslDataHandle *dhandle, const gchar *file_name) |
void | gsl_data_handle_common_free (GslDataHandle *dhandle) |
GslDataHandle* bse_data_handle_new_fir_highpass | ( | GslDataHandle * | src_handle, |
gdouble | cutoff_freq, | ||
guint | order | ||
) |
__________ / / /| _____/ | | cutoff_freq
cutoff_freq | cutoff frequency in Hz in intervall [0..SR/2] |
order | number of filter coefficients |
GslDataHandle* bse_data_handle_new_fir_lowpass | ( | GslDataHandle * | src_handle, |
gdouble | cutoff_freq, | ||
guint | order | ||
) |
______ \ \ |\ | \ __________ | cutoff_freq
cutoff_freq | cutoff frequency in Hz in intervall [0..SR/2] |
order | number of filter coefficients |
int64 gsl_data_handle_get_state_length | ( | GslDataHandle * | dhandle | ) |
data_handle | a DataHandle |
Most data handles produce output samples from an input data handle. Some of them, like filtering and resampling datahandles, have an internal state which means that the value of one input sample affects not only one output sample, but some samples before and/or some samples after the "corresponding" output sample.
Often the state is symmetric, so that the number of output samples affected before and after the "corresponding" output sample is the same. Then the function returns this number. If the state is asymmetric, this function shall return the maximum of the two numbers.
If multiple data handles are nested (for instance when resampling a filtered signal), the function propagates the state length, so that the accumulated state length of all operations together is returned.
Note: This function can only be used while the data handle is opened.
This function is MT-safe and may be called from any thread.
GslDataHandle* gsl_data_handle_new_crop | ( | GslDataHandle * | src_handle, |
int64 | n_head_cut, | ||
int64 | n_tail_cut | ||
) |
src_handle | source GslDataHandle |
n_head_cut | number of values to cut at data handle head |
n_tail_cut | number of values to cut at data handle tail |
Create a new data handle containing the contents of src_handle minus n_head_cut values at the start and n_tail_cut values at the end.
GslDataHandle* gsl_data_handle_new_cut | ( | GslDataHandle * | src_handle, |
int64 | cut_offset, | ||
int64 | n_cut_values | ||
) |
src_handle | source GslDataHandle |
cut_offset | offset of gap into src_handle |
n_cut_values | length of gap in src_handle |
Create a new data handle containing the contents of src_handle minus n_cut_values at offset cut_offset.