MicrophoneServer Class Reference#include <MicrophoneServer.h>
Inheritance diagram for MicrophoneServer:
[legend]List of all members.
Detailed Description
Streams audio from the microphone over the network.
Definition at line 9 of file MicrophoneServer.h.
|
Public Member Functions |
virtual | ~MicrophoneServer () |
virtual void | DoStart () |
| By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
|
virtual void | DoStop () |
| By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).
|
virtual void | processEvent (const EventBase &event) |
| By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.
|
Static Public Member Functions |
static MicrophoneServer * | GetInstance () |
static bool | SetMicrophoneUnidirectional (bool unidirectional) |
static bool | SetMicrophoneAlcEnabled (bool enabled) |
Private Member Functions |
| MicrophoneServer () |
| MicrophoneServer (const MicrophoneServer &rhs) |
MicrophoneServer & | operator= (const MicrophoneServer &rhs) |
unsigned int | GetResampledFrameSize (unsigned int samplesSize, unsigned int newSampleRate, unsigned int newSampleBits, bool newStereo) |
unsigned int | ResampleFrame (const char *samples, unsigned int samplesSize, unsigned int &newSampleRate, unsigned int &newSampleBits, bool &newStereo, void *newSamples, unsigned int newSamplesSize) |
Static Private Member Functions |
template<class T> |
static void | encode (char **dst, const T &value) |
| writes value to dst and advances dst
|
template<class T> |
static void | encode (char **dst, const T *src, int num) |
| writes length bytes from src to dst
|
Private Attributes |
Socket * | socket |
Static Private Attributes |
static const unsigned int | SEND_BUFFER_SIZE = 2048 + 16 |
static MicrophoneServer * | instance = 0 |
static const char *const | MIC_LOCATOR = "PRM:/r1/c1/c2/c3/m1-Mic:M1" |
Constructor & Destructor Documentation
MicrophoneServer::MicrophoneServer |
( |
|
) |
[private] |
|
Member Function Documentation
void MicrophoneServer::DoStart |
( |
|
) |
[virtual] |
|
void MicrophoneServer::DoStop |
( |
|
) |
[virtual] |
|
|
By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).
Reimplemented from BehaviorBase.
Definition at line 49 of file MicrophoneServer.cc. |
template<class T> |
static void MicrophoneServer::encode |
( |
char ** |
dst, |
|
|
const T * |
src, |
|
|
int |
num |
|
) |
[inline, static, private] |
|
template<class T> |
static void MicrophoneServer::encode |
( |
char ** |
dst, |
|
|
const T & |
value |
|
) |
[inline, static, private] |
|
unsigned int MicrophoneServer::GetResampledFrameSize |
( |
unsigned int |
samplesSize, |
|
|
unsigned int |
newSampleRate, |
|
|
unsigned int |
newSampleBits, |
|
|
bool |
newStereo |
|
) |
[private] |
|
void MicrophoneServer::processEvent |
( |
const EventBase & |
event |
) |
[virtual] |
|
unsigned int MicrophoneServer::ResampleFrame |
( |
const char * |
samples, |
|
|
unsigned int |
samplesSize, |
|
|
unsigned int & |
newSampleRate, |
|
|
unsigned int & |
newSampleBits, |
|
|
bool & |
newStereo, |
|
|
void * |
newSamples, |
|
|
unsigned int |
newSamplesSize |
|
) |
[private] |
|
bool MicrophoneServer::SetMicrophoneAlcEnabled |
( |
bool |
enabled |
) |
[static] |
|
bool MicrophoneServer::SetMicrophoneUnidirectional |
( |
bool |
unidirectional |
) |
[static] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
|