예제 #1
0
        public unsafe DriverInfo GetDriverInfo(int DriverId)
        {
            const int   AllocSize = Fmod.MaxInteropNameStringLength;
            Guid        guid;
            int         rate, channels;
            SpeakerMode mode;

            var NamePtr = stackalloc byte[AllocSize];

            library.System_GetDriverInfo(Handle, DriverId, NamePtr, AllocSize, &guid, &rate, &mode, &channels).CheckResult();

            return(new DriverInfo(FmodHelpers.BufferToString(NamePtr, AllocSize), guid, rate, mode, channels));
        }
예제 #2
0
        public unsafe PluginInfo GetPluginInfo(PluginHandle plugin)
        {
            const int   buflen = Fmod.MaxInteropNameStringLength;
            byte *      buffer = stackalloc byte[buflen];
            PluginType  type;
            FmodVersion version;

            library.System_GetPluginInfo(Handle, plugin, &type, buffer, buflen, &version).CheckResult();

            string name = FmodHelpers.BufferToString(buffer, buflen);

            return(new PluginInfo(name, type, version));
        }