| 35 | } |
| 36 | |
| 37 | struct 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]] |
| 52 | static SongTime |
nothing calls this directly
no outgoing calls
no test coverage detected