I’ve updated my application to use FMOD Ex from FMOD 3 and now with the following method

private string GetSoundName(FMOD.Sound sound)
StringBuilder name = new StringBuilder(256);
sound.getName(name, name.Capacity);
return name.ToString().Trim();

the name is only returning a single character, the first character of the file name. This used to return the full file name less the path, is there something I am doing wrong? I have ensured that the nameLen is indeed 256 when it is passed to the C# wrapper.


  • You must to post comments

I don’t know for sure as I have no setup to test it with, but this sounds an awful lot like a wchar being treated as non-wchar, so you might need some extra Encoding.* stuff when handling whatever comes out of Fmod.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.