\section{Stream\_\-mixer input channels}
\label{group__inchannels}\index{Stream_mixer input channels@{Stream\_\-mixer input channels}}


\subsection{Detailed Description}
The following are methods implemented in the {\bf Stream\_\-mixer} class to control input channels (In\-Channel class) that are then mixed together and sent to output channels ({\bf Out\-Channel} class).

The input channels make audio chunks available thru buffered and threadsafe FIFO pipes ({\bf Pipe} class), for the mixer to mix.

The playlist functions are incorporated inside the Linklist and {\bf Playlist} classes - which you can freely access. 

\subsection*{Functions}
\begin{CompactItemize}
\item 
bool {\bf create\_\-channel} (int ch)
\begin{CompactList}\small\item\em create channel ch\item\end{CompactList}\item 
bool {\bf delete\_\-channel} (int ch)\label{group__inchannels_a1}

\begin{CompactList}\small\item\em deletes the channel ch\item\end{CompactList}\item 
bool {\bf add\_\-to\_\-playlist} (int ch, const char $\ast$file)
\begin{CompactList}\small\item\em inserts a new entry at the bottom of a channel playlist\item\end{CompactList}\item 
void {\bf rem\_\-from\_\-playlist} (int ch, int pos)\label{group__inchannels_a3}

\begin{CompactList}\small\item\em removes the entry at a certain position from a channel playlist\item\end{CompactList}\item 
bool {\bf set\_\-channel} (int ch, int playlist\_\-pos)\label{group__inchannels_a4}

\begin{CompactList}\small\item\em selects the entry at a certain position of a channel playlist\item\end{CompactList}\item 
int {\bf play\_\-channel} (int ch)\label{group__inchannels_a5}

\begin{CompactList}\small\item\em set the channel playing\item\end{CompactList}\item 
bool {\bf stop\_\-channel} (int ch)\label{group__inchannels_a6}

\begin{CompactList}\small\item\em stop the channel\item\end{CompactList}\item 
bool {\bf pause\_\-channel} (int ch)\label{group__inchannels_a7}

\begin{CompactList}\small\item\em switch channel pause state between true and false\item\end{CompactList}\item 
bool {\bf pause\_\-channel} (int ch, bool stat)\label{group__inchannels_a8}

\begin{CompactList}\small\item\em set the channel pause state\item\end{CompactList}\item 
bool {\bf set\_\-volume} (int ch, float vol)\label{group__inchannels_a9}

\begin{CompactList}\small\item\em set a channel volume\item\end{CompactList}\item 
void {\bf set\_\-all\_\-volumes} (float $\ast$vol)\label{group__inchannels_a10}

\begin{CompactList}\small\item\em set all channel volumes at once\item\end{CompactList}\item 
void {\bf crossfade} (int ch1, float vol1, int ch2, float vol2)\label{group__inchannels_a11}

\begin{CompactList}\small\item\em set the volumes of two channels at once\item\end{CompactList}\item 
bool {\bf set\_\-playmode} (int ch, int mode)\label{group__inchannels_a12}

\begin{CompactList}\small\item\em set the playmode of a channel (LOOP,CONT,PLAY)\item\end{CompactList}\item 
void {\bf set\_\-speed} (int ch, int speed)\label{group__inchannels_a13}

\begin{CompactList}\small\item\em this is VERY EXPERIMENTAL, but we might get there soon\item\end{CompactList}\item 
bool {\bf set\_\-position} (int ch, float pos)\label{group__inchannels_a14}

\begin{CompactList}\small\item\em set the channel position (from 0.0 to 1.0)\item\end{CompactList}\item 
bool {\bf move\_\-song} (int ch, int pos, int nch, int npos)\label{group__inchannels_a15}

\begin{CompactList}\small\item\em move a playlist entry of a channel from a position to the other\item\end{CompactList}\item 
bool {\bf set\_\-live} (bool stat)\label{group__inchannels_a16}

\begin{CompactList}\small\item\em set the state of the live input from soundcard\item\end{CompactList}\item 
bool {\bf set\_\-lineout} (bool stat)\label{group__inchannels_a17}

\begin{CompactList}\small\item\em set the state of the live output to soundcard\item\end{CompactList}\end{CompactItemize}


\subsection{Function Documentation}
\index{add_to_playlist@{add\_\-to\_\-playlist}!inchannels@{inchannels}}\index{inchannels@{inchannels}!add_to_playlist@{add\_\-to\_\-playlist}}\index{inchannels@{inchannels}!add_to_playlist@{add\_\-to\_\-playlist}}
\index{add_to_playlist@{add\_\-to\_\-playlist}!inchannels@{inchannels}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Stream\_\-mixer::add\_\-to\_\-playlist (int {\em ch}, const char $\ast$ {\em file})\hspace{0.3cm}{\tt  [inherited]}}\label{group__inchannels_a2}


inserts a new entry at the bottom of a channel playlist

This adds an input stream or playlist to a certain channel

Many kinds of files are supported:\begin{enumerate}
\item .mp3 single files\item .ogg single files\item .pls $|$ .pl $|$ .m3u playlists\item {\tt http://} mp3 streams\item directory/ (recusively adding recognized contents) the types are recognized using the filename, more often the extension after the last dot or the prefix before the url. You can investigate the parser in {\bf jmixer.cpp}.\end{enumerate}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ch}]channel number \item[{\em file}]full path string \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true in case of success, false otherwise \end{Desc}


Definition at line 650 of file jmixer.cpp.\index{create_channel@{create\_\-channel}!inchannels@{inchannels}}\index{inchannels@{inchannels}!create_channel@{create\_\-channel}}\index{inchannels@{inchannels}!create_channel@{create\_\-channel}}
\index{create_channel@{create\_\-channel}!inchannels@{inchannels}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Stream\_\-mixer::create\_\-channel (int {\em ch})\hspace{0.3cm}{\tt  [inherited]}}\label{group__inchannels_a0}


create channel ch

At the moment Mu\-SE gives only the possibility to have 6 channels.

This function creates the channel number ch and is necessary to call it before doing anything on the channel.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ch}]number of the channel slot (from 1 to 6) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true in case of success, false otherwise \end{Desc}


Definition at line 336 of file jmixer.cpp.