• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • arts
 

arts

Public Slots | Signals | Public Member Functions | List of all members
KAudioRecordStream Class Reference

#include <kaudiorecordstream.h>

Inherits TQObject.

Public Slots

void stop ()
 
void start (int samplingRate, int bits, int channels)
 
void flush ()
 

Signals

void data (TQByteArray &data)
 
void running (bool)
 

Public Member Functions

 KAudioRecordStream (KArtsServer *server, const TQString &title, TQObject *parent=0, const char *name=0)
 
int read (char *, int size)
 
void setBlockingIO (bool)
 
bool blockingIO () const
 
void usePolling (bool)
 
bool polling () const
 
Arts::StereoEffectStack effectStack () const
 
bool running () const
 

Detailed Description

A KDE wrapper around Synth_AMAN_RECORD/AudioToByteStream/ByteSoundReceiver.

Author
Matthias Kretz kretz.nosp@m.@kde.nosp@m..org
Since
3.2

Definition at line 41 of file kaudiorecordstream.h.

Constructor & Destructor Documentation

◆ KAudioRecordStream()

KAudioRecordStream::KAudioRecordStream ( KArtsServer *  server,
const TQString &  title,
TQObject *  parent = 0,
const char *  name = 0 
)

Construct a KAudioRecordStream.

    @param server The server where it should record from.
    @param title The title that is shown in the AudioManager.
    @param parent You will propably want to pass the server as parent to so this stream gets deleted before the server disappears.
    @param name The name of the stream.

Definition at line 57 of file kaudiorecordstream.cpp.

◆ ~KAudioRecordStream()

KAudioRecordStream::~KAudioRecordStream ( )

Definition at line 87 of file kaudiorecordstream.cpp.

Member Function Documentation

◆ blockingIO()

bool KAudioRecordStream::blockingIO ( ) const

read blocking I/O setting

See also
setBlockingIO()

Definition at line 132 of file kaudiorecordstream.cpp.

◆ data

void KAudioRecordStream::data ( TQByteArray &  data)
signal

Data from the aRts server has arrived.

You should copy the data because the passed TQByteArray will be deleted right after returning from your slot(s).

Parameters
datathe data from the server

◆ effectStack()

Arts::StereoEffectStack KAudioRecordStream::effectStack ( ) const
Returns
The Effect Stack right after the Synth_AMAN_RECORD.

Definition at line 149 of file kaudiorecordstream.cpp.

◆ flush

void KAudioRecordStream::flush ( )
slot

flush input buffer

Definition at line 214 of file kaudiorecordstream.cpp.

◆ polling()

bool KAudioRecordStream::polling ( ) const

read whether polling is enabled

See also
usePolling()

Definition at line 144 of file kaudiorecordstream.cpp.

◆ read()

int KAudioRecordStream::read ( char *  buffer,
int  size 
)

You can read size number of bytes.

If blockingIO() 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.

See also
usePolling()

Definition at line 96 of file kaudiorecordstream.cpp.

◆ running() [1/2]

bool KAudioRecordStream::running ( ) const
Returns
Wether it is running (recording) or not.
Since
3.2

Definition at line 154 of file kaudiorecordstream.cpp.

◆ running [2/2]

void KAudioRecordStream::running ( bool  )
signal

Wether this RecordStream is recording or not.

Since
3.2

◆ setBlockingIO()

void KAudioRecordStream::setBlockingIO ( bool  blocking)

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

If blockingIO is false you can count on having control back to your program soon enough

Definition at line 127 of file kaudiorecordstream.cpp.

◆ start

void KAudioRecordStream::start ( int  samplingRate,
int  bits,
int  channels 
)
slot

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 start() before read()

Parameters
samplingRateThe sampling rate the stream should be resampled to. Use a number between 500 and 2000000.
bitsThe number of bits the stream should have. Only 8 and 16 Bits are supported.
channelsThe number of channels (mono/stereo). Only 1 and 2 are supported.

Definition at line 178 of file kaudiorecordstream.cpp.

◆ stop

void KAudioRecordStream::stop ( )
slot

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.

◆ usePolling()

void KAudioRecordStream::usePolling ( bool  polling)

If you want to poll for data using read() set this to true.

If you'd rather not poll use the data() signal for asynchronous I/O. If you set polling to true and don't call read() or flush() the inputbuffer will grow endlessly.

The default is false (if you want to use read() set this to true).

Definition at line 137 of file kaudiorecordstream.cpp.


The documentation for this class was generated from the following files:
  • kaudiorecordstream.h
  • kaudiorecordstream.cpp

arts

Skip menu "arts"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

arts

Skip menu "arts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for arts by doxygen 1.9.4
This website is maintained by Timothy Pearson.