0
0

I need to be able to record a track of audio and play the beginning of the track while it is being recorded. Can anybody give me a rough idea of how to do this either to RAM or a file using VB6?

  • You must to post comments
0
0

I see that this can be done, but I’m having trouble making the recording example in PureBasic into something that will work in VB… someof the sytax is difficult to comprehend… does anyone have something that is SIMPLE? The purebasic example seems to have a lot of code intermingled and is hard to tell what I can throw out… I don’t need any reverb, for example. The part that saves a wav file to hard drive – does it save more than 5 seconds… I need it to free-run record until I tell it to stop. I wish that more of the demos, such as recording would be written for VB, thanks for any help…

  • You must to post comments
0
0

first off, create a custom sample:

[code:1qu44nhs]
‘Create a custom sample (44100 * 5 is 5 seconds at 44.1k) This sample will loop forever every 5 seconds when played
Sample = FSOUND_Sample_Alloc(0, 44100 * 5, FSOUND_NORMAL | FSOUND_LOOP_NORMAL, 44100, 255, 127, 1)
[/code:1qu44nhs]

Then record into it…
[code:1qu44nhs]
FSOUND_Record_SetDriver(-1) ‘Use default driver for recording
FSOUND_Record_StartSample(Sample, True) ‘Record with looping
Sleep(40)
Channel = FSOUND_PlaySound(FSOUND_FREE, Sample)
[/code:1qu44nhs]

There is a better way to prevent overlapping of the recording pos and the
playback pos, but sleeping works just fine for demo

just use

[code:1qu44nhs]
FSOUND_StopSound(Channel)
FSOUND_Record_Stop()
[/code:1qu44nhs]

  • You must to post comments
0
0

I guess for now, I just want to try to record a file. Two potential issues, changing the datachunk length once I am done recording, and… will I have trouble saving a buffer fast enough to get it onto the harddrive, or should I use two buffers and alternate between them? – Record one while saving the other…

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.