Jump to content
  • Advertisement
Sign in to follow this  
ed209

[.net] referencing audio files in a project

This topic is 3657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm working in vb.net and in the debug folder of my project I added a folder named 'sounds'. So when I go to play a sound I would do My.Computer.Audio.Play("sounds/run1.wav") For some reason, it won't play the sound. Am I putting the folder is the wrong place??? Any help is appreciated.

Share this post


Link to post
Share on other sites
Advertisement
The path to data depends on who is using that data. I am guessing your application is calling another app to play the sounds. If that is the case then it is looking in it's local path, not yours.

theTroll

Share this post


Link to post
Share on other sites
Thanks, but I got it to work with..


My.Computer.Audio.Play(System.AppDomain.CurrentDomain.BaseDirectory + "sounds/run1.wav")

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!