erikd/libsndfile — pull request #65 by mtolly (2014-05-08 16:28:38+00:00)
Title: Seeking for IMA4 AIFF-C files

This patch allows seeking in IMA4 AIFF-C files. Looking at the existing IMA functions, there's a discrepancy in the AIFF and WAV container versions, which makes this patch kind of hacky.

* `wav_w64_ima_decode_block` does `pima->blockcount ++ ;` so `blockcount` is the number of "block-frames" read, where one block-frame has a block for each channel. This makes more sense in my opinion.
* `aiff_ima_decode_block` does `pima->blockcount += pima->channels ;` so `blockcount` is the number of individual channel blocks read.

Because of this I needed to duplicate the existing `ima_seek` function (which was for WAV) into two slightly different functions. If the above discrepancy is a mistake you want to fix, feel free to reject this pull request and let me know what your plans are.