static void dh_vorbis_destroy (GslDataHandle *dhandle) { VorbisHandle *vhandle = (VorbisHandle*) dhandle; gsl_data_handle_common_free (dhandle); sfi_delete_struct (VorbisHandle, vhandle); }
static void wave_handle_destroy (GslDataHandle *data_handle) { WaveHandle *whandle = (WaveHandle*) data_handle; gsl_data_handle_common_free (data_handle); gsl_delete_struct (WaveHandle, whandle); }
/* --- dcache handle --- */ static void dcache_handle_destroy (GslDataHandle *data_handle) { DCacheHandle *dhandle = (DCacheHandle*) data_handle; gsl_data_cache_unref (dhandle->dcache); gsl_data_handle_common_free (data_handle); gsl_delete_struct (DCacheHandle, dhandle); }
static void loop_handle_destroy (GslDataHandle *data_handle) { LoopHandle *lhandle = (LoopHandle*) data_handle; gsl_data_handle_unref (lhandle->src_handle); gsl_data_handle_common_free (data_handle); gsl_delete_struct (LoopHandle, lhandle); }
static void cut_handle_destroy (GslDataHandle *data_handle) { CutHandle *chandle = (CutHandle*) data_handle; gsl_data_handle_unref (chandle->src_handle); gsl_data_handle_common_free (data_handle); gsl_delete_struct (CutHandle, chandle); }
/* --- reversed handle --- */ static void reverse_handle_destroy (GslDataHandle *data_handle) { ReversedHandle *rhandle = (ReversedHandle*) data_handle; gsl_data_handle_unref (rhandle->src_handle); gsl_data_handle_common_free (data_handle); gsl_delete_struct (ReversedHandle, rhandle); }
static void mem_handle_destroy (GslDataHandle *dhandle) { MemHandle *mhandle = (MemHandle*) dhandle; void (*free_values) (gpointer) = mhandle->free_values; const gfloat *mem_values = mhandle->values; gsl_data_handle_common_free (dhandle); mhandle->values = NULL; mhandle->free_values = NULL; gsl_delete_struct (MemHandle, mhandle); if (free_values) free_values ((gpointer) mem_values); }
static void insert_handle_destroy (GslDataHandle *data_handle) { InsertHandle *ihandle = (InsertHandle*) data_handle; void (*free_values) (gpointer) = ihandle->free_values; const gfloat *paste_values = ihandle->paste_values; gsl_data_handle_unref (ihandle->src_handle); gsl_data_handle_common_free (data_handle); ihandle->paste_values = NULL; ihandle->free_values = NULL; gsl_delete_struct (InsertHandle, ihandle); if (free_values) free_values ((gpointer) paste_values); }