\hypertarget{group__Audio__IO}{}\section{Audio Codecs}
\label{group__Audio__IO}\index{Audio Codecs@{Audio Codecs}}


Audio file I/\+O support.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{group__Audio__IO_ga45ca575312caad67d568ff5ca4e60397}{S\+P\+L\+::load\+Audio\+File} (const std\+::string \&file\+Name, int \&sampling\+Rate, Real\+Array1 \&samples)
\begin{DoxyCompactList}\small\item\em Read audio data from a file in W\+A\+V format. \end{DoxyCompactList}\item 
int \hyperlink{group__Audio__IO_ga1f4f9c6bf7442399a383ca94a3a66d5a}{S\+P\+L\+::save\+Audio\+File} (const std\+::string \&file\+Name, int sampling\+Rate, const Real\+Array1 \&samples)
\begin{DoxyCompactList}\small\item\em Write a sequence to a file in W\+A\+V format. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Audio file I/\+O support. 



\subsection{Function Documentation}
\hypertarget{group__Audio__IO_ga45ca575312caad67d568ff5ca4e60397}{}\index{Audio Codecs@{Audio Codecs}!load\+Audio\+File@{load\+Audio\+File}}
\index{load\+Audio\+File@{load\+Audio\+File}!Audio Codecs@{Audio Codecs}}
\subsubsection[{load\+Audio\+File}]{\setlength{\rightskip}{0pt plus 5cm}int S\+P\+L\+::load\+Audio\+File (
\begin{DoxyParamCaption}
\item[{const std\+::string \&}]{file\+Name, }
\item[{int \&}]{sampling\+Rate, }
\item[{{\bf Real\+Array1} \&}]{samples}
\end{DoxyParamCaption}
)}\label{group__Audio__IO_ga45ca575312caad67d568ff5ca4e60397}


Read audio data from a file in W\+A\+V format. 

Effects\+: The audio signal from the file named file\+Name in W\+A\+V format is read. The sample data is placed in the array samples and the sampling rate is placed in sampling\+Rate. If the file has more than one channel, only the first channel is read. The sample data will always lie in the range \mbox{[}-\/1.\+0, 1.\+0\mbox{]}.

Returns\+: On success, zero is returned. On failure, a nonzero value is returned. \hypertarget{group__Audio__IO_ga1f4f9c6bf7442399a383ca94a3a66d5a}{}\index{Audio Codecs@{Audio Codecs}!save\+Audio\+File@{save\+Audio\+File}}
\index{save\+Audio\+File@{save\+Audio\+File}!Audio Codecs@{Audio Codecs}}
\subsubsection[{save\+Audio\+File}]{\setlength{\rightskip}{0pt plus 5cm}int S\+P\+L\+::save\+Audio\+File (
\begin{DoxyParamCaption}
\item[{const std\+::string \&}]{file\+Name, }
\item[{int}]{sampling\+Rate, }
\item[{const {\bf Real\+Array1} \&}]{samples}
\end{DoxyParamCaption}
)}\label{group__Audio__IO_ga1f4f9c6bf7442399a383ca94a3a66d5a}


Write a sequence to a file in W\+A\+V format. 

Effects\+: The sequence seq with sampling rate sampling\+Rate is written to the file named file\+Name in W\+A\+V format. The sample data must lie in the range \mbox{[}-\/1.\+0, 1.\+0\mbox{]}.

Returns\+: On success, zero is returned. On failure, a nonzero value is returned. 