.TH "KAudioRecordStream" kde3 "11 Jun 2005" "Version Version 3.4.1" "arts Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KAudioRecordStream \- A \fBKDE\fP wrapper around Synth_AMAN_RECORD/AudioToByteStream/ByteSoundReceiver.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kaudiorecordstream.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBstop\fP ()"
.br
.ti -1c
.RI "void \fBstart\fP (int samplingRate, int bits, int channels)"
.br
.ti -1c
.RI "void \fBflush\fP ()"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBdata\fP (\fBQByteArray\fP &data)"
.br
.ti -1c
.RI "void \fBrunning\fP (bool)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKAudioRecordStream\fP (\fBKArtsServer\fP *server, const \fBQString\fP &title, \fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "int \fBread\fP (char *, int size)"
.br
.ti -1c
.RI "void \fBsetBlockingIO\fP (bool)"
.br
.ti -1c
.RI "bool \fBblockingIO\fP () const "
.br
.ti -1c
.RI "void \fBusePolling\fP (bool)"
.br
.ti -1c
.RI "bool \fBpolling\fP () const "
.br
.ti -1c
.RI "Arts::StereoEffectStack \fBeffectStack\fP () const "
.br
.ti -1c
.RI "bool \fBrunning\fP () const "
.br
.in -1c
.SH "Detailed Description"
.PP 
A \fBKDE\fP wrapper around Synth_AMAN_RECORD/AudioToByteStream/ByteSoundReceiver. 

\fBAuthor:\fP
.RS 4
Matthias Kretz <kretz@kde.org> 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 41 of file kaudiorecordstream.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KAudioRecordStream::KAudioRecordStream (\fBKArtsServer\fP * server, const \fBQString\fP & title, \fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Construct a KAudioRecordStream. 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP You probably want to pass the \fBKArtsServer\fP as parent so that the stream will be deleted before the Arts server disappears
.RE
.PP

.PP
Definition at line 57 of file kaudiorecordstream.cpp.
.PP
References QObject::connect(), and kdFatal().
.SH "Member Function Documentation"
.PP 
.SS "int KAudioRecordStream::read (char *, int size)"
.PP
You can read \fCsize\fP number of bytes. 
.PP
If \fBblockingIO()\fP 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.
.PP
\fBSee also:\fP
.RS 4
\fBusePolling()\fP
.RE
.PP

.PP
Definition at line 96 of file kaudiorecordstream.cpp.
.PP
References data(), endl(), k_funcinfo, and kdDebug().
.SS "void KAudioRecordStream::setBlockingIO (bool)"
.PP
If you set blockingIO to true the read method will wait until it has enough data to return exactly what you asked for. 
.PP
If blockingIO is false you can count on having control back to your program soon enough
.PP
Definition at line 127 of file kaudiorecordstream.cpp.
.SS "bool KAudioRecordStream::blockingIO () const"
.PP
read blocking I/O setting 
.PP
\fBSee also:\fP
.RS 4
\fBsetBlockingIO()\fP
.RE
.PP

.PP
Definition at line 132 of file kaudiorecordstream.cpp.
.SS "void KAudioRecordStream::usePolling (bool)"
.PP
If you want to poll for data using \fBread()\fP set this to true. 
.PP
If you'd rather not poll use the \fBdata()\fP signal for asynchronous I/O. If you set polling to true and don't call \fBread()\fP or \fBflush()\fP the inputbuffer will grow endlessly.
.PP
The default is false (if you want to use \fBread()\fP set this to true).
.PP
Definition at line 137 of file kaudiorecordstream.cpp.
.PP
References flush().
.SS "bool KAudioRecordStream::polling () const"
.PP
read whether polling is enabled 
.PP
\fBSee also:\fP
.RS 4
\fBusePolling()\fP
.RE
.PP

.PP
Definition at line 144 of file kaudiorecordstream.cpp.
.SS "Arts::StereoEffectStack KAudioRecordStream::effectStack () const"
.PP
\fBReturns:\fP
.RS 4
The Effect Stack right after the Synth_AMAN_RECORD.
.RE
.PP

.PP
Definition at line 149 of file kaudiorecordstream.cpp.
.SS "bool KAudioRecordStream::running () const"
.PP
\fBReturns:\fP
.RS 4
Wether it is running (recording) or not. 
.RE
.PP
\fBSince:\fP
.RS 4
3.2
.RE
.PP

.PP
Definition at line 154 of file kaudiorecordstream.cpp.
.PP
Referenced by start(), and stop().
.SS "void KAudioRecordStream::stop ()\fC [slot]\fP"
.PP
Detaches the stream from the soundserver but doesn't remove the Synth_AMAN_RECORD so that the entry in the Audiomanager remains. 
.PP

.PP
Definition at line 159 of file kaudiorecordstream.cpp.
.PP
References endl(), k_funcinfo, kdDebug(), and running().
.SS "void KAudioRecordStream::start (int samplingRate, int bits, int channels)\fC [slot]\fP"
.PP
Attach to the soundserver and start getting data to read. 
.PP
This method must be called as soon as you want to receive data. In any case you have to call \fBstart()\fP before \fBread()\fP
.PP
\fBParameters:\fP
.RS 4
\fIsamplingRate\fP The sampling rate the stream should be resampled to. Use a number between 500 and 2000000. 
.br
\fIbits\fP The number of bits the stream should have. Only 8 and 16 Bits are supported. 
.br
\fIchannels\fP The number of channels (mono/stereo). Only 1 and 2 are supported.
.RE
.PP

.PP
Definition at line 178 of file kaudiorecordstream.cpp.
.PP
References QObject::connect(), data(), endl(), k_funcinfo, kdDebug(), kdWarning(), and running().
.SS "void KAudioRecordStream::flush ()\fC [slot]\fP"
.PP
flush input buffer 
.PP
Definition at line 214 of file kaudiorecordstream.cpp.
.PP
References endl(), k_funcinfo, and kdDebug().
.PP
Referenced by usePolling().
.SS "void KAudioRecordStream::data (\fBQByteArray\fP & data)\fC [signal]\fP"
.PP
Data from the aRts server has arrived. 
.PP
You should copy the data because the passed \fBQByteArray\fP will be deleted right after returning from your slot(s).
.PP
\fBParameters:\fP
.RS 4
\fIdata\fP the data from the server
.RE
.PP

.PP
Referenced by read(), and start().
.SS "void KAudioRecordStream::running (bool)\fC [signal]\fP"
.PP
Wether this RecordStream is recording or not. 
.PP
\fBSince:\fP
.RS 4
3.2
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for arts Library from the source code.
