BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Defines | Functions
gsldatautils.hh File Reference
#include <bse/bsemath.hh>
#include <bse/gsldatahandle.hh>

Go to the source code of this file.

Classes

struct  GslDataPeekBuffer
struct  GslLoopSpec
struct  GslDataClipConfig
struct  GslDataClipResult

Defines

#define GSL_DATA_HANDLE_PEEK_BUFFER
#define GSL_CONV_FORMAT(format, endian_flag)
#define GSL_ALAW_MAX
#define GSL_ULAW_MAX

Functions

gboolean gsl_data_detect_signal (GslDataHandle *handle, GslLong *sigstart, GslLong *sigend)
GslLong gsl_data_find_sample (GslDataHandle *dhandle, gfloat min_value, gfloat max_value, GslLong start_offset, gint direction)
gboolean gsl_data_find_tailmatch (GslDataHandle *dhandle, const GslLoopSpec *lspec, GslLong *loop_start_p, GslLong *loop_end_p)
GslLong gsl_data_find_block (GslDataHandle *handle, guint n_values, const gfloat *values, gfloat epsilon)
gfloat * gsl_data_make_fade_ramp (GslDataHandle *handle, GslLong min_pos, GslLong max_pos, GslLong *length_p)
double gsl_data_find_min_max (GslDataHandle *handle, double *dmin, double *dmax)
gint gsl_data_handle_dump (GslDataHandle *dhandle, gint fd, GslWaveFormatType format, guint byte_order)
gint gsl_data_handle_dump_wav (GslDataHandle *dhandle, gint fd, guint n_bits, guint n_channels, guint sample_freq)
void gsl_data_handle_dump_wstore (GslDataHandle *dhandle, SfiWStore *wstore, GslWaveFormatType format, guint byte_order)
gint bse_wave_file_dump_header (gint fd, guint n_data_bytes, guint n_bits, guint n_channels, guint sample_freq)
gint bse_wave_file_patch_length (gint fd, guint n_data_bytes)
gint bse_wave_file_dump_data (gint fd, guint n_bits, guint n_values, const gfloat *values)
gint bse_wave_file_from_fbuffer (const char *file_name, guint n_bits, guint n_channels, guint sample_freq, guint n_values, const gfloat *values)
gint bse_wave_file_from_dbuffer (const char *file_name, guint n_bits, guint n_channels, guint sample_freq, guint n_values, const gdouble *values)
BseErrorType gsl_data_clip_sample (GslDataHandle *dhandle, GslDataClipConfig *cconfig, GslDataClipResult *result)
gfloat gsl_data_peek_value_f (GslDataHandle *dhandle, GslLong pos, GslDataPeekBuffer *peekbuf)

Detailed Description


Function Documentation

BseErrorType gsl_data_clip_sample ( GslDataHandle *  dhandle,
GslDataClipConfig cconfig,
GslDataClipResult result 
)
Parameters:
dhandlevalid and opened GslDataHandle
cconfigclip configuration
resultclip result
Returns:
error code as stored in result Clip silence at head and/or tail of a data handle according to a given threshold and optionally produce a fade ramp.
GslLong gsl_data_find_block ( GslDataHandle *  handle,
guint  n_values,
const gfloat *  values,
gfloat  epsilon 
)
Parameters:
handlean open GslDataHandle
n_valuesamount of values to look for
valuesvalues to find
epsilonmaximum difference upon comparisions
Returns:
position of values in data handle or -1

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.

gfloat* gsl_data_make_fade_ramp ( GslDataHandle *  handle,
GslLong  min_pos,
GslLong  max_pos,
GslLong *  length_p 
)
Parameters:
dhandlevalid and opened GslDataHandle
min_posposition within dhandle
max_posposition within dhandle
length_plocation to store the length of the fade ramp in
Returns:
newly allocated float block with fade ramp Create a float value block of abs (max_pos - min_pos) values, which contain a fade ramp of values from dhandle, with min_pos indicating the minimum of the fade ramp and max_pos indicating its maximum.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines