\hypertarget{mysound_8h_source}{}\doxysection{mysound.\+h}
\label{mysound_8h_source}\index{inc/mysound.h@{inc/mysound.h}}
\mbox{\hyperlink{mysound_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{config_8h}{config.h}}"{}}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{myarr_8h}{myarr.h}}"{}}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <alsa/asoundlib.h>} \textcolor{comment}{// IWYU pragma: export}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{7 }
\DoxyCodeLine{8 \textcolor{keyword}{struct }\mbox{\hyperlink{structAmpResult}{AmpResult}}}
\DoxyCodeLine{9 \{}
\DoxyCodeLine{10     \textcolor{keywordtype}{long} \mbox{\hyperlink{structAmpResult_a5ebd6cd6df3249c747e49710942528e5}{avg}};}
\DoxyCodeLine{11     \textcolor{keywordtype}{int} \mbox{\hyperlink{structAmpResult_adcd2b784f8b4307921ab573d15c9c714}{clipCount}};}
\DoxyCodeLine{12     \textcolor{keywordtype}{int} \mbox{\hyperlink{structAmpResult_ad367f6e145c939e214913b0be869e9a6}{clipStreak}};}
\DoxyCodeLine{13     \textcolor{keywordtype}{int} \mbox{\hyperlink{structAmpResult_a10c22f6d4b4b35b37fa056a050960ea8}{gain\_increase\_locked}};}
\DoxyCodeLine{14     \textcolor{keywordtype}{int} \mbox{\hyperlink{structAmpResult_afa86490ad027f684458d5710fd35c378}{has\_increased}};}
\DoxyCodeLine{15     \textcolor{keywordtype}{long} \mbox{\hyperlink{structAmpResult_a6df372fad08e2f2cb7e5ea8b6a83110b}{min\_gain}};}
\DoxyCodeLine{16     \textcolor{keywordtype}{long} \mbox{\hyperlink{structAmpResult_abc88266fb53403efc84a89a1fc4a1c84}{max\_gain}};}
\DoxyCodeLine{17 \};}
\DoxyCodeLine{18 }
\DoxyCodeLine{22 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{structCaptureCtx}{CaptureCtx}}}
\DoxyCodeLine{23 \{}
\DoxyCodeLine{24     \textcolor{comment}{/* ALSA */}}
\DoxyCodeLine{25     snd\_pcm\_t* \mbox{\hyperlink{structCaptureCtx_ace563ab78d0d5e0120e05594f464b6fa}{cap}};}
\DoxyCodeLine{26     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} \mbox{\hyperlink{structCaptureCtx_ad35dd05fb9509468cbac8cd60f192aa9}{rate}};}
\DoxyCodeLine{27     snd\_pcm\_uframes\_t \mbox{\hyperlink{structCaptureCtx_a9e7f7a6af7165ab76cff349affffef37}{periodSize}};}
\DoxyCodeLine{28     snd\_pcm\_uframes\_t \mbox{\hyperlink{structCaptureCtx_af803fd1b04154cb9e316c271524dea2e}{bufferSize}};}
\DoxyCodeLine{29     \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{structCaptureCtx_aae2944a4a997c0dd36e3bb27a028b738}{ArrayLength}}; \textcolor{comment}{// frames per processing block}}
\DoxyCodeLine{30     snd\_mixer\_t* \mbox{\hyperlink{structCaptureCtx_a7ec4abfbcba31584213617b8a318f9ab}{mixerHandle}};}
\DoxyCodeLine{31     snd\_mixer\_elem\_t* \mbox{\hyperlink{structCaptureCtx_aee227c321b0cba0a172fc90861da44ff}{mixerElem}};}
\DoxyCodeLine{32     \textcolor{keyword}{struct }\mbox{\hyperlink{structAmpResult}{AmpResult}} \mbox{\hyperlink{structCaptureCtx_a35648e9f68ab58c8e99d0c7aecc53a00}{ampResult}};}
\DoxyCodeLine{33 \} \mbox{\hyperlink{mysound_8h_a6bcb80ca2e3c5ad2ec3e67389f7049e6}{CaptureCtx}};}
\DoxyCodeLine{34 }
\DoxyCodeLine{35 \textcolor{keywordtype}{void} \mbox{\hyperlink{mysound_8h_a19fd732c6566678a83efb08084b64c6a}{open\_capture\_elem}}(\mbox{\hyperlink{structCaptureCtx}{CaptureCtx}}* ctx, \textcolor{keyword}{const} \mbox{\hyperlink{structCapConfig}{CapConfig}}* cfg);}
\DoxyCodeLine{36 }
\DoxyCodeLine{48 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* \mbox{\hyperlink{mysound_8h_a335a86e7bb84220e0e05b8e89dde135b}{get\_default\_device}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{49 }
\DoxyCodeLine{60 \textcolor{comment}{// NOLINTNEXTLINE(misc-\/include-\/cleaner)}}
\DoxyCodeLine{61 snd\_pcm\_t* \mbox{\hyperlink{mysound_8h_a48f8c4cb9fd9917352fd118141aa4501}{initAudio}}(snd\_pcm\_format\_t format, \textcolor{keywordtype}{char}* device, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int}* rate);}
\DoxyCodeLine{62 }
\DoxyCodeLine{73 \textcolor{keywordtype}{int} \mbox{\hyperlink{mysound_8h_a9eb1bfb6d399e3b6e7b537cd422c2654}{initAudioSource}}(\mbox{\hyperlink{structCapConfig}{CapConfig}}* cfg, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int}* actualRate);}
\DoxyCodeLine{74 }
\DoxyCodeLine{92 \textcolor{keywordtype}{int} \mbox{\hyperlink{mysound_8h_aa310cc9b4cfd0f227a9e3143a101393f}{readBufferOrFile}}(\textcolor{keywordtype}{int}* derivative,}
\DoxyCodeLine{93                      \textcolor{keywordtype}{size\_t} ArrayLength,}
\DoxyCodeLine{94                      FILE* fpInput,}
\DoxyCodeLine{95                      \mbox{\hyperlink{structCaptureCtx}{CaptureCtx}}* ctx,}
\DoxyCodeLine{96                      int16\_t* buffer16);}
\DoxyCodeLine{97 }
\DoxyCodeLine{116 \textcolor{keywordtype}{int} \mbox{\hyperlink{mysound_8h_a4c693ee8e2155813d63204597ee13447}{getData}}(FILE* fpInput,}
\DoxyCodeLine{117             \textcolor{keyword}{struct} \mbox{\hyperlink{structmyarr}{myarr}}* derivative,}
\DoxyCodeLine{118             \mbox{\hyperlink{structCaptureCtx}{CaptureCtx}}* ctx,}
\DoxyCodeLine{119             int16\_t* out);}
\DoxyCodeLine{120 }
\DoxyCodeLine{131 \textcolor{keywordtype}{void} \mbox{\hyperlink{mysound_8h_af0c1c5f075f1e4df5e7d6606a4909b84}{captureTeardown}}(\mbox{\hyperlink{structCaptureCtx}{CaptureCtx}}* ctx);}
\DoxyCodeLine{132 }
\DoxyCodeLine{147 \textcolor{keywordtype}{int} \mbox{\hyperlink{mysound_8h_a470c1d105d80aa605f7c57a0247b3c63}{captureSetup}}(\mbox{\hyperlink{structCaptureCtx}{CaptureCtx}}* ctx, \mbox{\hyperlink{structCapConfig}{CapConfig}}* cfg, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} rate);}
\DoxyCodeLine{148 }
\DoxyCodeLine{165 \textcolor{keywordtype}{int} \mbox{\hyperlink{mysound_8h_a839355f40bec4ad51529e11ca71ac843}{readSamples}}(snd\_pcm\_t* cap, \textcolor{keywordtype}{size\_t} ArrayLength, int16\_t* out);}
\DoxyCodeLine{166 }
\DoxyCodeLine{178 \textcolor{keywordtype}{int} \mbox{\hyperlink{mysound_8h_a54b162f247c2b5a30d97466af6320412}{get\_mic\_amplification}}(\textcolor{keyword}{const} \mbox{\hyperlink{structCaptureCtx}{CaptureCtx}}* ctx, \textcolor{keywordtype}{long}* value);}
\DoxyCodeLine{179 }
\DoxyCodeLine{191 \textcolor{keywordtype}{int} \mbox{\hyperlink{mysound_8h_a9813c32cfc7c4c332daca0aa44874b95}{set\_mic\_amplification}}(\textcolor{keyword}{const} \mbox{\hyperlink{structCaptureCtx}{CaptureCtx}}* ctx, \textcolor{keywordtype}{long} value);}

\end{DoxyCode}
