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


C# FMOD.ChannelGroup类代码示例

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


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


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