Hi Mahyar
That sounds correct - since MATLAB is single-threaded, unless you explicitly implement multithreading with the parallel computing toolbox. Exceptions are timer and UI handle callbacks, which execute in parallel.
In the audio example protocol with psychtoolbox, an ongoing sound can be stopped with soft code "255", because the psychtoolbox "play" function is non-blocking.
With visual stimuli, I'm assuming you are using the "flip" command in a loop, to swap video buffers - so MATLAB will be busy for the duration of your loop.
One way to solve this is with a MATLAB timer object, which you can make global. Your soft code handler starts playback by starting the timer: start(t), and ends playback by stopping it: stop(t). The timer callback function loads the next frame and calls flip().
I have a wrapper function in development to make this easy, but its current implementation assumes things about your setup (portion of the screen your video is on, its size, color not supported, etc.), and also hasn't been validated for frame rate interval uniformity. I will release it once it's debugged, but I can't promise a release date yet.
J