Results 1 to 5 of 5

Thread: vb.net sound effect

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2011
    Posts
    118

    vb.net sound effect

    Hey,

    My application is not playing the sound effect and I don't understand why.

    Code:
        Public SEffect As SoundEffect
    Code:
                SEffect = OurContent.Content.Load(Of SoundEffect)("Music/Sounds/Success1")
    Code:
            SEffect.Play()
    this here above is my code, but its not working..

    anybody help?

    thanks

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: vb.net sound effect

    This isn't native VB.Net so what class/control are we dealing with here?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: vb.net sound effect

    Quote Originally Posted by dunfiddlin View Post
    This isn't native VB.Net so what class/control are we dealing with here?
    Seems like XNA: http://msdn.microsoft.com/en-us/libr...dio.31%29.aspx

    I haven't played around with XNA in a while... Are you sure the filename is "Success1", and not for instance "Success1.wav" or anything like that?
    <<<------------
    Improving Managed Code Performance | .NET Application Performance
    < Please if this helped you out. Any kind of thanks is gladly appreciated >


    .NET Programming (2012 - 2018)
    ®Crestron - DMC-T Certified Programmer | Software Developer
    <<<------------

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2011
    Posts
    118

    Re: vb.net sound effect

    Quote Originally Posted by AceInfinity View Post
    Seems like XNA: http://msdn.microsoft.com/en-us/libr...dio.31%29.aspx

    I haven't played around with XNA in a while... Are you sure the filename is "Success1", and not for instance "Success1.wav" or anything like that?
    Yes, sorry, it's XNA. And yes, the filenames are correct but it just wont play the sound

  5. #5
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: vb.net sound effect

    Explain where the file is, relative to your executable. I haven't done XNA in a while, but I remember it had to be relative to the Content folder.

    How did you add the wav to the project?
    Where is this structure located: Music/Sounds? (Being that it's a relative path)
    <<<------------
    Improving Managed Code Performance | .NET Application Performance
    < Please if this helped you out. Any kind of thanks is gladly appreciated >


    .NET Programming (2012 - 2018)
    ®Crestron - DMC-T Certified Programmer | Software Developer
    <<<------------

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