Results 1 to 7 of 7

Thread: Mp3-Player

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    84
    Is there anyone who has make their own Mp3-player and wants to send me the source code or the program in Visual Basic format ??

  2. #2
    Junior Member
    Join Date
    Mar 2000
    Location
    Ede, Gelderland, Nederland
    Posts
    26
    Simple!
    Code:
    Option Explicit
    
    Private Declare Function mciSendStringA Lib "WinMM" _
            (ByVal MCIcommand As String, ByVal returnStr As String, _
            ByVal returnLength As Integer, ByVal callBack As Integer) As Long
    
    Private Sub cmdPlay_Click
        Dim returnStr As String * 255
        Dim returnCode As Integer
    
        errorCode = mciSendStringA("open " & txtMp3.txt & " alias MP3" , returnStr, 255, 0)
        errorCode = mciSendStringA("play MP3", returnStr, 255, 0)
    End Sub
    
    Private Sub cmdStop_Click
        Dim returnStr As String * 255
        Dim returnCode As Integer
    
        errorCode = mciSendStringA("stop MP3", returnStr, 255, 0)
    End Sub
    
    Private Sub Form_Unload
        Dim returnStr As String * 255
        Dim returnCode As Integer
    
        errorCode = mciSendStringA("close MP3", returnStr, 255, 0)
    End Sub
    LauPro

  3. #3
    Junior Member
    Join Date
    Mar 2000
    Location
    Ede, Gelderland, Nederland
    Posts
    26

    This code is better!

    Code:
    Option Explicit
    
    Private Declare Function mciSendStringA Lib "WinMM" _
            (ByVal MCIcommand As String, ByVal returnStr As String, _
            ByVal returnLength As Integer, ByVal callBack As Integer) As Long
    
    Private Sub cmdPlay_Click()
        Dim returnStr As String * 255
        Dim errorCode As Integer
    
        errorCode = mciSendStringA("open " & txtMp3.Text & " alias MP3", returnStr, 255, 0)
        errorCode = mciSendStringA("play MP3", returnStr, 255, 0)
    End Sub
    
    Private Sub cmdStop_Click()
        Dim returnStr As String * 255
        Dim errorCode As Integer
    
        errorCode = mciSendStringA("stop MP3", returnStr, 255, 0)
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
        Dim returnStr As String * 255
        Dim errorCode As Integer
    
        errorCode = mciSendStringA("close MP3", returnStr, 255, 0)
    End Sub
    LauPro

  4. #4
    Lively Member
    Join Date
    Mar 2000
    Posts
    80

    Red face HEy

    Hey ?

    Are u serious , MP3 is a compression technique known as the
    mpeg layer 3 and one of the best compression methods and one of the most complex to decode
    and u just use WAVE api to play it ?

    What The FUC**** ?

    Explain YourSelf
    Got It , Roger And Out

  5. #5
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    It's easy, if you have the right codecs installed (and most ppl with MediaPlayer 6.2 or above) do have them, you can use the that API.
    But it relies on installed codecs!!
    Check out http://www.softseek.com, there are some very good ocx's available who play mp3s WITHOUT installed codecs, so you can even play mp3s with that ocx on clean installed machines with nothing else then your program.
    Hope this helps

    Crazy D

  6. #6
    Lively Member
    Join Date
    Mar 2000
    Posts
    80

    A Tought

    Now You Knocked Winamp to the ground real hard

    and i tought it requries affort

    Now i can just run the mp3 by a software i wrote

    and i quote a member that was before me

    : Shell("START 1.mp3") ;
    dont steal that code its a patent No. 842972

    and belongs to the member that wrote it down

    u can use it only on one computer

    Thank You
    Got It , Roger And Out

  7. #7
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    *LOL* I've never said winamp is so kewl.. (actually I think it sucks *LOL*)
    Hope this helps

    Crazy D

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