mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
Refactored for source change handler updates
This commit is contained in:
parent
c22e95cad2
commit
ed468add2c
19 changed files with 178 additions and 73 deletions
|
|
@ -12,6 +12,32 @@ namespace PepperDash.Essentials
|
|||
{
|
||||
public class Amplifier : Device, IRoutingSinkNoSwitching
|
||||
{
|
||||
public event SourceInfoChangeHandler CurrentSourceChange;
|
||||
|
||||
public string CurrentSourceInfoKey { get; set; }
|
||||
public SourceListItem CurrentSourceInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return _CurrentSourceInfo;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == _CurrentSourceInfo) return;
|
||||
|
||||
var handler = CurrentSourceChange;
|
||||
|
||||
if (handler != null)
|
||||
handler(_CurrentSourceInfo, ChangeType.WillChange);
|
||||
|
||||
_CurrentSourceInfo = value;
|
||||
|
||||
if (handler != null)
|
||||
handler(_CurrentSourceInfo, ChangeType.DidChange);
|
||||
}
|
||||
}
|
||||
SourceListItem _CurrentSourceInfo;
|
||||
|
||||
public RoutingInputPort AudioIn { get; private set; }
|
||||
|
||||
public Amplifier(string key, string name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue