Main Content

getSampleRate

Class: audioPlugin

Get sample rate at which the plugin is run

Syntax

sampleRate = getSampleRate(myAudioPlugin)

Description

sampleRate = getSampleRate(myAudioPlugin) returns the sample rate in Hz at which the plugin is being run.

  • In a digital audio workstation (DAW) environment, the DAW user sets the sample rate. getSampleRate interacts with the DAW to determine the sample rate.

  • In the MATLAB® environment, getSampleRate returns the value set by a previous call to setSampleRate. If setSampleRate has not been called, getSampleRate returns the default value, 44100.

Version History

Introduced in R2016a