|
Babel
1
The voip software that only works on your local network
|
Class responsible for managing audio compression and decompression. More...
#include <Manager.hpp>

Public Member Functions | |
| Manager () | |
| Default constructor. | |
| Manager (const Audio::Sample &sample) | |
| Constructor with an uncompressed audio sample. | |
| ~Manager () | |
| Destructor. | |
| void | compress () |
| Compress the uncompressed audio stream. | |
| void | encode (std::vector< float > &sound, std::vector< unsigned char > &output) |
| Encode raw audio data into compressed format. | |
| void | decode (std::vector< unsigned char > &sound, std::vector< float > &output) |
| Decode compressed audio data into raw format. | |
| void | decompress () |
| Decompress the compressed audio stream. | |
| void | setMaxPacketSize (const unsigned int maxPacketSize) |
| Set the maximum packet size for compression. | |
| const unsigned int | getMaxPacketSize () const |
| Get the maximum packet size for compression. | |
| void | setCompressedStream (const Compressor::Packet &data) |
| Set the compressed audio stream. | |
| const Compressor::Packet & | getCompressedStream () const |
| Get the compressed audio stream. | |
| void | setUncompressedStream (const Audio::Sample &data) |
| Set the uncompressed audio stream. | |
| const Audio::Sample & | getUncompressedStream () const |
| Get the uncompressed audio stream. | |
Class responsible for managing audio compression and decompression.
Definition at line 32 of file Manager.hpp.
| Compressor::Manager::Manager | ( | ) |
Default constructor.
Definition at line 15 of file Manager.cpp.
| Compressor::Manager::Manager | ( | const Audio::Sample & | sample | ) |
Constructor with an uncompressed audio sample.
| sample | The uncompressed audio sample. |
Definition at line 45 of file Manager.cpp.
| Compressor::Manager::~Manager | ( | ) |
Destructor.
Definition at line 84 of file Manager.cpp.
| void Compressor::Manager::compress | ( | ) |
Compress the uncompressed audio stream.
Compresses the audio stream.
Definition at line 127 of file Manager.cpp.
| void Compressor::Manager::decode | ( | std::vector< unsigned char > & | sound, |
| std::vector< float > & | output ) |
Decode compressed audio data into raw format.
Decodes the audio data.
| sound | Vector containing the compressed audio data. |
| output | Vector to store the raw audio data. |
| sound | The input encoded audio data. |
| output | The decoded audio data. |
Definition at line 348 of file Manager.cpp.
| void Compressor::Manager::decompress | ( | ) |
Decompress the compressed audio stream.
Decompresses the audio stream.
Definition at line 181 of file Manager.cpp.
| void Compressor::Manager::encode | ( | std::vector< float > & | sound, |
| std::vector< unsigned char > & | output ) |
Encode raw audio data into compressed format.
Encodes the audio data.
| sound | Vector containing the raw audio data. |
| output | Vector to store the compressed audio data. |
| sound | The input audio data. |
| output | The encoded audio data. |
Definition at line 286 of file Manager.cpp.
| const Compressor::Packet & Compressor::Manager::getCompressedStream | ( | ) | const |
Get the compressed audio stream.
Gets the compressed audio stream.
Definition at line 214 of file Manager.cpp.
| const unsigned int Compressor::Manager::getMaxPacketSize | ( | ) | const |
Get the maximum packet size for compression.
Gets the maximum packet size for compression.
Definition at line 118 of file Manager.cpp.
| const Audio::Sample & Compressor::Manager::getUncompressedStream | ( | ) | const |
Get the uncompressed audio stream.
Gets the uncompressed audio stream.
Definition at line 245 of file Manager.cpp.
| void Compressor::Manager::setCompressedStream | ( | const Compressor::Packet & | data | ) |
Set the compressed audio stream.
Sets the compressed audio stream.
| data | The compressed audio packet. |
| data | The compressed audio stream. |
Definition at line 231 of file Manager.cpp.
| void Compressor::Manager::setMaxPacketSize | ( | const unsigned int | maxPacketSize | ) |
Set the maximum packet size for compression.
Sets the maximum packet size for compression.
| maxPacketSize | The maximum packet size. |
Definition at line 106 of file Manager.cpp.
| void Compressor::Manager::setUncompressedStream | ( | const Audio::Sample & | data | ) |
Set the uncompressed audio stream.
Sets the uncompressed audio stream.
| data | The uncompressed audio sample. |
| data | The uncompressed audio stream. |
Definition at line 262 of file Manager.cpp.