Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
remove some logging and fix config in main
Browse files Browse the repository at this point in the history
  • Loading branch information
Epictek committed Nov 12, 2023
1 parent 3d4229c commit 03d5cd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions backend/src/obs_recorder/ObsRecordingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,6 @@ void OnAudioData(IntPtr param, IntPtr source, ref AudioData audioData, bool mute

percentage = Math.Min(Math.Max(percentage, 0.0f), 100.0f);

Logger.LogError("Volume: " + percentage);

string sourceName = null;
if (source == IntPtr.Zero)
{
Expand All @@ -415,7 +413,6 @@ void OnAudioData(IntPtr param, IntPtr source, ref AudioData audioData, bool mute
sourceName = GetSourceName(source);
}

Logger.LogError("Source: " + sourceName);
OnVolumePeakChanged?.Invoke(new VolumePeakLevel() { Peak = percentage, Source = sourceName });
}

Expand Down
7 changes: 3 additions & 4 deletions backend/src/obs_recorder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
app.MapGet("/api/StopStreaming", (ObsRecordingService recorder) => recorder.StopStreaming());

app.MapGet("/api/GetStatus", (ObsRecordingService recorder) => recorder.GetStatus());
app.MapGet("/api/GetConfig", (ConfigService config) => config.GetConfig());
app.MapGet("/api/GetConfig", (ConfigService configService) => configService.Config);
app.MapPost("/api/SaveConfig", (ConfigService config, ConfigModel newConfig) => config.SaveConfig(newConfig));
app.MapGet("/api/UpdateBufferSettings", (ObsRecordingService recorder) => recorder.UpdateBufferSettings());
app.MapGet("/api/SaveReplayBuffer", (ObsRecordingService recorder) => recorder.SaveReplayBuffer());
Expand All @@ -52,10 +52,9 @@
{
try
{
var config = configService.GetConfig();

if (config.ReplayBufferEnabled == enabled) return true;

if (configService.Config.ReplayBufferEnabled == enabled) return true;
var config = configService.Config;
config.ReplayBufferEnabled = enabled;
await configService.SaveConfig(config);

Expand Down

0 comments on commit 03d5cd3

Please sign in to comment.