필터 지우기
필터 지우기

How to attach a toolbox while deploying in appdesigner ?

조회 수: 6 (최근 30일)
Majid Khalili
Majid Khalili 2018년 4월 10일
편집: Majid Khalili 2018년 4월 10일
I am using appdesigner for a deploying an application using psychotoolbox. In the first line of using psychotoolbox functions, which is:
InitializePsychSound();
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.
  댓글 수: 2
Adam
Adam 2018년 4월 10일
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 2018년 4월 10일
편집: Majid Khalili 2018년 4월 10일
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 www.gstreamer.net 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');
InitializePsychSound();
app.ShowMessage('Initilized');
freq = 44100;
nrchannels=2;
try
app.ShowMessage('Try');
app.psyToolBxHandler = PsychPortAudio('Open', [], [], 0, freq, nrchannels);
catch
app.ShowMessage('Catch');
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, ...');
psychlasterror('reset');
app.psyToolBxHandler = PsychPortAudio('Open', [], [], 0, [], nrchannels);
end
app.ShowMessage('Done');
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by