Results 1 to 5 of 5

Thread: Anyone know how i can turn a mp3 into a wav with using a ocx??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    219

    Lightbulb 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 ?
    me

  2. #2
    Guest

    Lightbulb 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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    219
    i do not understant
    me

  4. #4
    Guest
    What don't you understand? Megatron explains every event that is taking place.

  5. #5
    Guest
    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
  •  



Click Here to Expand Forum to Full Width