erro while packaging psychtoolbox into matlap app designer

Dear Team of psychtoolbox
I am suing Matlab App Designer with PsychToolbox Version '3.0.19 - Flavor: beta - Corresponds to SVN Revision 13790.
I developed a Matlab app designer to show an experiment using PsychToolbox, and the experiment worked perfectly. When i package the app to work as matlab app, I receive the following error:

PTB-ERROR: Tried to initialize PsychPortAudio’s PortAudio engine. This didn’t work,
PTB-ERROR: because i couldn’t find or load the required portaudio_x64.dll library.
PTB-ERROR: Please make sure to call the InitializePsychSound function before first use of
PTB-ERROR: PsychPortAudio, otherwise this error will happen.

Error in function GetDevices: Usage error
Failed to initialize due to portaudio DLL loading problem. Call InitializePsychSound first! Aborted.
Error using InitializePsychSound
Error using InitializePsychSound
Failed to load PsychPortAudio driver for unknown reason! Dependency problem?!?

Error in NeuroFeedback_Behavioral_EXP/StarttheexperimentButtonPushed (line 168)
InitializePsychSound;

Error in appdesigner.internal.service.AppManagementService/executeCallback (line 172)
callback(appOrUserComponent, event);

Error in matlab.apps.AppBase>@(source,event)executeCallback(ams,app,callback,requiresEventData,event) (line 62)
newCallback = @(source, event)executeCallback(ams, …

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback
Error while evaluating Button PrivateButtonPushedFcn.

You’ll need to find where that DLL is stored and add it to your package I suspect. I don’t use Windows but I have used MATLAB Compiler to package a PTB-dependent app before on Linux and you need to find all dependencies before it will work…

1 Like