Click to See Complete Forum and Search --> : How to convert wav to mp3 using VB?


janice_2k4
07-05-2004, 03:14 AM
Dear gurus and members,
I am a newbie in VB and programming. I have created an exe that allows to record, play and save user's speech onto his computer. The file is saved as wav. I wonder is it possible to convert the files to mp3 format when user clicks on Save button? I use VB6 to create the MCI and currently stucked in the convertion of wav to mp3. The following is the code of my Save button:


Private Sub cmdSave_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSave.Click

Dim sName As String
counter = counter + 1
sName = "Test" & counter

WaveSaveAs((VB6.GetPath & "\" & sName & ".wav"))
cmdRecord.Enabled = True
cmdStop.Enabled = True
cmdPlay.Enabled = True
cmdSave.Enabled = False
cmdReset.Enabled = False
Exit Sub

End Sub


I would be very glad if someone could share the knowledge and expertise in this area with me. Looking forward to some replies soon.

Thanks in advance,
Janice

buntine
07-05-2004, 04:49 AM
If you download the archive provided by Mr. Bishop, you will be able to see how he has converted WAV to Mp3

http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=40974&lngWId=1

Regards.