1

How can I play a sound from the

System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal

folder?

I have tried:

string path = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "Sounds/Twing.mp3");
CCSimpleAudioEngine.SharedEngine.PlayEffect(path);

But it doesn't work

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
Jaakers
  • 11
  • 2

1 Answers1

0

you get an exception ? i assume that the specified sound is loaded via the content pipleline, so you would need to add that to your content project.

So if you see ContentPipeline, ContentLoader or something in the stack trace, this may be the correct answer.

I dit not find a way to directly pass the audio. With images that is possible.

Thomas Haller
  • 199
  • 1
  • 11
  • Yep with images it is possible, but looking for a way with sounds too. I download a zipfile with images and sounds and unzip them in previous directory. But from there on I`m stuck zith my sound. – Jaakers Jan 14 '14 at 12:02