\section{KAudio\-Play\-Stream Class Reference}
\label{classKAudioPlayStream}\index{KAudioPlayStream@{KAudioPlayStream}}
A wrapper around Byte\-Sound\-Producer/Byte\-Stream\-To\-Audio/Synth\_\-AMAN\_\-PLAY.  


{\tt \#include $<$kaudioplaystream.h$>$}

Inheritance diagram for KAudio\-Play\-Stream:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=68pt]{classKAudioPlayStream__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KAudio\-Play\-Stream:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=68pt]{classKAudioPlayStream__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf start} (int sampling\-Rate, int bits, int channels)
\item 
void {\bf stop} ()
\item 
void {\bf write} ({\bf QByte\-Array} \&data)
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf request\-Data} ({\bf QByte\-Array} \&)
\item 
void {\bf running} (bool)
\item 
void {\bf no\-Data} ()
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KAudio\-Play\-Stream} ({\bf KArts\-Server} $\ast$server, const {\bf QString} title, {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
{\bf $\sim$KAudio\-Play\-Stream} ()
\item 
void {\bf set\-Polling} (bool)
\item 
bool {\bf polling} () const 
\item 
bool {\bf running} () const 
\item 
Arts::Stereo\-Effect\-Stack {\bf effect\-Stack} () const 
\item 
void {\bf fill\-Data} (Arts::Data\-Packet$<$ Arts::mcopbyte $>$ $\ast$packet)
\end{CompactItemize}


\subsection{Detailed Description}
A wrapper around Byte\-Sound\-Producer/Byte\-Stream\-To\-Audio/Synth\_\-AMAN\_\-PLAY. 

\begin{Desc}
\item[Author:]Arnold Krille $<${\tt arnold@arnoldarts.de}$>$ \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}




Definition at line 42 of file kaudioplaystream.h.

\subsection{Constructor \& Destructor Documentation}
\index{KAudioPlayStream@{KAudio\-Play\-Stream}!KAudioPlayStream@{KAudioPlayStream}}
\index{KAudioPlayStream@{KAudioPlayStream}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAudio\-Play\-Stream::KAudio\-Play\-Stream ({\bf KArts\-Server} $\ast$ {\em server}, const {\bf QString} {\em title}, {\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKAudioPlayStream_a0}


Creates a KAudio\-Play\-Stream on server with a title. 

You should pass the {\bf KArts\-Server}{\rm (p.\,\pageref{classKArtsServer})} also as parent to be sure this object is deleted before the server is.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em server}]The server where it should play to. \item[{\em title}]The title that is shown in the Audio\-Manager. \item[{\em parent}]You will propably want to pass the server as parent to so this stream gets deleted before the server disappears.\end{description}
\end{Desc}


Definition at line 85 of file kaudioplaystream.cpp.

References endl(), k\_\-funcinfo, and kd\-Debug().\index{KAudioPlayStream@{KAudio\-Play\-Stream}!~KAudioPlayStream@{$\sim$KAudioPlayStream}}
\index{~KAudioPlayStream@{$\sim$KAudioPlayStream}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAudio\-Play\-Stream::$\sim${\bf KAudio\-Play\-Stream} ()}\label{classKAudioPlayStream_a1}


Destructs the KAudio\-Play\-Stream. 



Definition at line 91 of file kaudioplaystream.cpp.

References endl(), k\_\-funcinfo, and kd\-Debug().

\subsection{Member Function Documentation}
\index{KAudioPlayStream@{KAudio\-Play\-Stream}!setPolling@{setPolling}}
\index{setPolling@{setPolling}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Play\-Stream::set\-Polling (bool)}\label{classKAudioPlayStream_a2}


Controls wether this Stream should poll the data from you via the signal. 

\begin{Desc}
\item[See also:]{\bf request\-Data()}{\rm (p.\,\pageref{classKAudioPlayStream_l0})} or you use 

{\bf write()}{\rm (p.\,\pageref{classKAudioPlayStream_i2})} to fill the inputbuffer.\end{Desc}
Default is true

Definition at line 96 of file kaudioplaystream.cpp.\index{KAudioPlayStream@{KAudio\-Play\-Stream}!polling@{polling}}
\index{polling@{polling}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAudio\-Play\-Stream::polling () const}\label{classKAudioPlayStream_a3}


Returns the polling state. 

\begin{Desc}
\item[See also:]{\bf set\-Polling}{\rm (p.\,\pageref{classKAudioPlayStream_a2})}\end{Desc}


Definition at line 97 of file kaudioplaystream.cpp.\index{KAudioPlayStream@{KAudio\-Play\-Stream}!running@{running}}
\index{running@{running}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAudio\-Play\-Stream::running () const}\label{classKAudioPlayStream_a4}


\begin{Desc}
\item[Returns:]wether this stream is running (\char`\"{}on air\char`\"{}) or not.\end{Desc}


Definition at line 99 of file kaudioplaystream.cpp.

Referenced by start(), and stop().\index{KAudioPlayStream@{KAudio\-Play\-Stream}!effectStack@{effectStack}}
\index{effectStack@{effectStack}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Arts::Stereo\-Effect\-Stack KAudio\-Play\-Stream::effect\-Stack () const}\label{classKAudioPlayStream_a5}


\begin{Desc}
\item[Returns:]The Arts::Stereo\-Effect\-Stack right before the Synth\_\-AMAN\_\-PLAY.\end{Desc}


Definition at line 101 of file kaudioplaystream.cpp.\index{KAudioPlayStream@{KAudio\-Play\-Stream}!start@{start}}
\index{start@{start}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Play\-Stream::start (int {\em sampling\-Rate}, int {\em bits}, int {\em channels})\hspace{0.3cm}{\tt  [slot]}}\label{classKAudioPlayStream_i0}


Start the stream. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sampling\-Rate}]how many samples per second ( typically 11000/22050/44100/48000 ) \item[{\em bits}]how many bits per sample ( 8 / 16 ) \item[{\em channels}]how many channels ( 1 or 2 )\end{description}
\end{Desc}


