HamBook – Blame information for rev 14
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
14 | office | 1 | using Configuration.Annotations; |
2 | using System; |
||
3 | using System.Collections.Generic; |
||
4 | using System.ComponentModel; |
||
5 | using System.Linq; |
||
6 | using System.Runtime.CompilerServices; |
||
7 | using System.Text; |
||
8 | using System.Threading.Tasks; |
||
9 | |||
10 | namespace Configuration |
||
11 | { |
||
12 | public class Spectrogram : INotifyPropertyChanged |
||
13 | { |
||
14 | private bool _pinToDesktop = false; |
||
15 | private int _sampleRate = 8192; |
||
16 | private int _fftSamples = 1024; |
||
17 | private int _audioBufferTimespan = 20; |
||
18 | private int _spectrumIntensity = 5; |
||
19 | |||
20 | public bool PinToDesktop |
||
21 | { |
||
22 | get => _pinToDesktop; |
||
23 | set |
||
24 | { |
||
25 | if (value == _pinToDesktop) |
||
26 | { |
||
27 | return; |
||
28 | } |
||
29 | |||
30 | _pinToDesktop = value; |
||
31 | OnPropertyChanged(); |
||
32 | } |
||
33 | } |
||
34 | |||
35 | public int SampleRate |
||
36 | { |
||
37 | get => _sampleRate; |
||
38 | set |
||
39 | { |
||
40 | if (value == _sampleRate) |
||
41 | { |
||
42 | return; |
||
43 | } |
||
44 | |||
45 | _sampleRate = value; |
||
46 | OnPropertyChanged(); |
||
47 | } |
||
48 | } |
||
49 | |||
50 | public int SpectrumIntensity |
||
51 | { |
||
52 | get => _spectrumIntensity; |
||
53 | set |
||
54 | { |
||
55 | if (value == _spectrumIntensity) |
||
56 | { |
||
57 | return; |
||
58 | } |
||
59 | |||
60 | _spectrumIntensity = value; |
||
61 | OnPropertyChanged(); |
||
62 | } |
||
63 | } |
||
64 | |||
65 | public int FFTSamples |
||
66 | { |
||
67 | get => _fftSamples; |
||
68 | set |
||
69 | { |
||
70 | if (value == _fftSamples) |
||
71 | { |
||
72 | return; |
||
73 | } |
||
74 | |||
75 | _fftSamples = value; |
||
76 | OnPropertyChanged(); |
||
77 | } |
||
78 | } |
||
79 | |||
80 | public int AudioBufferTimespan |
||
81 | { |
||
82 | get => _audioBufferTimespan; |
||
83 | set |
||
84 | { |
||
85 | if (value == _audioBufferTimespan) |
||
86 | { |
||
87 | return; |
||
88 | } |
||
89 | |||
90 | _audioBufferTimespan = value; |
||
91 | OnPropertyChanged(); |
||
92 | } |
||
93 | } |
||
94 | |||
95 | public Spectrogram() |
||
96 | { |
||
97 | } |
||
98 | |||
99 | public event PropertyChangedEventHandler PropertyChanged; |
||
100 | |||
101 | [NotifyPropertyChangedInvocator] |
||
102 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
103 | { |
||
104 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
105 | } |
||
106 | } |
||
107 | } |