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


C++ LPDIRECTSOUNDBUFFER::Stop方法代码示例

本文整理汇总了C++中LPDIRECTSOUNDBUFFER::Stop方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECTSOUNDBUFFER::Stop方法的具体用法?C++ LPDIRECTSOUNDBUFFER::Stop怎么用?C++ LPDIRECTSOUNDBUFFER::Stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LPDIRECTSOUNDBUFFER的用法示例。


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

示例1:

//Kitao追加
void
AOUT_SetPlayStart()
{
	int i;

	if (!_bAudioInit)
		return;

	// 再生をストップ
	_pDSB1->Stop();
	_pDSB2->Stop();
	_pDSB3->Stop();

	// WAVファイル出力用Bufferに無音を書き込む 
	ZeroMemory(_pAudioBuf1, _dwBufSize);
	ZeroMemory(_pAudioBuf2, _dwBufSize);
	ZeroMemory(_pAudioBuf3, _dwBufSize);

	// ストリーミングバッファを無音で埋める
	for (i = 0; i<AOUT_BUFFERRATE; i++) //Kitao追加
	{
		write_streaming_buffer_1(i*_dwBufSize);
		write_streaming_buffer_2(i*_dwBufSize);
		write_streaming_buffer_3(i*_dwBufSize);
	}

	// 再生位置を0にする
	_pDSB1->SetCurrentPosition(0);
	_pDSB2->SetCurrentPosition(0);
	_pDSB3->SetCurrentPosition(0);
	
	_bPlayStart = TRUE;// 初回再生を表す
}
开发者ID:RetroAchievements,项目名称:RASuite,代码行数:34,代码来源:AudioOut.cpp

示例2: Release

static void Release(void)
{
    if (!g_lpDSDevice)
		return;

    if ( g_lpPrimaryBuffer!=NULL )
    {
        ULONG status;
		ChannelFlushAll(0);
        g_lpPrimaryBuffer->GetStatus(&status);

		if ( (status&DSBSTATUS_PLAYING)==DSBSTATUS_PLAYING )
			g_lpPrimaryBuffer->Stop();

		if (g_lpDS3DListener)
			g_lpDS3DListener->Release();

        g_lpPrimaryBuffer->Release();
        g_lpPrimaryBuffer = NULL;
    }
    if (V3XA.p_driverList)
	{
		array_free(V3XA.p_driverList);
		V3XA.p_driverList = NULL;
	}
}
开发者ID:cbxbiker61,项目名称:nogravity,代码行数:26,代码来源:snd_ds6.cpp

示例3: reset

void DirectSound::reset()
{
  if(dsbSecondary) {
    dsbSecondary->Stop();
    dsbSecondary->SetCurrentPosition(0);
  }  
}
开发者ID:BackupTheBerlios,项目名称:vbastep-svn,代码行数:7,代码来源:DirectSound.cpp

示例4: SNDDXDeInit

void SNDDXDeInit()
{
	DWORD status=0;

	doterminate = true;
	while(!terminated)
		Sleep(1);
	terminated = false;

	if (lpDSB2)
	{
		lpDSB2->GetStatus(&status);

		if(status == DSBSTATUS_PLAYING)
			lpDSB2->Stop();

		lpDSB2->Release();
		lpDSB2 = NULL;
	}

	if (lpDSB)
	{
		lpDSB->Release();
		lpDSB = NULL;
	}

	if (lpDS8)
	{
		lpDS8->Release();
		lpDS8 = NULL;
	}

	delete stereodata16;
	stereodata16=0;
}
开发者ID:BlueSplash,项目名称:svn-desmume,代码行数:35,代码来源:snddx.cpp

示例5: ChannelStop

void ChannelStop(int channel)
{
    LPDIRECTSOUNDBUFFER pDS = g_pDSHandles[channel].pbuffer;
    if (!pDS)
		return;
    pDS->Stop();
    pDS->SetCurrentPosition(0);
}
开发者ID:cbxbiker61,项目名称:nogravity,代码行数:8,代码来源:snd_ds6.cpp

示例6: StreamStop

void StreamStop(V3XA_STREAM handle)
{
	DS_stream		*pStr = g_pDSStreams + handle;
	LPDIRECTSOUNDBUFFER  pSrc = g_pDSHandles[pStr->channel].pbuffer;
	if (((pStr->nState&1)==0)||(!pSrc))
		return;
	SYS_DXTRACE(pSrc->Stop());
}
开发者ID:cbxbiker61,项目名称:nogravity,代码行数:8,代码来源:snd_ds6.cpp

示例7: DSoundExit

void DSoundExit(void)
{
  if (LoopBuffer)
    LoopBuffer->Stop();
  RELEASE(DSoundNotify);
  RELEASE(LoopBuffer)
  RELEASE(DSound)
  CloseHandle(seg_played_event);
  seg_played_event = NULL;
}
开发者ID:alban-rochel,项目名称:pixbox-pcsx-rearmed,代码行数:10,代码来源:dsnd.cpp

