If you record and save a wave file in R using the audio package, there is an error trying to load it again. The object is to store the audio files for later retrieval.
library(audio)
k = 3 # three seconds
x <- rep(NA_real_, 44100*2*k)
# record and save wav file
record(x, 44100, 2)
wait(k)
play(x)
save.wave(x, "test.wav")
# load file again
y <- load.wave("test.wav")
After the last command we get:
Error in load.wave("test.wav") : incomplete file
A previous post has suggested an extra data problem, but why wouldn't a file type be internally consistent within a package?