Learn R Programming

audio (version 0.1-11)

audio.drivers: Audio Drivers

Description

audio.drivers lists all currently loaded and available audio drivers.

current.audio.driver returns the name of the currently active audio driver or NULL if no audio drivers is available.

set.audio.driver selects an audio driver as the current driver.

load.audio.driver attempts to load a modular audio driver and, if succeessful, makes it the current audio driver.

Usage

audio.drivers()
current.audio.driver()
set.audio.driver(name)
load.audio.driver(path)

Value

audio.drivers returns a data frame lising all availbale drivers

set.audio.driver and current.audio.driver return the name of the active driver or NULL if no drivers ar avaliable.

load.audio.driver returns the name of the loaded driver.

Arguments

name

name of the driver to load (as it appears in the name column of audio.drivers()) or NULL to load the default audio driver

path

path to the dynamic module to load

Details

The audio package comes with several built-in audio drivers (currently "wmm": WindowsMultiMedia for MS Windows, "macosx": AudioUnits for Mac OS X and "portaudio": PortAudio for unix), but it also supports 3rd-party drivers to be loaded (e.g. from other packages).

All operations that create new audio instances (play and record) use the current audio driver. The audio package allows the user to switch between different audio drivers. Each audio instance is tied to the driver it was created with even if the current driver was changed in the meantime.

Drivers are references by its short name listed in the name column in the list of available drivers (obtainable via audio.drivers).

An audio driver is any shared module that provides a C function create_audio_driver which returns a pointer to a populated structure audio_driver as defined in driver.h.

See Also

record, play

Examples

Run this code
audio.drivers()

Run the code above in your browser using DataLab