Commit e627523
Benjamin Moody
_rd_compressed_file: read signals in 1048576-sample chunks.
A bug in libsndfile [1] means that if we try to read a chunk of more
than 16777216 (2**24) total samples (across all channels) from a FLAC
file, and the number of channels is not a power of two, then
sf_read_short will return zero.
Work around this bug by allocating an array ourselves and reading a
small block of samples at a time (a FLAC file has at most 8 channels,
at most 7 if not a power of two, and 7 * 1048576 < 16777216).
[1] libsndfile/libsndfile#4311 parent 78a1a86 commit e627523
1 file changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1875 | 1875 | | |
1876 | 1876 | | |
1877 | 1877 | | |
1878 | | - | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
1879 | 1895 | | |
1880 | 1896 | | |
1881 | 1897 | | |
| |||
0 commit comments