Definition at line 105 of file kaudioplaystream.cpp.

References endl(), k\_\-funcinfo, kd\-Debug(), and running().\index{KAudioPlayStream@{KAudio\-Play\-Stream}!stop@{stop}}
\index{stop@{stop}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Play\-Stream::stop ()\hspace{0.3cm}{\tt  [slot]}}\label{classKAudioPlayStream_i1}


Stops the stream. 



Definition at line 128 of file kaudioplaystream.cpp.

References endl(), k\_\-funcinfo, kd\-Debug(), and running().\index{KAudioPlayStream@{KAudio\-Play\-Stream}!write@{write}}
\index{write@{write}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Play\-Stream::write ({\bf QByte\-Array} \& {\em data})\hspace{0.3cm}{\tt  [slot]}}\label{classKAudioPlayStream_i2}


Write data into the inputbuffer. 

If you ignore the signal \begin{Desc}
\item[See also:]{\bf no\-Data()}{\rm (p.\,\pageref{classKAudioPlayStream_l2})} it will play 0 ( silence ).\end{Desc}


Definition at line 150 of file kaudioplaystream.cpp.\index{KAudioPlayStream@{KAudio\-Play\-Stream}!requestData@{requestData}}
\index{requestData@{requestData}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Play\-Stream::request\-Data ({\bf QByte\-Array} \&)\hspace{0.3cm}{\tt  [signal]}}\label{classKAudioPlayStream_l0}


This signal is emitted when audio should be played. 

You have to fill the array with data.

Referenced by fill\-Data().\index{KAudioPlayStream@{KAudio\-Play\-Stream}!running@{running}}
\index{running@{running}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Play\-Stream::running (bool)\hspace{0.3cm}{\tt  [signal]}}\label{classKAudioPlayStream_l1}


Is emitted when the state changes. 

\index{KAudioPlayStream@{KAudio\-Play\-Stream}!noData@{noData}}
\index{noData@{noData}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Play\-Stream::no\-Data ()\hspace{0.3cm}{\tt  [signal]}}\label{classKAudioPlayStream_l2}


Is emitted if the inputbuffer runs dry and polling os off. 

\index{KAudioPlayStream@{KAudio\-Play\-Stream}!fillData@{fillData}}
\index{fillData@{fillData}!KAudioPlayStream@{KAudio\-Play\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Play\-Stream::fill\-Data (Arts::Data\-Packet$<$ Arts::mcopbyte $>$ $\ast$ {\em packet})}\label{classKAudioPlayStream_a6}


TODO: Implement a queue and fetching from it... 

Definition at line 154 of file kaudioplaystream.cpp.

References request\-Data().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kaudioplaystream.h\item 
kaudioplaystream.cpp\end{CompactItemize}
