Internal soundgen function.
writeAudio(x, scale_used = NULL, audio, filename)
numeric vector
actually used scale (max(abs(x))) - overrides audio$scale_used
list returned by readAudio
containing
samplingRate, bit, scale, scale_used
full path and filename including .wav
Writes a .wav file to disk based on the bit/scale/samplingRate contained in
the internally generated audio
object. The point with using this
function is to package tuneR::Wave + normalize + writeWave in a
soundgen-specific way. Unlike seewave::savewav, writeAudio does NOT normalize
or rescale the input.