mirror of https://github.com/LX3JL/xlxd.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.0 KiB
69 lines
2.0 KiB
//
|
|
// ccodec2interface.h
|
|
// ambed
|
|
//
|
|
// Created by Antony Chazapis (SV9OAN) on 26/12/2018.
|
|
// Copyright © 2015 Jean-Luc Deltombe (LX3JL). All rights reserved.
|
|
//
|
|
// ----------------------------------------------------------------------------
|
|
// This file is part of ambed.
|
|
//
|
|
// xlxd is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// xlxd is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
|
// ----------------------------------------------------------------------------
|
|
|
|
#ifndef ccodec2interface_h
|
|
#define ccodec2interface_h
|
|
|
|
#include "cvocodecinterface.h"
|
|
#include <codec2/codec2.h>
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////
|
|
// class
|
|
|
|
class CCodec2Interface : public CVocodecInterface
|
|
{
|
|
public:
|
|
// constructors
|
|
CCodec2Interface();
|
|
|
|
// destructor
|
|
virtual ~CCodec2Interface();
|
|
|
|
// initialization
|
|
bool Init(void);
|
|
|
|
// get
|
|
const char *GetName(void) const { return "Codec 2"; }
|
|
|
|
// manage channels
|
|
int GetNbChannels(void) const { return 1; }
|
|
uint8 GetChannelCodec(int) const { return CODEC_CODEC2; }
|
|
|
|
// task
|
|
void Task(void);
|
|
|
|
protected:
|
|
// decoder helper
|
|
void DecodeAmbePacket(CAmbePacket *, CVoicePacket *);
|
|
|
|
// encoder helpers
|
|
void EncodeVoicePacket(CVoicePacket *, CAmbePacket *);
|
|
|
|
// data
|
|
struct CODEC2 *codec2_state;
|
|
};
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////
|
|
#endif /* ccodec2interface_h */
|