#include <RakVoiceInterface.h>
Inheritance diagram for RakVoiceInterface:
Public Member Functions | |
virtual | ~RakVoiceInterface () |
Destructor. | |
virtual void | Init (int samplingRate, int bitsPerSample, RakPeerInterface *_peer)=0 |
virtual int | GetFrameSize (void) const =0 |
virtual void | Disconnect (PlayerID id)=0 |
virtual void | SetBlockSize (int _blockSize)=0 |
virtual void | Deinit (void)=0 |
Frees all memory used. Call this before shutting down. | |
virtual void | EncodeSoundPacket (char *input, PlayerID recipient)=0 |
virtual void | DecodeAndQueueSoundPacket (char *data, int length)=0 |
virtual bool | GetSoundPacket (char *output, PlayerID *sender)=0 |
virtual int | GetNextSoundPacketSize (void)=0 |
virtual int | GetOutputBufferSize (void)=0 |
Users should only use the function provided by this interface while using the RakVoice Subsystem.
|
When you get a packet with the type ID_VOICE_PACKET, pass the packet data and length to this function. This function will decode the data and put it in the internal queue, or simply relay the data if this is the server and the target is not the server
Implemented in RakVoice. |
|
Whenever a player disconnects RakVoice needs to know about it. Otherwise we will be using old values for our encoding.
Implemented in RakVoice. |
|
Pass your raw sound data to this function. This function will encode and send in another thread the data as a packet Because of the way encoding works, you cannot broadcast voice data.
Implemented in RakVoice. |
|
Implemented in RakVoice. |
|
Returns the size, in bytes, of the next sound packet, or 0 for nothing left
Implemented in RakVoice. |
|
This will tell you the total number of bytes waiting to be copied out via the function DecodeAndQueueSoundPacket()
Implemented in RakVoice. |
|
This will get the next sound packet and copy it to output. By sound packet, I mean decompressed sound data, not network datagram
Implemented in RakVoice. |
|
Call this first.
Implemented in RakVoice. |
|
Sets the block size that EncodeSoundPacket will read and GetSoundPacket will write. If you don't call this, it will default to GetFrameSize(). It is reset every call to Init.
Implemented in RakVoice. |