I’m from Czech republic so we use also non-ascii characters in out alphabet, I’m now testing FModEx 4.6.23 because of problem with those chars.
I’m using C# to test it,
private FMOD.System system = null;
private FMOD.Sound sound = null;
private FMOD.RESULT result;
private string s = "assume here are some Czech characters";
result = FMOD.Factory.System_Create(ref system);
result = system.init(1, FMOD.INITFLAG.NORMAL, (IntPtr)null);
result = system.createSound(s, (FMOD.MODE.DEFAULT), ref sound);
result = system.createSound(s, (FMOD.MODE.UNICODE), ref sound);
and assume I have 2 systems WindowsXP in Czech localization (WinXPCz) and WindowsXP in english (WinXPEn)
the results are:
example 1 + WinXPCz = works correctly
example 1 + WinXPEn = error FILE_NOT_FOUND
example 2 + WinXPCz = error FILE_NOT_FOUND
example 2 + WinXPEn = error FILE_NOT_FOUND
how can I make all those 4 cases work?
- Bauglir asked 11 years ago
Hello, i recently was having the same problem with playing unicode files. I tried the above code and it works. I noticed while making the change, some of the import functions had the CharSet = CharSet.Unicode, but not all of them for the createstream function. This is the one i changed to make it work.
[DllImport (VERSION.dll, CharSet = CharSet.Unicode)]
private static extern RESULT FMOD_System_CreateStream (IntPtr system, string name_or_data, MODE mode, int exinfo, ref IntPtr sound);
that one above did not have the unicode charset, and fmod would not load my unicode files. So i added it. FMOD version is : 4.13.03
- nci answered 10 years ago
I’ve found the solution, there has to be some correction made in fmoc.cs libraty import, import function must be marked as Unicode e.g
[DllImport(VERSION.dll, CharSet = CharSet.Unicode)]
private static extern RESULT FMOD_System_CreateSound (IntPtr system, string name_or_data, MODE mode, int exinfo, ref IntPtr sound);
- Bauglir answered 11 years ago
Please login first to submit.