2017-04-09 18:14:33 +02:00
|
|
|
//
|
|
|
|
// Created by Grishka on 01.04.17.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef LIBTGVOIP_RESAMPLER_H
|
|
|
|
#define LIBTGVOIP_RESAMPLER_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-03-05 13:31:57 +01:00
|
|
|
namespace tgvoip {
|
|
|
|
namespace audio {
|
|
|
|
class Resampler {
|
2017-04-09 18:14:33 +02:00
|
|
|
public:
|
|
|
|
static size_t Convert48To44(int16_t* from, int16_t* to, size_t fromLen, size_t toLen);
|
|
|
|
static size_t Convert44To48(int16_t* from, int16_t* to, size_t fromLen, size_t toLen);
|
2020-03-05 13:31:57 +01:00
|
|
|
static size_t Convert(int16_t* from, int16_t* to, size_t fromLen, size_t toLen, size_t num, size_t denom);
|
2017-05-21 16:50:23 +02:00
|
|
|
static void Rescale60To80(int16_t* in, int16_t* out);
|
|
|
|
static void Rescale60To40(int16_t* in, int16_t* out);
|
2017-04-09 18:14:33 +02:00
|
|
|
};
|
2020-03-05 13:31:57 +01:00
|
|
|
} // namespace audio
|
|
|
|
} // namespace tgvoip
|
2017-04-09 18:14:33 +02:00
|
|
|
|
|
|
|
#endif //LIBTGVOIP_RESAMPLER_H
|