| 1251 | |
| 1252 | |
| 1253 | FLAC__StreamDecoderReadStatus flacStreamDecoderReadCallback( |
| 1254 | const FLAC__StreamDecoder * |
| 1255 | /*_decoder*/, |
| 1256 | FLAC__byte * _buffer, |
| 1257 | unsigned int * _bytes, |
| 1258 | void * _client_data ) |
| 1259 | { |
| 1260 | int res = static_cast<flacStreamDecoderClientData *>( |
| 1261 | _client_data )->read_buffer->read( |
| 1262 | (char *) _buffer, *_bytes ); |
| 1263 | |
| 1264 | if( res > 0 ) |
| 1265 | { |
| 1266 | *_bytes = res; |
| 1267 | return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; |
| 1268 | |
| 1269 | } |
| 1270 | *_bytes = 0; |
| 1271 | return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM; |
| 1272 | } |
| 1273 | |
| 1274 | |
| 1275 | |