sound (version 1.4.5)

loadSample: Load a WAV File from Disk

Description

Load a wav file from disk and create a Sample object.

Usage

loadSample(filename, filecheck=TRUE)

Value

the Sample object that is equivalent to the wav file.

Arguments

filename

a string giving the path and the name of the wav file.

filecheck

logical. If FALSE, no check for existance and read permission of the file will be performed.

Author

Author: tools:::Rd_package_author("sound")

Maintainer: tools:::Rd_package_maintainer("sound")

Details

All kinds of wav files are supported: mono / stereo, 8 / 16 bits per sample, 1000 to 48000 samples/second.

See Also

saveSample, as.Sample

Examples

Run this code
if (FALSE) {
s <- loadSample("soundfile.wav")
play(s)
}

Run the code above in your browser using DataCamp Workspace