\section{KAudio\-Record\-Stream Class Reference}
\label{classKAudioRecordStream}\index{KAudioRecordStream@{KAudioRecordStream}}
A {\bf KDE} wrapper around Synth\_\-AMAN\_\-RECORD/Audio\-To\-Byte\-Stream/Byte\-Sound\-Receiver.  


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

Inheritance diagram for KAudio\-Record\-Stream:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=74pt]{classKAudioRecordStream__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KAudio\-Record\-Stream:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=74pt]{classKAudioRecordStream__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf stop} ()
\item 
void {\bf start} (int sampling\-Rate, int bits, int channels)
\item 
void {\bf flush} ()
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf data} ({\bf QByte\-Array} \&data)
\item 
void {\bf running} (bool)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KAudio\-Record\-Stream} ({\bf KArts\-Server} $\ast$server, const {\bf QString} \&title, {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
int {\bf read} (char $\ast$, int size)
\item 
void {\bf set\-Blocking\-IO} (bool)
\item 
bool {\bf blocking\-IO} () const 
\item 
void {\bf use\-Polling} (bool)
\item 
bool {\bf polling} () const 
\item 
Arts::Stereo\-Effect\-Stack {\bf effect\-Stack} () const 
\item 
bool {\bf running} () const 
\end{CompactItemize}


\subsection{Detailed Description}
A {\bf KDE} wrapper around Synth\_\-AMAN\_\-RECORD/Audio\-To\-Byte\-Stream/Byte\-Sound\-Receiver. 

\begin{Desc}
\item[Author:]Matthias Kretz $<${\tt kretz@kde.org}$>$ \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}




Definition at line 41 of file kaudiorecordstream.h.

\subsection{Constructor \& Destructor Documentation}
\index{KAudioRecordStream@{KAudio\-Record\-Stream}!KAudioRecordStream@{KAudioRecordStream}}
\index{KAudioRecordStream@{KAudioRecordStream}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAudio\-Record\-Stream::KAudio\-Record\-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{classKAudioRecordStream_a0}


Construct a KAudio\-Record\-Stream. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]You probably want to pass the {\bf KArts\-Server}{\rm (p.\,\pageref{classKArtsServer})} as parent so that the stream will be deleted before the Arts server disappears\end{description}
\end{Desc}


Definition at line 57 of file kaudiorecordstream.cpp.

References QObject::connect(), and kd\-Fatal().

\subsection{Member Function Documentation}
\index{KAudioRecordStream@{KAudio\-Record\-Stream}!read@{read}}
\index{read@{read}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KAudio\-Record\-Stream::read (char $\ast$, int {\em size})}\label{classKAudioRecordStream_a2}


You can read {\tt size} number of bytes. 

If {\bf blocking\-IO()}{\rm (p.\,\pageref{classKAudioRecordStream_a4})} is set the method will return as soon as it has all your data and could possibly block your program. The method returns the number of bytes that are actually in the buffer.

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


Definition at line 96 of file kaudiorecordstream.cpp.

References data(), endl(), k\_\-funcinfo, and kd\-Debug().\index{KAudioRecordStream@{KAudio\-Record\-Stream}!setBlockingIO@{setBlockingIO}}
\index{setBlockingIO@{setBlockingIO}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Record\-Stream::set\-Blocking\-IO (bool)}\label{classKAudioRecordStream_a3}


If you set blocking\-IO to true the read method will wait until it has enough data to return exactly what you asked for. 

If blocking\-IO is false you can count on having control back to your program soon enough

Definition at line 127 of file kaudiorecordstream.cpp.\index{KAudioRecordStream@{KAudio\-Record\-Stream}!blockingIO@{blockingIO}}
\index{blockingIO@{blockingIO}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAudio\-Record\-Stream::blocking\-IO () const}\label{classKAudioRecordStream_a4}


read blocking I/O setting 

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


Definition at line 132 of file kaudiorecordstream.cpp.\index{KAudioRecordStream@{KAudio\-Record\-Stream}!usePolling@{usePolling}}
\index{usePolling@{usePolling}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Record\-Stream::use\-Polling (bool)}\label{classKAudioRecordStream_a5}


If you want to poll for data using {\bf read()}{\rm (p.\,\pageref{classKAudioRecordStream_a2})} set this to true. 

If you'd rather not poll use the {\bf data()}{\rm (p.\,\pageref{classKAudioRecordStream_l0})} signal for asynchronous I/O. If you set polling to true and don't call {\bf read()}{\rm (p.\,\pageref{classKAudioRecordStream_a2})} or {\bf flush()}{\rm (p.\,\pageref{classKAudioRecordStream_i2})} the inputbuffer will grow endlessly.

The default is false (if you want to use {\bf read()}{\rm (p.\,\pageref{classKAudioRecordStream_a2})} set this to true).

Definition at line 137 of file kaudiorecordstream.cpp.

References flush().\index{KAudioRecordStream@{KAudio\-Record\-Stream}!polling@{polling}}
\index{polling@{polling}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAudio\-Record\-Stream::polling () const}\label{classKAudioRecordStream_a6}


read whether polling is enabled 

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


Definition at line 144 of file kaudiorecordstream.cpp.\index{KAudioRecordStream@{KAudio\-Record\-Stream}!effectStack@{effectStack}}
\index{effectStack@{effectStack}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Arts::Stereo\-Effect\-Stack KAudio\-Record\-Stream::effect\-Stack () const}\label{classKAudioRecordStream_a7}


\begin{Desc}
\item[Returns:]The Effect Stack right after the Synth\_\-AMAN\_\-RECORD.\end{Desc}


Definition at line 149 of file kaudiorecordstream.cpp.\index{KAudioRecordStream@{KAudio\-Record\-Stream}!running@{running}}
\index{running@{running}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAudio\-Record\-Stream::running () const}\label{classKAudioRecordStream_a8}


\begin{Desc}
\item[Returns:]Wether it is running (recording) or not. \end{Desc}
\begin{Desc}
\item[Since:]3.2\end{Desc}


Definition at line 154 of file kaudiorecordstream.cpp.

Referenced by start(), and stop().\index{KAudioRecordStream@{KAudio\-Record\-Stream}!stop@{stop}}
\index{stop@{stop}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Record\-Stream::stop ()\hspace{0.3cm}{\tt  [slot]}}\label{classKAudioRecordStream_i0}


Detaches the stream from the soundserver but doesn't remove the Synth\_\-AMAN\_\-RECORD so that the entry in the Audiomanager remains. 



Definition at line 159 of file kaudiorecordstream.cpp.

References endl(), k\_\-funcinfo, kd\-Debug(), and running().\index{KAudioRecordStream@{KAudio\-Record\-Stream}!start@{start}}
\index{start@{start}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Record\-Stream::start (int {\em sampling\-Rate}, int {\em bits}, int {\em channels})\hspace{0.3cm}{\tt  [slot]}}\label{classKAudioRecordStream_i1}


Attach to the soundserver and start getting data to read. 

This method must be called as soon as you want to receive data. In any case you have to call {\bf start()}{\rm (p.\,\pageref{classKAudioRecordStream_i1})} before {\bf read()}{\rm (p.\,\pageref{classKAudioRecordStream_a2})}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sampling\-Rate}]The sampling rate the stream should be resampled to. Use a number between 500 and 2000000. \item[{\em bits}]The number of bits the stream should have. Only 8 and 16 Bits are supported. \item[{\em channels}]The number of channels (mono/stereo). Only 1 and 2 are supported.\end{description}
\end{Desc}


