Ejemplo n.º 1
0
        public void SetPluginHost(IPluginHost Host)
        {
            //We play this channel trough Asio output, so we choose the device NOSOUND
            Bass.BASS_Init(0, 48000, 0, IntPtr.Zero, null);
            this.manager = ChannelsManager.GetInstance();

            BassUtils.LoadPlugins();

            this.FHost = Host;

            this.FHost.CreateValueInput("Device", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInDevice);
            this.FPinInDevice.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            this.FHost.CreateValueInput("Channel Index", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinChannelIndex);
            this.FPinChannelIndex.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            this.FHost.CreateValueInput("Channels Count", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinChannelCount);
            this.FPinChannelCount.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            this.FHost.CreateValueInput("Enabled", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInEnabled);
            this.FPinInEnabled.SetSubType(0, 1, 1, 0, false, true, true);

            this.FHost.CreateValueOutput("Handle", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinOutHandle);
            this.FPinOutHandle.SetSubType(double.MinValue, double.MaxValue, 0, 0, false, false, true);

            this.FHost.CreateStringOutput("Status", TSliceMode.Single, TPinVisibility.True, out this.FPinOutStatus);
        }
Ejemplo n.º 2
0
        public void SetPluginHost(IPluginHost Host)
        {
            Bass.BASS_Init(0, 48000, 0, IntPtr.Zero, null);
            BassUtils.LoadPlugins();

            this.FHost      = Host;
            this.FScanners  = new List <ThreadedBeatScanner>();
            this.FPositions = new List <List <double> >();
            this.FProgress  = new List <double>();

            //Input Pins

            this.FHost.CreateStringInput("Path", TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInFilename);
            this.FPinInFilename.SetSubType("", true);
            this.FHost.CreateValueInput("BandWidth", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInBandWidth);
            this.FPinInBandWidth.SetSubType(0, double.MaxValue, 0.01, 10.0, false, false, false);
            this.FHost.CreateValueInput("Center Frequency", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInCenter);
            this.FPinInCenter.SetSubType(0, double.MaxValue, 0.01, 90.0, false, false, false);
            this.FHost.CreateValueInput("Release Time", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInRelease);
            this.FPinInRelease.SetSubType(0, double.MaxValue, 1, 20.0, false, false, true);

            //Output pins
            this.FHost.CreateValueOutput("Beat Positions", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinOutBeatPositions);
            this.FPinOutBeatPositions.SetSubType(0, double.MaxValue, 0.01, 0, false, false, false);
            this.FHost.CreateValueOutput("Percent Complete", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinOutPercent);
            this.FPinOutPercent.SetSubType(0, 100, 0.01, 0, false, false, false);
            this.FHost.CreateValueOutput("Bin Sizes", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinOutBinSizes);
            this.FPinOutBinSizes.SetSubType(0, double.MaxValue, 0.01, 0, false, false, true);
        }
Ejemplo n.º 3
0
        public void SetPluginHost(IPluginHost Host)
        {
            this.FHost    = Host;
            this.FManager = ChannelsManager.GetInstance();

            BassUtils.LoadPlugins();

            this.FHost.CreateValueInput("Handle", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInHandle);
            this.FPinInHandle.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true);

            this.FHost.CreateStringInput("Host", TSliceMode.Single, TPinVisibility.True, out this.FPinInServer);
            this.FPinInServer.SetSubType("localhost", false);

            this.FHost.CreateValueFastInput("Port", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInPort);
            this.FPinInPort.SetSubType(double.MinValue, 65000, 8000, 0, false, false, true);

            this.FHost.CreateStringInput("Password", TSliceMode.Single, TPinVisibility.True, out this.FPinInPwd);
            this.FPinInPwd.SetSubType("", false);

            this.FHost.CreateValueFastInput("Bit Rate", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInBitrate);
            this.FPinInBitrate.SetSubType(32, 320000, 1, 64, false, false, true);


            this.FHost.CreateStringOutput("Status", TSliceMode.Single, TPinVisibility.True, out this.FPinOutStatus);

            this.OnPluginHostSet();

            this.FHost.CreateValueInput("Is Active", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInIsActive);
            this.FPinInIsActive.SetSubType(0, 1, 1, 0, false, true, true);
        }
Ejemplo n.º 4
0
        public void SetPluginHost(IPluginHost Host)
        {
            this.FHost   = Host;
            this.manager = ChannelsManager.GetInstance();

            BassUtils.LoadPlugins();

            this.FHost.CreateValueInput("Device", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInDevice);
            this.FPinInDevice.SetSubType(-1, double.MaxValue, 1, -1, false, false, true);

            this.FHost.CreateValueInput("Handles In", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInHandle);
            this.FPinInHandle.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true);
        }
