\section{Stream\_\-mixer output channels}
\label{group__outchannels}\index{Stream_mixer output channels@{Stream\_\-mixer output channels}}


\subsection{Detailed Description}
The following methods are implemented in the {\bf Stream\_\-mixer} class and can be used to control output channels ({\bf Out\-Channel} class).

Registered Outchannels are automatically feeded by the {\bf Stream\_\-mixer} thru buffered and threadsafe FIFO pipes ({\bf Pipe} class) also every outchannel is running on his own thread.

/ Internals: The superclass {\bf Out\-Channel} wraps around two components: the Encoder, and the Shouter. The Encoder is internally implementing a Codec. 

\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf create\_\-enc} (enum {\bf codec} enc)
\begin{CompactList}\small\item\em Create a new {\bf Out\-Channel} encoder channel.\item\end{CompactList}\item 
void {\bf delete\_\-enc} (int id)
\begin{CompactList}\small\item\em Delete an {\bf Out\-Channel} encoder (discards ID).\item\end{CompactList}\item 
{\bf Out\-Channel} $\ast$ {\bf get\_\-enc} (int id)
\begin{CompactList}\small\item\em Returns the {\bf Out\-Channel} instance with the given ID.\item\end{CompactList}\item 
bool {\bf apply\_\-enc} (int id)
\begin{CompactList}\small\item\em apply the current {\bf Out\-Channel} configuration\item\end{CompactList}\end{CompactItemize}


\subsection{Function Documentation}
\index{apply_enc@{apply\_\-enc}!outchannels@{outchannels}}\index{outchannels@{outchannels}!apply_enc@{apply\_\-enc}}\index{outchannels@{outchannels}!apply_enc@{apply\_\-enc}}
\index{apply_enc@{apply\_\-enc}!outchannels@{outchannels}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Stream\_\-mixer::apply\_\-enc (int {\em id})\hspace{0.3cm}{\tt  [inherited]}}\label{group__outchannels_a3}


apply the current {\bf Out\-Channel} configuration

If any setting has been changed on the {\bf Out\-Channel}, then this function must be called to apply them (works while running)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the ID of the encoder \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success, false otherwise \end{Desc}


Definition at line 880 of file jmixer.cpp.\index{create_enc@{create\_\-enc}!outchannels@{outchannels}}\index{outchannels@{outchannels}!create_enc@{create\_\-enc}}\index{outchannels@{outchannels}!create_enc@{create\_\-enc}}
\index{create_enc@{create\_\-enc}!outchannels@{outchannels}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Stream\_\-mixer::create\_\-enc (enum {\bf codec} {\em enc})\hspace{0.3cm}{\tt  [inherited]}}\label{group__outchannels_a0}


Create a new {\bf Out\-Channel} encoder channel.

The encoder channel is given back to the calling process in the form of a numeric (int) ID number.

That number can be used as a reference to obtain back the Outchannel instance created.

Internally this function starts up the Encoder thread and initialize its buffers for the Codec selected.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em enc}]can be MP3 or OGG (see enum codec in {\bf outchannels.h}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]id the ID of the encoder, -1 on error \end{Desc}


Definition at line 811 of file jmixer.cpp.\index{delete_enc@{delete\_\-enc}!outchannels@{outchannels}}\index{outchannels@{outchannels}!delete_enc@{delete\_\-enc}}\index{outchannels@{outchannels}!delete_enc@{delete\_\-enc}}
\index{delete_enc@{delete\_\-enc}!outchannels@{outchannels}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Stream\_\-mixer::delete\_\-enc (int {\em id})\hspace{0.3cm}{\tt  [inherited]}}\label{group__outchannels_a1}


Delete an {\bf Out\-Channel} encoder (discards ID).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the ID of the {\bf Out\-Channel} to destroy. \end{description}
\end{Desc}


Definition at line 853 of file jmixer.cpp.\index{get_enc@{get\_\-enc}!outchannels@{outchannels}}\index{outchannels@{outchannels}!get_enc@{get\_\-enc}}\index{outchannels@{outchannels}!get_enc@{get\_\-enc}}
\index{get_enc@{get\_\-enc}!outchannels@{outchannels}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Out\-Channel} $\ast$ Stream\_\-mixer::get\_\-enc (int {\em id})\hspace{0.3cm}{\tt  [inherited]}}\label{group__outchannels_a2}


Returns the {\bf Out\-Channel} instance with the given ID.

This function is used to obtain an {\bf Out\-Channel} direct pointer to be able to configure it thru its public methods and properties.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the ID of the encoder \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the {\bf Out\-Channel} class instance with ID \end{Desc}


Definition at line 876 of file jmixer.cpp.