CodecCelt.h 634 Bytes
Newer Older
jcacerec's avatar
jcacerec committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef CODECCELT_H
#define CODECCELT_H

#include "Codec.h"
#include "AudioInterface.h"
#include "celt/celt.h"

class CodecCELT : public Codec
{
public:
    CodecCELT(int bytes);

    virtual void setup(AudioInterface* audioInterface);
    virtual void stop();
    virtual void encode(int8_t* original, int8_t* compressed);
    virtual void decode(int8_t* compressed, int8_t* uncompressed);
    virtual size_t getTotalCodecSizeInBytes();

private:
    int frameSize;
    celt_int32 sampleRate;
    int bytesPerFrame;
    int nChannel;

    CELTMode *mode;
    CELTEncoder *encoder;
    CELTDecoder *decoder;
};

#endif // CODECCELT_H