diff options
Diffstat (limited to '')
-rw-r--r-- | src/output/OutputState.cxx | 7 | ||||
-rw-r--r-- | src/output/OutputState.hxx | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/output/OutputState.cxx b/src/output/OutputState.cxx index 7f3a8da7b..0c1424404 100644 --- a/src/output/OutputState.cxx +++ b/src/output/OutputState.cxx @@ -28,6 +28,7 @@ #include "Internal.hxx" #include "Domain.hxx" #include "Log.hxx" +#include "fs/output/BufferedOutputStream.hxx" #include "util/StringUtil.hxx" #include <assert.h> @@ -38,13 +39,13 @@ unsigned audio_output_state_version; void -audio_output_state_save(FILE *fp, const MultipleOutputs &outputs) +audio_output_state_save(BufferedOutputStream &os, + const MultipleOutputs &outputs) { for (unsigned i = 0, n = outputs.Size(); i != n; ++i) { const AudioOutput &ao = outputs.Get(i); - fprintf(fp, AUDIO_DEVICE_STATE "%d:%s\n", - ao.enabled, ao.name); + os.Format(AUDIO_DEVICE_STATE "%d:%s\n", ao.enabled, ao.name); } } diff --git a/src/output/OutputState.hxx b/src/output/OutputState.hxx index 32f4bbcce..47f8429d5 100644 --- a/src/output/OutputState.hxx +++ b/src/output/OutputState.hxx @@ -25,15 +25,15 @@ #ifndef MPD_OUTPUT_STATE_HXX #define MPD_OUTPUT_STATE_HXX -#include <stdio.h> - class MultipleOutputs; +class BufferedOutputStream; bool audio_output_state_read(const char *line, MultipleOutputs &outputs); void -audio_output_state_save(FILE *fp, const MultipleOutputs &outputs); +audio_output_state_save(BufferedOutputStream &os, + const MultipleOutputs &outputs); /** * Generates a version number for the current state of the audio |