This commit is contained in:
@@ -247,9 +247,9 @@ impl CagireDesktop {
|
||||
initial_samples,
|
||||
Arc::clone(&audio_sample_pos),
|
||||
) {
|
||||
Ok((s, sample_rate, analysis)) => {
|
||||
app.audio.config.sample_rate = sample_rate;
|
||||
sample_rate_shared.store(sample_rate as u32, Ordering::Relaxed);
|
||||
Ok((s, info, analysis)) => {
|
||||
app.audio.config.sample_rate = info.sample_rate;
|
||||
sample_rate_shared.store(info.sample_rate as u32, Ordering::Relaxed);
|
||||
(Some(s), Some(analysis))
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -328,11 +328,12 @@ impl CagireDesktop {
|
||||
restart_samples,
|
||||
Arc::clone(&self.audio_sample_pos),
|
||||
) {
|
||||
Ok((new_stream, sr, new_analysis)) => {
|
||||
Ok((new_stream, info, new_analysis)) => {
|
||||
self._stream = Some(new_stream);
|
||||
self._analysis_handle = Some(new_analysis);
|
||||
self.app.audio.config.sample_rate = sr;
|
||||
self.sample_rate_shared.store(sr as u32, Ordering::Relaxed);
|
||||
self.app.audio.config.sample_rate = info.sample_rate;
|
||||
self.sample_rate_shared
|
||||
.store(info.sample_rate as u32, Ordering::Relaxed);
|
||||
self.app.audio.error = None;
|
||||
self.app.ui.set_status("Audio restarted".to_string());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user