class CAVERN_audioStream_c

Audio streaming class

Public Fields

static const int OK
Status OK
static const int FAILED
Status FAILED
static const int VERBOSE
Verbose mode
static const int QUIET
No printout mode
static const int DEFAULT_PORT
Default port of server (11000).
static const int MAX_AUDIO_PORTS
Default max number of audio output ports (4).

Public Methods

int init (char* remHost, int remPort=CAVERN_audioStream_c::DEFAULT_PORT, int numAudioPorts = CAVERN_audioStream_c::MAX_AUDIO_PORTS)
Initialize the audio streaming tool
void process ()
Begin audio streaming.
void setVerbose (int verb)
Set verbose mode
void setThreshold (float thresh)
Set threshold to trigger audio streaming
~CAVERN_audioStream_c ()
Deleting the object stops the streaming.

Documentation

Audio streaming class. This class allows you to perform multi-way audio streaming. This tool assumes that you have set up a UDP reflector to deliver the audio stream to all participating clients. Use CAVERNnet_udpReflector_c to build one. Make sure that it is listening on port 11000 or whatever port you choose.

Also the assumption is that audio sampling is performed at 8K Hz. This class will automatically set the audio panel to those values. If you prefer to use a different rate use the apanel to adjust it. But you should adjust both audio in and out to the same frequency.

This class is also instrumented to show network utilization. To turn instrumentation on enter the following before running your program:

setenv CAVERN_AUDIO_PERFMON 5

The 5 here indicates that a report is generated every 5 seconds.

To turn off instrumentation use:

setenv CAVERN_AUDIO_PERFMON 0

NOTE: If you turn on instrumentation for 1 client you have to turn it on for all clients. This is because turning on instrumentation modifies the data stream. So the data stream for client with monitoring turned ON is not compatible with the stream for clients with monitoring turned OFF.

Also set the form of performance monitoring you wish to perform:

To log to a file set the environment variable CAVERN_AUDIO_PERFMON_LOG to the name of the file to save performance monitoring data to.

To log to a remote performance monitoring daemon, specify the hostname of the daemon in CAVERN_AUDIO_PERFMON_DAEMON.

The definitions of the performance monitoring logs are described in the general description of CAVERNsoft performance monitoring.

int init(char* remHost, int remPort=CAVERN_audioStream_c::DEFAULT_PORT, int numAudioPorts = CAVERN_audioStream_c::MAX_AUDIO_PORTS)
Initialize the audio streaming tool
Returns:
Either OK or FAILED.
Parameters:
remHost - hostname of remote UDP reflector.
remPort - port number that remote reflector is listening on.
numAudioPorts - determines the number of audio output ports to open. Choosing some number N means you can have N simultaneous voices heard together. The default is set at 4. The max depends on your SGI's audio hardware.

void setVerbose(int verb)
Set verbose mode. Perform this call either during the execution of the streaming or after the init() call.
Parameters:
verb - set to either CAVERN_audioStream_c::VERBOSE or QUIET. Default is QUIET.

void setThreshold(float thresh)
Set threshold to trigger audio streaming. The higher the number the higher the threshold.
Parameters:
thresh - threshold. Suitable default is 0.05.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de