SpeakerServer Class Reference#include <SpeakerServer.h>
Inheritance diagram for SpeakerServer:
[legend]List of all members.
Detailed Description
Plays streamed audio via the speaker.
Definition at line 9 of file SpeakerServer.h.
|
Public Member Functions |
virtual | ~SpeakerServer () |
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 ).
|
Static Public Member Functions |
SpeakerServer * | GetInstance () |
int | socket_callback (char *buf, int size) |
Private Member Functions |
| SpeakerServer () |
| SpeakerServer (const SpeakerServer &rhs) |
SpeakerServer & | operator= (const SpeakerServer &rhs) |
int | GotSocketData (char *data, int dataSize) |
void | AddPacket (const void *samples, int samplesSize, int sampleRate, byte sampleBits) |
const void * | ResampleForSpeaker (const void *samples, int samplesSize, int sampleRate, byte bitsPerSample, int &newSamplesSize) |
void | QueueFrame (const char *samples, int samplesSize) |
Static Private Member Functions |
short | GetShort (const void *buf) |
Private Attributes |
Socket * | socket |
Packet | packet |
Buffer * | frame |
Buffer * | resampled |
SoundManager::Play_ID | channel |
Static Private Attributes |
SpeakerServer * | instance = 0 |
const int | MAX_PACKET_SIZE = 1024 * 1024 |
const int | RECEIVE_BUFFER_SIZE = 2048 |
Constructor & Destructor Documentation
SpeakerServer::SpeakerServer |
( |
|
) |
[private] |
|
SpeakerServer::SpeakerServer |
( |
const SpeakerServer & |
rhs |
) |
[private] |
|
Member Function Documentation
void SpeakerServer::AddPacket |
( |
const void * |
samples, |
|
|
int |
samplesSize, |
|
|
int |
sampleRate, |
|
|
byte |
sampleBits |
|
) |
[private] |
|
void SpeakerServer::DoStart |
( |
|
) |
[virtual] |
|
void SpeakerServer::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 54 of file SpeakerServer.cc. |
short SpeakerServer::GetShort |
( |
const void * |
buf |
) |
[inline, static, private] |
|
int SpeakerServer::GotSocketData |
( |
char * |
data, |
|
|
int |
dataSize |
|
) |
[private] |
|
void SpeakerServer::QueueFrame |
( |
const char * |
samples, |
|
|
int |
samplesSize |
|
) |
[private] |
|
const void * SpeakerServer::ResampleForSpeaker |
( |
const void * |
samples, |
|
|
int |
samplesSize, |
|
|
int |
sampleRate, |
|
|
byte |
bitsPerSample, |
|
|
int & |
newSamplesSize |
|
) |
[private] |
|
int SpeakerServer::socket_callback |
( |
char * |
buf, |
|
|
int |
size |
|
) |
[static] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
|