#include <udpsound.h>
Collaboration diagram for UdpSoundChannel:

Public Member Functions | |
| UdpSoundChannel (MyOpalCall &myOpalCall, BOOL isSource) | |
| virtual | ~UdpSoundChannel () |
| virtual BOOL | Write (const void *buffer, PINDEX amount) |
| virtual BOOL | Read (void *buffer, PINDEX amount) |
| void | CreateSilence (void *buffer, PINDEX amount) |
| virtual BOOL | Close () |
| PINDEX | GetPortNumber () |
| virtual BOOL | IsOpen () const |
| virtual BOOL | Open (const PString &device, Directions dir, unsigned numChannels=1, unsigned sampleRate=8000, unsigned bitsPerSample=16) |
| virtual BOOL | SetFormat (unsigned, unsigned, unsigned) |
| virtual unsigned | GetChannels () const |
| Get the number of channels (mono/stereo) in the sound. | |
| virtual unsigned | GetSampleRate () const |
| Get the sample rate in samples per second. | |
| virtual unsigned | GetSampleSize () const |
| Get the sample size in bits per sample. | |
| virtual BOOL | SetBuffers (PINDEX size, PINDEX count=2) |
| virtual BOOL | GetBuffers (PINDEX &size, PINDEX &count) |
| virtual BOOL | SetVolume (unsigned) |
| virtual BOOL | GetVolume (unsigned &volume) |
| void | PrintOn (ostream &strm) const |
Protected Member Functions | |
| virtual int | overflow (int=EOF) |
| virtual int | sync () |
| virtual int | underflow () |
Protected Attributes | |
| MyOpalCall & | myOpalCall |
| PUDPSocket & | audioSocket |
| BOOL | isSource |
| AudioDelay | delay |
| PINDEX | bufSize |
| PINDEX | bufCount |
| PQueueChannel | readQueue |
| PBYTEArray | readBuffer |
|
||||||||||||
|
Constructor |
|
|
Destructor |
|
|
Close the socket down |
|
||||||||||||
|
Set the buffer to null, as we have no sound |
|
||||||||||||
|
Get the internal buffers for the sound channel I/O.
|
|
|
Get the port number used by the socket on this channel |
|
|
Get the volume of the play/read process. The volume range is 0 == quiet. 100 == LOUD.
|
|
|
Report if the UDPSocket used for comms is open |
|
||||||||||||||||||||||||
|
Open the sound device for use |
|
|
From the PChannelStreamBuffer ancestor |
|
|
Standard stream print function. The PObject class has a << operator defined that calls this function polymorphically.
|
|
||||||||||||
|
pull audio of the socket |
|
||||||||||||
|
Set the internal buffers for the sound channel I/O. Note that with Linux OSS, the size is always rounded up to the nearest power of two, so 20000 => 32768.
|
|
||||||||||||||||
|
Set the format for play/record. Note that linear PCM data is the only one supported at this time. Note that if the PlayFile() function is used, this may be overridden by information in the file being played.
|
|
|
Set the volume of the play/read process. The volume range is 0 == quiet. 100 == LOUD.
|
|
|
From the PChannelStreamBuffer ancestor |
|
|
From the PChannelStreamBuffer ancestor |
|
||||||||||||
|
Send audio from the connection to the socket |
|
|
Socket for handling UDP comms. of the audio data. |
|
|
Depth of the buffers |
|
|
Size of the buffers |
|
|
Interactive the delay |
|
|
Flag to say if we generate data, or receive data |
|
|
OpalCall structure responsible for managing this call |
|
|
A read buffer for incoming data |
|
|
an intermediate buffer to cope with the size of the network packet being larger than the size of the read array |
1.4.4