File: classAudioMasker.tex

package info (click to toggle)
libaudiomask 1.0-3
  • links: PTS
  • area: main
  • in suites: bullseye, sid, stretch
  • size: 17,668 kB
  • ctags: 636
  • sloc: cpp: 787; perl: 108; makefile: 67
file content (123 lines) | stat: -rw-r--r-- 5,786 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
\hypertarget{classAudioMasker}{
\section{AudioMasker Class Reference}
\label{classAudioMasker}\index{AudioMasker@{AudioMasker}}
}


{\ttfamily \#include $<$AudioMasker.H$>$}

Inheritance diagram for AudioMasker:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classAudioMasker}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classAudioMasker_a54e311385cd015faa21b7a73f1051696}{AudioMasker} (int sampFreq, int fBankCount)
\item 
\hypertarget{classAudioMasker_a22714686a028b1f584a210ffeed4a0d8}{
\hyperlink{classAudioMasker_a22714686a028b1f584a210ffeed4a0d8}{AudioMasker} (void)}
\label{classAudioMasker_a22714686a028b1f584a210ffeed4a0d8}

\begin{DoxyCompactList}\small\item\em Audio masker constructor -\/ allowing specification of fs and sub-\/band count later. \item\end{DoxyCompactList}\item 
\hypertarget{classAudioMasker_adfe819949c5be7b05a6a70ecfd425178}{
\hyperlink{classAudioMasker_adfe819949c5be7b05a6a70ecfd425178}{$\sim$AudioMasker} (void)}
\label{classAudioMasker_adfe819949c5be7b05a6a70ecfd425178}

\begin{DoxyCompactList}\small\item\em Audio masker deconstructor. \item\end{DoxyCompactList}\item 
void \hyperlink{classAudioMasker_ae7182941513eab5853dc65ebe03e0529}{excite} (short int $\ast$Input, int sCount)
\item 
void \hyperlink{classAudioMasker_a98b3d9bdaccc0875f096f6924ddff37c}{excite} (double $\ast$Input, int sCount)
\item 
double \hyperlink{classAudioMasker_a13dd56b43780b2e45199c449866f5616}{findThreshold} (double freq)
\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classAudioMasker_a5fcc150b323bb9e75a99b4f81fc4d689}{
\hyperlink{classDepUKFB}{DepUKFB} $\ast$ \hyperlink{classAudioMasker_a5fcc150b323bb9e75a99b4f81fc4d689}{pfb}}
\label{classAudioMasker_a5fcc150b323bb9e75a99b4f81fc4d689}

\begin{DoxyCompactList}\small\item\em roex filters \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Audio masking class -\/ top level Class to transform input audio in the time domain to a simultaneous audio mask in the frequency domain.

========================= HOWTO ===============================

// First find the masking threshold

\hyperlink{classAudioMasker}{AudioMasker} masker(sampleFreq, count); // Create the audio masker class using fs=sampleFreq and count filters

masker.excite(input, sampleCount); // find the mask for the array of input data which has sampleCount time samples.

// Now do something with the masking threshold ...

// The frequency domain mask is now located here

for (int j=0; j$<$count;j++)

masker.mask\mbox{[}j\mbox{]}; // This is the mask at each of the count frequencies of interest

// A more sophisticated example -\/ find the threshold for each Fourier bin

double fact=(double)sampleFreq/((double)sampleCount-\/1.0); // convert from an index to the equivalent Fourier bin frequency

for (int j=0; j$<$halfSampleCount;j++)\{

cout$<$$<$\char`\"{}finding for freq \char`\"{}$<$$<$j$\ast$fact$<$$<$''; // The frequency we are inspecting

double threshold=masker.findThreshold(j$\ast$fact); // The masking threshold

20$\ast$log10(threshold); // The threshold in decibels (dB)

\} \begin{Desc}
\item[Examples: ]\par


\hyperlink{AudioMaskerExample_8cc-example}{AudioMaskerExample.cc}.

\end{Desc}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classAudioMasker_a54e311385cd015faa21b7a73f1051696}{
\index{AudioMasker@{AudioMasker}!AudioMasker@{AudioMasker}}
\index{AudioMasker@{AudioMasker}!AudioMasker@{AudioMasker}}
\subsubsection[{AudioMasker}]{\setlength{\rightskip}{0pt plus 5cm}AudioMasker::AudioMasker (int {\em sampFreq}, \/  int {\em fBankCount})}}
\label{classAudioMasker_a54e311385cd015faa21b7a73f1051696}
The Audio masking constructor @ sampFreq The sample frequency of the time domain data @ fBankCount The number of filter banks 

\subsection{Member Function Documentation}
\hypertarget{classAudioMasker_a98b3d9bdaccc0875f096f6924ddff37c}{
\index{AudioMasker@{AudioMasker}!excite@{excite}}
\index{excite@{excite}!AudioMasker@{AudioMasker}}
\subsubsection[{excite}]{\setlength{\rightskip}{0pt plus 5cm}void AudioMasker::excite (double $\ast$ {\em Input}, \/  int {\em sCount})}}
\label{classAudioMasker_a98b3d9bdaccc0875f096f6924ddff37c}
Finds the excitation for input data @ Input Using double input data @ sCount samples \hypertarget{classAudioMasker_ae7182941513eab5853dc65ebe03e0529}{
\index{AudioMasker@{AudioMasker}!excite@{excite}}
\index{excite@{excite}!AudioMasker@{AudioMasker}}
\subsubsection[{excite}]{\setlength{\rightskip}{0pt plus 5cm}void AudioMasker::excite (short int $\ast$ {\em Input}, \/  int {\em sCount})}}
\label{classAudioMasker_ae7182941513eab5853dc65ebe03e0529}
Finds the excitation for input data @ Input Using short int input data @ sCount samples

These should be implemented differently for different Input types \begin{Desc}
\item[Examples: ]\par
\hyperlink{AudioMaskerExample_8cc-example}{AudioMaskerExample.cc}.\end{Desc}
\hypertarget{classAudioMasker_a13dd56b43780b2e45199c449866f5616}{
\index{AudioMasker@{AudioMasker}!findThreshold@{findThreshold}}
\index{findThreshold@{findThreshold}!AudioMasker@{AudioMasker}}
\subsubsection[{findThreshold}]{\setlength{\rightskip}{0pt plus 5cm}double AudioMasker::findThreshold (double {\em freq})}}
\label{classAudioMasker_a13dd56b43780b2e45199c449866f5616}
Returns the simultaneous masking threshold at a particular frequency @ freq The frequency of interest \begin{Desc}
\item[Examples: ]\par
\hyperlink{AudioMaskerExample_8cc-example}{AudioMaskerExample.cc}.\end{Desc}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
AudioMasker.H\item 
AudioMasker.cc\end{DoxyCompactItemize}