当前位置: 首页>>代码示例>>C++>>正文


C++ DPF函数代码示例

本文整理汇总了C++中DPF函数的典型用法代码示例。如果您正苦于以下问题:C++ DPF函数的具体用法?C++ DPF怎么用?C++ DPF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DPF函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DPF

void	CTestPage::StartRecord( void )
/////////////////////////////////////////////////////////////////////////////
{
	ULONG	ulBytesRequested, ulCircularBufferSize;
	PHALWAVEDEVICE	pHD;
	PWAVEFORMATEX	pFormatEx;

	if( m_nRecordMode != MODE_STOP )
		return;

	m_nRecordDevice = m_RecordDevice.GetCurSel();

	DPF(("Starting Record Device %d\n", m_nRecordDevice ));

	pHD = m_pHalAdapter->GetWaveInDevice( m_nRecordDevice );

	// change the button to stop
	SetDlgItemText( IDC_RECORD, "Stop" );

	if( !m_WaveRecordFile.Open( m_szFileName, MMIO_CREATE | MMIO_READWRITE ) )
	{
		DPF(("CTestPage::StartRecord Open Failed!\n"));
		return;
	}

	m_WaveRecordFile.SetFormat( WAVE_FORMAT_PCM, 24, 44100, 2 );
	pFormatEx = m_WaveRecordFile.GetFormat();

	if( !m_WaveRecordFile.WriteHeader() )
	{
		DPF(("CTestPage::StartRecord WriteHeader Failed!\n"));
	}

	//DPF(("SetFormat\n"));
	pHD->SetFormat( pFormatEx->wFormatTag, pFormatEx->nChannels, pFormatEx->nSamplesPerSec, pFormatEx->wBitsPerSample, pFormatEx->nBlockAlign );

	m_lSampleRate = pFormatEx->nSamplesPerSec;

	// Get the amount of free space on device
	//DPF(("GetTransferSize\n"));
	pHD->GetTransferSize( &ulBytesRequested, &ulCircularBufferSize );
	ulCircularBufferSize += sizeof(DWORD);

	m_pRecordBuffer = malloc( ulCircularBufferSize );

	pHD->SetInterruptSamples( (ulCircularBufferSize / sizeof( DWORD )) / 2 );
	
	// put the device in MODE_RUN
	//DPF(("Start\n"));
	if( pHD->Start() )
	{
		DPF(("Start Failed!\n"));
	}
	
	// advance the hardware pointer so the first interrupt will actually transfer something
	pHD->TransferComplete( TRUE );
	
	// set the mode to Recording
	m_nRecordMode = MODE_RUN;
}
开发者ID:jerlich,项目名称:rt-fsm,代码行数:60,代码来源:TestPage.cpp

示例2: DPF

bk3d::Bone*   CPhConstraint::build(TTransformPool *transformPool, const MapMayaCVPtrs &CVPtrs, MapTransform2bk3d &transform2bk3d, bk3d::Bone * pTr, int &childrenOffset, int &effectorOffset)
{
	DPF(("--------------\n"));
	size_t nodeByteSize = Bk3dPool::cur_bk3dPool->getUsedSize();

    // first time initialization: if 0, it means we must set it to the first constraint
    //if(transformPool->offsetConstraints == 0)
    //    transformPool->offsetConstraints = transformPool->nBones;
    //
	// create and copy data
	//
    m_bk3dConstraint = new TConstraint;
    bk3d::Bone	* ttr = CBone::build(transformPool, CVPtrs, transform2bk3d, m_bk3dConstraint, childrenOffset, effectorOffset);

    m_bk3dConstraint->pRigidBody1 = NULL; // filled in antoher pass later
    m_bk3dConstraint->pRigidBody2 = NULL;
    memcpy(m_bk3dConstraint->translation_limit_min, m_translation_limit_min, sizeof(float)*3);
    memcpy(m_bk3dConstraint->translation_limit_max, m_translation_limit_max, sizeof(float)*3);
    memcpy(m_bk3dConstraint->rotation_limit_min, m_rotation_limit_min, sizeof(float)*3);
    memcpy(m_bk3dConstraint->rotation_limit_max, m_rotation_limit_max, sizeof(float)*3);
    memcpy(m_bk3dConstraint->spring_constant_translation, m_spring_constant_translation, sizeof(float)*3);
    memcpy(m_bk3dConstraint->spring_constant_rotation, m_spring_constant_rotation, sizeof(float)*3);

	nodeByteSize = Bk3dPool::cur_bk3dPool->getUsedSize() - nodeByteSize;
	m_bk3dConstraint->nodeByteSize = (unsigned int)nodeByteSize;
	m_bk3dConstraint->nextNode = (bk3d::Node*)Bk3dPool::cur_bk3dPool->getAvailablePtr(); // next available ptr... not allocated, yet !

	DPF(("CPhConstraint sz : %d\n", nodeByteSize));
	return m_bk3dConstraint;
}
开发者ID:dquam,项目名称:Bak3d,代码行数:30,代码来源:builder_Constraint.cpp

