当前位置: 首页>>代码示例>>C#>>正文


C# Sound.setRaw方法代码示例

本文整理汇总了C#中FMOD.Sound.setRaw方法的典型用法代码示例。如果您正苦于以下问题:C# Sound.setRaw方法的具体用法?C# Sound.setRaw怎么用?C# Sound.setRaw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FMOD.Sound的用法示例。


在下文中一共展示了Sound.setRaw方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: createStream

        public RESULT createStream(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, ref Sound sound)
        {
            RESULT result           = RESULT.OK;
            IntPtr      soundraw    = new IntPtr();
            Sound       soundnew    = null;

            try
            {
                result = FMOD_System_CreateStream(systemraw, data, mode, ref exinfo, ref soundraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (sound == null)
            {
                soundnew = new Sound();
                soundnew.setRaw(soundraw);
                sound = soundnew;
            }
            else
            {
                sound.setRaw(soundraw);
            }

            return result;
        }
开发者ID:huming2207,项目名称:ghgame,代码行数:32,代码来源:fmod.cs

示例2: getSound

        public RESULT getSound(int index, ref Sound sound)
        {
            RESULT result         = RESULT.OK;
            IntPtr soundraw      = new IntPtr();
            Sound soundnew      = null;

            try
            {
                result = FMOD_SoundGroup_GetSound(soundgroupraw, index, ref soundraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (sound == null)
            {
                soundnew = new Sound();
                soundnew.setRaw(soundraw);
                sound = soundnew;
            }
            else
            {
                sound.setRaw(soundraw);
            }

            return result;
        }
开发者ID:huming2207,项目名称:ghgame,代码行数:32,代码来源:fmod.cs

示例3: getCurrentSound

        public RESULT getCurrentSound(ref Sound sound)
        {
            RESULT result      = RESULT.OK;
            IntPtr soundraw    = new IntPtr();
            Sound  soundnew    = null;

            try
            {
                result = FMOD_Channel_GetCurrentSound(channelraw, ref soundraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (sound == null)
            {
                soundnew = new Sound();
                soundnew.setRaw(soundraw);
                sound = soundnew;
            }
            else
            {
                sound.setRaw(soundraw);
            }

            return result;
        }
开发者ID:huming2207,项目名称:ghgame,代码行数:32,代码来源:fmod.cs

示例4: createSound

        // Sound/DSP/Channel creation and retrieval.
        public RESULT createSound(string name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, ref Sound sound)
        {
            var result = RESULT.OK;
            var soundraw = new IntPtr();
            Sound soundnew = null;

            mode = mode | MODE.UNICODE;

            try
            {
                result = FMOD_System_CreateSound(systemraw, name_or_data, mode, ref exinfo, ref soundraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (sound == null)
            {
                soundnew = new Sound();
                soundnew.setRaw(soundraw);
                sound = soundnew;
            }
            else
            {
                sound.setRaw(soundraw);
            }

            return result;
        }
开发者ID:nathan-alden,项目名称:old-text-adventure,代码行数:35,代码来源:fmod.cs

示例5: getSubSound

        public RESULT getSubSound(int index, ref Sound subsound)
        {
            var result = RESULT.OK;
            var subsoundraw = new IntPtr();
            Sound subsoundnew = null;

            try
            {
                result = FMOD_Sound_GetSubSound(soundraw, index, ref subsoundraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (subsound == null)
            {
                subsoundnew = new Sound();
                subsoundnew.setRaw(subsoundraw);
                subsound = subsoundnew;
            }
            else
            {
                subsound.setRaw(subsoundraw);
            }

            return result;
        }
开发者ID:nathan-alden,项目名称:old-text-adventure,代码行数:32,代码来源:fmod.cs

示例6: IntPtr

        public RESULT createStream            (string name, MODE mode, ref Sound sound)
        {
            RESULT result           = RESULT.OK;
            IntPtr      soundraw    = new IntPtr();
            Sound       soundnew    = null;

            byte[] stringData;
            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                stringData = Encoding.Unicode.GetBytes(name + Char.MinValue);
                mode = mode | FMOD.MODE.UNICODE;
            }
            else
            {
                stringData = Encoding.UTF8.GetBytes(name + Char.MinValue);
            }

            try
            {
                result = FMOD_System_CreateStream(systemraw, stringData, mode, 0, ref soundraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (sound == null)
            {
                soundnew = new Sound();
                soundnew.setRaw(soundraw);
                sound = soundnew;
            }
            else
            {
                sound.setRaw(soundraw);
            }

            return result;
        }
开发者ID:whztt07,项目名称:GameEngine,代码行数:43,代码来源:fmod.cs


注:本文中的FMOD.Sound.setRaw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。