<reponame>WaynePhung/OpenSpeechPlatform-UCSD<filename>Software/librtmha/docs/latex/classwdrc.tex
\hypertarget{classwdrc}{}\section{wdrc Class Reference}
\label{classwdrc}\index{wdrc@{wdrc}}


Wide Dynamic Range Compression (W\+D\+RC) Class.  




{\ttfamily \#include $<$wdrc.\+hpp$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classwdrc_a9a836480fcfd49a21f592d15ef94f290}{wdrc} (float gain50, float gain80, float knee\+\_\+low, float mpo\+\_\+limit)
\begin{DoxyCompactList}\small\item\em wdrc constructor \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classwdrc_ab99f98ae700777e0505ff3460d107a21}\label{classwdrc_ab99f98ae700777e0505ff3460d107a21}} 
\hyperlink{classwdrc_ab99f98ae700777e0505ff3460d107a21}{$\sim$wdrc} ()
\begin{DoxyCompactList}\small\item\em wdrc destructor \end{DoxyCompactList}\item 
void \hyperlink{classwdrc_a8b804984f0b23d2883f5653e42570caf}{set\+\_\+param} (float gain50, float gain80, float knee\+\_\+low, float mpo\+\_\+limit)
\begin{DoxyCompactList}\small\item\em Setting W\+D\+RC parameters. \end{DoxyCompactList}\item 
void \hyperlink{classwdrc_a9365c99f1d0b4a706dd031d4093922cd}{get\+\_\+param} (float \&gain50, float \&gain80, float \&knee\+\_\+low, float \&mpo\+\_\+limit)
\begin{DoxyCompactList}\small\item\em Getting W\+D\+RC parameters. \end{DoxyCompactList}\item 
void \hyperlink{classwdrc_abc022a485b25b994d226053021224e31}{process} (float $\ast$input, float $\ast$pdb, size\+\_\+t in\+\_\+len, float $\ast$output)
\begin{DoxyCompactList}\small\item\em Perform W\+D\+RC. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Wide Dynamic Range Compression (W\+D\+RC) Class. 

Applying W\+D\+RC to a subband signal from an analysis filterbank 

Definition at line 18 of file wdrc.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classwdrc_a9a836480fcfd49a21f592d15ef94f290}\label{classwdrc_a9a836480fcfd49a21f592d15ef94f290}} 
\index{wdrc@{wdrc}!wdrc@{wdrc}}
\index{wdrc@{wdrc}!wdrc@{wdrc}}
\subsubsection{\texorpdfstring{wdrc()}{wdrc()}}
{\footnotesize\ttfamily wdrc\+::wdrc (\begin{DoxyParamCaption}\item[{float}]{gain50,  }\item[{float}]{gain80,  }\item[{float}]{knee\+\_\+low,  }\item[{float}]{mpo\+\_\+limit }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}



wdrc constructor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em gain50} & Gain at 50 dB S\+PL of input level \\
\hline
\mbox{\tt in}  & {\em gain80} & Gain at 80 dB S\+PL of input level \\
\hline
\mbox{\tt in}  & {\em knee\+\_\+low} & Lower knee-\/point \\
\hline
\mbox{\tt in}  & {\em mpo\+\_\+limit} & Maximum power output (M\+PO) \\
\hline
\end{DoxyParams}


Definition at line 3 of file wdrc.\+cpp.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classwdrc_a9365c99f1d0b4a706dd031d4093922cd}\label{classwdrc_a9365c99f1d0b4a706dd031d4093922cd}} 
\index{wdrc@{wdrc}!get\+\_\+param@{get\+\_\+param}}
\index{get\+\_\+param@{get\+\_\+param}!wdrc@{wdrc}}
\subsubsection{\texorpdfstring{get\+\_\+param()}{get\_param()}}
{\footnotesize\ttfamily void wdrc\+::get\+\_\+param (\begin{DoxyParamCaption}\item[{float \&}]{gain50,  }\item[{float \&}]{gain80,  }\item[{float \&}]{knee\+\_\+low,  }\item[{float \&}]{mpo\+\_\+limit }\end{DoxyParamCaption})}



Getting W\+D\+RC parameters. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em gain50} & Gain at 50 dB S\+PL of input level \\
\hline
\mbox{\tt out}  & {\em gain80} & Gain at 80 dB S\+PL of input level \\
\hline
\mbox{\tt out}  & {\em knee\+\_\+low} & Lower knee-\/point \\
\hline
\mbox{\tt out}  & {\em mpo\+\_\+limit} & M\+PO \\
\hline
\end{DoxyParams}


Definition at line 43 of file wdrc.\+cpp.

\mbox{\Hypertarget{classwdrc_abc022a485b25b994d226053021224e31}\label{classwdrc_abc022a485b25b994d226053021224e31}} 
\index{wdrc@{wdrc}!process@{process}}
\index{process@{process}!wdrc@{wdrc}}
\subsubsection{\texorpdfstring{process()}{process()}}
{\footnotesize\ttfamily void wdrc\+::process (\begin{DoxyParamCaption}\item[{float $\ast$}]{input,  }\item[{float $\ast$}]{pdb,  }\item[{size\+\_\+t}]{in\+\_\+len,  }\item[{float $\ast$}]{output }\end{DoxyParamCaption})}



Perform W\+D\+RC. 

The peak detector output in dB S\+PL is needed as one of the inputs. The gain at 50 and 80 dB S\+PL is specified for the frequency sub-\/band, along with the lower and upper kneepoints in dB S\+PL. The compressor is linear below the lower kneepoint and applies compression limiting above the upper kneepoint 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em input} & The input signal (1-\/D array) \\
\hline
\mbox{\tt in}  & {\em pdb} & The output from the peak detector in S\+PL, i.\+e., the output from get\+\_\+spl member function in \hyperlink{classpeak__detect}{peak\+\_\+detect} class \\
\hline
\mbox{\tt in}  & {\em in\+\_\+len} & Length of the input signal \\
\hline
\mbox{\tt out}  & {\em output} & Pointer to a signal (1-\/D array) where the compressed output of the subband signal will be written, i.\+e., the output of W\+D\+RC \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{classpeak__detect}{peak\+\_\+detect} 
\end{DoxySeeAlso}


Definition at line 52 of file wdrc.\+cpp.

\mbox{\Hypertarget{classwdrc_a8b804984f0b23d2883f5653e42570caf}\label{classwdrc_a8b804984f0b23d2883f5653e42570caf}} 
\index{wdrc@{wdrc}!set\+\_\+param@{set\+\_\+param}}
\index{set\+\_\+param@{set\+\_\+param}!wdrc@{wdrc}}
\subsubsection{\texorpdfstring{set\+\_\+param()}{set\_param()}}
{\footnotesize\ttfamily void wdrc\+::set\+\_\+param (\begin{DoxyParamCaption}\item[{float}]{gain50,  }\item[{float}]{gain80,  }\item[{float}]{knee\+\_\+low,  }\item[{float}]{mpo\+\_\+limit }\end{DoxyParamCaption})}



Setting W\+D\+RC parameters. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em gain50} & Gain at 50 dB S\+PL of input level \\
\hline
\mbox{\tt in}  & {\em gain80} & Gain at 80 dB S\+PL of input level \\
\hline
\mbox{\tt in}  & {\em knee\+\_\+low} & Lower knee-\/point \\
\hline
\mbox{\tt in}  & {\em mpo\+\_\+limit} & M\+PO \\
\hline
\end{DoxyParams}


Definition at line 25 of file wdrc.\+cpp.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
wdrc.\+hpp\item 
wdrc.\+cpp\end{DoxyCompactItemize}
