Dear Psychtoolbox users,
I'm trying to present movie and sound from two different '.mov' files using Screen('Playmovie') function. So, the sound is from an original video file, and the picture is from a muted video file which is filtered from the original one. The code runs okay with iMac, but doesn't work in my MacBook Pro. When the code is run, the picture is presented okay, but there's no sound. Sound demo works fine with MacBook Pro. Do you have any idea on this issue? Should it be a hardware problem?? I'm pasting trimmed copy of the code below. (The PTB version: 3.0.10, SVN Revision 2499 / MacOS: 10.7.4)
Thank you for your help
Yihwa
Here's the code:
homedir = pwd;
addpath(pwd);
cd(homedir);
movStr = [homedir '/Moviefile_bigfilt.mov']; % filtered movie without sound (for picture)
audStr = [homedir '/Moviefile.mov']; % original movie (for sound)
[w,scrRect]=Screen('OpenWindow',0, 0,[],32,2);
[moviePtr dur fps width height] = Screen('OpenMovie', w, movStr,0);
Screen('PlayMovie', moviePtr, 1, 0, 0); %muted
[soundPtr] = Screen('OpenMovie', w, audStr);
Screen('PlayMovie', soundPtr, 1, 0, 1.0);
tex = Screen('GetMovieImage', w, moviePtr);
if tex<=0
[moviePtr duration fps width height] = Screen('OpenMovie', w, movStr,0);
Screen('PlayMovie', moviePtr, 1, 0, 0);
[soundPtr] = Screen('OpenMovie', w, audStr,0);
Screen('PlayMovie', soundPtr, 1, 0, 1.0);
tex = Screen('GetMovieImage', w, moviePtr);
end;
PlayDur = 10;
t0=GetSecs;
while (GetSecs - t0) < PlayDur;
Screen('DrawTexture', w, tex, Screen('Rect', tex), scrRect);
Screen('Flip', w);
Screen('Close', tex);
tex = Screen('GetMovieImage', w, moviePtr);
end
Screen('CloseMovie', moviePtr);
Screen('CloseMovie', soundPtr);
Screen('CloseAll');
I'm trying to present movie and sound from two different '.mov' files using Screen('Playmovie') function. So, the sound is from an original video file, and the picture is from a muted video file which is filtered from the original one. The code runs okay with iMac, but doesn't work in my MacBook Pro. When the code is run, the picture is presented okay, but there's no sound. Sound demo works fine with MacBook Pro. Do you have any idea on this issue? Should it be a hardware problem?? I'm pasting trimmed copy of the code below. (The PTB version: 3.0.10, SVN Revision 2499 / MacOS: 10.7.4)
Thank you for your help
Yihwa
Here's the code:
homedir = pwd;
addpath(pwd);
cd(homedir);
movStr = [homedir '/Moviefile_bigfilt.mov']; % filtered movie without sound (for picture)
audStr = [homedir '/Moviefile.mov']; % original movie (for sound)
[w,scrRect]=Screen('OpenWindow',0, 0,[],32,2);
[moviePtr dur fps width height] = Screen('OpenMovie', w, movStr,0);
Screen('PlayMovie', moviePtr, 1, 0, 0); %muted
[soundPtr] = Screen('OpenMovie', w, audStr);
Screen('PlayMovie', soundPtr, 1, 0, 1.0);
tex = Screen('GetMovieImage', w, moviePtr);
if tex<=0
[moviePtr duration fps width height] = Screen('OpenMovie', w, movStr,0);
Screen('PlayMovie', moviePtr, 1, 0, 0);
[soundPtr] = Screen('OpenMovie', w, audStr,0);
Screen('PlayMovie', soundPtr, 1, 0, 1.0);
tex = Screen('GetMovieImage', w, moviePtr);
end;
PlayDur = 10;
t0=GetSecs;
while (GetSecs - t0) < PlayDur;
Screen('DrawTexture', w, tex, Screen('Rect', tex), scrRect);
Screen('Flip', w);
Screen('Close', tex);
tex = Screen('GetMovieImage', w, moviePtr);
end
Screen('CloseMovie', moviePtr);
Screen('CloseMovie', soundPtr);
Screen('CloseAll');