I am a beginner in FMOD core API and I am trying to play FSB5 files using C #, but it is not working. I am not sure where the problem lies, and I hope someone can answer it for me. I would greatly appreciate it.
This is my code:
FMOD.System system;
FMOD.Factory.System_Create(out system);
FMOD.Sound sound;
FMOD.Channel channel;
FMOD.ChannelGroup channelGroup;
FMOD.CREATESOUNDEXINFO exinfo;
//string fsbFilePath = "E:\\vorbis.ogg"; //This has a sound
string fsbFilePath = "E:\\wave_vorbis.fsb"; //This is No sound
FileInfo fileInfo = new FileInfo(fsbFilePath);
long fileSize = fileInfo.Length;
system.init(32, FMOD.INITFLAGS.NORMAL, IntPtr.Zero);
system.createChannelGroup("MyChannelGroup", out channelGroup);
exinfo = new FMOD.CREATESOUNDEXINFO();
exinfo.cbsize = Marshal.SizeOf(exinfo);
exinfo.fileoffset = 0;
exinfo.length = (uint)fileSize;
exinfo.suggestedsoundtype = SOUND_TYPE.FSB;
system.createSound(fsbFilePath, MODE.DEFAULT, ref exinfo, out sound);
system.playSound(sound, channelGroup, false, out channel);
Console.WriteLine("press any key to exit...");
Console.ReadKey();
sound.release();
system.close();
system.release();