| 6 |
| #define LIBTGVOIP_RESAMPLER_H |
| 7 |
| 8 | #include <cstdint> |
| 9 | #include <cstddef> |
| 10 |
| 11 | namespace tgvoip |
| 12 | { |
| 13 |
| 14 | namespace audio |
| 15 | { |
| 16 |
| 17 | class Resampler |
| 18 | { |
| 19 | public: |
| 20 | static std::size_t Convert48To44(const std::int16_t* from, std::int16_t* to, std::size_t fromLen, std::size_t toLen); |
| 21 | static std::size_t Convert44To48(const std::int16_t* from, std::int16_t* to, std::size_t fromLen, std::size_t toLen); |
| 22 | static std::size_t Convert(const std::int16_t* from, std::int16_t* to, std::size_t fromLen, std::size_t toLen, std::size_t num, std::size_t denom); |
| 23 | static void Rescale60To80(const std::int16_t* in, std::int16_t* out); |
| 24 | static void Rescale60To40(const std::int16_t* in, std::int16_t* out); |
| 25 | }; |
| 26 |
| 27 | } // namespace audio |
| 28 |
| 29 | } // namespace tgvoip |
| 30 |
| 31 | #endif // LIBTGVOIP_RESAMPLER_H |
| 32 |