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
+13 -2

No files matched your search

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