add support for DES-OFB; fix alert tone to behave as expected with primary channel; update fnecore submodule

pull/1/head
firealarmss 11 months ago
parent f13a4775e2
commit 5eb294f273

@ -42,7 +42,7 @@ zones:
tgid: "2001" tgid: "2001"
# Encryption Key Id (If 0 or blank, will be assumed clear) # Encryption Key Id (If 0 or blank, will be assumed clear)
keyId: 0x50 keyId: 0x50
# Algorithm AES ("aes"), ADP/ARC4 ("arc4"), None ("none") # Algorithm AES ("aes"), DES-OFB ("des"), ADP/ARC4 ("arc4"), None ("none")
algo: "aes" algo: "aes"
# Ignored now, we use dvmfne KMM support (This will be used in the future to ovveride FNE KMM support) # Ignored now, we use dvmfne KMM support (This will be used in the future to ovveride FNE KMM support)
encryptionKey: null encryptionKey: null

@ -206,6 +206,8 @@ namespace dvmconsole
{ {
case "aes": case "aes":
return P25Defines.P25_ALGO_AES; return P25Defines.P25_ALGO_AES;
case "des":
return P25Defines.P25_ALGO_DES;
case "arc4": case "arc4":
return P25Defines.P25_ALGO_ARC4; return P25Defines.P25_ALGO_ARC4;
default: default:

@ -11,12 +11,9 @@
* *
*/ */
using System.Diagnostics;
using fnecore; using fnecore;
using fnecore.DMR; using fnecore.DMR;
using NAudio.Wave;
namespace dvmconsole namespace dvmconsole
{ {
/// <summary> /// <summary>

@ -651,11 +651,13 @@ namespace dvmconsole
{ {
try try
{ {
var channel = selectedChannelsManager.PrimaryChannel; ChannelBox primaryChannel = selectedChannelsManager.PrimaryChannel;
if (channel == null) List<ChannelBox> channelsToProcess = primaryChannel != null
? new List<ChannelBox> { primaryChannel }
: selectedChannelsManager.GetSelectedChannels().ToList();
foreach (ChannelBox channel in channelsToProcess)
{ {
return;
}
if (channel.SystemName == PLAYBACKSYS || channel.ChannelName == PLAYBACKCHNAME || channel.DstId == PLAYBACKTG) if (channel.SystemName == PLAYBACKSYS || channel.ChannelName == PLAYBACKCHNAME || channel.DstId == PLAYBACKTG)
return; return;
@ -687,12 +689,12 @@ namespace dvmconsole
return; return;
} }
// if (channel.PageState || (forHold && channel.HoldState) || primaryChannel != null)
if (channel.PageState || (forHold && channel.HoldState))
{ {
byte[] pcmData; byte[] pcmData;
Task.Run(async () => { Task.Run(async () =>
{
using (var waveReader = new WaveFileReader(filePath)) using (var waveReader = new WaveFileReader(filePath))
{ {
if (waveReader.WaveFormat.Encoding != WaveFormatEncoding.Pcm || if (waveReader.WaveFormat.Encoding != WaveFormatEncoding.Pcm ||
@ -769,6 +771,7 @@ namespace dvmconsole
}); });
} }
} }
}
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show($"Failed to process alert tone: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error); MessageBox.Show($"Failed to process alert tone: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);

@ -1 +1 @@
Subproject commit 13a82b3a82054e4fe8299368c7258c51176cee87 Subproject commit 0419c2fac7351e67064437f94751bad21bc92975
Loading…
Cancel
Save

Powered by TurnKey Linux.