Definition at line 178 of file kaudiorecordstream.cpp.

References QObject::connect(), data(), endl(), k\_\-funcinfo, kd\-Debug(), kd\-Warning(), and running().\index{KAudioRecordStream@{KAudio\-Record\-Stream}!flush@{flush}}
\index{flush@{flush}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Record\-Stream::flush ()\hspace{0.3cm}{\tt  [slot]}}\label{classKAudioRecordStream_i2}


flush input buffer 



Definition at line 214 of file kaudiorecordstream.cpp.

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

Referenced by use\-Polling().\index{KAudioRecordStream@{KAudio\-Record\-Stream}!data@{data}}
\index{data@{data}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Record\-Stream::data ({\bf QByte\-Array} \& {\em data})\hspace{0.3cm}{\tt  [signal]}}\label{classKAudioRecordStream_l0}


Data from the a\-Rts server has arrived. 

You should copy the data because the passed {\bf QByte\-Array} will be deleted right after returning from your slot(s).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]the data from the server\end{description}
\end{Desc}


Referenced by read(), and start().\index{KAudioRecordStream@{KAudio\-Record\-Stream}!running@{running}}
\index{running@{running}!KAudioRecordStream@{KAudio\-Record\-Stream}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Record\-Stream::running (bool)\hspace{0.3cm}{\tt  [signal]}}\label{classKAudioRecordStream_l1}


Wether this Record\-Stream is recording or not. 

\begin{Desc}
\item[Since:]3.2\end{Desc}


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