diff options
author | Max Kellermann <max@duempel.org> | 2014-07-30 20:58:14 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-07-30 22:17:01 +0200 |
commit | 9fb351a139a56fc7b1ece549894f8fc31fa887cd (patch) | |
tree | 7c9ce42a1262af587f1b9fede2b24ff39cef93fc /src/mixer | |
parent | 0d0ccacdf3e154b1cc27a0840fce80ac13f9641c (diff) | |
download | mpd-9fb351a139a56fc7b1ece549894f8fc31fa887cd.tar.gz mpd-9fb351a139a56fc7b1ece549894f8fc31fa887cd.tar.xz mpd-9fb351a139a56fc7b1ece549894f8fc31fa887cd.zip |
*Save, *State: use the OutputStream API instead of FILE*
Diffstat (limited to 'src/mixer')
-rw-r--r-- | src/mixer/Volume.cxx | 6 | ||||
-rw-r--r-- | src/mixer/Volume.hxx | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/mixer/Volume.cxx b/src/mixer/Volume.cxx index 596b3c12a..86ebbf422 100644 --- a/src/mixer/Volume.cxx +++ b/src/mixer/Volume.cxx @@ -24,6 +24,7 @@ #include "util/StringUtil.hxx" #include "util/Domain.hxx" #include "system/PeriodClock.hxx" +#include "fs/output/BufferedOutputStream.hxx" #include "Log.hxx" #include <assert.h> @@ -110,9 +111,10 @@ read_sw_volume_state(const char *line, MultipleOutputs &outputs) return true; } -void save_sw_volume_state(FILE *fp) +void +save_sw_volume_state(BufferedOutputStream &os) { - fprintf(fp, SW_VOLUME_STATE "%u\n", volume_software_set); + os.Format(SW_VOLUME_STATE "%u\n", volume_software_set); } unsigned diff --git a/src/mixer/Volume.hxx b/src/mixer/Volume.hxx index a02c21a21..d787a6415 100644 --- a/src/mixer/Volume.hxx +++ b/src/mixer/Volume.hxx @@ -22,9 +22,8 @@ #include "Compiler.h" -#include <stdio.h> - class MultipleOutputs; +class BufferedOutputStream; void InvalidateHardwareVolume(); @@ -39,7 +38,8 @@ volume_level_change(MultipleOutputs &outputs, unsigned volume); bool read_sw_volume_state(const char *line, MultipleOutputs &outputs); -void save_sw_volume_state(FILE *fp); +void +save_sw_volume_state(BufferedOutputStream &os); /** * Generates a hash number for the current state of the software |