Ejemplo n.º 1
0
        internal FMODGrouping([NotNull] FMODAudioEngine engine, string name)
        {
            if (engine == null)
            {
                throw new ArgumentNullException("engine");
            }

            _engine = engine;
            FMODErr.Check(engine.System.createChannelGroup(name, ref _channelGroup));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FMODAudioTrack"/> class.
        /// Loads the file and creates sound and channel
        /// </summary>
        internal FMODAudioTrack([NotNull] FMODAudioEngine engine, string filePath)
        {
            _engine = engine;

            MODE creationMode = MODE.HARDWARE | MODE.CREATESTREAM | MODE.LOOP_OFF;

            FMODErr.Check(_engine.System.createSound(filePath, creationMode, ref _sound));

            // keep a reference on the callback delegate for passing to unmanaged code
            _channelCallbackDelegate = new CHANNEL_CALLBACK(OnPlaybackEnd);
        }
Ejemplo n.º 3
0
        internal FMODGrouping([NotNull] FMODAudioEngine engine, [NotNull] FMOD.ChannelGroup channelGroup)
        {
            if (engine == null)
            {
                throw new ArgumentNullException("engine");
            }
            if (channelGroup == null)
            {
                throw new ArgumentNullException("channelGroup");
            }

            _engine       = engine;
            _channelGroup = channelGroup;
            _external     = true;
        }