Article View: comp.lang.basic.visual.misc
Article #486Trying to stream to a file from a looping capture buffer
From: Xavier Flix
Date: Fri, 19 Nov 1999 00:00
Date: Fri, 19 Nov 1999 00:00
32 lines
2110 bytes
2110 bytes
Hi...
I really hope someone can help me with this:
(I'm using DX7 for Visual Basic 6.0)
I'm trying to stream to a file the contents of a looping capture buffer, but
what gets saved into the file seems to be only halve of each cycle.
I've set an event at:
gDSCBD.lBufferBytes \ 2
where gDSCBD is the direct sound capture structure used by the
CreateCaptureBuffer method.
As you can see, I'm triggering it every time the Write position is at the
halve point of the cyclic buffer.
This is the code that saves the buffer to the file:
gDSCB.GetCurrentPosition WriteCursor
ReDim sBuffer8(WriteCursor.lWrite - 1)
gDSCB.ReadBuffer 0, WriteCursor.lWrite, sBuffer8(0), DSCBLOCK_DEFAULT
Put #StreamFileHandler, , sBuffer8
Erase sBuffer8
Can anyone tell me what am I doing wrong???
Or even better, what should be the correct procedure to save the contents of
a looping capture buffer to a file?
I'll really appreciate a response.
Xavier Flix
xavier@xfx.net
Technical Details
Message-ID:
<i7eZ3.88643$YB4.2979010@typ12.nn.bcandid.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1053fc,1fc87f4f3364b3ad,start X-Google-Attributes: gid1053fc,public X-Google-Thread: 110e3b,1fc87f4f3364b3ad,start X-Google-Attributes: gid110e3b,public X-Google-Thread: fb992,1fc87f4f3364b3ad,start X-Google-Attributes: gidfb992,public X-Google-Thread: ffb5a,1fc87f4f3364b3ad,start X-Google-Attributes: gidffb5a,public X-Google-Thread: 11427d,1fc87f4f3364b3ad,start X-Google-Attributes: gid11427d,public From: "Xavier Flix" <xavier@xfx.net> Subject: Trying to stream to a file from a looping capture buffer Date: 1999/11/19 Message-ID: <i7eZ3.88643$YB4.2979010@typ12.nn.bcandid.com> X-Deja-AN: 550571165 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Trace: typ12.nn.bcandid.com 943025742 206.105.229.76 (Fri, 19 Nov 1999 10:35:42 EST) Organization: xFX JumpStart X-MSMail-Priority: Normal NNTP-Posting-Date: Fri, 19 Nov 1999 10:35:42 EST Newsgroups: comp.lang.basic.visual.misc,comp.lang.visual.basic,comp.lang.visual.basic.misc,es.comp.lenguajes.visual-basic,microsoft.public.usasalesinfo.developer.visualbasic