Exemple #1
0
        public bool TryParamsDrmMultimediaServiceIndex(uint index)//0-4
        {
            var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint)));

            try
            {
                MarshalHelper.WriteUInt32(ptr, index);
                return(_api.SetDemodulatorParam(_radio.GetHandle(), _ddc2.Channel(),
                                                (uint)NativeDefinitions.DemodulatorParameter.G3XDDC_DEMODULATOR_PARAM_DRM_MULTIMEDIA_SERVICE, ptr,
                                                (uint)Marshal.SizeOf(typeof(uint))));
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
Exemple #2
0
        public bool TryParamsAmsCaptureRange(uint value) //50-10000 Hz
        {
            var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint)));

            try
            {
                MarshalHelper.WriteUInt32(ptr, value);
                return(_api.SetDemodulatorParam(_radio.GetHandle(), _ddc2.Channel(),
                                                (uint)NativeDefinitions.DemodulatorParameter.G3XDDC_DEMODULATOR_PARAM_AMS_CAPTURE_RANGE, ptr,
                                                (uint)Marshal.SizeOf(typeof(uint))));
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
Exemple #3
0
        public bool TryParamsAmsSideband(AmsSideband state)
        {
            var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint)));

            try
            {
                MarshalHelper.WriteUInt32(ptr, (uint)state);
                return(_api.SetDemodulatorParam(_radio.GetHandle(), _ddc2.Channel(),
                                                (uint)NativeDefinitions.DemodulatorParameter.G3XDDC_DEMODULATOR_PARAM_AMS_SIDE_BAND, ptr,
                                                (uint)Marshal.SizeOf(typeof(uint))));
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
Exemple #4
0
        public uint StateFmDeviation()
        {
            var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint)));

            try
            {
                _radio.Check(_api.GetDemodulatorState(_radio.GetHandle(), _ddc2.Channel(),
                                                      (uint)NativeDefinitions.DemodulatorState.G3XDDC_DEMODULATOR_STATE_FM_DEVIATION, ptr,
                                                      (uint)Marshal.SizeOf(typeof(uint))));

                var res = MarshalHelper.ReadUInt32(ptr);
                return(res);
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
Exemple #5
0
        public double StateAmsModulationDepth()//as %
        {
            var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(double)));

            try
            {
                _radio.Check(_api.GetDemodulatorState(_radio.GetHandle(), _ddc2.Channel(),
                                                      (uint)NativeDefinitions.DemodulatorState.G3XDDC_DEMODULATOR_STATE_AM_DEPTH, ptr,
                                                      (uint)Marshal.SizeOf(typeof(double))));

                var res = MarshalHelper.ReadDouble(ptr);
                return(res);
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
Exemple #6
0
        public uint ParamsDrmAudioServiceIndex()//0-4
        {
            var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint)));

            try
            {
                _radio.Check(_api.GetDemodulatorParam(_radio.GetHandle(), _ddc2.Channel(),
                                                      (uint)NativeDefinitions.DemodulatorParameter.G3XDDC_DEMODULATOR_PARAM_DRM_AUDIO_SERVICE, ptr,
                                                      (uint)Marshal.SizeOf(typeof(uint))));

                var res = MarshalHelper.ReadUInt32(ptr);
                return(res);
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
Exemple #7
0
        public AmsSideband ParamsAmsSideband()
        {
            var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(uint)));

            try
            {
                _radio.Check(_api.GetDemodulatorParam(_radio.GetHandle(), _ddc2.Channel(),
                                                      (uint)NativeDefinitions.DemodulatorParameter.G3XDDC_DEMODULATOR_PARAM_AMS_SIDE_BAND, ptr,
                                                      (uint)Marshal.SizeOf(typeof(uint))));

                var res = MarshalHelper.ReadUInt32(ptr);
                return((AmsSideband)res);
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }