|
-
Jul 15th, 2000, 12:17 PM
#1
Thread Starter
Addicted Member
how can i turn a mp3 into a wav with out using a ocx ?
how can i turn a mp3 into a wav with out using a ocx ?
-
Jul 15th, 2000, 01:49 PM
#2
Use mciSendString
If you do not want to use a Control to play MP3's you must be advanced in reading the MP3 File format, then use that data to output it into the speakers.
However, if you use a Control to play the MP3's you can try using the mciSendString API to recrod it into a WAV.
Since different MP3 Controls have different methods of usage, I will give you an example of how to use the mciSendString to record. Make a Form with 2 CommandButton's called cmdRecord and cmdSave and put the following code into your Form.
Code:
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Sub cmdRecord_Click()
'Open a WaveAudio called Record
mciSendString "open new type waveaudio Alias record", 0&, 0, 0
'Start Recording
mciSendString "record record", 0&, 0, 0
'Play your MP3 Here.
End Sub
Private Sub cmdSave_Click()
'Stops recording
mciSendString "stop record", 0&, 0, 0
'Saves the sound
mciSendString "save record C:\Windows\Desktop\MyWav.wav", 0&, 0, 0
'Close "Record"
mciSendString "close record", 0&, 0, 0
End Sub
-
Jul 15th, 2000, 04:37 PM
#3
Thread Starter
Addicted Member
-
Jul 15th, 2000, 04:42 PM
#4
What don't you understand? Megatron explains every event that is taking place.
-
Jul 15th, 2000, 05:02 PM
#5
First, you must use a Control to play the WAV, which is much easier than having to read the File-Format and translate it to the speakers.
Then use the mciSendString API (shown above) to Record and save it. The line that says Play your MP3 Here is where you play your MP3 using whatever command that you MP3Player uses. For example, Mp3Control.Play "C:\MyMp3.mp3".
If you still do not understand, I can elaborate more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|