arts Library API Documentation

KAudioPlayStream Class Reference

A wrapper around ByteSoundProducer/ByteStreamToAudio/Synth_AMAN_PLAY. More...

#include <kaudioplaystream.h>

Inheritance diagram for KAudioPlayStream:

QObject List of all members.

Public Slots

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

Signals

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

Public Methods

 KAudioPlayStream (KArtsServer *server, const QString title, QObject *parent=0, const char *name=0)
 ~KAudioPlayStream ()
void setPolling (bool)
bool polling () const
bool running () const
Arts::StereoEffectStack effectStack () const

Detailed Description

A wrapper around ByteSoundProducer/ByteStreamToAudio/Synth_AMAN_PLAY.

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

Definition at line 40 of file kaudioplaystream.h.


Constructor & Destructor Documentation

KAudioPlayStream::KAudioPlayStream KArtsServer   server,
const QString    title,
QObject   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:
server  The server where it should play to.
title  The title that is shown in the AudioManager.
parent  You will propably want to pass the server as parent to so this stream gets deleted before the server disappears.

Definition at line 85 of file kaudioplaystream.cpp.

KAudioPlayStream::~KAudioPlayStream  
 

Destructs the KAudioPlayStream.

Definition at line 91 of file kaudioplaystream.cpp.


Member Function Documentation

void KAudioPlayStream::setPolling bool   
 

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

See also:
requestData() or you use , write() to fill the inputbuffer.
Default is true

Definition at line 96 of file kaudioplaystream.cpp.

bool KAudioPlayStream::polling  
 

Returns the polling state.

See also:
setPolling

Definition at line 97 of file kaudioplaystream.cpp.

bool KAudioPlayStream::running  
 

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

Definition at line 99 of file kaudioplaystream.cpp.

Referenced by start(), and stop().

Arts::StereoEffectStack KAudioPlayStream::effectStack  
 

Returns:
The Arts::StereoEffectStack right before the Synth_AMAN_PLAY.

Definition at line 101 of file kaudioplaystream.cpp.

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

Start the stream.

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

Definition at line 105 of file kaudioplaystream.cpp.

References running().

void KAudioPlayStream::stop   [slot]
 

Stops the stream.

Definition at line 128 of file kaudioplaystream.cpp.

References running().

void KAudioPlayStream::write QByteArray   data [slot]
 

Write data into the inputbuffer.

If you ignore the signal

See also:
noData() it will play 0 ( silence ).

Definition at line 150 of file kaudioplaystream.cpp.

void KAudioPlayStream::requestData QByteArray   [signal]
 

This signal is emitted when audio should be played.

You have to fill the array with data.

void KAudioPlayStream::running bool    [signal]
 

Is emitted when the state changes.

void KAudioPlayStream::noData   [signal]
 

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


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for arts Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 22 14:24:30 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003