|
|
|
@ -3,7 +3,6 @@ |
|
|
|
// Copyright(c) 2021 SimonG. All Rights Reserved. |
|
|
|
// Copyright(c) 2021 SimonG. All Rights Reserved. |
|
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
|
|
|
|
using Lib.Audio.Interfaces; |
|
|
|
using Lib.Audio.Interfaces; |
|
|
|
using NAudio.CoreAudioApi; |
|
|
|
using NAudio.CoreAudioApi; |
|
|
|
|
|
|
|
|
|
|
|
@ -32,7 +31,6 @@ namespace Lib.Audio |
|
|
|
public bool IsValid { get; set; } = true; |
|
|
|
public bool IsValid { get; set; } = true; |
|
|
|
public string ExecutablePath { get; } |
|
|
|
public string ExecutablePath { get; } |
|
|
|
public string Name { get; } |
|
|
|
public string Name { get; } |
|
|
|
public string? IconPath => _audioSessionControls.FirstOrDefault(c => !string.IsNullOrEmpty(c.IconPath))?.IconPath; //FixMe |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void SetVolume(float volume) => _audioSessionControls.ForEach(c => c.SimpleAudioVolume.Volume = volume); |
|
|
|
public void SetVolume(float volume) => _audioSessionControls.ForEach(c => c.SimpleAudioVolume.Volume = volume); |
|
|
|
public float GetVolume() => _audioSessionControls[0].SimpleAudioVolume.Volume; //TODO: Can we always take 0? |
|
|
|
public float GetVolume() => _audioSessionControls[0].SimpleAudioVolume.Volume; //TODO: Can we always take 0? |
|
|
|
|