Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Record sound to a WAV file, Using VB6

619 views
Skip to first unread message

Mike Simmonds

unread,
Sep 13, 2004, 3:04:56 PM9/13/04
to
Hello

I am OK with VB6 language, can not understand VC or much else unless is
simply explained.

What i am trying to do is record the sound received from my Hauppauge WinTV
USB2 device to a file. I need to start recording to the WAV file and at a
set time stop recording, allowing the WAV file to be played like any other
WAV or audio file.

I have tried experimenting with code like...
'MCI command to save the WAV file
i = mciSendString("save capture " & CommonDialog1.FileName, 0&, 0, 0)
... but no WAV file is created

My current success is...
Private Sub Command1_Click()
'Start Recording
With MMControl1
.DeviceType = "WaveAudio"
.FileName = "F:\New.wav"
.RecordMode = mciRecordOverwrite
.UpdateInterval = 10
.Command = "Open"
.Command = "Record"
End With

'End Recording
End Sub

Private Sub Command2_Click()
MMControl1.Command = "Save"
MMControl1.Command = "Close"
End Sub
... but this records any sound, where i only want the sound that the
Hauppauge device receives.

Can any one help, hope theres enough information to understand what im
trying to do?
Mike


luminos

unread,
Sep 13, 2004, 5:00:58 PM9/13/04
to
Manually mute any other inputs on the mixer. If you want to do this in VB
code, you will need to use the API mixer functions.

Since the Hauppauge is on the line in channel, that is where you are
at....mute all other devices. If you have multiple devices on the line in
you are SOL.

"Mike Simmonds" <mike.s...@tesco.net> wrote in message
news:sbm1d.1109$5K3...@newsfe6-gui.ntli.net...

Norm Cook

unread,
Sep 14, 2004, 10:30:35 AM9/14/04
to
See Record a WAV File From Scratch
at
http://www.geocities.com/smigman.geo/mci/wav.html

"Mike Simmonds" <mike.s...@tesco.net> wrote in message news:sbm1d.1109$5K3...@newsfe6-gui.ntli.net...

Mike Simmonds

unread,
Sep 15, 2004, 2:54:42 PM9/15/04
to
Many thanks Luminos and Norm Cook,

What does SOL mean?? So Out of Luck????

I can get the exact sound using GraphEdit from Microsoft but am lost how or
what to use to write the code to do the same. Have you heard of GraphEdit???

Are there any other ideas to try out??
Mike


Norm Cook

unread,
Sep 16, 2004, 9:46:10 AM9/16/04
to
>What does SOL mean?? So Out of Luck????
Close, Sh*t Outa Luck

Don't know about graphedit--I thought you were just trying to record a wave from your sound card output.

Private Sub StartRecord()
mciSendString "close all", 0&, 0&, 0&
mciSendString "open new type waveaudio alias capture", 0&, 0&, 0&
mciSendString "set capture bitspersample 16", 0&, 0&, 0&
mciSendString "set capture samplespersec 44100", 0&, 0&, 0&
mciSendString "set capture channels 2", 0&, 0&, 0&
mciSendString "record capture", 0&, 0&, 0&
End Sub
Private Sub StopAndRecordWave()
mciSendString "save capture c:\test.wav", 0&, 0&, 0&
DoEvents
mciSendString "close capture", 0&, 0&, 0&
End Sub

"Mike Simmonds" <mike.s...@tesco.net> wrote in message news:Sd02d.122$Er....@newsfe1-gui.ntli.net...

Michael B. Johnson

unread,
Sep 16, 2004, 11:06:41 AM9/16/04
to
On Thu, 16 Sep 2004 08:46:10 -0500, "Norm Cook"
<normcoo...@cableone.net> wrote:

>>What does SOL mean?? So Out of Luck????
>Close, Sh*t Outa Luck

I so prefer SO Out of Luck, it has a more gracious sound to it.
_______________________
Michael B. Johnson

0 new messages