diff options
author | Max Kellermann <max@duempel.org> | 2013-10-23 22:08:59 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-23 23:12:02 +0200 |
commit | 93deb844996120b6326345d6d87e803142dd1968 (patch) | |
tree | d6c00669efffad1b15fc45e03158d6838a7e5827 /src/decoder/SndfileDecoderPlugin.cxx | |
parent | c4d4011c63808a64ca20a4b03fd455a83c23cc33 (diff) | |
download | mpd-93deb844996120b6326345d6d87e803142dd1968.tar.gz mpd-93deb844996120b6326345d6d87e803142dd1968.tar.xz mpd-93deb844996120b6326345d6d87e803142dd1968.zip |
input_stream: rename struct to InputStream
Diffstat (limited to 'src/decoder/SndfileDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/SndfileDecoderPlugin.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/decoder/SndfileDecoderPlugin.cxx b/src/decoder/SndfileDecoderPlugin.cxx index 5f5c256e9..3360cd1bf 100644 --- a/src/decoder/SndfileDecoderPlugin.cxx +++ b/src/decoder/SndfileDecoderPlugin.cxx @@ -34,29 +34,29 @@ static constexpr Domain sndfile_domain("sndfile"); static sf_count_t sndfile_vio_get_filelen(void *user_data) { - const struct input_stream *is = (const struct input_stream *)user_data; + const InputStream &is = *(const InputStream *)user_data; - return is->GetSize(); + return is.GetSize(); } static sf_count_t sndfile_vio_seek(sf_count_t offset, int whence, void *user_data) { - struct input_stream *is = (struct input_stream *)user_data; + InputStream &is = *(InputStream *)user_data; - if (!is->LockSeek(offset, whence, IgnoreError())) + if (!is.LockSeek(offset, whence, IgnoreError())) return -1; - return is->GetOffset(); + return is.GetOffset(); } static sf_count_t sndfile_vio_read(void *ptr, sf_count_t count, void *user_data) { - struct input_stream *is = (struct input_stream *)user_data; + InputStream &is = *(InputStream *)user_data; Error error; - size_t nbytes = is->LockRead(ptr, count, error); + size_t nbytes = is.LockRead(ptr, count, error); if (nbytes == 0 && error.IsDefined()) { LogError(error); return -1; @@ -77,9 +77,9 @@ sndfile_vio_write(gcc_unused const void *ptr, static sf_count_t sndfile_vio_tell(void *user_data) { - const struct input_stream *is = (const struct input_stream *)user_data; + const InputStream &is = *(const InputStream *)user_data; - return is->GetOffset(); + return is.GetOffset(); } /** @@ -113,7 +113,7 @@ time_to_frame(float t, const AudioFormat *audio_format) } static void -sndfile_stream_decode(Decoder &decoder, struct input_stream *is) +sndfile_stream_decode(Decoder &decoder, InputStream &is) { SNDFILE *sf; SF_INFO info; @@ -123,7 +123,7 @@ sndfile_stream_decode(Decoder &decoder, struct input_stream *is) info.format = 0; - sf = sf_open_virtual(&vio, SFM_READ, &info, is); + sf = sf_open_virtual(&vio, SFM_READ, &info, &is); if (sf == nullptr) { LogWarning(sndfile_domain, "sf_open_virtual() failed"); return; |