示例3: DrawPrimitiveHAL

/*===========================================================================*/
extern "C" void DrawPrimitiveHAL( PMESAD3DSHARED pShared, D3DPRIMITIVETYPE dptPrimitiveType, D3DTLVERTEX *pVertices, DWORD dwCount )
{
  PMESAD3DHAL	pHAL = (PMESAD3DHAL)pShared;

#ifdef D3D_DEBUG
  HRESULT		rc;      

  DPF(( DBG_FUNC, "DrawPrimitveHAL();" ));

  /* Make sure we have enough info. */
  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
    return;

  DPF(( DBG_PRIM_INFO, "DP( %d )", dwCount ));

  rc = pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
								 D3DFVF_TLVERTEX,
								 (LPVOID)pVertices,
								 dwCount, 
								 (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
  if ( FAILED(rc) )
  {
    RIP( pHAL, "DrawPrimitive ->", ErrorStringD3D(rc) );
  }
#else
  pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
							 D3DFVF_TLVERTEX,
							 (LPVOID)pVertices,
							 dwCount, 
							 (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
#endif
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:33,代码来源:D3DRaster.cpp

示例4: linVidMemInit

/*
 * linVidMemInit - initialize video memory manager
 */
static BOOL linVidMemInit( LPVMEMHEAP pvmh, FLATPTR start, FLATPTR end )
{
    DWORD       size;

    DPF( 2, "linVidMemInit(%08lx,%08lx)", start, end );

    /*
     * get the size of the heap (and verify its alignment for debug builds)
     */
    size = end - start + 1;
    #ifdef DEBUG
	if( (size & (BLOCK_BOUNDARY-1)) != 0 )
	{
	    DPF( 1, "Invalid size: %08lx (%ld)\n", size, size );
	    return FALSE;
	}
    #endif

    /*
     * set up a free list with the whole chunk of memory on the block
     */
    pvmh->freeList = MemAlloc( sizeof( VMEML ) );
    if( pvmh->freeList == NULL )
    {
	return FALSE;
    }
    ((LPVMEML)pvmh->freeList)->next = NULL;
    ((LPVMEML)pvmh->freeList)->ptr = start;
    ((LPVMEML)pvmh->freeList)->size = size;

    pvmh->allocList = NULL;

    return TRUE;

} /* linVidMemInit */
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:38,代码来源:vmemmgr.c

示例5: main

int
main(int argc, char *argv[])
#endif
{
	struct lock_msg message_buf;
	daemonaddr_t from;
	int addrlen;
	int rc;
	int x = 1;		/* kludge to stop warnings from compiler */

	init(argc, argv);
	CRIT_BEGIN();
	while (x) {
		CRIT_END();
		addrlen = sizeof (from);
		DPF((stderr, "begin recvfrom\n"));
		rc = recvfrom(lock_soc, &message_buf, sizeof (message_buf),
		    0, (struct sockaddr *)&from, &addrlen);
		DPF((stderr, "end recvfrom rc = %d\n", rc));
		CRIT_BEGIN();
		if (rc == sizeof (message_buf))
			dispatch(&message_buf, &from);
		else
			check_for_write_lock();

		/* if we own the lock, check to see if the process died */
		if (the_lock.type != LOCK_NOTLOCKED &&
		    the_lock.remote_daemon == NULL)
			check_for_dead();
	}
	CRIT_END();
	return (0);
}
开发者ID:CadeLaRen,项目名称:illumos-gate,代码行数:33,代码来源:dscfglockd.c

示例6: emu10k1_mpuin_start

int emu10k1_mpuin_start(struct emu10k1_card *card)
{
	struct emu10k1_mpuin *card_mpuin = card->mpuin;
	u8 dummy;

	DPF(2, "emu10k1_mpuin_start()\n");

	/* Set timestamp if not set */
	if (card_mpuin->status & FLAGS_MIDM_STARTED) {
		DPF(2, "Time Stamp not changed\n");
	} else {
		while (!emu10k1_mpu_read_data(card, &dummy));

		card_mpuin->status |= FLAGS_MIDM_STARTED;	/* set */

		/* Set new time stamp */
		card_mpuin->timestart = (jiffies * 1000) / HZ;
		DPD(2, "New Time Stamp = %d\n", card_mpuin->timestart);

		card_mpuin->qhead = 0;
		card_mpuin->qtail = 0;

		emu10k1_irq_enable(card, card->is_audigy ? A_INTE_MIDIRXENABLE : INTE_MIDIRXENABLE);
	}

	return 0;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:27,代码来源:cardmi.c

示例7: Getx64FunctionSize

// returns the size (number of bytes) in an X64 function
ULONG 
Getx64FunctionSize ( 
    PVOID Function )
{
    PIMAGE_RUNTIME_FUNCTION_ENTRY  RuntimeFunction;
    ULONGLONG ImageBase = 0;
    ULONG FunctionSize = 0;

    // RtlLookupFunctionEntry() locates the start and end of the function
    // using the X64 exception table information in the PE file
    // RtlLookupFunctionEntry() is only available on X64 systems
    // using it makes this this module incompatible with x86 systems
    RuntimeFunction = (PIMAGE_RUNTIME_FUNCTION_ENTRY)RtlLookupFunctionEntry(
        (ULONGLONG)Function,
        &ImageBase,
        NULL );

    // if there is no valid runtime entry structure then the extents of 
    // the functions cannot be determined
    if ( ! RuntimeFunction ) {
        DPF(("%s!%s RtlLookupFunctionEntry(%p)\n", __MODULE__, __FUNCTION__,
             Function ));
        goto Exit;
    }

    // compute the number of functions in the function body based on the 
    // functions extents, note this logic will not work for BBT'd functions
    FunctionSize = RuntimeFunction->EndAddress - RuntimeFunction->BeginAddress;

    DPF(("%s!%s PRUNTIME_FUNCTION(BeginAddress=0x%08x EndAddress=0x%08x) Size=%u\n", __MODULE__, __FUNCTION__,
        RuntimeFunction->BeginAddress, RuntimeFunction->EndAddress, FunctionSize ));

Exit :
    return FunctionSize;
} // Getx64FunctionSize()
开发者ID:EternalKeel,项目名称:CodeMachineCourse,代码行数:36,代码来源:Utils.c

示例8: DriverEntry

NDIS_STATUS 
DriverEntry(
    IN  PDRIVER_OBJECT      DriverObject,
    IN  PUNICODE_STRING     RegistryPath )
{
    NDIS_FILTER_DRIVER_CHARACTERISTICS  FilterCharacteristics;
    NDIS_STATUS NdisStatus;

    DPF(("%s!%s DriverObject=%p RegistryPath=%wZ\n", __MODULE__, __FUNCTION__, 
        DriverObject, RegistryPath )); 

    DriverObject->DriverUnload = DriverUnload;

    GlobalNDISLWF.FilterDriverHandle = NULL;

    // Setup the FilterCharacteristics structure
    // Handlers implemented by the driver are :
    // AttachHandler, DetachHandler, RestartHandler, PauseHandler, StatusHandler
    // ReceiveNetBufferListsHandler, ReturnNetBufferListsHandler
    NdisZeroMemory(&FilterCharacteristics, sizeof(NDIS_FILTER_DRIVER_CHARACTERISTICS));

    FilterCharacteristics.Header.Type = NDIS_OBJECT_TYPE_FILTER_DRIVER_CHARACTERISTICS;
    FilterCharacteristics.Header.Size = sizeof(NDIS_FILTER_DRIVER_CHARACTERISTICS);
    FilterCharacteristics.Header.Revision = NDIS_FILTER_CHARACTERISTICS_REVISION_1;
    FilterCharacteristics.MajorNdisVersion = NDISLWF_NDIS_MAJOR_VERSION;
    FilterCharacteristics.MinorNdisVersion = NDISLWF_NDIS_MINOR_VERSION;
    FilterCharacteristics.MajorDriverVersion = NDISLWF_DRIVER_MAJOR_VERSION;
    FilterCharacteristics.MinorDriverVersion = NDISLWF_DRIVER_MINOR_VERSION;
    FilterCharacteristics.Flags = 0;
    NdisInitUnicodeString ( &FilterCharacteristics.FriendlyName, NDISLWF_FRIENDLY_NAME );
    NdisInitUnicodeString ( &FilterCharacteristics.UniqueName, NDISLWF_UNIQUE_NAME);
    NdisInitUnicodeString ( &FilterCharacteristics.ServiceName, NDISLWF_SERVICE_NAME);
    FilterCharacteristics.AttachHandler = NDISLWF_AttachHandler;
    FilterCharacteristics.DetachHandler = NDISLWF_DetachHandler;
    FilterCharacteristics.RestartHandler = NDISLWF_RestartHandler;
    FilterCharacteristics.PauseHandler = NDISLWF_PauseHandler;
    FilterCharacteristics.StatusHandler = NDISLWF_StatusHandler;
    FilterCharacteristics.ReceiveNetBufferListsHandler = NDISLWF_ReceiveNetBufferListsHandler;
    FilterCharacteristics.ReturnNetBufferListsHandler = NDISLWF_ReturnNetBufferListsHandler;

    // Register the filter driver using the FilterCharacteristics structure
    // NdisFRegisterFilterDriver())
    NdisStatus = NdisFRegisterFilterDriver(
        DriverObject,
        (NDIS_HANDLE)DriverObject, // no driver-wide context
        &FilterCharacteristics, 
        &GlobalNDISLWF.FilterDriverHandle);

    if (NdisStatus != NDIS_STATUS_SUCCESS) {
        DPF(("%s!%s NdisFRegisterFilterDriver() FAIL=%08x\n", __MODULE__, __FUNCTION__, NdisStatus));
        goto Exit1;
    }

    DPF(("%s!%s NdisFRegisterFilterDriver() FilterDriverHandle=%p\n", __MODULE__, __FUNCTION__, 
        GlobalNDISLWF.FilterDriverHandle )); 

Exit1 :
    return NdisStatus;
}
开发者ID:EternalKeel,项目名称:CodeMachineCourse,代码行数:59,代码来源:NdisLwf.c

示例9: cmp_addr

static int
cmp_addr(daemonaddr_t *a, daemonaddr_t *b)
{
	int rc;
	rc = memcmp(&(a->sin_addr), &(b->sin_addr), sizeof (a->sin_addr));
	DPF((stderr, "compare %s %hu with", dp_addr(a), a->sin_port));
	DPF((stderr, " %s %hu = %d\n", dp_addr(b), b->sin_port, rc));
	return (rc);
}
开发者ID:CadeLaRen,项目名称:illumos-gate,代码行数:9,代码来源:dscfglockd.c

示例10: SwapBuffersHAL

/*===========================================================================*/
extern "C" void SwapBuffersHAL( PMESAD3DSHARED pShared )
{
  PMESAD3DHAL	pHAL = (PMESAD3DHAL)pShared;

#ifdef D3D_DEBUG
  HRESULT		rc;      

  DPF(( DBG_FUNC, "SwapBuffersHAL();" ));
  DPF(( DBG_ALL_PROFILE, "=================SWAP===================" ));

  /* Make sure we have enough info. */
  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
    return;

  /* Make sure we have enough info. */
  if ( pHAL->lpDDSPrimary != NULL )
  {
    rc = pHAL->lpD3DDevice->EndScene();   
    if ( FAILED(rc) )
    {
	 RIP( pHAL, "EndScene ->", ErrorStringD3D(rc) );
    }
 
    if ( pShared->bFlipable )
    {
	 DPF(( DBG_CNTX_PROFILE, "Swap->FLIP" ));
	 rc = pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
    }
    else
    {
	 DPF(( DBG_CNTX_PROFILE, "Swap->Blt" ));
	 rc = pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );
    }
    if ( FAILED(rc) )
    {
	 RIP( pHAL, "Blt (RENDER/PRIMARY) ->", ErrorStringD3D(rc) );
    }

    rc = pHAL->lpD3DDevice->BeginScene(); 
    if ( FAILED(rc) )
    {
	 RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) );
    }
  }
#else
  pHAL->lpD3DDevice->EndScene();   

  if ( pShared->bFlipable )
    pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
  else
    pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );

  pHAL->lpD3DDevice->BeginScene(); 

#endif
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:57,代码来源:D3DRaster.cpp

示例11: SGXUT_decode_build_option

/*!
 ************************************************

 @function SGXUT_decode_build_options

 @description	Describe the build options returned from microkernel
				 (SGXGetMiscInfo) query

 @input		IMG_UINT32 : build options
 @input		IMG_UINT32 : mask

 @output	none
 ************************************************
 */
static IMG_VOID SGXUT_decode_build_option(IMG_UINT32 ui32In, IMG_UINT32 ui32Mask)
{
	if ( (ui32In & ui32Mask) != 0)
	{
		DPF("enabled\n");
	}
	else
	{
		DPF("disabled\n");
	}
}
开发者ID:aosp,项目名称:gfx_linux_ddk,代码行数:25,代码来源:sgx_init_test.c

示例12: DriverUnload

VOID
DriverUnload (
    PDRIVER_OBJECT DriverObject )
{
    DPF(("%s!%s DriverObject=%p\n", __MODULE__, __FUNCTION__, 
        DriverObject )); 

    // Deregister the filter driver (NdisFDeregisterFilterDriver())
    NdisFDeregisterFilterDriver(GlobalNDISLWF.FilterDriverHandle);

    DPF(("***** DRIVER UNLOADED *****\n")); 
}
开发者ID:EternalKeel,项目名称:CodeMachineCourse,代码行数:12,代码来源:NdisLwf.c

示例13: print_sgx_info

/*!
******************************************************************************

 @Function	print_sgx_info

 @Description

 Print info about the passed PVRSRV_SGX_CLIENT_INFO structure to stdout

 @Input    *psSGXInfo :

 @Return   void  :

******************************************************************************/
static void print_sgx_info(PVRSRV_SGX_CLIENT_INFO *psSGXInfo)
{
	/*
		Add anything interesting from the SGX info structure here.
	*/
	DPF(".... ui32ProcessID:%u\n", psSGXInfo->ui32ProcessID);
}
开发者ID:aosp,项目名称:gfx_linux_ddk,代码行数:21,代码来源:sgx_init_test.c

示例14: emu10k1_mpuin_open

int emu10k1_mpuin_open(struct emu10k1_card *card, struct midi_openinfo *openinfo)
{
	struct emu10k1_mpuin *card_mpuin = card->mpuin;

	DPF(2, "emu10k1_mpuin_open\n");

	if (!(card_mpuin->status & FLAGS_AVAILABLE))
		return -1;

	/* Copy open info and mark channel as in use */
	card_mpuin->openinfo = *openinfo;
	card_mpuin->status &= ~FLAGS_AVAILABLE;	/* clear */
	card_mpuin->status |= FLAGS_READY;	/* set */
	card_mpuin->status &= ~FLAGS_MIDM_STARTED;	/* clear */
	card_mpuin->firstmidiq = NULL;
	card_mpuin->lastmidiq = NULL;
	card_mpuin->qhead = 0;
	card_mpuin->qtail = 0;

	sblive_miStateInit(card_mpuin);

	emu10k1_mpu_reset(card);
	emu10k1_mpu_acquire(card);

	return 0;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:26,代码来源:cardmi.c

示例15: emu10k1_wavein_close

void emu10k1_wavein_close(struct emu10k1_wavedevice *wave_dev)
{
	struct emu10k1_card *card = wave_dev->card;
	struct wiinst *wiinst = wave_dev->wiinst;
	unsigned long flags;

	DPF(2, "emu10k1_wavein_close()\n");

	emu10k1_wavein_stop(wave_dev);

	emu10k1_timer_uninstall(card, &wiinst->timer);

	free_buffer(card, &wiinst->buffer);

	spin_lock_irqsave(&card->lock, flags);
	switch (wave_dev->wiinst->recsrc) {
	case WAVERECORD_AC97:
		card->wavein.ac97 = NULL;
		break;
	case WAVERECORD_MIC:
		card->wavein.mic = NULL;
		break;
	case WAVERECORD_FX:
		card->wavein.fx = NULL;
		break;
	default:
		BUG();
		break;
	}
	spin_unlock_irqrestore(&card->lock, flags);

	wiinst->state = WAVE_STATE_CLOSED;
}
开发者ID:GunioRobot,项目名称:MI424WR_GEN2_Rev_E-F,代码行数:33,代码来源:cardwi.c


注:本文中的DPF函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。