Main Content

Run Audio I/O Features OutsideMATLABand金宝app

You can deploy these audio input and output features outside the MATLAB®and Simulink®environments:

The generated code for the audio I/O features relies on prebuilt dynamic library files included with MATLAB. You must account for these extra files when you run audio I/O features outside the MATLAB and Simulink environments. To run a standalone executable generated from a model or code containing the audio I/O features, set your system environment using commands specific to your platform.

Platform Command
Mac

setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:$MATLABROOT/bin/maci64" (csh/tcsh)

export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MATLABROOT/bin/maci64 (Bash)

Linux

setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:$MATLABROOT/bin/glnxa64 (csh/tcsh)

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MATLABROOT/bin/glnxa64 (Bash)

Windows

set PATH=%PATH%;%MATLABROOT%\bin\win64

The path in these commands is valid only on systems that have MATLAB installed. If you run the standalone app on a machine with only MCR, and no MATLAB installed, replace$MATLABROOT/bin/...with the path to the MCR.

To run the code generated from the above System objects and blocks on a machine does not have MCR or MATLAB installed, use thepackNGofunction. ThepackNGo函数packages all relevant files in a compressed zip file so that you can relocate, unpack, and rebuild your project in another development environment with no MATLAB installed.

You can use thepackNGofunction at the command line or thePackageoption in theMATLAB Coder™app. The files are packaged in a compressed file that you can relocate and unpack using a standard zip utility. For more details on how to pack the code generated from MATLAB code, seePackage Code for Other Development Environments(MATLAB Coder). For more details on how to pack the code generated from Simulink blocks, see thepackNGo(Simulink Coder)function.

Related Topics