mirror of
https://github.com/tuxdotrs/highminded.git
synced 2025-08-22 23:51:03 +05:30
fix: platform specific init
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace highminded.models;
|
||||
|
||||
public partial class MainViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty] private string _appName = "High Minded";
|
||||
[ObservableProperty] private string _hideShortcutKey = "ALT + SHIFT + \\";
|
||||
[ObservableProperty] private string _screenshotShortcutKey = "ALT + SHIFT + S";
|
||||
[ObservableProperty] private string _audioShortcutKey = "ALT + SHIFT + A";
|
||||
|
||||
[ObservableProperty]
|
||||
private string _hideShortcutKey = OperatingSystem.IsMacOS() ? "OPTION + SHIFT + \\" : "ALT + SHIFT + \\";
|
||||
|
||||
[ObservableProperty] private string _screenshotShortcutKey =
|
||||
OperatingSystem.IsMacOS() ? "OPTION + SHIFT + S" : "ALT + SHIFT + S";
|
||||
|
||||
[ObservableProperty]
|
||||
private string _audioShortcutKey = OperatingSystem.IsMacOS() ? "OPTION + SHIFT + A" : "ALT + SHIFT + A";
|
||||
|
||||
[ObservableProperty] private bool _isRecording = false;
|
||||
[ObservableProperty] private bool _isHidden = true;
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using SoundFlow.Backends.MiniAudio;
|
||||
using SoundFlow.Components;
|
||||
using SoundFlow.Enums;
|
||||
@@ -7,7 +8,9 @@ namespace highminded.utils;
|
||||
|
||||
public class AudioCapture
|
||||
{
|
||||
private readonly MiniAudioEngine _audioEngine = new(48000, Capability.Loopback);
|
||||
private readonly MiniAudioEngine _audioEngine =
|
||||
new(48000, OperatingSystem.IsWindows() ? Capability.Loopback : Capability.Mixed);
|
||||
|
||||
private Stream? _fileStream;
|
||||
private Recorder? _recorder;
|
||||
|
||||
|
Reference in New Issue
Block a user