I downloaded ScopeView plugin for SDR# from here:
https://www.rtl-sdr.com/sdrsharp-plugins/
ScopeView Plugin (Not working with 1400+)
Adds a simple audio scope to the plugin window.
The package contains source code so no need for reverse engineering (dotPeek)
First change target .NET framework to 4.6.1 and copy newer DLL versions to project folder (SDRSharp.Common and SDRSharp.Radio)
Try to build the project. This time Visual Studio showed error message for unsafe code
Severity Code Description Project File Line Suppression State
Error CS0227 Unsafe code may only appear if compiling with /unsafe SDRSharp.ScopeView
Code is quite old and needs re-engineering (audio processor handling is changed from the SDR# version for which it was developed)
Rewrite ScopeViewPlugin code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SDRSharp.Common;
using System.Windows.Forms;
using System.Threading;
using SDRSharp.Radio;
namespace SDRSharp.ScopeView
{
public class ScopeViewPlugin : ISharpPlugin
{
private const string _displayName = "Scope View";
private ISharpControl _control;
private ScopeViewPanel _scopeViewPanel;
public UserControl Gui
{
get { return _scopeViewPanel; }
}
public bool HasGui
{
get { return true; }
}
//public UserControl GuiControl
//{
// get { return _scopeViewPanel; }
//}
public bool HasData
{
get { return false; }
}
public string DisplayName
{
get { return _displayName; }
}
public void Close()
{
}
public void Initialize(ISharpControl control)
{
_control = control;
_scopeViewPanel = new ScopeViewPanel(_control);
ScopeViewProcess _scopeViewProcess = new ScopeViewProcess(_scopeViewPanel);
_control.RegisterStreamHook(_scopeViewProcess, ProcessorType.FilteredAudioOutput);
}
}
}
Code new class for audio processing (ScopeViewProcess)
using SDRSharp.Radio;
using SDRSharp.Common;
namespace SDRSharp.ScopeView
{
public class ScopeViewProcess : IRealProcessor, IStreamProcessor, IBaseProcessor
{
private ScopeViewPanel _scopeViewPanel;
private bool _enabled = true;
private double _sampleRate;
private bool _bypass = false;
public int GoertzelFreq;
public ScopeViewProcess(ScopeViewPanel control)
{
_scopeViewPanel = control;
}
public bool Enabled
{
get
{
return _enabled;
}
set
{
_enabled = value;
}
}
public bool Bypass
{
get { return _bypass; }
set { _bypass = value; }
}
public double SampleRate
{
get { return _sampleRate; }
set { _sampleRate = value; }
}
public unsafe void Process(float* audioBuffer, int length)
{
if (!_bypass)
{
_scopeViewPanel.Render(audioBuffer, length);
}
}
}
}
https://i.ibb.co/0mmPYmn/scopeview.jpg
Add the magic line (Plugins.xml)
<add key="ScopeView" value="SDRSharp.ScopeView.ScopeViewPlugin ,SDRSharp.ScopeView" />
Seems to work.
<add key="TetraE" value="SDRSharp.Tetra.TetraPlugin,SDRSharp.TetraE"/>
<add key="Tetra" value="SDRSharp.Tetra.TetraPlugin,SDRSharp.Tetra"/>
<add key="TD utils" value="SDRSharp.TDutilsPlugin.TDutilsPlugin,SDRSharp.TDutilsPlugin"/>
<add key="Multimon-ng" value="SDRSharp.MmngPlugin.mmng,SDRSharp.MmngPlugin"/>
<add key="CTCSSDecoder" value="SDRSharp.CTCSSDecoder.CTCSSDecoderPlugin,SDRSharp.CTCSSDecoder" />
<add key="Net Remote" value="SDRSharp.NetRemote.NetRemotePlugin,SDRSharp.NetRemote" />
<add key="ScopeView" value="SDRSharp.ScopeView.ScopeViewPlugin ,SDRSharp.ScopeView" />
... TetraE is a old version (from 2019) of the TETRA demod plugin which I reverse engineered with dotPeek and coded some mods (raw PDU logging etc).
Kommentit
Tämän blogin kommentit tarkistetaan ennen julkaisua.