Learn R Programming

AIFFtools (version 1.0)

aiff2wav: 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, ...)

Value

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

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

Author

Author and Maintainer:Carl Witthoft carl@witthoft.com

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.

See Also

readAIFF to load an AIFF file.

Examples

Run this code

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


Run the code above in your browser using DataLab