本文整理汇总了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;// 初回再生を表す
}
示例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;
}
}
示例3: reset
void DirectSound::reset()
{
if(dsbSecondary) {
dsbSecondary->Stop();
dsbSecondary->SetCurrentPosition(0);
}
}
示例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;
}
示例5: ChannelStop
void ChannelStop(int channel)
{
LPDIRECTSOUNDBUFFER pDS = g_pDSHandles[channel].pbuffer;
if (!pDS)
return;
pDS->Stop();
pDS->SetCurrentPosition(0);
}
示例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());
}
示例7: DSoundExit
void DSoundExit(void)
{
if (LoopBuffer)
LoopBuffer->Stop();
RELEASE(DSoundNotify);
RELEASE(LoopBuffer)
RELEASE(DSound)
CloseHandle(seg_played_event);
seg_played_event = NULL;
}
示例8: pause
void DirectSound::pause()
{
if( dsbSecondary == NULL ) return;
DWORD status;
dsbSecondary->GetStatus( &status );
if( status & DSBSTATUS_PLAYING ) dsbSecondary->Stop();
}
示例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;
}
示例10: reset
void DirectSound::reset()
{
if( dsbSecondary == NULL ) return;
dsbSecondary->Stop();
dsbSecondary->SetCurrentPosition( 0 );
soundNextPosition = 0;
}
示例11: soundmng_pcmstop
void soundmng_pcmstop(UINT num) {
LPDIRECTSOUNDBUFFER dsbuf;
if ((!mute) && (num < SOUND_MAXPCM)) {
dsbuf = pDSwave3[num];
if (dsbuf) {
dsbuf->Stop();
}
}
}
示例12: pause
void DirectSound::pause()
{
if(dsbSecondary != NULL) {
DWORD status = 0;
dsbSecondary->GetStatus(&status);
if(status & DSBSTATUS_PLAYING) {
dsbSecondary->Stop();
}
}
}
示例13: VStop
// *******************************************************************************************************************
bool cDirectSoundAudioBuffer::VStop()
{
LPDIRECTSOUNDBUFFER pDSBuffer = GetSoundBuffer();
if (pDSBuffer == NULL)
{
return false;
}
m_Paused = true;
pDSBuffer->Stop();
return true;
}
示例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();
}
}
示例15: streamenable
static void streamenable(BOOL play) {
if (pDSData3) {
if (play) {
pDSData3->Play(0, 0, DSBPLAY_LOOPING);
}
else {
pDSData3->Stop();
}
}
juliet_YMF288Enable(play);
}