Closed philipp-baumann closed 3 years ago
I wonder if we could/should use a smarter approach using file.size
, as described here:
[...]
fsize <- file.info(fn)["size"]
rw <- readBin(fn, "raw", n = fsize)
out <- opus_read_raw(rw, type = type, atm_comp_minus4offset = atm_comp_minus4offset)
[...]
According to the readBin
docs, you can give the n
parameter a generous allocation, but you have to be mindful as this space will be reserved (in other words we can be "wasting" RAM).
The latest commit fixes the invalid byte strings that can occur for time and PLF elements.
The latest fix is not really linked and should have been assigned to a different pull request.
Hi Pierre, I could not read larger OPUS files. This fixes the error. Cheers