• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FMOD.ChannelGroup类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ChannelGroup类属于FMOD命名空间,在下文中一共展示了ChannelGroup类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: createChannelGroup

 public RESULT createChannelGroup(string name, out ChannelGroup channelgroup)
 {
     channelgroup = null;
     byte[] bytes = Encoding.UTF8.GetBytes(name + '\0');
     IntPtr raw;
     RESULT result = System.FMOD5_System_CreateChannelGroup(this.rawPtr, bytes, out raw);
     channelgroup = new ChannelGroup(raw);
     return result;
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:9,代码来源:System.cs


示例2: getMasterChannelGroup

        public RESULT getMasterChannelGroup  (out ChannelGroup channelgroup)
        {
            channelgroup = null;

            IntPtr channelgroupraw;
            RESULT result = FMOD_System_GetMasterChannelGroup(rawPtr, out channelgroupraw);
            channelgroup = new ChannelGroup(channelgroupraw);

            return result;
        }
开发者ID:Cocotus,项目名称:simple-music-player,代码行数:10,代码来源:fmod.cs


示例3: Channel

        public RESULT playDSP                (DSP dsp, ChannelGroup channelGroup, bool paused, out Channel channel)
        {
            channel = null;

            IntPtr channelGroupRaw = (channelGroup != null) ? channelGroup.getRaw() : IntPtr.Zero;

            IntPtr channelraw;
            RESULT result = FMOD_System_PlayDSP(rawPtr, dsp.getRaw(), channelGroupRaw, paused, out channelraw);
            channel = new Channel(channelraw);

            return result;
        }
开发者ID:Cocotus,项目名称:simple-music-player,代码行数:12,代码来源:fmod.cs


示例4: FMOD_System_CreateChannelGroup

        public RESULT createChannelGroup     (string name, out ChannelGroup channelgroup)
        {
            channelgroup = null;

            byte[] stringData = Encoding.UTF8.GetBytes(name + Char.MinValue);

            IntPtr channelgroupraw;
            RESULT result = FMOD_System_CreateChannelGroup(rawPtr, stringData, out channelgroupraw);
            channelgroup = new ChannelGroup(channelgroupraw);

            return result;
        }
开发者ID:Cocotus,项目名称:simple-music-player,代码行数:12,代码来源:fmod.cs


示例5: IntPtr

        public RESULT playSound              (Sound sound, ChannelGroup channelGroup, bool paused, ref Channel channel)
        {
            RESULT result      = RESULT.OK;
            IntPtr      channelraw;
            Channel     channelnew  = null;

            if (channel != null)
            {
                channelraw = channel.getRaw();
            }
            else
            {
                channelraw  = new IntPtr();
            }

            IntPtr channelGroupRaw = (channelGroup != null) ? channelGroup.getRaw() : (IntPtr)0;


            try
            {
                result = FMOD_System_PlaySound(systemraw, sound.getRaw(), channelGroupRaw, (paused ? 1 : 0), ref channelraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (channel == null)
            {
                channelnew = new Channel();
                channelnew.setRaw(channelraw);
                channel = channelnew;
            }
            else
            {
                channel.setRaw(channelraw);
            }
                             
            return result;                                                                    
        }
开发者ID:whztt07,项目名称:GameEngine,代码行数:44,代码来源:fmod.cs


示例6: getParentGroup

        public RESULT getParentGroup(ref ChannelGroup group)
        {
            RESULT result = RESULT.OK;
            IntPtr channelraw = new IntPtr();
            ChannelGroup    channelnew = null;

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

            if (group == null)
            {
                channelnew = new ChannelGroup();
                channelnew.setRaw(channelraw);
                group = channelnew;
            }
            else
            {
                group.setRaw(channelraw);
            }

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


示例7: setChannelGroup

 public RESULT setChannelGroup(ChannelGroup channelgroup)
 {
     return FMOD_Channel_SetChannelGroup(channelraw, channelgroup.getRaw());
 }
开发者ID:huming2207,项目名称:ghgame,代码行数:4,代码来源:fmod.cs


示例8: FMOD_Channel_GetChannelGroup

        public RESULT getChannelGroup       (out ChannelGroup channelgroup)
        {
            channelgroup = null;

            IntPtr channelgroupraw;
            RESULT result = FMOD_Channel_GetChannelGroup(getRaw(), out channelgroupraw);
            channelgroup = new ChannelGroup(channelgroupraw);

            return result;
        }
开发者ID:Cocotus,项目名称:simple-music-player,代码行数:10,代码来源:fmod.cs


示例9: LoadSong

        //Loads a song into memory given a sample size and file-path to an audio file.
        //The most commonly used and accurate Sample Size is 1024.
        public void LoadSong(int sSize, string audioString)
        {
            //Take in Aruguments
            sampleSize = sSize;
            songString = audioString;

            stopW.Start();
            areWePlaying = true;
            specFlux = 0.0f;
            timeBetween = 0;
            initialTime = (int)stopW.ElapsedMilliseconds;
            currentTime = 0;
            currentSeconds = 0;
            lastSeconds = 0;
            currentMillis = 0;
            currentMinutes = 0;
            median = 0.0f;
            smoothMedian = 0.0f;
            beatThreshold = 0.6f;
            thresholdSmoother = 0.6f;
            started = false;
            lastBeatRegistered = new TimeStamp();
            audio = new FMOD.Sound();
            songChannel1 = new FMOD.Channel();

            channelMusic = new FMOD.ChannelGroup();

            previousFFT = new float[sampleSize
                / 2 + 1];
            for (int i = 0; i < sampleSize / 2; i++)
            {
                previousFFT[i] = 0;
            }

            //Brute force for testing
            //songString = "Music/drums.wav";

            //Create channel and audio
            FMODErrorCheck(system.createChannelGroup(null, ref channelMusic));
               // CREATESOUNDEXINFO ex = new CREATESOUNDEXINFO();

            FMODErrorCheck(system.createStream(songString, FMOD.MODE.SOFTWARE, ref audio));

            audio.getLength(ref seconds, FMOD.TIMEUNIT.MS);
            audio.getDefaults(ref sampleRate, ref zeroF, ref zeroF, ref zero);
            seconds = ((seconds + 500) / 1000);
            minutes = seconds / 60;
            fullSeconds = (int)seconds;
            seconds = seconds - (minutes * 60);

            FMODErrorCheck(system.playSound(FMOD.CHANNELINDEX.FREE, audio, true, ref songChannel1));

            //hzRange = (sampleRate / 2) / static_cast<float>(sampleSize);
            songChannel1.setChannelGroup(channelMusic);
            songChannel1.setPaused(true);

            Console.WriteLine("Song Length: " + minutes + ":" + seconds);
            Console.WriteLine("Sample Rate: " + sampleRate);

            //std::cout << "Freq Range: " << hzRange << std::endl;
            //songChannel1.setVolume(0);
        }
开发者ID:SkuliSheepman,项目名称:BeatDetectorForGames,代码行数:64,代码来源:BeatDetector.cs


示例10: getChannelGroup

        public RESULT getChannelGroup(ref ChannelGroup channelgroup)
        {
            RESULT result   = RESULT.OK;
            IntPtr cgraw = new IntPtr();
            ChannelGroup  cgnew = null;

            try
            {
                result = FMOD_Event_GetChannelGroup(eventraw, ref cgraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (channelgroup == null)
            {
                cgnew = new ChannelGroup();
                cgnew.setRaw(cgraw);
                channelgroup = cgnew;
            }
            else
            {
                channelgroup.setRaw(cgraw);
            }

            return result;
        }
开发者ID:Guitaroz,项目名称:Arcade-Space-Shooter,代码行数:32,代码来源:fmod_event.cs


示例11: createChannelGroup

        public RESULT createChannelGroup(string name, ref ChannelGroup channelgroup)
        {
            var result = RESULT.OK;
            var channelgroupraw = new IntPtr();
            ChannelGroup channelgroupnew = null;

            try
            {
                result = FMOD_System_CreateChannelGroup(systemraw, name, ref channelgroupraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (channelgroup == null)
            {
                channelgroupnew = new ChannelGroup();
                channelgroupnew.setRaw(channelgroupraw);
                channelgroup = channelgroupnew;
            }
            else
            {
                channelgroup.setRaw(channelgroupraw);
            }

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


示例12: playSound

 public RESULT playSound(Sound sound, ChannelGroup channelGroup, bool paused, out Channel channel)
 {
     channel = null;
     IntPtr channelGroup2 = (!(channelGroup != null)) ? IntPtr.Zero : channelGroup.getRaw();
     IntPtr raw;
     RESULT result = System.FMOD5_System_PlaySound(this.rawPtr, sound.getRaw(), channelGroup2, paused, out raw);
     channel = new Channel(raw);
     return result;
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:9,代码来源:System.cs


示例13: getMasterChannelGroup

 public RESULT getMasterChannelGroup(out ChannelGroup channelgroup)
 {
     channelgroup = null;
     IntPtr raw;
     RESULT result = System.FMOD5_System_GetMasterChannelGroup(this.rawPtr, out raw);
     channelgroup = new ChannelGroup(raw);
     return result;
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:8,代码来源:System.cs


示例14: detachChannelGroupFromPort

 public RESULT detachChannelGroupFromPort(ChannelGroup channelgroup)
 {
     return System.FMOD5_System_DetachChannelGroupFromPort(this.rawPtr, channelgroup.getRaw());
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:4,代码来源:System.cs


示例15: attachChannelGroupToPort

 // Routing to ports.
 public RESULT attachChannelGroupToPort(uint portType, ulong portIndex, ChannelGroup channelgroup)
 {
     return FMOD_System_AttachChannelGroupToPort(rawPtr, portType, portIndex, channelgroup.getRaw());
 }
开发者ID:Cocotus,项目名称:simple-music-player,代码行数:5,代码来源:fmod.cs


示例16: FMOD5_ChannelGroup_AddGroup

        // Nested channel groups.
        public RESULT addGroup               (ChannelGroup group, bool propagatedspclock, out DSPConnection connection)
        {
            connection = null;

            IntPtr connectionRaw;
            RESULT result = FMOD5_ChannelGroup_AddGroup(getRaw(), group.getRaw(), propagatedspclock, out connectionRaw);
            connection = new DSPConnection(connectionRaw);

            return result;

        }
开发者ID:kendobi,项目名称:Entropy_V5,代码行数:12,代码来源:fmod.cs


示例17: detachChannelGroupFromPort

 public RESULT detachChannelGroupFromPort(ChannelGroup channelgroup)
 {
     return FMOD_System_DetachChannelGroupFromPort(rawPtr, channelgroup.getRaw());
 }
开发者ID:Cocotus,项目名称:simple-music-player,代码行数:4,代码来源:fmod.cs


示例18: attachChannelGroupToPort

 // Routing to ports.
 public RESULT attachChannelGroupToPort(uint portType, ulong portIndex, ChannelGroup channelgroup, bool passThru = false)
 {
     return FMOD5_System_AttachChannelGroupToPort(rawPtr, portType, portIndex, channelgroup.getRaw(), passThru);
 }
开发者ID:ajm1996,项目名称:SpaceSalvage,代码行数:5,代码来源:fmod.cs


示例19: FMOD_ChannelGroup_GetParentGroup

        public RESULT getParentGroup         (out ChannelGroup group)
        {
            group = null;

            IntPtr groupraw;
            RESULT result = FMOD_ChannelGroup_GetParentGroup(getRaw(), out groupraw);
            group = new ChannelGroup(groupraw);

            return result;
        }
开发者ID:Cocotus,项目名称:simple-music-player,代码行数:10,代码来源:fmod.cs


示例20: FMOD5_ChannelGroup_AddGroup

 // Nested channel groups.
 public RESULT addGroup               (ChannelGroup group)
 {
     return FMOD5_ChannelGroup_AddGroup(getRaw(), group.getRaw());
 }
开发者ID:ajm1996,项目名称:SpaceSalvage,代码行数:5,代码来源:fmod.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# FMOD.DSP类代码示例发布时间:2022-05-24
下一篇:
C# FMOD.Channel类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap