diff options
Diffstat (limited to 'gst/audioresample/resample.c')
-rw-r--r-- | gst/audioresample/resample.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c index 38c6ba84..e8ec45fb 100644 --- a/gst/audioresample/resample.c +++ b/gst/audioresample/resample.c @@ -29,9 +29,9 @@ #include <limits.h> #include <liboil/liboil.h> -#include <audioresample/resample.h> -#include <audioresample/buffer.h> -#include <audioresample/debug.h> +#include "resample.h" +#include "buffer.h" +#include "debug.h" void resample_scale_ref (ResampleState * r); void resample_scale_functable (ResampleState * r); @@ -101,6 +101,10 @@ resample_buffer_free (AudioresampleBuffer * buffer, void *priv) } } +/** + * free_func: a function that frees the given closure. If NULL, caller is + * responsible for freeing. + */ void resample_add_input_data (ResampleState * r, void *data, int size, void (*free_func) (void *), void *closure) @@ -135,6 +139,12 @@ resample_input_eos (ResampleState * r) } int +resample_get_output_size_for_input (ResampleState * r, int size) +{ + return floor (size * r->o_rate / r->i_rate); +} + +int resample_get_output_size (ResampleState * r) { return floor (audioresample_buffer_queue_get_depth (r->queue) * r->o_rate / |