loads data from a WAVE file
fastReadWave(where, from = 0, to = NA_real_, header = FALSE, toWaveMC = FALSE)
returns an object of the class audioSample
as loaded from
the WAVE file, or if header=TRUE
a named list with the sample.rate,
num channels, bit rate, and sample length. audioSample
objects
store the wav data as a matrix wth one row for every channel and
attributes "rate" and "bits"
file to load data from
starting point to load data from (seconds)
end point to read data to (seconds), NA
to read til end
logical flag to read only header information
logical flag to return a WaveMC object
Taiki Sakai taiki.sakai@noaa.gov
WAVE is a RIFF (Resource Interchange File Format) widely used for storage of uncompressed audio data. It is often identified by the extension .WAV on DOS-legacy systems (such as Windows). Although WAVE files may contain compressed data, the above functions only support plain, uncompressed PCM data.
This function was originally written Simon Urbanek, all credit for the bulk of the C programming goes to him. Adapted by Taiki Sakai to add additional features and fix some bugs. See additional license comments in file.c