ref: 7a200942cedf07c18130957a4a27a889d88bc0e5
parent: ee346bbeacc596a87d1eccea35f0ed9ae2e6e67a
author: evpobr <evpobr@gmail.com>
date: Tue Nov 3 15:39:51 EST 2020
Return SRC_ERROR from prepare_data()
--- a/src/src_sinc.c
+++ b/src/src_sinc.c
@@ -62,7 +62,7 @@
static SRC_ERROR sinc_stereo_vari_process (SRC_STATE *state, SRC_DATA *data) ;
static SRC_ERROR sinc_mono_vari_process (SRC_STATE *state, SRC_DATA *data) ;
-static int prepare_data (SINC_FILTER *filter, int channels, SRC_DATA *data, int half_filter_chan_len) WARN_UNUSED ;
+static SRC_ERROR prepare_data (SINC_FILTER *filter, int channels, SRC_DATA *data, int half_filter_chan_len) WARN_UNUSED ;
static void sinc_reset (SRC_STATE *state) ;
static SRC_ERROR sinc_copy (SRC_STATE *from, SRC_STATE *to) ;
@@ -1080,15 +1080,15 @@
/*----------------------------------------------------------------------------------------
*/
-static int
+static SRC_ERROR
prepare_data (SINC_FILTER *filter, int channels, SRC_DATA *data, int half_filter_chan_len)
{ int len = 0 ;
if (filter->b_real_end >= 0)
- return 0 ; /* Should be terminating. Just return. */
+ return SRC_ERR_NO_ERROR ; /* Should be terminating. Just return. */
if (data->data_in == NULL)
- return 0 ;
+ return SRC_ERR_NO_ERROR ;
if (filter->b_current == 0)
{ /* Initial state. Set up zeros at the start of the buffer and
@@ -1153,7 +1153,7 @@
filter->b_end += len ;
} ;
- return 0 ;
+ return SRC_ERR_NO_ERROR ;
} /* prepare_data */
static void