Main Content

setSampleRate

Class: audioPlugin

Set sample rate at which the plugin is run

Syntax

setSampleRate(myAudioPlugin,sampleRate)

Description

setSampleRate(myAudioPlugin,sampleRate) sets the sample rate of the plugin, myAudioPlugin, to the value specified by sampleRate. Specify sampleRate as a positive real integer. setSampleRate enables the MATLAB® environment to mimic behavior in a digital audio workstation (DAW) environment.

Note

A plugin must not call setSampleRate on itself. If the plugin attempts to call setSampleRate on itself, generateAudioPlugin throws an error.

Introduced in R2016a