Source: multiaudiowriter.h
|
|
|
|
// ##########################################################################
// #### ####
// #### RTP Audio Server Project ####
// #### ============================ ####
// #### ####
// #### Multi Audio Writer ####
// #### ####
// #### Version 1.00 -- February 04, 2001 ####
// #### ####
// #### Copyright (C) 1999 Thomas Dreibholz ####
// #### 2000 Universität Bonn, Abt. IV ####
// #### 2001 EMail: Dreibholz@bigfoot.com ####
// #### WWW: http://www.bigfoot.com/~dreibholz ####
// #### ####
// ##########################################################################
#ifndef MULTIAUDIOWRITER_H
#define MULTIAUDIOWRITER_H
#include "system.h"
#include "audiowriterinterface.h"
#include "synchronizable.h"
#include <multiset.h>
#include <algo.h>
namespace Coral {
/**
* This class implements AudioWriterInterface for a set of AudioWriterInterfaces.
* Example: AudioDevice + AudioDebug + SpectrumAnalyzer.
*
* @short Multi Audio Writer
* @author Thomas Dreibholz (Dreibholz@bigfoot.com)
* @version 1.0
*/
class MultiAudioWriter : virtual public AudioWriterInterface,
public Synchronizable
{
// ====== Constructor/Destructor =========================================
public:
/**
* Constructor.
*/
MultiAudioWriter();
/**
* Destructor.
*/
~MultiAudioWriter();
// ====== MultiAudioWriter functions =====================================
/**
* Add new AudioWriterInferface to writer set.
*
* @param writer AudioWriterInterface object.
* @return true, if writer has been added; false otherwise.
*/
bool addWriter(AudioWriterInterface* writer);
/**
* Remove AudioWriterInterface object from writer set.
*/
void removeWriter(AudioWriterInterface* writer);
// ====== AudioQualityInterface implementation ===========================
/**
* getSamplingRate() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#getSamplingRate
*/
card16 getSamplingRate() const;
/**
* getBits() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#getBits
*/
card8 getBits() const;
/**
* getChannels() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#getChannels
*/
card8 getChannels() const;
/**
* getByteOrder() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#getByteOrder
*/
card16 getByteOrder() const;
/**
* setSamplingRate() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#setSamplingRate
*/
card16 setSamplingRate(const card16 samplingRate);
/**
* setBits() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#setBits
*/
card8 setBits(const card8 bits);
/**
* setChannels() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#setChannels
*/
card8 setChannels(const card8 channels);
/**
* setByteOrder() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#setByteOrder
*/
card16 setByteOrder(const card16 byteOrder);
/**
* getBytesPerSecond() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#getBytesPerSecond
*/
cardinal getBytesPerSecond() const;
/**
* getBitsPerSample() Implementation of AudioQualityInterface.
*
* @see AudioQualityInterface#getBitsPerSample
*/
cardinal getBitsPerSample() const;
// ====== AudioInterface implementation ==================================
/**
* ready() implementation of AudioWriterInterface
*
* @see AudioWriterInterface#ready
*/
bool ready() const;
/**
* sync() implementation of AudioWriterInterface
*
* @see AudioWriterInterface#sync
*/
void sync();
/**
* write() implementation of AudioWriterInterface
*
* @see AudioWriterInterface#write
*/
bool write(const void* data, const size_t length);
// ====== Internal data ==================================================
private:
multiset<AudioWriterInterface*> WriterSet;
card16 AudioSamplingRate;
card8 AudioBits;
card8 AudioChannels;
card16 AudioByteOrder;
};
}
#endif
Generated by: viper@odin on Sun Feb 4 18:54:51 2001, using kdoc 2.0a22. |