Source: audioqualityinterface.h
|
|
|
|
// ##########################################################################
// #### ####
// #### RTP Audio Server Project ####
// #### ============================ ####
// #### ####
// #### Audio Quality Interface ####
// #### ####
// #### Version 1.00 -- February 23, 2001 ####
// #### ####
// #### Copyright (C) 1999 Thomas Dreibholz ####
// #### 2000 Universität Bonn, Abt. IV ####
// #### 2001 EMail: Dreibholz@bigfoot.com ####
// #### WWW: http://www.bigfoot.com/~dreibholz ####
// #### ####
// ##########################################################################
#ifndef AUDIOQUALITYINTERFACE_H
#define AUDIOQUALITYINTERFACE_H
#include "system.h"
namespace Coral {
/**
* This class is an interface for getting audio quality.
*
* @short Audio Quality Interface
* @author Thomas Dreibholz (Dreibholz@bigfoot.com)
* @version 1.0
*/
class AudioQualityInterface
{
// ====== Getting values =================================================
public:
/**
* Get sampling rate.
*
* @return Sampling rate.
*/
virtual card16 getSamplingRate() const = 0;
/**
* Get number of bits.
*
* @return Number of bits.
*/
virtual card8 getBits() const = 0;
/**
* Get number of channels.
*
* @return Number of channels.
*/
virtual card8 getChannels() const = 0;
/**
* Get byte order.
*
* @return Byte order: BIG_ENDIAN, LITTLE_ENDIAN.
*/
virtual card16 getByteOrder() const = 0;
// ====== Calculating bandwidth settings =================================
/**
* Get bytes per second.
*
* @return Bytes per second.
*/
virtual cardinal getBytesPerSecond() const = 0;
/**
* Get bits per sample.
*
* @return Bits per sample.
*/
virtual cardinal getBitsPerSample() const = 0;
// ====== Comparision operators ==========================================
/**
* Implementation of == operator.
*/
inline int operator==(const AudioQualityInterface& quality) const;
/**
* Implementation of != operator.
*/
inline int operator!=(const AudioQualityInterface& quality) const;
/**
* Implementation of <= operator.
* Note: This operator does not compare byte orders!
*/
inline int operator<=(const AudioQualityInterface& quality) const;
/**
* Implementation of < operator.
* Note: This operator does not compare byte orders!
*/
inline int operator<(const AudioQualityInterface& quality) const;
/**
* Implementation of >= operator.
* Note: This operator does not compare byte orders!
*/
inline int operator>=(const AudioQualityInterface& quality) const;
/**
* Implementation of > operator.
* Note: This operator does not compare byte orders!
*/
inline int operator>(const AudioQualityInterface& quality) const;
};
/**
* This class is an interface for getting and setting audio quality.
* It extends AudioQualityInterface with setting functions.
*
* @short Adjustable Audio Quality Interface
* @author Thomas Dreibholz (Dreibholz@bigfoot.com)
* @version 1.0
*/
class AdjustableAudioQualityInterface : virtual public AudioQualityInterface
{
public:
/**
* Set sampling rate.
*
* @param samplingRate New sampling rate.
* @return New sampling rate.
*/
virtual card16 setSamplingRate(const card16 samplingRate) = 0;
/**
* Set number of bits.
*
* @param samplingRate New number of bits.
* @return New number of bits.
*/
virtual card8 setBits(const card8 bits) = 0;
/**
* Set number of channels.
*
* @param samplingRate New number of channels.
* @return New number of channels.
*/
virtual card8 setChannels(const card8 channels) = 0;
/**
* Set byte order.
*
* @param byteOrder New byte order: BIG_ENDIAN, LITTLE_ENDIAN.
* @return New byte order.
*/
virtual card16 setByteOrder(const card16 byteOrder) = 0;
/**
* Set quality from AudioQualityInterface.
*
* @param quality AudioQualityInterface.
*/
inline void setQuality(const AudioQualityInterface& quality);
};
}
#include "audioqualityinterface.icc"
#endif
Generated by: viper@odin on Fri Feb 23 12:41:26 2001, using kdoc 2.0a36. |