Lines Matching refs:bytes
105 FLAC__OggDecoderAspectReadStatus FLAC__ogg_decoder_aspect_read_callback_wrapper(FLAC__OggDecoderAspect *aspect, FLAC__byte buffer[], size_t *bytes, FLAC__OggDecoderAspectReadCallbackProxy read_callback, const FLAC__StreamDecoder *decoder, void *client_data)
108 const size_t bytes_requested = *bytes;
121 * the same number of bytes from Ogg, then pass what's decoded down to
133 * to read in enough pages to return the full number of bytes
136 *bytes = 0;
137 while (*bytes < bytes_requested && !aspect->end_of_stream) {
140 size_t n = bytes_requested - *bytes;
141 if ((size_t)aspect->working_packet.bytes <= n) {
143 n = aspect->working_packet.bytes;
145 *bytes += n;
150 /* only n bytes of the packet will fit in the buffer */
152 *bytes += n;
155 aspect->working_packet.bytes -= n;
164 if (aspect->working_packet.bytes > 0 && aspect->working_packet.packet[0] == FLAC__OGG_MAPPING_FIRST_HEADER_PACKET_TYPE) {
172 if (aspect->working_packet.bytes < (long)header_length)
184 aspect->working_packet.bytes -= header_length;
213 const size_t ogg_bytes_to_read = max(bytes_requested - *bytes, OGG_BYTES_CHUNK);
235 /* double protection; this will happen if the read callback returns more bytes than the max requested, which would overflow Ogg's internal buffer */
248 if (aspect->end_of_stream && *bytes == 0) {