\section{Muse\-Dec\-Mp3 Class Reference}
\label{classMuseDecMp3}\index{MuseDecMp3@{MuseDecMp3}}
{\tt \#include $<$dec\_\-mp3.h$>$}

Inherits {\bf Muse\-Dec}.

Inheritance diagram for Muse\-Dec\-Mp3:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=57pt]{classMuseDecMp3__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for Muse\-Dec\-Mp3:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=57pt]{classMuseDecMp3__coll__graph}
\end{center}
\end{figure}


\subsection{Detailed Description}
Mpeg-1 layer 1,2,3 and Mpeg-2 layer 3.

Instances of the Mp3 codec (splay implementation) are created internally by the Channel class, publicly available interface to the creation is in {\bf Stream\_\-mixer::add\_\-to\_\-playlist}.



Definition at line 45 of file dec\_\-mp3.h.\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
int {\bf load} (char $\ast$file)
\begin{CompactList}\small\item\em open file in decoder\item\end{CompactList}\item 
bool {\bf seek} (float pos)
\begin{CompactList}\small\item\em seek to a position\item\end{CompactList}\item 
void {\bf clean} ()\label{classMuseDecMp3_a4}

\item 
IN\_\-DATATYPE $\ast$ {\bf get\_\-audio} ()
\begin{CompactList}\small\item\em decode a chunk of channel audio\item\end{CompactList}\end{CompactItemize}


\subsection{Member Function Documentation}
\index{get_audio@{get\_\-audio}!MuseDecMp3@{MuseDecMp3}}\index{MuseDecMp3@{MuseDecMp3}!get_audio@{get\_\-audio}}\index{MuseDecMp3@{Muse\-Dec\-Mp3}!get_audio@{get\_\-audio}}
\index{get_audio@{get\_\-audio}!MuseDecMp3@{Muse\-Dec\-Mp3}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}IN\_\-DATATYPE $\ast$ Muse\-Dec\-Mp3::get\_\-audio ()\hspace{0.3cm}{\tt  [virtual]}}\label{classMuseDecMp3_a5}


decode a chunk of channel audio

Decode another chunk of audio for the channel at the current position, this function is implementing the low-level decoder functionalities to obtain the audio pcm to be mixed.

The audio will be then resampled at a common rate and mixed by Mu\-SE.

This is a pure virtual function: needs to be implemented in decoders.

\begin{Desc}
\item[Returns:]pointer to decoded pcm buffer \end{Desc}


Implements {\bf Muse\-Dec} {\rm (p.\,\pageref{classMuseDec_a4})}.

Definition at line 118 of file dec\_\-mp3.cpp.\index{load@{load}!MuseDecMp3@{MuseDecMp3}}\index{MuseDecMp3@{MuseDecMp3}!load@{load}}\index{MuseDecMp3@{Muse\-Dec\-Mp3}!load@{load}}
\index{load@{load}!MuseDecMp3@{Muse\-Dec\-Mp3}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Muse\-Dec\-Mp3::load (char $\ast$ {\em file})\hspace{0.3cm}{\tt  [virtual]}}\label{classMuseDecMp3_a2}


open file in decoder

Open up a filename (full path) and makes it ready for decoding, the filename or url can be formed in different ways, depending on the decoder implementation.

This is a pure virtual function: needs to be implemented in decoders.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file}]full pathname for file, or url accepted by the decoder \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on error, otherwise\begin{itemize}
\item 1 = success, channel is seekable\item 2 = success, channel is not seekable \end{itemize}
\end{Desc}


Implements {\bf Muse\-Dec} {\rm (p.\,\pageref{classMuseDec_a2})}.

Definition at line 46 of file dec\_\-mp3.cpp.\index{seek@{seek}!MuseDecMp3@{MuseDecMp3}}\index{MuseDecMp3@{MuseDecMp3}!seek@{seek}}\index{MuseDecMp3@{Muse\-Dec\-Mp3}!seek@{seek}}
\index{seek@{seek}!MuseDecMp3@{Muse\-Dec\-Mp3}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Muse\-Dec\-Mp3::seek (float {\em pos})\hspace{0.3cm}{\tt  [virtual]}}\label{classMuseDecMp3_a3}


seek to a position

Seek position over the audio data available to an opened channel.

This operation is only possible if the channel is seekable (see the flag in this class and the return code of {\bf Muse\-Dec::load}).

This is a pure virtual function: needs to be implemented in decoders.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pos}]floating point value from 0.0 to 1.0 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success, false otherwise \end{Desc}


Implements {\bf Muse\-Dec} {\rm (p.\,\pageref{classMuseDec_a3})}.

Definition at line 193 of file dec\_\-mp3.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
{\bf dec\_\-mp3.h}\item 
dec\_\-mp3.cpp\end{CompactItemize}
