tests : add test for capture/playback at different sample rates

This commit is contained in:
Georgi Gerganov
2021-01-23 16:27:50 +02:00
parent 597cc48cbb
commit 0c746c1b15
3 changed files with 56 additions and 11 deletions

View File

@@ -181,15 +181,23 @@ public:
static const Parameters & getDefaultParameters();
// set Tx data to encode
bool init(const std::string & text, const int volume = kDefaultVolume);
bool init(const std::string & text, const TxProtocol & txProtocol, const int volume = kDefaultVolume);
bool init(int dataSize, const char * dataBuffer, const int volume = kDefaultVolume);
bool init(int dataSize, const char * dataBuffer, const TxProtocol & txProtocol, const int volume = kDefaultVolume);
// expected waveform size of the encoded Tx data
uint32_t encodeSize_bytes() const;
uint32_t encodeSize_samples() const;
// encode Tx data into an audio waveform
//
// returns false if the encoding fails
//
bool encode(const CBWaveformOut & cbWaveformOut);
// decode an audio waveform
void decode(const CBWaveformInp & cbWaveformInp);
const bool & hasTxData() const { return m_hasNewTxData; }