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