Results 1 to 5 of 5

Thread: Play Wave File [RESOLVED]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Posts
    124

    Play Wave File [RESOLVED]

    Is there a way to play a wav file without use of DirectSound?

    thx
    Last edited by daveStudent; Jul 17th, 2003 at 09:15 AM.

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    VB Code:
    1. Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Integer, ByVal dwFlags As Integer) As Integer
    2.     Private Const SND_FILENAME As Integer = CInt(&H20000)
    3.  
    4.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    5.         Dim path As String = "C:\Knock.wav" '/// your wav's location here.
    6.         PlaySound(path, 0, SND_FILENAME)
    7.     End Sub
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Posts
    124
    thank you

    it works perfect

    db

  4. #4
    New Member
    Join Date
    Nov 2004
    Posts
    1

    Thanks

    Your the Man!

  5. #5
    Lively Member
    Join Date
    Oct 2004
    Posts
    123
    Is it possible to play 2 sounds and more at 1 goal without using directsound?
    The Power Of Sharing Knowledge!

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