spectrum
This commit is contained in:
@@ -56,6 +56,8 @@ pub struct AudioConfig {
|
||||
pub sample_paths: Vec<PathBuf>,
|
||||
pub sample_count: usize,
|
||||
pub refresh_rate: RefreshRate,
|
||||
pub show_scope: bool,
|
||||
pub show_spectrum: bool,
|
||||
}
|
||||
|
||||
impl Default for AudioConfig {
|
||||
@@ -69,6 +71,8 @@ impl Default for AudioConfig {
|
||||
sample_paths: Vec::new(),
|
||||
sample_count: 0,
|
||||
refresh_rate: RefreshRate::default(),
|
||||
show_scope: true,
|
||||
show_spectrum: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,6 +86,8 @@ pub enum AudioFocus {
|
||||
BufferSize,
|
||||
RefreshRate,
|
||||
RuntimeHighlight,
|
||||
ShowScope,
|
||||
ShowSpectrum,
|
||||
SamplePaths,
|
||||
LinkEnabled,
|
||||
StartStopSync,
|
||||
@@ -97,6 +103,7 @@ pub struct Metrics {
|
||||
pub scope: [f32; 64],
|
||||
pub peak_left: f32,
|
||||
pub peak_right: f32,
|
||||
pub spectrum: [f32; 32],
|
||||
}
|
||||
|
||||
impl Default for Metrics {
|
||||
@@ -110,6 +117,7 @@ impl Default for Metrics {
|
||||
scope: [0.0; 64],
|
||||
peak_left: 0.0,
|
||||
peak_right: 0.0,
|
||||
spectrum: [0.0; 32],
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,7 +157,9 @@ impl AudioSettings {
|
||||
AudioFocus::Channels => AudioFocus::BufferSize,
|
||||
AudioFocus::BufferSize => AudioFocus::RefreshRate,
|
||||
AudioFocus::RefreshRate => AudioFocus::RuntimeHighlight,
|
||||
AudioFocus::RuntimeHighlight => AudioFocus::SamplePaths,
|
||||
AudioFocus::RuntimeHighlight => AudioFocus::ShowScope,
|
||||
AudioFocus::ShowScope => AudioFocus::ShowSpectrum,
|
||||
AudioFocus::ShowSpectrum => AudioFocus::SamplePaths,
|
||||
AudioFocus::SamplePaths => AudioFocus::LinkEnabled,
|
||||
AudioFocus::LinkEnabled => AudioFocus::StartStopSync,
|
||||
AudioFocus::StartStopSync => AudioFocus::Quantum,
|
||||
@@ -165,7 +175,9 @@ impl AudioSettings {
|
||||
AudioFocus::BufferSize => AudioFocus::Channels,
|
||||
AudioFocus::RefreshRate => AudioFocus::BufferSize,
|
||||
AudioFocus::RuntimeHighlight => AudioFocus::RefreshRate,
|
||||
AudioFocus::SamplePaths => AudioFocus::RuntimeHighlight,
|
||||
AudioFocus::ShowScope => AudioFocus::RuntimeHighlight,
|
||||
AudioFocus::ShowSpectrum => AudioFocus::ShowScope,
|
||||
AudioFocus::SamplePaths => AudioFocus::ShowSpectrum,
|
||||
AudioFocus::LinkEnabled => AudioFocus::SamplePaths,
|
||||
AudioFocus::StartStopSync => AudioFocus::LinkEnabled,
|
||||
AudioFocus::Quantum => AudioFocus::StartStopSync,
|
||||
|
||||
Reference in New Issue
Block a user