How to attach a toolbox while deploying in appdesigner ?

2 views (last 30 days)
I am using appdesigner for a deploying an application using psychotoolbox. In the first line of using psychotoolbox functions, which is:
I get beep and it doesn't go further. While deploying, list of files from psychotoolbox that I have used,are automatically added, including
  1. InitializePsychSound.m
  2. PsychtoolboxRoot.m
  3. psychlasterror.m
  4. IsOSX.m
  5. IsWin.m
  6. WaitSec.mexw64
  7. PsychPortAudio.mexw64
Any comment is highly appreciated.
Adam on 10 Apr 2018
Have you run it from command line or created a log file so you can see what the actual error is? It could be anything given just a ping!
Majid Khalili
Majid Khalili on 10 Apr 2018
Edited: Majid Khalili on 10 Apr 2018
I didnt know that I can see the output in command window, thanks alot for that tip ;)
Here is the output of command prompt :
PsychStartup: Environment variable GSTREAMER_1_0_ROOT_X86_64 is undefined.
PsychStartup: Either GStreamer-1.4 is not installed at all, or if it is installed then something
PsychStartup: is botched. Trying various common locations for the GStreamer runtime to keep going.
PsychStartup: Path to GStreamer runtime is undefined! This probably means that
PsychStartup: the 64-Bit GStreamer 1.x runtime from is not installed.
PsychStartup: The Psychtoolbox Screen() multimedia functions and the new 'DrawText'
PsychStartup: high quality text renderer will fail to work until you fix
PsychStartup: this! Read 'help GStreamer' for instructions.
Warning: File 'tmpFile' not found.
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_x86.dll or 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 (line 126)
Failed to load PsychPortAudio driver for unknown reason! Dependency problem?!?
Error in MyProjext/MyFunction (line 108)
Error in MyProjext/StartButtonPushed (line 407)
Error in appdesigner.internal.service.AppManagementService/tryCallback (line 283)
Error in matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 309)
Error while evaluating Button PrivateButtonPushedFcn.
And here is my code you can see that I use InitializePsychSound before using it, when running I get "Initilizing Psychotoolbox - v2" message, but it never reaches "Initilized".
app.ShowMessage('Initilizing Psychotoolbox - v2');
freq = 44100;
app.psyToolBxHandler = PsychPortAudio('Open', [], [], 0, freq, nrchannels);
app.ShowMessage('Could not open device at wanted playback frequency of Hz. Will retry with device default frequency.');
app.ShowMessage('Sound may sound a bit out of tune, ...');
app.psyToolBxHandler = PsychPortAudio('Open', [], [], 0, [], nrchannels);
app.psyToolBxHandler = PsychPortAudio('Open', [], [], 0, freq, nrchannels);
It also worth mentioning that, the code is working when I use Matlab to run it, but not when I use exe file.

Sign in to comment.

Answers (0)


Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!