Skip to content

Commit 2b6e517

Browse files
fix: add Key and Name properties to DmpsAudioOutput and DmCardAudioOutputController (#29)
Update PepperDashEssentials NuGet reference from v2.7.0 to v2.29.0. IBasicVolumeControls now extends IKeyName, requiring Key and Name properties. DmpsAudioOutput and DmCardAudioOutputController implement IBasicVolumeWithFeedback but are not EssentialsDevice subclasses, so they lacked these properties, causing VTable initialization failures at runtime on processors running Essentials v2.29.0."
1 parent 8c78bac commit 2b6e517

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/Chassis/DmCardAudioOutput.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ namespace PepperDash.Essentials.DM
1212
{
1313
public class DmCardAudioOutputController : IBasicVolumeWithFeedback
1414
{
15+
public string Key { get; private set; }
16+
public string Name { get; private set; }
1517
public Audio.Output Output { get; private set; }
1618

1719
public IntFeedback VolumeLevelFeedback { get; private set; }
@@ -24,6 +26,8 @@ public class DmCardAudioOutputController : IBasicVolumeWithFeedback
2426
public DmCardAudioOutputController(Audio.Output output)
2527
{
2628
Output = output;
29+
Key = output.ToString();
30+
Name = output.ToString();
2731
VolumeLevelFeedback = new IntFeedback(() => Output.VolumeFeedback.UShortValue);
2832
MuteFeedback = new BoolFeedback(() => IsMuted);
2933
}

src/Chassis/DmpsAudioOutputController.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ public class DmpsAudioOutput : IBasicVolumeWithFeedback
352352
protected short MinLevel { get; set; }
353353
protected short MaxLevel { get; set; }
354354

355+
public string Key { get; private set; }
356+
public string Name { get; private set; }
355357
public eDmpsLevelType Type { get; private set; }
356358
public BoolFeedback MuteFeedback { get; private set; }
357359
public IntFeedback VolumeLevelFeedback { get; private set; }
@@ -367,6 +369,8 @@ public DmpsAudioOutput(Dmps3AudioOutputBase output, eDmpsLevelType type)
367369
VolumeLevelInput = 0;
368370
EnableVolumeSend = false;
369371
Type = type;
372+
Key = type.ToString();
373+
Name = type.ToString();
370374
MinLevel = -800;
371375
MaxLevel = 100;
372376

src/PepperDash.Essentials.DM.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<DebugType>portable</DebugType>
2828
</PropertyGroup>
2929
<ItemGroup>
30-
<PackageReference Include="PepperDashEssentials" Version="2.7.0">
30+
<PackageReference Include="PepperDashEssentials" Version="2.29.0">
3131
<ExcludeAssets>runtime</ExcludeAssets>
3232
</PackageReference>
3333
</ItemGroup>

0 commit comments

Comments
 (0)