\hypertarget{resources_8c}{}\doxysection{src/resources.c File Reference}
\label{resources_8c}\index{src/resources.c@{src/resources.c}}
{\ttfamily \#include \char`\"{}resources.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}myfft.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}mysync.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}printing.\+h\char`\"{}}\newline
{\ttfamily \#include $<$fftw3.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
Include dependency graph for resources.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{resources_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structAppResources}{App\+Resources}} \mbox{\hyperlink{resources_8c_ac9dde6e83fbbbe2e79a35712bc53fd05}{allocate\+Resources}} (size\+\_\+t array\+Length, size\+\_\+t ticktock\+Buffer, \mbox{\hyperlink{structCapConfig}{Cap\+Config}} $\ast$cfg)
\begin{DoxyCompactList}\small\item\em Allocates and initializes the resources needed for the application. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{resources_8c_a6c2b2090f22158436b4d392412dc922f}{cleanup\+Resources}} (\mbox{\hyperlink{structAppResources}{App\+Resources}} $\ast$res, \mbox{\hyperlink{structCapConfig}{Cap\+Config}} $\ast$cfg, \mbox{\hyperlink{structCaptureCtx}{Capture\+Ctx}} $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Frees all allocated resources and performs any necessary cleanup. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{resources_8c_ac9dde6e83fbbbe2e79a35712bc53fd05}\label{resources_8c_ac9dde6e83fbbbe2e79a35712bc53fd05}} 
\index{resources.c@{resources.c}!allocateResources@{allocateResources}}
\index{allocateResources@{allocateResources}!resources.c@{resources.c}}
\doxysubsubsection{\texorpdfstring{allocateResources()}{allocateResources()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structAppResources}{App\+Resources}} allocate\+Resources (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{array\+Length,  }\item[{size\+\_\+t}]{ticktock\+Buffer,  }\item[{\mbox{\hyperlink{structCapConfig}{Cap\+Config}} $\ast$}]{cfg }\end{DoxyParamCaption})}



Allocates and initializes the resources needed for the application. 


\begin{DoxyParams}{Parameters}
{\em array\+Length} & The length of the arrays to be allocated. \\
\hline
{\em ticktock\+Buffer} & The size of the audio buffer to be allocated. \\
\hline
{\em cfg} & Pointer to the configuration structure containing necessary parameters. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An \mbox{\hyperlink{structAppResources}{App\+Resources}} struct containing pointers to all allocated resources. 
\end{DoxyReturn}
\mbox{\Hypertarget{resources_8c_a6c2b2090f22158436b4d392412dc922f}\label{resources_8c_a6c2b2090f22158436b4d392412dc922f}} 
\index{resources.c@{resources.c}!cleanupResources@{cleanupResources}}
\index{cleanupResources@{cleanupResources}!resources.c@{resources.c}}
\doxysubsubsection{\texorpdfstring{cleanupResources()}{cleanupResources()}}
{\footnotesize\ttfamily void cleanup\+Resources (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structAppResources}{App\+Resources}} $\ast$}]{res,  }\item[{\mbox{\hyperlink{structCapConfig}{Cap\+Config}} $\ast$}]{cfg,  }\item[{\mbox{\hyperlink{structCaptureCtx}{Capture\+Ctx}} $\ast$}]{ctx }\end{DoxyParamCaption})}



Frees all allocated resources and performs any necessary cleanup. 


\begin{DoxyParams}{Parameters}
{\em res} & Pointer to the \mbox{\hyperlink{structAppResources}{App\+Resources}} struct containing the resources to be freed. \\
\hline
{\em cfg} & Pointer to the \mbox{\hyperlink{structCapConfig}{Cap\+Config}} struct containing configuration parameters (if needed for cleanup). \\
\hline
{\em ctx} & Pointer to the \mbox{\hyperlink{structCaptureCtx}{Capture\+Ctx}} struct containing context information (if needed for cleanup). \\
\hline
\end{DoxyParams}
