|
|
This class is an audio client.
AudioClient (AudioWriterInterface* audioOutput, const char* receiverName) |
Constructor for a new audio client.
Parameters:
audioOutput | AudioWriter to write the output to. |
receiverName | String 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:
server | Server address (e.g. gaffel:7500). |
mediaName | Media 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:
mediaName | New 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 () |
Get maximum media position.
Returns: Maximum position in nanoseconds.
card16 getSamplingRate () |
getSamplingRate() Implementation of AudioQualityInterface.
See also: AudioQualityInterface#getSamplingRate
Reimplemented from AudioQualityInterface
card8 getBits () |
getBits() Implementation of AudioQualityInterface.
See also: AudioQualityInterface#getBits
Reimplemented from AudioQualityInterface
card8 getChannels () |
getChannels() Implementation of AudioQualityInterface.
See also: AudioQualityInterface#getChannels
Reimplemented from AudioQualityInterface
card16 getByteOrder () |
getByteOrder() Implementation of AudioQualityInterface.
See also: AudioQualityInterface#getByteOrder
Reimplemented from AudioQualityInterface
cardinal getBytesPerSecond () |
getBytesPerSecond() Implementation of AudioQualityInterface.
See also: AudioQualityInterface#getBytesPerSecond
Reimplemented from AudioQualityInterface
cardinal getBitsPerSample () |
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:
calculateLevels | true to calculate all level constants; false otherwise. |
Returns: TransportInfo.
MediaInfo getMediaInfo () |
Get MediaInfo.
Returns: MediaInfo.
inline card8 getErrorCode () |
Get error code.
Returns: Error code.
inline const char* getEncoding () |
Get encoding name.
Returns: Encoding name.
inline card32 getBandwidthLimit () |
Get bandwidth limit.
Returns: Bandwidth limit.
card8 getIPVersion () |
Get IP version.
Returns: IP Version.
inline bool playing () |
Check, if audio client is playing.
Returns: true, if client is playing; false otherwise.
String getServerAddressString (InternetAddress::PrintFormat format = InternetAddress::PF_Address) |
Get server address string.
Parameters:
format | Print format. |
Returns: Server address.
See also: InternetAddress#PrintFormat
String getOurAddressString (InternetAddress::PrintFormat format = InternetAddress::PF_Address) |
Get client address string.
Parameters:
format | Print format. |
Returns: Client address.
See also: InternetAddress#PrintFormat
inline cardinal getLayers () |
Get number of layers in last transmission.
inline card64 getBytesReceived (const cardinal layer = 0) |
Get number of bytes received.
Parameters:
layer | Layer number or (cardinal)-1 for sum of all layers. |
Returns: Number of bytes received
inline card64 getPacketsReceived (const cardinal layer = 0) |
Get number of packets received in given layer.
Parameters:
layer | Layer number or (cardinal)-1 for sum of all layers. |
Returns: Number of packets received
See also: getLayers
inline InternetFlow getInternetFlow (const cardinal layer = 0) |
Get InternetFlow of last received packet in given layer.
Parameters:
layer | Layer number. |
Returns: InternetFlow.
See also: getLayers
inline card32 getFlowLabel (const cardinal layer = 0) |
Get flow label of last received packet in given layer.
Parameters:
layer | Layer number. |
Returns: Flow label.
See also: getLayers
inline card8 getTrafficClass (const cardinal layer = 0) |
Get traffic class of last received packet in given layer.
Parameters:
layer | Layer number. |
Returns: Traffic class.
See also: getLayers
card32 getServerSSRC (const cardinal layer = 0) |
Get server SSRC for given layer.
Parameters:
layer | Layer number. |
Returns: Server SSRC.
See also: getLayers
inline card32 getOurSSRC () |
Get client SSRC.
Returns: Client SSRC.
card64 getPacketsLost (const cardinal layer = 0) |
Get number of packets lost for given layer.
Parameters:
layer | Layer number. |
Returns: Number of packets lost.
See also: getLayers
double getFractionLost (const cardinal layer = 0) |
Get fraction of packets lost for given layer.
Parameters:
layer | Layer number. |
Returns: Fraction of packets lost.
See also: getLayers
double getJitter (const cardinal layer = 0) |
Get jitter for given layer.
Parameters:
layer | Layer 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:
index | Repository index. |
Returns: Encoding name or NULL, if index is too high.
inline void setPosition (const card64 position) |
Set media position.
Parameters:
position | New media position in nanoseconds. |
void setPause (const bool on) |
Set pause.
Parameters:
on | true for pause on; false for pause off. |
card16 setSamplingRate (const card16 rate) |
Set audio sampling rate.
Parameters:
rate | New audio sampling rate. |
Reimplemented from AdjustableAudioQualityInterface
card8 setChannels (const card8 channels) |
Set number of audio channels
Parameters:
channels | New number of audio channels. |
Reimplemented from AdjustableAudioQualityInterface
card8 setBits (const card8 bits) |
Set number of audio bits.
Parameters:
bits | New number of audio bits. |
Reimplemented from AdjustableAudioQualityInterface
card16 setByteOrder (const card16 byteOrder) |
Set audio byte order.
Parameters:
rate | New audio byte order. |
Reimplemented from AdjustableAudioQualityInterface
void setEncoding (const cardinal index) |
Set encoding by index in client's decoder repository.
Parameters:
index | Index in decoder repository. |
inline void setBandwidthLimit (const card32 bandwidthLimit) |
Set bandwidth limit.
Parameters:
bandwidthLimit | Bandwidth limit. |