Skip to content

Commit

Permalink
чейнжлог и еще фикс ттс
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Jun 9, 2024
1 parent d458ea5 commit cd9c52d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Content.Client/_Sunrise/TTS/TTSSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public sealed class TTSSystem : EntitySystem
private readonly MemoryContentRoot _contentRoot = new();
private static readonly ResPath Prefix = ResPath.Root / "TTS";

private const float BaseSpeakVolume = 0f;
private const float BaseAnnounceVolume = 0f;

private float _volume;
private float _radioVolume;
private int _fileIdx;
Expand Down Expand Up @@ -98,7 +101,7 @@ private void PlayNextInQueue()
if (_announcementUid == EntityUid.Invalid)
_announcementUid = Spawn(null);

var finalParams = new AudioParams() { Volume = _volumeAnnounce + SharedAudioSystem.GainToVolume(_volumeAnnounce) };
var finalParams = new AudioParams() { Volume = BaseAnnounceVolume + SharedAudioSystem.GainToVolume(_volumeAnnounce) };

if (ev.AnnouncementSound != null)
{
Expand All @@ -119,7 +122,7 @@ private void OnPlayTTS(PlayTTSEvent ev)
if (volume == 0)
return;

volume = _volume + SharedAudioSystem.GainToVolume(volume * ev.VolumeModifier);
volume = BaseSpeakVolume + SharedAudioSystem.GainToVolume(volume * ev.VolumeModifier);

var audioParams = AudioParams.Default.WithVolume(volume);

Expand Down
9 changes: 9 additions & 0 deletions Resources/Changelog/ChangelogSunrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,12 @@ Entries:
type: Tweak
id: 32
time: '2024-06-09T02:52:26.930025+00:00'
- author: VigersRay
changes:
- message: "\u041F\u043E\u043B\u0437\u0443\u043D\u043A\u0438 \u0433\u0440\u043E\u043C\
\u043A\u043E\u0441\u0442\u0438 \u0442\u0442\u0441 \u0442\u0435\u043F\u0435\u0440\
\u044C \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442 \u043A\u043E\u0440\u0440\
\u0435\u043A\u0442\u043D\u043E."
type: Fix
id: 33
time: '2024-06-09T03:24:42.081190+00:00'

0 comments on commit cd9c52d

Please sign in to comment.