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 ?
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
i do not understant
What don't you understand? Megatron explains every event that is taking place.
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.