Page 1 of 2 12 LastLast
Results 1 to 40 of 48

Thread: [RESOLVED] Is there something that acts and loops like sndPlaySOund, but can play .mp3 files?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Resolved [RESOLVED] Is there something that acts and loops like sndPlaySOund, but can play .mp3 files?

    I need something that can loop perfectly like sndPlaySound does, but i also need something that can play .mp3 files... I dont want to have to use a control though. Any ideas?

    If i have to use a control(like the ones in the tools...), then let me know.

    The problem is that the .wav files are just WAY to big. I put them into a .res, and it makes the project HUGE. So, i want to try .mp3. Tried it with sndPlaySound(ik u cant use 'em. Just foolin around) and of course didnt work.... so.. yeah. plz help. i need this help so bad!
    Last edited by Gamemaster1494; Jul 6th, 2010 at 10:11 PM.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  2. #2
    Frenzied Member
    Join Date
    Mar 2009
    Posts
    1,182

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    MMC (Microsoft Multimedia Control) should be able to play *.mp3's...



    Good Luck
    Option Explicit should not be an Option!

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    yeah, but how would u get those to loop, like start again RIGHT as the song ends?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  4. #4
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    mmc uses mci, there is a "repeat" command for mcisendstring,
    but if i'm not mistaken,
    there is some delay between each loop.
    you can try it, the command is:


    Code:
    Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal lBuffer As Long) As Long
    Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal HwndCallback As Long) As Long
    Declare Function mciGetErrorString Lib "winmm.dll" Alias "mciGetErrorStringA" (ByVal dwError As Long, ByVal lpstrBuffer As String, ByVal uLength As Long) As Long
    
    Public Const MAX_PATH = 260
    
    Public LastMCIError As Long
    
    
    Public Function LenZ(ByVal Str1 As String) As Integer
        LenZ = InStr(1, Str1$, vbNullChar)
    End Function
    
    
    Public Function RTrimNull(ByVal Str1 As String) As String
        Dim iNum As Integer
    
        iNum = LenZ(Str1$)
        If iNum <= 0 Then
            iNum = InStr(1, Str1$, Chr(13))
            If iNum <= 0 Then
                RTrimNull$ = RTrim(Str1$)
                Exit Function
            End If
        End If
        RTrimNull$ = Left(Str1$, iNum - 1)
    End Function
    
    
    Public Function GetShortPath(ByVal Str1 As String) As String
        Dim strBuf As String * MAX_PATH
    
        Call GetShortPathName(Str1$, strBuf$, MAX_PATH - 1)
        GetShortPath$ = RTrimNull$(strBuf$)
    End Function
    
    Public Function MCIGetError(Optional ByVal lErr As Long = -1) As String
        Dim Str1 As String * 1024
    
        If lErr = -1 Then lErr = LastMCIError
        'retrieve the error string
        Call mciGetErrorString(lErr, Str1$, 1023)
        'strip off the trailing spaces
        MCIGetError$ = RTrimNull$(Str1$)
    End Function
    
    Private Function Mci_(ByVal sCommand As String, Optional Ret As Long = vbNull) As String
        Dim Str1 As String * 512
    
        LastMCIError = mciSendString(sCommand, Str1$, 511, 0)
        If Ret <> vbNull Then Ret = LastMCIError
        Mci_$ = RTrimNull$(Str1$)
    End Function
    
    
    Function MCIOpen(ByVal fName As String, Optional ByVal sDevice As String = "mpegvideo") As Boolean
        Dim Num1 As Long
        Call Mci_$("open " & GetShortPath$(fName) & " type " & sDevice$ & " alias MediaStream", Num1)
        Call Mci_$("set MediaStream time format milliseconds")
        If Num1 Then MCIOpen = True
    End Function
    
    Sub Main
      MCIOpen "my_mp3.mp3"
      mci_ "play MediaStream repeat"
    End Sub

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Yeah. there is a time laps b4 it loops again... i dont rly want that.... is there another way?
    Last edited by Gamemaster1494; Jul 7th, 2010 at 02:25 PM.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  6. #6
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    for mp3 i think the repeat method can be good enough.

    you can also try these methods:
    using a timer and check the playing state.
    using notify command, mci will call your form, when it finish playing.

    i checked these 2 methods with tiny wav files and it doesn't work as i want,
    sndplay does it for waves the best, except that it can't play more than one file per app.

    but as i said for mp3, i think the mci is good enough.

    you can also try other dlls,
    on my signature there is a very good audio library, that has many features, like effects, etc...

    also there is a very good app in the forum code bank, called "monoton".
    this a full audio library, written in vb, and it's very good.

  7. #7
    New Member
    Join Date
    Jul 2010
    Posts
    3

    Resolved Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Put this code in module
    Code:
      Option Explicit
      Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
    
     Private Const HWND_TOPMOST = -1
     Private Const SWP_NOMOVE = &H2
     Private Const SWP_NOSIZE = &H1
    
     Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
     Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
     Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
     Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
     Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
    Private Sub Pause()
        Call mciSendString("pause mp3play", 0, 0, 0)
    End Sub
    
    Public Sub Play(MpegAudio As String)
        Dim lngLen As Long, strShort As String * 255, strPlay As String
        Call mciSendString("stop mp3play", 0, 0, 0)
        Call mciSendString("close mp3play", 0, 0, 0)
        lngLen = GetShortPathName(MpegAudio, strShort, 255)
        strPlay = Left(strShort, lngLen)
        Call mciSendString("open " & strPlay & " type mpegvideo alias mp3play", 0, 0, 0)
        Call mciSendString("play mp3play", 0, 0, 0)
    End Sub
    
    Private Sub Resume_Play()
        Call mciSendString("resume mp3play", 0, 0, 0)
    End Sub
    
    Private Sub Speed_Slow()
        Call mciSendString("set mp3play speed 500", 0, 0, 0)
    End Sub
    
    Private Sub Speed_Normal()
        Call mciSendString("set mp3play speed 1000", 0, 0, 0)
    End Sub
    
    Private Sub Speed_Fast()
        Call mciSendString("set mp3play speed 1500", 0, 0, 0)
    End Sub
    
    Private Sub StopIt()
        Call mciSendString("stop mp3play", 0, 0, 0)
        Call mciSendString("close all", 0, 0, 0)
    End Sub
    
    Private Function length() As String
        Dim LengthA As String * 30
        Call mciSendString("status mp3play length", LengthA, Len(LengthA), 0)
        length = LengthA
    End Function
    
    Private Function Position() As String
        Dim PositionA As String * 30
        Call mciSendString("status mp3play position", PositionA, Len(PositionA), 0)
        Position = PositionA
    End Function
    
    Private Sub Mute(isMute As Boolean)
        If isMute = True Then
            Call mciSendString("set mp3play audio all off", 0, 0, 0)
        ElseIf isMute = False Then
            Call mciSendString("set mp3play audio all on", 0, 0, 0)
        End If
    End Sub
    
    Private Sub PauseRsm(rSm As Boolean)
     If rSm = True Then
        Call Pause
     ElseIf rSm = False Then
        Call Resume_Play
     End If
    End Sub
    Usage is here ... in the form write this code ...

    Code:
    Private Sub Form_Load ()
    
    Play("c:\windows\help\mysound.mp3")  ' your mp3 file path
    
    
    End Sub

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    okay tricker32.... how does this help me loop? xD
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  9. #9
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Quote Originally Posted by Gamemaster1494 View Post
    okay tricker32.... how does this help me loop? xD
    One post I found said to add repeat to the play string,...
    Call mciSendString("play mp3play repeat", 0, 0, 0)

  10. #10
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    What about having your app download the .wav and/or .mp3 from the net.

    Play("Http://www.windows.com/help/mysound.mp3")
    Play("Http://www.windows.com/help/mysound.wav")
    Last edited by 5ms?; Jul 8th, 2010 at 04:37 PM.

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Hmm........... well, i was kinda wanting to avoid the overall size of the game. im using the .res to hold the .wav's, then exporting them. With the .wav's, its a HUGE game. like 196MB.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  12. #12
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    To avoid the overall size just check if a file exists
    Code:
    Private Sub Form_Load()
    Dim MyWav, wavFilepath, wavNetpath
    MyWav = "mysound.wav"
    wavFilepath = "??\???\????\"
    wavNetpath = "??/???/????/"
    If Not FileExists(wavFilepath & MyWav) Then download (wavNetpath & MyWav)
    The .res can be 0MBs.

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    No. You don't understand. I don't want them to have to download something. I want to use the .mp3, for everything to be already there. I wanted to use the .mp3 to cut the size of the download for it. =S
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  14. #14
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Hi Gamemaster1494
    Quote Originally Posted by Gamemaster1494 View Post
    No. You don't understand.
    Yip I understand, I understood from the get go.

    The next big trend, Cloud Computing is Internet-based computing, whereby shared resources, software, and information are provided to computers and other devices on demand

    Quote Originally Posted by Gamemaster1494 View Post
    I wanted to use the .mp3 to cut the size of the download for it. =S
    Good idear

    Quote Originally Posted by Gamemaster1494 View Post
    I don't want them to have to download something. I want to use the .mp3, for everything to be already there.
    They have to download something, your app, and the .mp3/.wav in the app,
    then your app makes anther copy, so now you have two copy's on disk.

    Therefor if there is no .mp3/.wav in the app it would cut the size of the download, and the copy's on disk to.

    Quote Originally Posted by Gamemaster1494 View Post
    Any ideas?
    so.. yeah. plz help. i need this help so bad!
    Code:
    Private Sub Form_Load()
    Dim Mymp3, mp3Filepath, mp3Netpath
    Mymp3 = "mysound.mp3"
    mp3Filepath = "??\???\????\"
    mp3Netpath = "??/???/????/"
    If Not FileExists(mp3Filepath & Mymp3) Then download (mp3Netpath & Mymp3)
    Just an idea.

    Regards 5ms.

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Okay. Another question then 5ms?. If i download it, can i download a .zip file? and can the mcisendstring thing play sounds from a .zip file?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  16. #16
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Yip.
    Yip.
    Mmmm....No. ???????????

    If you download a .zip, just unzip.

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Yeah, i know that. im just wondering if it could do that. I'll think bout it. =)
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  18. #18
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Manual repeat: Since you know the length of the tracks. Why not just store the length of each track? Then you can call "play" again after the duration(see post #4 or #7).

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Yeah. I have done that, but, it still had a delay. What if i put that code in a .dll? Would it go faster?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  20. #20
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Quote Originally Posted by Gamemaster1494 View Post
    Yeah. I have done that, but, it still had a delay. What if i put that code in a .dll? Would it go faster?
    Did you actually check the difference between say, Timer, or GetTickCount(good, accurate enough for this)? Or did you iterate a 'static' variable in a timer(bad, not accurate enough)?

  21. #21

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    ...Static.... xD um. How would i try to do that first one?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  22. #22
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Create a 'static' variable(or private, or a property), but instead of iterating it on a timer, you add the length of the track when the track plays(like sVariable = Timer + length_of_track). Then you simply check: If Timer >= sVariable Then PlayNextSong.

    Timer is built in to VB, and is accurate to the nearest hundredth second.

  23. #23
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Quote Originally Posted by Gamemaster1494 View Post
    I need something that can loop perfectly like sndPlaySound does, but i also need something that can play .mp3 files... I dont want to have to use a control though. Any ideas?

    If i have to use a control(like the ones in the tools...), then let me know.

    The problem is that the .wav files are just WAY to big. I put them into a .res, and it makes the project HUGE. So, i want to try .mp3. Tried it with sndPlaySound(ik u cant use 'em. Just foolin around) and of course didnt work.... so.. yeah. plz help. i need this help so bad!
    the size problem also can be solved.
    you can zip your files, then insert them to the res file,
    and on run time, unzip them.

    you can easily build the zip and unzip functions your self,
    using for example zlib.dll
    or use third party zip/unzip like 7-zip for example.

    another simpler solution is to insert the files to the res, as they are,
    and at the end, zip the big exe file, with upx, it will get much smaller,
    as if you packed the files with zip utility.

  24. #24
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Are you sure your MP3 doesn't either have some blank lead-in or lead-out as part of the file? Using the mciSendString with repeat as part of the play command there should be no delay between the when the file ends and when the file starts again.

  25. #25

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    I am positive MartT because i edited them with Audacity. No blank lead-in's or outs.

    @FireXTol: I'm not certain what you are saying, but are you saying, to have a timer add to a variable, then if the variable is longer than the length of the track, start it over?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  26. #26
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    There must be more to your file than you think. Attached is a quick sample project that shows using repeat in the play command for mciSendString will play without a pause. Excuse the choice of mp3 but it was the first small file I found that didn't have a lead in and out to demonstrate with.
    Attached Files Attached Files

  27. #27

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    MarkT. I have a feeling that due to the amount of code that i have in a different timer, that, it delays it to know when to loop. Because on my only timer, it has 1445 lines of code in it. Some of them are Calling a function.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  28. #28

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Also MarkT, there is a problem with your .zip. Says can't find project or library. and highlights strFile = IIf(Right(App.Path, 1) = "\", "Duck.mp3", "\Duck.mp3")

    the Right in it is what it highlights.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  29. #29
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    You have other problems if VB6 does not recognize the Right function. To get past it in this example try replacing these 2 lines
    Code:
        strFile = IIf(Right(App.Path, 1) = "\", "Duck.mp3", "\Duck.mp3")
        strFile = App.Path & strFile
    with
    Code:
        strFile = App.Path & "\Duck.mp3"

  30. #30

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Would it be because you have 2 II in IIf?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  31. #31
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    No, IIf is a function. About the only place I have found I like to use it is in this example where you are testing app.path. In this case I know that app.path will not end with a \ so we can just hardcode it here.

  32. #32

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    It recognizes the Right function because i lowercased it, and went away from that code and it automaticly uppercased it..... Hum... werid. Now it is highlighting Chr and saying the same thing.... wth is wrong with my vb!?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  33. #33
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    You have something wierd going on. The Chr function is a common one. To get past this one remove the Length and Position functions in the module since they aren't being used.

  34. #34

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Hold on. Im going to restart my computer. It has been on for a while. Maybe that's the case. Idk.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  35. #35

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Still not working. This is super weird.... Any idea y this would be happening? It doesn't even recognize Trim().....
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  36. #36
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Attached is the stripped down example that addresses all the error you have seen. Let me know if it runs.
    Attached Files Attached Files

  37. #37

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Hold on... I opened up References, and it is saying:
    MISSING: Micorsoft Fax Service Extended COM Type Library
    MISSING: faxcom 1.0 library types

    IS that why it is not working!?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  38. #38
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Remove those references. Do you have these four selected.
    Attached Images Attached Images  

  39. #39

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    Yes i do. I was able to find thoes 2 .dll's that caused it to say Missing, and it fixed it. =D
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  40. #40
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Is there something that acts and loops like sndPlaySOund, but can play .mp3 files

    You don't need those DLLs referenced. That was something I had been working on earlier and forgot to exclude them before I zipped the project.

Page 1 of 2 12 LastLast

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