aiff2wav: Function to Convert an AIFF - Class Object to a Wave - or...

View source: R/aiff2wav.R

aiff2wavR Documentation

Function to Convert an AIFF - Class Object to a Wave - or WaveMC - Class Object

Description

This function converts an object produced with readAiff to a Wave-class object such as is generated with readWave .

Usage

aiff2wav(aifsrc,  makeMC = FALSE, ...)

Arguments

aifsrc

The source object. Must be of class "Aiff" as created with readAiff

makeMC

If TRUE, force the output to be of class WaveMC regardless of the number of input channels. However, if the input audio array has more than two channels, the value is always set to TRUE.

...

Reserved for future use

Details

Given that AIFF files are PCM encoded, the default value of the slot @pcm is TRUE and remains untouched. The slots @bits, @samp.rate are read from the source object. Note, however, that should the source bit-depth be a value unsupported by wave files, the function will exit with an error message. For class "Wave" , the slot @stereo is set to FALSE if the input is a vector or single column, and to TRUE if there are two columns.

Value

A Wave or WaveMC object as defined in the tuneR package.

Author(s)

Author and Maintainer:Carl Witthoft carl@witthoft.com

See Also

readAIFF to load an AIFF file.

Examples


samp3 <- readAiff(system.file("extdata", "sample3.aif", package = "AIFFtools") )
samp3wav <- aiff2wav(samp3)



AIFFtools documentation built on Sept. 11, 2024, 8:59 p.m.