Search code examples
c#audioxnastreamsoundeffect

C# XNA SoundEffect.FromStream


I want to load on XNA SoundEffect. I have tried to use:

SoundEffect.FromStream(TitleContainer.OpenStream(XXX));

The XXX is the addres but it require the address from the content and I want to search from the whole computer. Address like:

C:\Users\PC\Desktop\programs

How do I do that?


Solution

  • Will this work?

    SoundEffect.FromStream(new FileStream(path, FileMode.Open));
    

    where path is the file path.