Ejemplo n.º 5
0
        public void SetPluginHost(IPluginHost Host)
        {
            this.FHost   = Host;
            this.manager = ChannelsManager.GetInstance();

            //We play this channel trough Asio output, so we choose the device NOSOUND
            Bass.BASS_Init(0, 48000, 0, IntPtr.Zero, null);

            //int cnt = BassAsio.BASS_ASIO_GetDeviceCount();
            //List<string> devices = new List<string>();
            //BASS_ASIO_DEVICEINFO[] devinfo = BassAsio.BASS_ASIO_GetDeviceInfos();
            //for (int i = 0; i < devinfo.Length; i++)
            //{
            //    BASS_ASIO_DEVICEINFO d = devinfo[i];
            //    devices.Add(d.name);
            //}



            //this.FHost.UpdateEnum("Bass Asio Devices", devices[0], devices.ToArray());

            BassUtils.LoadPlugins();

            //this.FHost.CreateEnumInput("Device Id", TSliceMode.Single, TPinVisibility.True, out this.FPinInDeviceEnum);
            // this.FPinInDeviceEnum.SetSubType("Bass Asio Devices");

            this.FHost.CreateValueInput("Device", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInDevice);
            this.FPinInDevice.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            this.FHost.CreateValueInput("Control Panel", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FControlPanel);
            this.FControlPanel.SetSubType(0, 1, 1, 0, true, false, false);

            this.FHost.CreateValueInput("Is Active", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInActive);
            this.FPinInActive.SetSubType(0.0, 1.0, 1, 0, false, true, true);

            this.FHost.CreateValueInput("Volume", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInVolumeOutput);
            this.FPinInVolumeOutput.SetSubType(0, 1, 0.01, 1, false, false, false);

            this.FHost.CreateValueInput("Handles In", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInChannels);
            this.FPinInChannels.SetSubType(double.MinValue, double.MaxValue, 1, -1, false, false, true);

            this.FHost.CreateStringOutput("Status", TSliceMode.Single, TPinVisibility.True, out this.FPinErrorCode);

            this.myAsioProc = new ASIOPROC(AsioCallback);
        }
Ejemplo n.º 6
0
        public void SetPluginHost(IPluginHost Host)
        {
            this.FHost    = Host;
            this.FManager = ChannelsManager.GetInstance();

            BassUtils.LoadPlugins();

            this.FHost.CreateValueInput("Handle", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInHandle);
            this.FPinInHandle.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true);

            this.FHost.CreateStringInput("File Name", TSliceMode.Single, TPinVisibility.True, out this.FPinInFilename);
            this.FPinInFilename.SetSubType("", true);

            this.FHost.CreateValueInput("Record", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInRecord);
            this.FPinInRecord.SetSubType(0, 1, 1, 0, false, true, true);

            this.FHost.CreateStringOutput("Status", TSliceMode.Single, TPinVisibility.True, out this.FPinOutStatus);

            this.OnPluginHostSet();
        }
Ejemplo n.º 7
0
        public void SetPluginHost(IPluginHost Host)
        {
            Bass.BASS_Init(-1, 44100, 0, IntPtr.Zero, null);
            BassUtils.LoadPlugins();

            //assign host
            this.FHost = Host;

            this.FHost.CreateStringInput("Path", TSliceMode.Single, TPinVisibility.True, out this.FPinInPath);
            this.FPinInPath.SetSubType("", true);

            this.FHost.CreateValueInput("FFT Size", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInSize);
            this.FPinInSize.SetSubType(0, double.MaxValue, 1, 256, false, false, true);

            this.FHost.CreateValueInput("Windowed", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInWindowed);
            this.FPinInWindowed.SetSubType(0, 1, 1, 1, false, true, false);

            this.FHost.CreateValueInput("Individual", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInInvidivual);
            this.FPinInInvidivual.SetSubType(0, 1, 1, 1, false, true, false);

            this.FHost.CreateValueInput("Position", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInPosition);
            this.FPinInPosition.SetSubType(0, double.MaxValue, 0.01, 0, false, false, false);


            this.FHost.CreateValueOutput("FFT Left", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinOutLeft);
            this.FPinOutLeft.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false);

            this.FHost.CreateValueOutput("FFT Right", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinOutRight);
            this.FPinOutRight.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false);

            this.FHost.CreateValueOutput("Position", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutPosition);
            this.FPinOutPosition.SetSubType(0, double.MaxValue, 0.01, 0, false, false, false);

            this.FHost.CreateStringOutput("Status", TSliceMode.Single, TPinVisibility.True, out this.FPinOutStatus);
            this.FPinOutStatus.SetSubType("", false);
        }