This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Class: audioPlugin

Set sample rate at which the plugin is run




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.


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

Introduced in R2016a