示例8: pause

void DirectSound::pause()
{
	if( dsbSecondary == NULL ) return;

	DWORD status;

	dsbSecondary->GetStatus( &status );

	if( status & DSBSTATUS_PLAYING ) dsbSecondary->Stop();
}
开发者ID:MrSwiss,项目名称:visualboyadvance-m,代码行数:10,代码来源:DirectSound.cpp

示例9: DS_DestroyBuffers

/*
** DS_DestroyBuffers
*/
static void DS_DestroyBuffers( void )
{
	Com_Printf( "Destroying DirectSound 8 buffers\n" );
	if ( pDS )
	{
		Com_Printf( "...setting NORMAL coop level\n" );
#ifdef QDSNDCOMPILERHACK
		pDS->lpVtbl->SetCooperativeLevel( pDS, cl_hwnd, DSSCL_NORMAL );
#else
		pDS->SetCooperativeLevel(cl_hwnd, DSSCL_NORMAL);
#endif
	}

	if ( pDSBuf )
	{
		Com_Printf( "...stopping and releasing secondary buffer\n" );
#ifdef QDSNDCOMPILERHACK
		pDSBuf->lpVtbl->Stop(pDSBuf);
		pDSBuf->lpVtbl->Release(pDSBuf);
#else
		pDSBuf->Stop();
		pDSBuf->Release();
#endif
	}
	
	// only release primary buffer if it's not also the mixing buffer we just released
	if ( pDSPBuf && ( pDSBuf != pDSPBuf ) )
	{
		Com_Printf( "...releasing primary buffer\n" );
#ifdef QDSNDCOMPILERHACK
		pDSPBuf->lpVtbl->Stop(pDSPBuf);
		pDSPBuf->lpVtbl->Release(pDSPBuf);
#else
		pDSPBuf->Stop();
		pDSPBuf->Release();
#endif
	}

	pDSBuf = NULL;
	pDSPBuf = NULL;

	dma.buffer = NULL;
}
开发者ID:Jaegermeiste,项目名称:quake2_322,代码行数:46,代码来源:snd_win.c

示例10: reset

void DirectSound::reset()
{
	if( dsbSecondary == NULL ) return;

	dsbSecondary->Stop();

	dsbSecondary->SetCurrentPosition( 0 );

	soundNextPosition = 0;
}
开发者ID:MrSwiss,项目名称:visualboyadvance-m,代码行数:10,代码来源:DirectSound.cpp

示例11: soundmng_pcmstop

void soundmng_pcmstop(UINT num) {

	LPDIRECTSOUNDBUFFER	dsbuf;

	if ((!mute) && (num < SOUND_MAXPCM)) {
		dsbuf = pDSwave3[num];
		if (dsbuf) {
			dsbuf->Stop();
		}
	}
}
开发者ID:josejl1987,项目名称:neko-tracer,代码行数:11,代码来源:soundmng.cpp

示例12: pause

void DirectSound::pause()
{
  if(dsbSecondary != NULL) {
    DWORD status = 0;
    dsbSecondary->GetStatus(&status);
    
    if(status & DSBSTATUS_PLAYING) {
      dsbSecondary->Stop();
    }
  }  
}
开发者ID:BackupTheBerlios,项目名称:vbastep-svn,代码行数:11,代码来源:DirectSound.cpp

示例13: VStop

//  *******************************************************************************************************************
bool cDirectSoundAudioBuffer::VStop()
{
  LPDIRECTSOUNDBUFFER pDSBuffer = GetSoundBuffer();
  if (pDSBuffer == NULL)
  {
    return false;
  }
  m_Paused = true;
  pDSBuffer->Stop();
  return true;
}
开发者ID:AnkurSheel,项目名称:HHero,代码行数:12,代码来源:DirectSoundAudioBuffer.cpp

示例14: Stop

static void Stop(void)
{
    if (g_lpPrimaryBuffer)
    {
      ULONG status;
      g_lpPrimaryBuffer->GetStatus(&status);
      if ( (status&DSBSTATUS_PLAYING)==DSBSTATUS_PLAYING )
      g_lpPrimaryBuffer->SetVolume(DSBVOLUME_MIN);
      g_lpPrimaryBuffer->Stop();
    }
}
开发者ID:cbxbiker61,项目名称:nogravity,代码行数:11,代码来源:snd_ds6.cpp

示例15: streamenable

static void streamenable(BOOL play) {

	if (pDSData3) {
		if (play) {
			pDSData3->Play(0, 0, DSBPLAY_LOOPING);
		}
		else {
			pDSData3->Stop();
		}
	}
	juliet_YMF288Enable(play);
}
开发者ID:josejl1987,项目名称:neko-tracer,代码行数:12,代码来源:soundmng.cpp


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