Advertisement
Guest User

Untitled

a guest
Feb 28th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. | size = (
  2. | | ((uint64_t)(context->duration) * (uint64_t)song->sample_rate) /
  3. | | ((uint64_t)AV_TIME_BASE)
  4. | | ) *
  5. | | song->channels *
  6. | | song->nb_bytes_per_sample;
  7.  
  8. if ((index * song->nb_bytes_per_sample + data_size) > size) {
  9. | | | | | size += data_size;
  10. | | | | | int8_t *ptr;
  11. | | | | | ptr = realloc(beginning, size);
  12. | | | | | if(ptr != NULL)
  13. | | | | | | beginning = ptr;
  14. song->nSamples += data_size / song->nb_bytes_per_sample;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement