Two small fixes (#832)

* Fix for CNameSelection

* Fix for CPlaybackBase
This commit is contained in:
MSchneidar authored and GitHub committed 2026-01-25 07:03:58 +01:00
1 parent 9328210f9e
commit 4c984d9f7c
2 files changed
+18 -7

No files matched your search

+7 -4
View File
@@ -1,4 +1,4 @@
#region license
#region license
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
@@ -73,9 +73,12 @@ namespace Vocaluxe.Lib.Sound.Playback
if (!_Initialized)
return;
float volumeF = volume.Clamp(0, 100) / 100f;
foreach (IAudioStream stream in _Streams)
if(!stream.IsFading)
stream.VolumeMax = volumeF;
lock (_Streams)
{
foreach (IAudioStream stream in _Streams)
if (!stream.IsFading)
stream.VolumeMax = volumeF;
}
_GlobalVolume = volumeF;
}
+11 -3
View File
@@ -1,4 +1,4 @@
#region license
#region license
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
@@ -272,8 +272,16 @@ namespace VocaluxeLib.Menu
//Normal activation
else if (active)
{
SelectedID = _VisibleProfiles.ElementAt(0);
_ActualSelection = 0;
if (_VisibleProfiles.Count > 0)
{
SelectedID = _VisibleProfiles.ElementAt(0);
_ActualSelection = 0;
}
else
{
SelectedID = Guid.Empty;
_ActualSelection = -1;
}
_Player = player;
_PlayerSelector.Color = CBase.Themes.GetPlayerColor(player);
_PlayerSelector.Visible = true;