MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / AudioFileInputStream

Class AudioFileInputStream

src/decoder/plugins/AudiofileDecoderPlugin.cxx:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37struct AudioFileInputStream {
38 DecoderClient *const client;
39 InputStream &is;
40
41 size_t Read(void *buffer, size_t size) noexcept {
42 /* libaudiofile does not like partial reads at all,
43 and will abort playback; therefore always force full
44 reads */
45 return decoder_read_full(client, is, {reinterpret_cast<std::byte *>(buffer), size})
46 ? size
47 : 0;
48 }
49};
50
51[[gnu::pure]]
52static SongTime

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected