From 7178ab01a8d038a65f44b2030111998e302746b5 Mon Sep 17 00:00:00 2001 From: Akos Denke Date: Wed, 21 Feb 2024 09:32:16 +0100 Subject: [PATCH] Add extra logging for dummy resample imp (#3863) --- pjmedia/src/pjmedia/resample_resample.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pjmedia/src/pjmedia/resample_resample.c b/pjmedia/src/pjmedia/resample_resample.c index 6153f29049..806a5dc765 100644 --- a/pjmedia/src/pjmedia/resample_resample.c +++ b/pjmedia/src/pjmedia/resample_resample.c @@ -24,14 +24,12 @@ #include #include +#define THIS_FILE "resample.c" #if PJMEDIA_RESAMPLE_IMP==PJMEDIA_RESAMPLE_LIBRESAMPLE #include -#define THIS_FILE "resample.c" - - struct pjmedia_resample { @@ -158,7 +156,7 @@ PJ_DEF(void) pjmedia_resample_run( pjmedia_resample *resample, * So here comes the trick. * * First of all, because of the history and lookahead requirement, - * resample->buffer need to accomodate framesize+2*xoff samples in its + * resample->buffer need to accommodate framesize+2*xoff samples in its * buffer. This is done when the buffer is created. * * On the first run, the input frame (supplied by application) is @@ -176,8 +174,8 @@ PJ_DEF(void) pjmedia_resample_run( pjmedia_resample *resample, * | 0000 | 0000 | frame0... | * +------+------+--------------+ * ^ ^ ^ ^ - * 0 xoff 2*xoff size+2*xoff - * + * 0 xoff 2*xoff size+2*xoff + * * (Note again: resample algorithm is called at resample->buffer+xoff) * * At the end of the run, 2*xoff samples from the end of @@ -204,7 +202,7 @@ PJ_DEF(void) pjmedia_resample_run( pjmedia_resample *resample, * | frm0 | frm0 | frame1... | * +------+------+--------------+ * ^ ^ ^ ^ - * 0 xoff 2*xoff size+2*xoff + * 0 xoff 2*xoff size+2*xoff * * As you can see from above diagram, the resampling algorithm is * actually called from the last xoff part of previous frame (frm0). @@ -320,6 +318,8 @@ PJ_DEF(pj_status_t) pjmedia_resample_create( pj_pool_t *pool, PJ_UNUSED_ARG(samples_per_frame); PJ_UNUSED_ARG(p_resample); + PJ_LOG(3, (THIS_FILE, "No resampler created (sample rate conversion is " + "disabled or no resample implementation selected)")); return PJ_EINVALIDOP; }