本文整理汇总了C++中ClearBuffer函数的典型用法代码示例。如果您正苦于以下问题:C++ ClearBuffer函数的具体用法?C++ ClearBuffer怎么用?C++ ClearBuffer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ClearBuffer函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ClearBuffer
void
StencilMapCanvas::Begin()
{
if (!buffer_drawn) {
ClearBuffer();
buffer_drawn = true;
}
}
开发者ID:Advi42,项目名称:XCSoar,代码行数:8,代码来源:StencilMapCanvas.cpp
示例2: ClearBuffer
bool CFile::Truncate() {
if (m_iFD != -1 && ftruncate(m_iFD, 0) == 0) {
ClearBuffer();
return true;
}
return false;
}
开发者ID:BGCX261,项目名称:znc-msvc-svn-to-git,代码行数:8,代码来源:FileUtils.cpp
示例3: ClearBuffer
void
MapDrawHelper::BufferRenderStart()
{
if (!buffer_drawn) {
ClearBuffer();
buffer_drawn = true;
}
}
开发者ID:damianob,项目名称:xcsoar,代码行数:8,代码来源:MapDrawHelper.cpp
示例4: glEnable
void TGBufferCanvas::Enable()
{
glEnable(GL_DEPTH_TEST);
BindFrameBuffer(m_frameBuffer);
glPushAttrib(GL_VIEWPORT_BIT | GL_ENABLE_BIT);
ClearBuffer();
GLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_COLOR_ATTACHMENT2_EXT ,GL_COLOR_ATTACHMENT3_EXT};
glDrawBuffers(4, buffers);
}
开发者ID:dreamsxin,项目名称:Donut,代码行数:9,代码来源:gbuffercanvas.cpp
示例5: ClearBuffer
SERIALISATION_INLINE void StreamWriter::Close()
{
ClearBuffer();
if (mFileStream.is_open())
{
mFileStream.close();
}
}
开发者ID:Zefiros-Software,项目名称:SerLib,代码行数:9,代码来源:streamWriter.cpp
示例6: StopTransfer
CloHttpCurl::~CloHttpCurl(void)
{
StopTransfer();
ClearBuffer();
ClearParam();
delete m_pAssoc;
m_pAssoc = NULL;
}
开发者ID:skyui-cdel,项目名称:MyFirstGit,代码行数:9,代码来源:loHttpCurl.cpp
示例7: m_bEnabled
////////////////////////////////////////////////
//
// CStatEvents::CStatEvents
//
//
//
////////////////////////////////////////////////
CStatEvents::CStatEvents ( void )
: m_bEnabled ( false )
, m_ItemBuffer ( 0 )
, m_BufferPos ( 0 )
, m_BufferPosMax ( 0 )
, m_BufferPosMaxUsing ( 0 )
{
ClearBuffer ( true );
}
开发者ID:EagleShen,项目名称:MTA,代码行数:16,代码来源:SharedUtil.Profiling.hpp
示例8: BiquadFilterInit
/*******************************************************************************
BiquadFilterInit */
BiquadFilter*
BiquadFilterInit(const float *bCoeff, const float *aCoeff)
{
// Allocate Memory
BiquadFilter* filter = (BiquadFilter*)malloc(sizeof(BiquadFilter));
if (filter)
{
// Initialize Buffers
CopyBuffer(filter->b, bCoeff, 3);
CopyBuffer(filter->a, aCoeff, 2);
ClearBuffer(filter->x, 2);
ClearBuffer(filter->y, 2);
ClearBuffer(filter->w, 2);
}
return filter;
}
开发者ID:liufeigit,项目名称:FxDSP,代码行数:21,代码来源:BiquadFilter.c
示例9: ClearBuffer
void CBuffer::Copy(CBuffer& buffer)
{
int nReSize = buffer.GetMemSize(); //2048 2048
int nSize = buffer.GetBufferLen(); //1025 0 1025
ClearBuffer();
if (ReAllocateBuffer(nReSize) == -1)
return;
CopyMemory(m_pBase,buffer.GetBuffer(),buffer.GetBufferLen());
m_pPtr = m_pBase + nSize;
}
开发者ID:26597925,项目名称:Remote,代码行数:10,代码来源:Buffer.cpp
示例10: DEBUG
void CFile::Close() {
if (m_iFD >= 0) {
if (close(m_iFD) < 0) {
DEBUG("CFile::Close(): close() failed with ["
<< strerror(errno) << "]");
}
}
m_iFD = -1;
ClearBuffer();
}
开发者ID:BGCX261,项目名称:znc-msvc-svn-to-git,代码行数:10,代码来源:FileUtils.cpp
示例11: ZeroMemory
HRESULT CMpcAudioRenderer::CreateDSBuffer()
{
if (! m_pWaveFileFormat) return E_POINTER;
HRESULT hr = S_OK;
LPDIRECTSOUNDBUFFER pDSBPrimary = NULL;
DSBUFFERDESC dsbd;
DSBUFFERDESC cDSBufferDesc;
DSBCAPS bufferCaps;
DWORD dwDSBufSize = m_pWaveFileFormat->nAvgBytesPerSec * 4;
ZeroMemory(&bufferCaps, sizeof(bufferCaps));
ZeroMemory(&dsbd, sizeof(DSBUFFERDESC));
dsbd.dwSize = sizeof(DSBUFFERDESC);
dsbd.dwFlags = DSBCAPS_PRIMARYBUFFER;
dsbd.dwBufferBytes = 0;
dsbd.lpwfxFormat = NULL;
if (SUCCEEDED (hr = m_pDS->CreateSoundBuffer( &dsbd, &pDSBPrimary, NULL )))
{
hr = pDSBPrimary->SetFormat(m_pWaveFileFormat);
ATLASSERT(SUCCEEDED(hr));
SAFE_RELEASE (pDSBPrimary);
}
SAFE_RELEASE (m_pDSBuffer);
cDSBufferDesc.dwSize = sizeof (DSBUFFERDESC);
cDSBufferDesc.dwFlags = DSBCAPS_GLOBALFOCUS |
DSBCAPS_GETCURRENTPOSITION2 |
DSBCAPS_CTRLVOLUME |
DSBCAPS_CTRLPAN |
DSBCAPS_CTRLFREQUENCY;
cDSBufferDesc.dwBufferBytes = dwDSBufSize;
cDSBufferDesc.dwReserved = 0;
cDSBufferDesc.lpwfxFormat = m_pWaveFileFormat;
cDSBufferDesc.guid3DAlgorithm = GUID_NULL;
hr = m_pDS->CreateSoundBuffer (&cDSBufferDesc, &m_pDSBuffer, NULL);
m_nDSBufSize = 0;
if (SUCCEEDED(hr))
{
bufferCaps.dwSize = sizeof(bufferCaps);
hr = m_pDSBuffer->GetCaps(&bufferCaps);
}
if (SUCCEEDED (hr))
{
m_nDSBufSize = bufferCaps.dwBufferBytes;
hr = ClearBuffer();
m_pDSBuffer->SetFrequency ((long)(m_pWaveFileFormat->nSamplesPerSec * m_dRate));
}
return hr;
}
开发者ID:Fluffiest,项目名称:splayer,代码行数:55,代码来源:MpcAudioRenderer.cpp
示例12: ReadTagName
void ReadTagName(char c)
{
if (IsWhitespace(c))
{
if (buffer == "a")
state = State::ReadTag;
else if (buffer == "!--")
state = State::SkipComment;
else
state = State::SkipTag;
ClearBuffer();
}
else if (c == '>')
{
state = State::Default;
ClearBuffer();
}
else
StoreToLower(c);
}
开发者ID:hansmaad,项目名称:Chase,代码行数:20,代码来源:HtmlSearch.cpp
示例13: NO_DEBUG
void NoFile::Close()
{
if (m_fd >= 0) {
if (close(m_fd) < 0) {
m_hadError = true;
NO_DEBUG("NoFile::Close(): close() failed with [" << strerror(errno) << "]");
}
}
m_fd = -1;
ClearBuffer();
}
开发者ID:Kriechi,项目名称:nobnc,代码行数:11,代码来源:nofile.cpp
示例14: SaveReleaseDevice
bool Mouse::SetCoopLevel(HWND hWnd)
{
HRESULT result = _dDevice->SetCooperativeLevel(hWnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND);
if (FAILED(result))
{
SaveReleaseDevice();
return false;
}
ClearBuffer();
return true;
}
开发者ID:dbrekelmans,项目名称:game-engine,代码行数:11,代码来源:Mouse.cpp
示例15: ClearBuffer
////////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: Copy
//
// DESCRIPTION: Copy from one buffer object to another...
//
// RETURNS:
//
// NOTES:
//
// MODIFICATIONS:
//
// Name Date Version Comments
// N T ALMOND 270400 1.0 Origin
//
////////////////////////////////////////////////////////////////////////////////
void CBuffer::Copy(CBuffer& buffer)
{
int nReSize = buffer.GetMemSize();
int nSize = buffer.GetBufferLen();
ClearBuffer();
ReAllocateBuffer(nReSize);
m_pPtr = m_pBase + nSize;
CopyMemory(m_pBase,buffer.GetBuffer(),buffer.GetBufferLen());
}
开发者ID:asdlei00,项目名称:icmp_shell,代码行数:27,代码来源:Buffer.cpp
示例16: ClearBuffer
bool CFile::Seek(off_t uPos) {
/* This sets errno in case m_iFD == -1 */
errno = EBADF;
if (m_iFD != -1 && lseek(m_iFD, uPos, SEEK_SET) == uPos) {
ClearBuffer();
return true;
}
m_bHadError = true;
return false;
}
开发者ID:BlaXpirit,项目名称:znc,代码行数:12,代码来源:FileUtils.cpp
示例17: ClearBuffer
/**************************************************************************************
* Function: AllocateBuffers
*
* Description: allocate all the memory needed for the RA8 decoder
*
* Inputs: none
*
* Outputs: none
*
* Return: pointer to Gecko2Info structure, set to all 0's
**************************************************************************************/
Gecko2Info *AllocateBuffers(void)
{
Gecko2Info *gi;
/* create new Gecko2Info structure */
gi = (Gecko2Info *)malloc(sizeof(Gecko2Info));
if (!gi)
return 0;
ClearBuffer(gi, sizeof(Gecko2Info));
return gi;
}
开发者ID:vitmod,项目名称:libp,代码行数:23,代码来源:ra_buffers.c
示例18: SkipAttribute
void SkipAttribute(char c)
{
if (c == '"')
{
if (buffer == "\"")
{
state = State::ReadTag;
ClearBuffer();
}
else
Store(c);
}
}
开发者ID:hansmaad,项目名称:Chase,代码行数:13,代码来源:HtmlSearch.cpp
示例19: ReadTag
void ReadTag(char c)
{
if (c == '=')
{
if (buffer == "href")
state = State::ReadAttribute;
else
state = State::SkipAttribute;
ClearBuffer();
}
else if (!IsWhitespace(c))
StoreToLower(c);
}
开发者ID:hansmaad,项目名称:Chase,代码行数:13,代码来源:HtmlSearch.cpp
示例20: TEST
TEST(DSPSingle, TestStrideCopy)
{
float out[10];
float in1[5] = {1.,2.,3.,4.,5.};
float in2[10] = {1., 2., 3., 4., 5., 6., 7., 8., 9., 10.};
float ex1[10] = {1., 0., 2., 0., 3., 0., 4., 0., 5., 0.};
float ex2[5] = {1., 3., 5., 7., 9.};
ClearBuffer(out, 10);
CopyBufferStride(out, 2, in1, 1, 5);
for (unsigned i = 0; i < 10; ++i)
{
ASSERT_FLOAT_EQ(ex1[i], out[i]);
}
ClearBuffer(out, 10);
CopyBufferStride(out, 1, in2, 2, 5);
for (unsigned i = 0; i < 5; ++i)
{
ASSERT_FLOAT_EQ(ex2[i], out[i]);
}
}
开发者ID:eriser,项目名称:FxDSP,代码行数:22,代码来源:TestDSP.cpp
注:本文中的ClearBuffer函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论