From 72bfc7442f4e8517763159f4a0079e8af43f0058 Mon Sep 17 00:00:00 2001 From: Kevin Larke Date: Fri, 22 May 2015 13:56:54 -0700 Subject: [PATCH] cmProc.h/c : Added kSlRejIsBetaWndFl for use in cmWndFuncInit(). --- cmProc.c | 8 +++++++- cmProc.h | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cmProc.c b/cmProc.c index 1aee6fc..1d167a1 100644 --- a/cmProc.c +++ b/cmProc.c @@ -443,7 +443,13 @@ cmRC_t cmWndFuncInit( cmWndFunc* p, unsigned wndId, unsigned wndSmpCnt, do case kUnityWndId: cmVOS_Fill( p->wndV, p->outN, 1.0 ); break; case kKaiserWndId: { - double beta = cmVOS_KaiserBetaFromSidelobeReject(fabs(kslRejectDb)); + double beta; + + if( cmIsFlag(wndId,kSlRejIsBetaWndFl) ) + beta = kslRejectDb; + else + beta = cmVOS_KaiserBetaFromSidelobeReject(fabs(kslRejectDb)); + cmVOS_Kaiser( p->wndV,p->outN, beta); } break; diff --git a/cmProc.h b/cmProc.h index 5034fb6..bead204 100644 --- a/cmProc.h +++ b/cmProc.h @@ -158,7 +158,8 @@ extern "C" { kWndIdMask = 0x0ff, kNormByLengthWndFl = 0x100, // mult by 1/wndSmpCnt - kNormBySumWndFl = 0x200 // mult by wndSmpCnt/sum(wndV) + kNormBySumWndFl = 0x200, // mult by wndSmpCnt/sum(wndV) + kSlRejIsBetaWndFl = 0x400 // kaiserSideLobeRejectDb param. is actually kaiser beta arg. }; typedef struct