Exemplo n.º 1
0
        public Channel.Channel PlayDSP(DSP dsp, bool paused)
        {
            IntPtr channelHandle = IntPtr.Zero;

            Code returnCode = PlayDSP(DangerousGetHandle(), Index.Free, dsp.DangerousGetHandle(), paused, ref channelHandle);
            Errors.ThrowError(returnCode);

            return new Channel.Channel(channelHandle);
        }
Exemplo n.º 2
0
        public void PlayDSP(DSP dsp, bool paused, Channel.Channel chn)
        {
            IntPtr channel = chn.DangerousGetHandle();

            Code returnCode = PlayDSP(DangerousGetHandle(), Index.Reuse, dsp.DangerousGetHandle(), paused, ref channel);
            Errors.ThrowError(returnCode);

            //This can't really happend.
            //Check just in case...
            if (chn.DangerousGetHandle() != channel)
                throw new Exception("Channel handle got changed by Fmod.");
        }
Exemplo n.º 3
0
            public EqualizerBand(SoundSystem system, EqualizerParam param)
            {
                _dsp = system.CreateDspByType(Type.ParameQ);
                system.AddDSP(_dsp);

                Center = param.Center;
                BandWidth = param.Bandwidth;
                Gain = param.Gain;

                _dsp.Active = Active = true;

                Caption = param.Center < 1000
                    ? param.Center.ToString(CultureInfo.InvariantCulture)
                    : string.Format("{0}K", (param.Center/1000));
            }
Exemplo n.º 4
0
 public void Remove()
 {
     if (_dsp != null)
     {
         _dsp.Remove();
         _dsp = null;
     }
     Active = false;
 }
Exemplo n.º 5
0
        public Connection AddDSP(DSP dsp)
        {
            IntPtr connectionHandle = IntPtr.Zero;

            Code returnCode = AddDSP(DangerousGetHandle(), dsp.DangerousGetHandle(), ref connectionHandle);
            Errors.ThrowError(returnCode);

            return new Connection(connectionHandle);
        }
Exemplo n.º 6
0
 public Channel.Channel PlayDSP(DSP dsp)
 {
     return PlayDSP(dsp, false);
 }