Results 1 to 3 of 3

Thread: Wave Files !! Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Location
    Lost
    Posts
    216

    Talking

    Hi !
    playing wave files using API:

    Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

    1-What are all the values of uFlags?
    2-How can we stop playing a wave file started yo play using this API call


    Thank You anyway!!

    B.S Computer Science
    M.S Computer Engineering

  2. #2
    Guest
    Use the PlaySound API funtion instead which is the same as the sndPlaySound API function.

    Code:
    Private Declare Function PlaySound Lib "winmm.dll" _
     Alias "PlaySoundA" (ByVal lpszName As String, ByVal _
    hModule As Long, ByVal dwFlags As Long) As Long
    
    Private Sub Command1_Click()
    
        'Play the Wav file
        PlaySound "C:\MyFile.wav", 0&, &H1
    
    End Sub
    
    
    Private Sub Command2_Click()
    
        'Stop the WAV file
        PlaySound "C:\MyFile.wav", 0&, &H4
    
    End Sub

  3. #3
    Guest

    Hey Matthew

    I've used PlaySound / sndPlaySound, but I can't play two sounds at the same time.

    I've also done buffers correctly through direct sound to play two sounds at once, but is there a way to play 2 sounds at once, without using direct x/direct sound?

    I was thinking of importing flash movies that are just wavs...

    Masterguy

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