Skip to content

Commit

Permalink
Fix loading total volume from default volumes
Browse files Browse the repository at this point in the history
Author: laurigates
See: prixt/soundsense-rs#13
  • Loading branch information
Rudo2204 committed Jul 21, 2021
1 parent 6c2583e commit a854840
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sound/sound_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ impl SoundManager {
/// Write the current slider values into the soundsense-rs/default-volumes.ini file.
pub fn set_current_volumes_as_default(&self, mut file: File) -> Result<()> {
use std::io::Write;
writeln!(&mut file, "all={}", (self.total_volume.get()*100.0) as u32)?;
writeln!(&mut file, "total={}", (self.total_volume.get()*100.0) as u32)?;
for (channel_name, channel) in self.channels.iter() {
writeln!(&mut file, "{}={}", channel_name, (channel.get_local_volume()*100.0) as u32)?;
}
Expand Down Expand Up @@ -727,4 +727,4 @@ fn parse_playlist(path: &Path) -> Result<Vec<PathBuf>> {
}
}
Ok(path_vec)
}
}

0 comments on commit a854840

Please sign in to comment.