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

arts

Public Slots | Signals | Public Member Functions
KAudioPlayStream Class Reference

#include <kaudioplaystream.h>

Inheritance diagram for KAudioPlayStream:
TQObject

List of all members.

Public Slots

void start (int samplingRate, int bits, int channels)
void stop ()
void write (TQByteArray &data)

Signals

void requestData (TQByteArray &)
void running (bool)
void noData ()

Public Member Functions

 KAudioPlayStream (KArtsServer *server, const TQString title, TQObject *parent=0, const char *name=0)
 ~KAudioPlayStream ()
void setPolling (bool)
bool polling () const
bool running () const
Arts::StereoEffectStack effectStack () const
void fillData (Arts::DataPacket< Arts::mcopbyte > *packet)

Detailed Description

A wrapper around ByteSoundProducer/ByteStreamToAudio/Synth_AMAN_PLAY.

Author:
Arnold Krille <arnold@arnoldarts.de>
Since:
3.2

Definition at line 42 of file kaudioplaystream.h.


Constructor & Destructor Documentation

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

Creates a KAudioPlayStream on server with a title.

You should pass the KArtsServer also as parent to be sure this object is deleted before the server is.

Parameters:
serverThe server where it should play to.
titleThe title that is shown in the AudioManager.
parentYou will propably want to pass the server as parent to so this stream gets deleted before the server disappears.
nameThe name of the stream.

Definition at line 85 of file kaudioplaystream.cpp.

KAudioPlayStream::~KAudioPlayStream ( )

Destructs the KAudioPlayStream.

Definition at line 91 of file kaudioplaystream.cpp.


Member Function Documentation

Arts::StereoEffectStack KAudioPlayStream::effectStack ( ) const
Returns:
The Arts::StereoEffectStack right before the Synth_AMAN_PLAY.

Definition at line 101 of file kaudioplaystream.cpp.

void KAudioPlayStream::fillData ( Arts::DataPacket< Arts::mcopbyte > *  packet)

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

Definition at line 154 of file kaudioplaystream.cpp.

void KAudioPlayStream::noData ( ) [signal]

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

bool KAudioPlayStream::polling ( ) const

Returns the polling state.

See also:
setPolling

Definition at line 97 of file kaudioplaystream.cpp.

void KAudioPlayStream::requestData ( TQByteArray &  ) [signal]

This signal is emitted when audio should be played.

You have to fill the array with data.

bool KAudioPlayStream::running ( ) const
Returns:
wether this stream is running ("on air") or not.

Definition at line 99 of file kaudioplaystream.cpp.

void KAudioPlayStream::running ( bool  ) [signal]

Is emitted when the state changes.

void KAudioPlayStream::setPolling ( bool  n)

Controls wether this Stream should poll the data from you via the signal requestData() or you use write() to fill the inputbuffer.

Default is true

Definition at line 96 of file kaudioplaystream.cpp.

void KAudioPlayStream::start ( int  samplingRate,
int  bits,
int  channels 
) [slot]

Start the stream.

Parameters:
samplingRatehow many samples per second ( typically 11000/22050/44100/48000 )
bitshow many bits per sample ( 8 / 16 )
channelshow many channels ( 1 or 2 )

Definition at line 105 of file kaudioplaystream.cpp.

void KAudioPlayStream::stop ( ) [slot]

Stops the stream.

Definition at line 128 of file kaudioplaystream.cpp.

void KAudioPlayStream::write ( TQByteArray &  data) [slot]

Write data into the inputbuffer.

If you ignore the signal noData() it will play 0 ( silence ).

Definition at line 150 of file kaudioplaystream.cpp.


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

arts

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

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.7.6.1
This website is maintained by Timothy Pearson.