mfc event stored ?! (directx programming)

E6f2340955ae931034e5a88c25236ffe
0
hadikazemi 101 Oct 12, 2009 at 13:36

hi
i have problem with capture 2 sound device in same time.
i have one system with 4 sound card and i want to record sound from 2 sound card in same time.
i create 2 directSound device in my program. my problem is when i create two directSoundCaptureBufer and start recording from one device. after stop recording from that device with IDirectSoundCaptureBuffer_Stop(lpdscb); and then i start recording again, streamTofile() calls frequently that means in stop time, events stored and after start recording, all stored events run and streamTofile call frequently unreasonable! if i create only one capturebuffer this problem dont accure and after stop and start again recording start without call streamTofile() unreasonable!
this occur independent of device 2 start or stop.
some code:

DWORD dwEvt = MsgWaitForMultipleObjects(
NUMCAPTUREEVENTS,
rghEvent,
FALSE,
INFINITE,
QS_ALLINPUT);

dwEvt -= WAIT_OBJECT_0;

if (dwEvt < NUMCAPTUREEVENTS)
{
StreamToFile();
}

i debug my program and i know that in stop time, my program dont go inside if(dwEvt < NUMCAPTUREEVENTS) and therefore streamTofile() dont called in stop time.

0 Replies

Please log in or register to post a reply.

No replies have been made yet.