diff options
-rw-r--r-- | gst/audioresample/buffer.h | 38 | ||||
-rw-r--r-- | gst/audioresample/functable.h | 2 | ||||
-rw-r--r-- | gst/audioresample/gstaudioresample.c | 2 | ||||
-rw-r--r-- | gst/audioresample/resample.h | 50 | ||||
-rw-r--r-- | tests/check/elements/audioresample.c | 14 |
5 files changed, 53 insertions, 53 deletions
diff --git a/gst/audioresample/buffer.h b/gst/audioresample/buffer.h index 35b15e7c..4cf1fd94 100644 --- a/gst/audioresample/buffer.h +++ b/gst/audioresample/buffer.h @@ -28,24 +28,24 @@ struct _AudioresampleBufferQueue int offset; }; -AudioresampleBuffer * audioresample_buffer_new (void); -AudioresampleBuffer * audioresample_buffer_new_and_alloc (int size); -AudioresampleBuffer * audioresample_buffer_new_with_data (void *data, int size); -AudioresampleBuffer * audioresample_buffer_new_subbuffer (AudioresampleBuffer * buffer, - int offset, - int length); -void audioresample_buffer_ref (AudioresampleBuffer * buffer); -void audioresample_buffer_unref (AudioresampleBuffer * buffer); - -AudioresampleBufferQueue * - audioresample_buffer_queue_new (void); -void audioresample_buffer_queue_free (AudioresampleBufferQueue * queue); -int audioresample_buffer_queue_get_depth (AudioresampleBufferQueue * queue); -int audioresample_buffer_queue_get_offset (AudioresampleBufferQueue * queue); -void audioresample_buffer_queue_push (AudioresampleBufferQueue * queue, - AudioresampleBuffer * buffer); -AudioresampleBuffer * audioresample_buffer_queue_pull (AudioresampleBufferQueue * queue, int len); -AudioresampleBuffer * audioresample_buffer_queue_peek (AudioresampleBufferQueue * queue, int len); -void audioresample_buffer_queue_flush (AudioresampleBufferQueue * queue); +AudioresampleBuffer * audioresample_buffer_new (void); +AudioresampleBuffer * audioresample_buffer_new_and_alloc (int size); +AudioresampleBuffer * audioresample_buffer_new_with_data (void *data, int size); +AudioresampleBuffer * audioresample_buffer_new_subbuffer (AudioresampleBuffer * buffer, + int offset, + int length); +void audioresample_buffer_ref (AudioresampleBuffer * buffer); +void audioresample_buffer_unref (AudioresampleBuffer * buffer); + +AudioresampleBufferQueue * + audioresample_buffer_queue_new (void); +void audioresample_buffer_queue_free (AudioresampleBufferQueue * queue); +int audioresample_buffer_queue_get_depth (AudioresampleBufferQueue * queue); +int audioresample_buffer_queue_get_offset (AudioresampleBufferQueue * queue); +void audioresample_buffer_queue_push (AudioresampleBufferQueue * queue, + AudioresampleBuffer * buffer); +AudioresampleBuffer * audioresample_buffer_queue_pull (AudioresampleBufferQueue * queue, int len); +AudioresampleBuffer * audioresample_buffer_queue_peek (AudioresampleBufferQueue * queue, int len); +void audioresample_buffer_queue_flush (AudioresampleBufferQueue * queue); #endif diff --git a/gst/audioresample/functable.h b/gst/audioresample/functable.h index 4349719d..5f56e2bd 100644 --- a/gst/audioresample/functable.h +++ b/gst/audioresample/functable.h @@ -51,7 +51,7 @@ double functable_evaluate (Functable *t,double x); double functable_fir(Functable *t,double x0,int n,double *data,int len); void functable_fir2(Functable *t,double *r0, double *r1, double x0, - int n,double *data,int len); + int n,double *data,int len); void functable_func_sinc(double *fx, double *dfx, double x, void *closure); void functable_func_boxcar(double *fx, double *dfx, double x, void *closure); diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c index 3fbff60e..16c01a79 100644 --- a/gst/audioresample/gstaudioresample.c +++ b/gst/audioresample/gstaudioresample.c @@ -48,7 +48,7 @@ enum LAST_SIGNAL }; -#define DEFAULT_FILTERLEN 16 +#define DEFAULT_FILTERLEN 16 enum { diff --git a/gst/audioresample/resample.h b/gst/audioresample/resample.h index f27e2be4..fd67bf23 100644 --- a/gst/audioresample/resample.h +++ b/gst/audioresample/resample.h @@ -25,9 +25,9 @@ #include "buffer.h" typedef enum { - RESAMPLE_FORMAT_S16 = 0, - RESAMPLE_FORMAT_S32, - RESAMPLE_FORMAT_F32, + RESAMPLE_FORMAT_S16 = 0, + RESAMPLE_FORMAT_S32, + RESAMPLE_FORMAT_F32, RESAMPLE_FORMAT_F64 } ResampleFormat; @@ -36,25 +36,25 @@ typedef void (*ResampleCallback) (void *); typedef struct _ResampleState ResampleState; struct _ResampleState { - /* parameters */ + /* parameters */ - int n_channels; - ResampleFormat format; + int n_channels; + ResampleFormat format; - int filter_length; + int filter_length; - double i_rate; - double o_rate; + double i_rate; + double o_rate; int method; - /* internal parameters */ + /* internal parameters */ int need_reinit; - double halftaps; + double halftaps; - /* filter state */ + /* filter state */ void *o_buf; int o_size; @@ -63,27 +63,27 @@ struct _ResampleState { int eos; int started; - int sample_size; + int sample_size; - void *buffer; - int buffer_len; - int buffer_filled; + void *buffer; + int buffer_len; + int buffer_filled; - double i_start; - double o_start; + double i_start; + double o_start; - double i_inc; - double o_inc; + double i_inc; + double o_inc; double sinc_scale; - double i_end; - double o_end; + double i_end; + double o_end; - int i_samples; - int o_samples; + int i_samples; + int o_samples; - //void *i_buf; + //void *i_buf; Functable *ft; diff --git a/tests/check/elements/audioresample.c b/tests/check/elements/audioresample.c index 29724338..680ab7be 100644 --- a/tests/check/elements/audioresample.c +++ b/tests/check/elements/audioresample.c @@ -33,13 +33,13 @@ gboolean have_eos = FALSE; GstPad *mysrcpad, *mysinkpad; -#define RESAMPLE_CAPS_TEMPLATE_STRING \ - "audio/x-raw-int, " \ - "channels = (int) [ 1, MAX ], " \ - "rate = (int) [ 1, MAX ], " \ - "endianness = (int) BYTE_ORDER, " \ - "width = (int) 16, " \ - "depth = (int) 16, " \ +#define RESAMPLE_CAPS_TEMPLATE_STRING \ + "audio/x-raw-int, " \ + "channels = (int) [ 1, MAX ], " \ + "rate = (int) [ 1, MAX ], " \ + "endianness = (int) BYTE_ORDER, " \ + "width = (int) 16, " \ + "depth = (int) 16, " \ "signed = (bool) TRUE" static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", |