class AudioClient

Audio Client. More...

Full nameCoral::AudioClient
Definition#include <audioclient.h>
InheritsCoral::AdjustableAudioQualityInterface [virtual public]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


Detailed Description

This class is an audio client.

AudioClient (AudioWriterInterface* audioOutput, const char* receiverName)

Constructor for a new audio client.

Parameters:
audioOutputAudioWriter to write the output to.
receiverNameString with the receiver name or NULL for default.

~AudioClient ()

Destructor.

bool play (const char* server, const char* mediaName)

Start playing given media from given server.

Parameters:
serverServer address (e.g. gaffel:7500).
mediaNameMedia name (e.g. ../AudioFiles/Test1.list)

Returns: true, if play request has been sent to server.

void change (const char* mediaName)

Change media of an established connection.

Parameters:
mediaNameNew media name (e.g. ../AudioFiles/Test2.list)

See also: play

void stop ()

Stop playing.

card64 getPosition ()

Get current media position. This will automatically the RestartPosition value in the next AudioClientAppPacket. The server will restart from the current position, if the server is restarted.

Returns: Position in nanoseconds.

inline card64 getMaxPosition ()
[const]

Get maximum media position.

Returns: Maximum position in nanoseconds.

card16 getSamplingRate ()
[const]

getSamplingRate() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getSamplingRate

Reimplemented from AudioQualityInterface

card8 getBits ()
[const]

getBits() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getBits

Reimplemented from AudioQualityInterface

card8 getChannels ()
[const]

getChannels() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getChannels

Reimplemented from AudioQualityInterface

card16 getByteOrder ()
[const]

getByteOrder() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getByteOrder

Reimplemented from AudioQualityInterface

cardinal getBytesPerSecond ()
[const]

getBytesPerSecond() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getBytesPerSecond

Reimplemented from AudioQualityInterface

cardinal getBitsPerSample ()
[const]

getBitsPerSample() Implementation of AudioQualityInterface.

See also: AudioQualityInterface#getBitsPerSample

Reimplemented from AudioQualityInterface

cardinal getRawBytesPerSecond ()

Get number of raw bytes (incl. IPv6/UDP/RTP/RTPAudio headers) per second.

Returns: Number of raw bytes per second.

TransportInfo getTransportInfo (const bool calculateLevels = true)

Get TransportInfo for current setting.

Parameters:
calculateLevelstrue to calculate all level constants; false otherwise.

Returns: TransportInfo.

MediaInfo getMediaInfo ()
[const]

Get MediaInfo.

Returns: MediaInfo.

inline card8 getErrorCode ()
[const]

Get error code.

Returns: Error code.

inline const char* getEncoding ()
[const]

Get encoding name.

Returns: Encoding name.

inline card32 getBandwidthLimit ()
[const]

Get bandwidth limit.

Returns: Bandwidth limit.

card8 getIPVersion ()
[const]

Get IP version.

Returns: IP Version.

inline bool playing ()
[const]

Check, if audio client is playing.

Returns: true, if client is playing; false otherwise.

String getServerAddressString (InternetAddress::PrintFormat format = InternetAddress::PF_Address)
[const]

Get server address string.

Parameters:
formatPrint format.

Returns: Server address.

See also: InternetAddress#PrintFormat

String getOurAddressString (InternetAddress::PrintFormat format = InternetAddress::PF_Address)
[const]

Get client address string.

Parameters:
formatPrint format.

Returns: Client address.

See also: InternetAddress#PrintFormat

inline cardinal getLayers ()
[const]

Get number of layers in last transmission.

inline card64 getBytesReceived (const cardinal layer = 0)
[const]

Get number of bytes received.

Parameters:
layerLayer number or (cardinal)-1 for sum of all layers.

Returns: Number of bytes received

inline card64 getPacketsReceived (const cardinal layer = 0)
[const]

Get number of packets received in given layer.

Parameters:
layerLayer number or (cardinal)-1 for sum of all layers.

Returns: Number of packets received

See also: getLayers

inline InternetFlow getInternetFlow (const cardinal layer = 0)
[const]

Get InternetFlow of last received packet in given layer.

Parameters:
layerLayer number.

Returns: InternetFlow.

See also: getLayers

inline card32 getFlowLabel (const cardinal layer = 0)
[const]

Get flow label of last received packet in given layer.

Parameters:
layerLayer number.

Returns: Flow label.

See also: getLayers

inline card8 getTrafficClass (const cardinal layer = 0)
[const]

Get traffic class of last received packet in given layer.

Parameters:
layerLayer number.

Returns: Traffic class.

See also: getLayers

card32 getServerSSRC (const cardinal layer = 0)
[const]

Get server SSRC for given layer.

Parameters:
layerLayer number.

Returns: Server SSRC.

See also: getLayers

inline card32 getOurSSRC ()
[const]

Get client SSRC.

Returns: Client SSRC.

card64 getPacketsLost (const cardinal layer = 0)
[const]

Get number of packets lost for given layer.

Parameters:
layerLayer number.

Returns: Number of packets lost.

See also: getLayers

double getFractionLost (const cardinal layer = 0)
[const]

Get fraction of packets lost for given layer.

Parameters:
layerLayer number.

Returns: Fraction of packets lost.

See also: getLayers

double getJitter (const cardinal layer = 0)
[const]

Get jitter for given layer.

Parameters:
layerLayer number.

Returns: Jitter.

See also: getLayers

const char* getEncodingName (const cardinal index)

Get encoding name for a given index of the client's decoder repository.

Parameters:
indexRepository index.

Returns: Encoding name or NULL, if index is too high.

inline void setPosition (const card64 position)

Set media position.

Parameters:
positionNew media position in nanoseconds.

void setPause (const bool on)

Set pause.

Parameters:
ontrue for pause on; false for pause off.

card16 setSamplingRate (const card16 rate)

Set audio sampling rate.

Parameters:
rateNew audio sampling rate.

Reimplemented from AdjustableAudioQualityInterface

card8 setChannels (const card8 channels)

Set number of audio channels

Parameters:
channelsNew number of audio channels.

Reimplemented from AdjustableAudioQualityInterface

card8 setBits (const card8 bits)

Set number of audio bits.

Parameters:
bitsNew number of audio bits.

Reimplemented from AdjustableAudioQualityInterface

card16 setByteOrder (const card16 byteOrder)

Set audio byte order.

Parameters:
rateNew audio byte order.

Reimplemented from AdjustableAudioQualityInterface

void setEncoding (const cardinal index)

Set encoding by index in client's decoder repository.

Parameters:
indexIndex in decoder repository.

inline void setBandwidthLimit (const card32 bandwidthLimit)

Set bandwidth limit.

Parameters:
bandwidthLimitBandwidth limit.