CRload_wav: Loads wav-file.

View source: R/CRload_wav.R

CRload_wavR Documentation

Loads wav-file.

Description

Loads a wav-file specified in wavfile, adds it to wav_list. wavfile argument must provide full path, filename and extension of file. Wav_list can later be provided to CRclose to close resource. Before loading wav, CRinit_audio must be called.

Usage

CRload_wav(wav_list, wavfile, status = NULL)

Arguments

wav_list

a list of wav files previously loaded (possibly empty), to which the loaded wav file is added.

wavfile

wav file (full path, filename, extension) to be loaded.

status

Optional list status with elements value and message to retrieve warnings and error messages.

Value

Returns updated wav_list with loaded wav-file added. If everything worked fine, returned wav_list has an integer valid set to 1.

Examples

    CRinit_audio()

    wavs <- list()
    wavs <- CRload_wav(wavs, "C:/Documents/sound1.wav")
    wavs <- CRload_wav(wavs, "C:/Documents/sound2.wav")
    wavs <- CRload_wav(wavs, "C:/Documents/sound3.wav")

lorweiuk/CREx documentation built on March 16, 2024, 3:04 a.m.