g_pDSBuffer8->Play(0,0,DSBPLAY_LOOPING);如何改为只播放一次?
LPDIRECTSOUNDBUFFER8 g_pDSBuffer8 = NULL;
g_pDSBuffer8->Play(0,0,DSBPLAY_LOOPING);
我只知道循环播放是DSBPLAY_LOOPING,但是只播放一次的参数是什么我就不知道了!请各位师兄指导指导!
[解决办法]
m_pDSoundBuffer->Play(0, 0, (bRepeat? DSBPLAY_LOOPING : 0));
重复:DSBPLAY_LOOPING
不重复:0