theinterfacetoboard.cpp

来自「这是G.723和G.729的音频编解码的源代码」· C++ 代码 · 共 61 行

CPP
61
字号

// TheInterfaceToBoard.cpp: implementation of the CTheInterfaceToBoard class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"

#include "InterfaceToBoard.h"

#include <afxmt.h>
#include "CPacker.h"
#include <afxtempl.h>
#include "CChannel.h"
#include "CMultiplex.h"
#include "CDemultiplex.h"
#include "CByteBuffer.h"

#include "TheInterfaceToBoard.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CTheInterfaceToBoard::CTheInterfaceToBoard(CMultiplex * pMultiplex,CDemultiplex * pDemultiplex)
{
	m_pMultiplex=pMultiplex;
	m_pDemultiplex=pDemultiplex;
}

CTheInterfaceToBoard::~CTheInterfaceToBoard()
{

}

int CTheInterfaceToBoard::Input(BYTE * pbyBuffer,int nBufferLength)
{
	int a;
	a = m_pMultiplex->DetachStream(pbyBuffer,nBufferLength);
	if(!a)
	{
		TRACE("DATA = %d ",a);
		return FALSE;
	}

	else
		return  a;
}

extern int gnReceivedBytes;
void CTheInterfaceToBoard::Output(BYTE * pbyBlock,int nBlockLength)
{
	gnReceivedBytes+=nBlockLength;
	m_pDemultiplex->InputStream(pbyBlock,nBlockLength);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?