Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

validateAudioPlugin

Test MATLAB source code for audio plugin

Syntax

validateAudioPlugin classname
validateAudioPlugin options classname

Description

example

validateAudioPlugin classname generates and runs a Test Bench Procedure that exercises your audio plugin class.

example

validateAudioPlugin options classname specifies options to modify the default Test Bench Procedure.

Examples

collapse all

validateAudioPlugin audiopluginexample.Echo
Checking plug-in class 'audiopluginexample.Echo'... passed.
Generating testbench file 'testbench_Echo.m'... done.
Running testbench... passed.
Generating mex file 'testbench_Echo_mex.mexw64'... done.
Running mex testbench... passed.
Deleting testbench.
Ready to generate audio plug-in.
validateAudioPlugin -nomex audiopluginexample.Echo
Checking plug-in class 'audiopluginexample.Echo'... passed.
Generating testbench file 'testbench_Echo.m'... done.
Running testbench... passed.
Skipping mex.
Deleting testbench.
validateAudioPlugin -keeptestbench audiopluginexample.Echo
Checking plug-in class 'audiopluginexample.Echo'... passed.
Generating testbench file 'testbench_Echo.m'... done.
Running testbench... passed.
Generating mex file 'testbench_Echo_mex.mexw64'... done.
Running mex testbench... passed.
Keeping testbench.
Ready to generate audio plug-in.

Two test benches are saved to your current folder:

  • testbench_Echo.m

  • testbench_Echo_mex.mexw64

validateAudioPlugin -keeptestbench -nomex audiopluginexample.Echo
Checking plug-in class 'audiopluginexample.Echo'... passed.
Generating testbench file 'testbench_Echo.m'... done.
Running testbench... passed.
Skipping mex.
Keeping testbench.

One test bench is saved to your current folder:

  • testbench_Echo.m

Input Arguments

collapse all

Options to modify test bench procedure, specified as -nomex or -keeptestbench. Options can be specified together or separately, and in any order.

  • -nomex –– validateAudioPlugin does not generate and run a MEX version of the test bench file. This option significantly reduces run time of the test bench procedure.

  • -keeptestbench –– validateAudioPlugin saves the generated test benches to the current folder.

Name of the plugin class to validate. The plugin class must derive from either the audioPlugin class or the audioPluginSource class. The validateAudioPlugin function exercises an instance of the specified plugin class.

Limitations

The valdiateAudioPlugin function is compatible with Windows® and Mac operating systems. It is not compatible with Linux®.

More About

collapse all

Test Bench Procedure

The valudateAudioPlugin function uses dynamic testing to find common audio plugin programming mistakes not found by the static checks performed by generateAudioPlugin. The function:

  1. Runs a subset of error checks performed by generateAudioPlugin.

  2. Generates and runs a MATLAB® test bench to exercise the class.

  3. Generates and runs a MEX version of the test bench.

  4. Removes the generated test benches.

If the plugin class fails testing, step 4 is automatically omitted. To debug your plugin, step through the saved generated test bench.

If you use the -keeptestbench option, or if an error occurs during validation, the test bench files are saved to your current folder.

Output File Name

Output File Type

Output File Name With File Extension

testbench_myClassName

MATLAB

testbench_myClassName.m

testbench_myClassName_mex

MEX

testbench_myClassName_mex.mexw64

The MEX-file extension depends on your operating system.

Introduced in R2016a

Was this topic helpful?