这篇教程C++ IDirectSoundBuffer_Stop函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中IDirectSoundBuffer_Stop函数的典型用法代码示例。如果您正苦于以下问题:C++ IDirectSoundBuffer_Stop函数的具体用法?C++ IDirectSoundBuffer_Stop怎么用?C++ IDirectSoundBuffer_Stop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了IDirectSoundBuffer_Stop函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: RemoveSoundvoid RemoveSound(void){ int iRes; if(iDoRecord) RecordStop(); if(lpDSBSECONDARY1!=NULL) { IDirectSoundBuffer_Stop(lpDSBSECONDARY1); iRes=IDirectSoundBuffer_Release(lpDSBSECONDARY1); // FF says such a loop is bad... Demo says it's good... Pete doesn't care while(iRes!=0) iRes=IDirectSoundBuffer_Release(lpDSBSECONDARY1); lpDSBSECONDARY1=NULL; } if(lpDSBPRIMARY!=NULL) { IDirectSoundBuffer_Stop(lpDSBPRIMARY); iRes=IDirectSoundBuffer_Release(lpDSBPRIMARY); // FF says such a loop is bad... Demo says it's good... Pete doesn't care while(iRes!=0) iRes=IDirectSoundBuffer_Release(lpDSBPRIMARY); lpDSBPRIMARY=NULL; } if(lpDS!=NULL) { iRes=IDirectSound_Release(lpDS); // FF says such a loop is bad... Demo says it's good... Pete doesn't care while(iRes!=0) iRes=IDirectSound_Release(lpDS); lpDS=NULL; }}
开发者ID:madnessw,项目名称:thesnow,代码行数:33,
示例2: m1sdr_Exitvoid m1sdr_Exit(void){ if (!s32SoundEnable) { return; } if (lpSecB) { IDirectSoundBuffer_Stop(lpSecB); IDirectSoundBuffer_Release(lpSecB); lpSecB = NULL; } if (lpPDSB) { IDirectSoundBuffer_Stop(lpPDSB); IDirectSoundBuffer_Release(lpPDSB); lpPDSB = NULL; } if (lpDS) { IDirectSound_Release(lpDS); lpDS = NULL; } if (samples) { free(samples); }}
开发者ID:dreiss,项目名称:M1-Android,代码行数:32,
示例3: DS_Exitstatic void DS_Exit(void){ DWORD statusInfo; if(updateBufferHandle) { /* Signal thread to exit and wait for the exit */ if (threadInUse) { threadInUse = 0; MUTEX_UNLOCK(vars); SetEvent (notifyUpdateHandle); WaitForSingleObject (updateBufferHandle, INFINITE); MUTEX_LOCK(vars); } CloseHandle(updateBufferHandle), updateBufferHandle = NULL; } if (notifyUpdateHandle) { CloseHandle(notifyUpdateHandle), notifyUpdateHandle = NULL; } if (pSoundBufferNotify) { IDirectSoundNotify_Release(pSoundBufferNotify); pSoundBufferNotify = NULL; } if(pSoundBuffer) { if(IDirectSoundBuffer_GetStatus(pSoundBuffer,&statusInfo)==DS_OK) if(statusInfo&DSBSTATUS_PLAYING) IDirectSoundBuffer_Stop(pSoundBuffer); IDirectSoundBuffer_Release(pSoundBuffer); pSoundBuffer = NULL; } if(pPrimarySoundBuffer) { if(IDirectSoundBuffer_GetStatus(pPrimarySoundBuffer,&statusInfo)==DS_OK) if(statusInfo&DSBSTATUS_PLAYING) IDirectSoundBuffer_Stop(pPrimarySoundBuffer); IDirectSoundBuffer_Release(pPrimarySoundBuffer); pPrimarySoundBuffer = NULL; } if (pSoundCard) { IDirectSound_Release(pSoundCard); pSoundCard = NULL; } VC_Exit();}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:49,
示例4: Stop/** * Closes the audio device. */static HRESULT Stop( aout_stream_sys_t *p_sys ){ vlc_mutex_lock( &p_sys->lock ); p_sys->b_playing = true; vlc_cond_signal( &p_sys->cond ); vlc_mutex_unlock( &p_sys->lock ); vlc_cancel( p_sys->eraser_thread ); vlc_join( p_sys->eraser_thread, NULL ); vlc_cond_destroy( &p_sys->cond ); vlc_mutex_destroy( &p_sys->lock ); if( p_sys->p_notify != NULL ) { IDirectSoundNotify_Release(p_sys->p_notify ); p_sys->p_notify = NULL; } if( p_sys->p_dsbuffer != NULL ) { IDirectSoundBuffer_Stop( p_sys->p_dsbuffer ); IDirectSoundBuffer_Release( p_sys->p_dsbuffer ); p_sys->p_dsbuffer = NULL; } if( p_sys->p_dsobject != NULL ) { IDirectSound_Release( p_sys->p_dsobject ); p_sys->p_dsobject = NULL; } return DS_OK;}
开发者ID:videolan,项目名称:vlc,代码行数:32,
示例5: FreeSoundstatic voidFreeSound (void){ if (pDSBuf) { IDirectSoundBuffer_Stop (pDSBuf); IDirectSound_Release (pDSBuf); }// release primary buffer only if it's not also the mixing buffer we just released if (pDSPBuf && (pDSBuf != pDSPBuf)) { IDirectSound_Release (pDSPBuf); } if (pDS) { IDirectSound_SetCooperativeLevel (pDS, mainwindow, DSSCL_NORMAL); IDirectSound_Release (pDS); } pDS = NULL; pDSBuf = NULL; pDSPBuf = NULL; hWaveOut = 0; hData = 0; hWaveHdr = 0; lpData = NULL; lpWaveHdr = NULL;}
开发者ID:EIREXE,项目名称:Quakeforge-gcw0,代码行数:25,
示例6: dsound_freestatic void dsound_free(void *data){ dsound_t *ds = (dsound_t*)data; if (ds) { if (ds->thread) { ds->thread_alive = false; WaitForSingleObject(ds->thread, INFINITE); CloseHandle(ds->thread); } DeleteCriticalSection(&ds->crit); if (ds->dsb) { IDirectSoundBuffer_Stop(ds->dsb); IDirectSoundBuffer_Release(ds->dsb); } if (ds->ds) IDirectSound_Release(ds->ds); if (ds->event) CloseHandle(ds->event); if (ds->buffer) fifo_free(ds->buffer); free(ds); }}
开发者ID:jonakino,项目名称:RetroArch,代码行数:32,
示例7: tdav_consumer_dsound_stopint tdav_consumer_dsound_stop(tmedia_consumer_t* self){ tdav_consumer_dsound_t* dsound = (tdav_consumer_dsound_t*)self; HRESULT hr; if(!self){ TSK_DEBUG_ERROR("Invalid parameter"); return -1; } if(!dsound->started){ TSK_DEBUG_WARN("Consumer not started"); return 0; } /* should be done here */ dsound->started = tsk_false; /* stop thread */ if(dsound->tid[0]){ tsk_thread_join(&(dsound->tid[0])); } if((hr = IDirectSoundBuffer_Stop(dsound->secondaryBuffer)) != DS_OK){ tdav_win32_print_error("IDirectSoundBuffer_Stop", hr); } if((hr = IDirectSoundBuffer_SetCurrentPosition(dsound->secondaryBuffer, 0)) != DS_OK){ tdav_win32_print_error("IDirectSoundBuffer_SetCurrentPosition", hr); } return 0;}
开发者ID:NewComerBH,项目名称:doubango,代码行数:33,
示例8: DSoundRender_Pausestatic HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface){ HRESULT hr = S_OK; DSoundRenderImpl *This = (DSoundRenderImpl *)iface; TRACE("(%p/%p)->()/n", This, iface); EnterCriticalSection(&This->renderer.csRenderLock); if (This->renderer.filter.state != State_Paused) { if (This->renderer.filter.state == State_Stopped) { if (This->renderer.pInputPin->pin.pConnectedTo) ResetEvent(This->renderer.evComplete); This->renderer.pInputPin->end_of_stream = 0; } hr = IDirectSoundBuffer_Stop(This->dsbuffer); if (SUCCEEDED(hr)) This->renderer.filter.state = State_Paused; ResetEvent(This->blocked); ResetEvent(This->renderer.RenderEvent); } ResetEvent(This->renderer.ThreadSignal); LeaveCriticalSection(&This->renderer.csRenderLock); return hr;}
开发者ID:reactos,项目名称:reactos,代码行数:29,
示例9: I_UpdateSoundParamsvoid I_UpdateSoundParams(int channel, int vol, int sep, int pitch){// proff 07/04/98: Added for CYGWIN32 compatibility#ifdef HAVE_LIBDSOUND int DSB_Status; if (noDSound == true) return;// proff 07/26/98: Added volume check if (vol==0) { IDirectSoundBuffer_Stop(lpSecondaryDSB[channel]); return; } IDirectSoundBuffer_SetVolume(lpSecondaryDSB[channel],VOL(vol)); IDirectSoundBuffer_SetPan(lpSecondaryDSB[channel],SEP(sep)); IDirectSoundBuffer_SetFrequency (lpSecondaryDSB[channel], ChannelInfo[channel].samplerate+PITCH(pitch)); if (ChannelInfo[channel].playing == true) { IDirectSoundBuffer_GetStatus(lpSecondaryDSB[channel], &DSB_Status); if ((DSB_Status & DSBSTATUS_PLAYING) == 0) IDirectSoundBuffer_Play(lpSecondaryDSB[channel], 0, 0, 0); }#endif // HAVE_LIBDSOUND}
开发者ID:dorienh,项目名称:smmu,代码行数:27,
示例10: delete_fluid_dsound_audio_drivervoid delete_fluid_dsound_audio_driver(fluid_audio_driver_t* d){ fluid_dsound_audio_driver_t* dev = (fluid_dsound_audio_driver_t*) d; fluid_return_if_fail(dev != NULL); /* tell the audio thread to stop its loop */ dev->cont = 0; /* wait till the audio thread exits */ if (dev->thread != 0) { if (WaitForSingleObject(dev->thread, 2000) != WAIT_OBJECT_0) { /* on error kill the thread mercilessly */ FLUID_LOG(FLUID_DBG, "Couldn't join the audio thread. killing it."); TerminateThread(dev->thread, 0); } } /* release all the allocated ressources */ FLUID_FREE(dev->format); if (dev->sec_buffer != NULL) { IDirectSoundBuffer_Stop(dev->sec_buffer); IDirectSoundBuffer_Release(dev->sec_buffer); } if (dev->prim_buffer != NULL) { IDirectSoundBuffer_Release(dev->prim_buffer); } if (dev->direct_sound != NULL) { IDirectSound_Release(dev->direct_sound); } FLUID_FREE(dev);}
开发者ID:nezticle,项目名称:fluidsynth,代码行数:34,
示例11: DSW_Termvoid DSW_Term( DSoundWrapper *dsw ){ // Cleanup the sound buffers if (dsw->dsw_OutputBuffer) { IDirectSoundBuffer_Stop( dsw->dsw_OutputBuffer ); IDirectSoundBuffer_Release( dsw->dsw_OutputBuffer ); dsw->dsw_OutputBuffer = NULL; } if (dsw->dsw_InputBuffer) { IDirectSoundCaptureBuffer_Stop( dsw->dsw_InputBuffer ); IDirectSoundCaptureBuffer_Release( dsw->dsw_InputBuffer ); dsw->dsw_InputBuffer = NULL; } if (dsw->dsw_pDirectSoundCapture) { IDirectSoundCapture_Release( dsw->dsw_pDirectSoundCapture ); dsw->dsw_pDirectSoundCapture = NULL; } if (dsw->dsw_pDirectSound) { IDirectSound_Release( dsw->dsw_pDirectSound ); dsw->dsw_pDirectSound = NULL; }}
开发者ID:BackupTheBerlios,项目名称:reshaked-svn,代码行数:29,
示例12: MCICDA_Pause/************************************************************************** * MCICDA_Pause [internal] */static DWORD MCICDA_Pause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms){ WINE_MCICDAUDIO* wmcda = MCICDA_GetOpenDrv(wDevID); HANDLE oldcb; DWORD br; TRACE("(%04X, %08X, %p);/n", wDevID, dwFlags, lpParms); if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID; oldcb = InterlockedExchangePointer(&wmcda->hCallback, NULL); if (oldcb) mciDriverNotify(oldcb, wmcda->wNotifyDeviceID, MCI_NOTIFY_ABORTED); if (wmcda->hThread != 0) { /* Don't bother calling stop if the playLoop thread has already stopped */ if(WaitForSingleObject(wmcda->stopEvent, 0) != WAIT_OBJECT_0 && FAILED(IDirectSoundBuffer_Stop(wmcda->dsBuf))) return MCIERR_HARDWARE; } else if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_PAUSE_AUDIO, NULL, 0, NULL, 0, &br, NULL)) return MCIERR_HARDWARE; if ((dwFlags & MCI_NOTIFY) && lpParms) MCICDA_Notify(lpParms->dwCallback, wmcda, MCI_NOTIFY_SUCCESSFUL); return 0;}
开发者ID:MichaelMcDonnell,项目名称:wine,代码行数:29,
示例13: dsound_freestatic void dsound_free(void *data){ dsound_t *ds = (dsound_t*)data; if (!ds) return; if (ds->thread) { ds->thread_alive = false; sthread_join(ds->thread); } DeleteCriticalSection(&ds->crit); if (ds->dsb) { IDirectSoundBuffer_Stop(ds->dsb); IDirectSoundBuffer_Release(ds->dsb); } if (ds->ds) IDirectSound_Release(ds->ds); if (ds->event) CloseHandle(ds->event); if (ds->buffer) fifo_free(ds->buffer); free(ds);}
开发者ID:Joonie86,项目名称:RetroArch,代码行数:32,
示例14: DS_PlayStopstatic void DS_PlayStop(void){ do_update = 0; if (pSoundBuffer) IDirectSoundBuffer_Stop(pSoundBuffer); VC_PlayStop();}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:7,
示例15: DSoundRender_Stopstatic HRESULT WINAPI DSoundRender_Stop(IBaseFilter * iface){ HRESULT hr = S_OK; DSoundRenderImpl *This = (DSoundRenderImpl *)iface; TRACE("(%p/%p)->()/n", This, iface); EnterCriticalSection(&This->filter.csFilter); { DWORD state = 0; if (This->dsbuffer) { hr = IDirectSoundBuffer_GetStatus(This->dsbuffer, &state); if (SUCCEEDED(hr)) { if (state & DSBSTATUS_PLAYING) hr = IDirectSoundBuffer_Stop(This->dsbuffer); } } if (SUCCEEDED(hr)) This->filter.state = State_Stopped; /* Complete our transition */ SetEvent(This->state_change); SetEvent(This->blocked); MediaSeekingPassThru_ResetMediaTime(This->seekthru_unk); } LeaveCriticalSection(&This->filter.csFilter); return hr;}
开发者ID:r6144,项目名称:wine,代码行数:31,
示例16: DSW_Termvoid DSW_Term( DSoundWrapper *dsw ){// Cleanup the sound buffers if (dsw->dsw_OutputBuffer) { IDirectSoundBuffer_Stop( dsw->dsw_OutputBuffer ); IDirectSoundBuffer_Release( dsw->dsw_OutputBuffer ); dsw->dsw_OutputBuffer = NULL; }#if SUPPORT_AUDIO_CAPTURE if (dsw->dsw_InputBuffer) { IDirectSoundCaptureBuffer_Stop( dsw->dsw_InputBuffer ); IDirectSoundCaptureBuffer_Release( dsw->dsw_InputBuffer ); dsw->dsw_InputBuffer = NULL; } if (dsw->dsw_pDirectSoundCapture) { IDirectSoundCapture_Release( dsw->dsw_pDirectSoundCapture ); dsw->dsw_pDirectSoundCapture = NULL; }#endif /* SUPPORT_AUDIO_CAPTURE */ if (dsw->dsw_pDirectSound) { IDirectSound_Release( dsw->dsw_pDirectSound ); dsw->dsw_pDirectSound = NULL; }}
开发者ID:andreipaga,项目名称:audacity,代码行数:28,
示例17: DSoundRender_Pausestatic HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface){ HRESULT hr = S_OK; DSoundRenderImpl *This = (DSoundRenderImpl *)iface; TRACE("(%p/%p)->()/n", This, iface); EnterCriticalSection(&This->filter.csFilter); if (This->filter.state != State_Paused) { DWORD state = 0; if (This->filter.state == State_Stopped) { This->pInputPin->end_of_stream = 0; } if (This->dsbuffer) { hr = IDirectSoundBuffer_GetStatus(This->dsbuffer, &state); if (SUCCEEDED(hr)) { if (state & DSBSTATUS_PLAYING) hr = IDirectSoundBuffer_Stop(This->dsbuffer); } } if (SUCCEEDED(hr)) This->filter.state = State_Paused; ResetEvent(This->blocked); ResetEvent(This->state_change); } LeaveCriticalSection(&This->filter.csFilter); return hr;}
开发者ID:r6144,项目名称:wine,代码行数:35,
示例18: I_StopSoundvoid I_StopSound(int channel){// proff 07/04/98: Added for CYGWIN32 compatibility#ifdef HAVE_LIBDSOUND IDirectSoundBuffer_Stop(lpSecondaryDSB[channel]); ChannelInfo[channel].playing=false;#endif // HAVE_LIBDSOUND}
开发者ID:dorienh,项目名称:smmu,代码行数:8,
示例19: dsound_stopstatic bool dsound_stop(void *data){ dsound_t *ds = (dsound_t*)data; dsound_stop_thread(ds); ds->is_paused = (IDirectSoundBuffer_Stop(ds->dsb) == DS_OK) ? true : false; return (ds->is_paused) ? true : false;}
开发者ID:Joonie86,项目名称:RetroArch,代码行数:9,
示例20: DSW_StopOutputHRESULT DSW_StopOutput( DSoundWrapper *dsw ){// Stop the buffer playback if( dsw->dsw_OutputBuffer != NULL ) { dsw->dsw_OutputRunning = FALSE; return IDirectSoundBuffer_Stop( dsw->dsw_OutputBuffer ); } else return 0;}
开发者ID:andreipaga,项目名称:audacity,代码行数:10,
示例21: buffers/**/brief stop playing and empty buffers (for seeking/pause)*/static void reset(struct ao *ao){ struct priv *p = ao->priv; IDirectSoundBuffer_Stop(p->hdsbuf); // reset directsound buffer IDirectSoundBuffer_SetCurrentPosition(p->hdsbuf, 0); p->write_offset = 0; p->underrun_check = 0;}
开发者ID:CrimsonVoid,项目名称:mpv,代码行数:13,
示例22: DirectSound_stop_audio_streamstatic void DirectSound_stop_audio_stream(void){ if (dsb != NULL) { IDirectSoundBuffer_Stop(dsb); IDirectSoundBuffer_Release(dsb); dsb = NULL; }}
开发者ID:cdrr,项目名称:MAME_hack,代码行数:10,
示例23: DSoundRender_OnStopStreamingstatic VOID WINAPI DSoundRender_OnStopStreaming(BaseRenderer * iface){ DSoundRenderImpl *This = impl_from_BaseRenderer(iface); TRACE("(%p/%p)->()/n", This, iface); IDirectSoundBuffer_Stop(This->dsbuffer); This->writepos = This->buf_size; SetEvent(This->blocked);}
开发者ID:reactos,项目名称:reactos,代码行数:10,
示例24: DirectSoundDrv_PCM_StopPlaybackvoid DirectSoundDrv_PCM_StopPlayback(void){ if (!Playing) { return; } IDirectSoundBuffer_Stop(lpdsbsec); IDirectSoundBuffer_SetCurrentPosition(lpdsbsec, 0); Playing = 0;}
开发者ID:DanielGibson,项目名称:jfaudiolib,代码行数:11,
示例25: I_StopSoundvoid I_StopSound(int handle){ sndsource_t *buf = GetSource(handle); if(!initOk || !buf) return; if(buf->source) { IDirectSoundBuffer_Stop(buf->source); IDirectSoundBuffer_SetCurrentPosition(buf->source, 0); }}
开发者ID:cmbruns,项目名称:Doomsday-Engine,代码行数:11,
示例26: m1sdr_Exitvoid m1sdr_Exit(void){ if (lpSecB) { IDirectSoundBuffer_Stop(lpSecB); IDirectSoundBuffer_Release(lpSecB); lpSecB = NULL; } if (lpPDSB) { IDirectSoundBuffer_Stop(lpPDSB); IDirectSoundBuffer_Release(lpPDSB); lpPDSB = NULL; } if (lpDS) { IDirectSound_Release(lpDS); lpDS = NULL; }}
开发者ID:Kinglions,项目名称:modizer,代码行数:20,
示例27: dsound_destroy_buffersstatic void dsound_destroy_buffers(void){ // stop any playback if (stream_buffer) IDirectSoundBuffer_Stop(stream_buffer); // release the buffer if (stream_buffer) IDirectSoundBuffer_Release(stream_buffer); stream_buffer = NULL;}
开发者ID:chrisjubb,项目名称:pinmame,代码行数:11,
示例28: TrashSoundvoid TrashSound(void){ FCEUI_Sound(0); if(ppbufsec) { IDirectSoundBuffer_Stop(ppbufsec); IDirectSoundBuffer_Release(ppbufsec); ppbufsec=0; } if(ppbuf) { IDirectSoundBuffer_Stop(ppbuf); IDirectSoundBuffer_Release(ppbuf); ppbuf=0; } if(ppDS) { IDirectSound_Release(ppDS); ppDS=0; }}
开发者ID:ficoos,项目名称:fceu-next,代码行数:21,
示例29: FreeSound/* FreeSound*/voidFreeSound (void){ int i; if (pDSBuf) { IDirectSoundBuffer_Stop (pDSBuf); IDirectSound_Release (pDSBuf); }// only release primary buffer if it's not also the mixing buffer we just released if (pDSPBuf && (pDSBuf != pDSPBuf)) { IDirectSound_Release (pDSPBuf); } if (pDS) { IDirectSound_SetCooperativeLevel (pDS, mainwindow, DSSCL_NORMAL); IDirectSound_Release (pDS); } if (hWaveOut) { waveOutReset (hWaveOut); if (lpWaveHdr) { for (i = 0; i < WAV_BUFFERS; i++) waveOutUnprepareHeader (hWaveOut, lpWaveHdr + i, sizeof (WAVEHDR)); } waveOutClose (hWaveOut); if (hWaveHdr) { GlobalUnlock (hWaveHdr); GlobalFree (hWaveHdr); } if (hData) { GlobalUnlock (hData); GlobalFree (hData); } } pDS = NULL; pDSBuf = NULL; pDSPBuf = NULL; hWaveOut = 0; hData = 0; hWaveHdr = 0; lpData = NULL; lpWaveHdr = NULL; dsound_init = false; wav_init = false;}
开发者ID:luaman,项目名称:qforge-newtree,代码行数:56,
注:本文中的IDirectSoundBuffer_Stop函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ IDirectSoundBuffer_Unlock函数代码示例 C++ IDirectSoundBuffer_Restore函数代码示例 |