![]() Or you explain in much more detail what exactly you intend to achieve, in case the above doesn’t work for you. There’s also BasicSoundScheduleDemo.m which demonstrates use of sound schedules and prefilled buffers, which might allow for a more elegant approach, minimizing audible gaps and such. that requires you to make sure that you refill the right amount – too little and you might run out of sound, too much and the change of the sound will lag the actual mouse movement. If you don’t want interruptions at all, you’d need to go back to the streaming refill approach that you found first. If you switch zones, you will have a short interruption. Boinx Software has announced the release of Mousepose 3, a new version of its cursor highlight software for Mac OS X. PsychPortAudio('FillBuffer', pahandle, soundforzone3) PsychPortAudio('FillBuffer', pahandle, soundforzone2) ![]() PsychPortAudio('FillBuffer', pahandle, soundforzone1) ![]() This only stops-fillbuffers-starts playback if the zone is changed: oldzone = -1 Something along the following, assuming you have 3 “zones” each of which needs a different sound. Can you tell me how I can solve this issue? It’s as if the “else” statement is ignored. It’s a continuous tone without interruptions but it seems like the rest of the code does not execute anymore. Here all I change is PsychPortAudio(‘Start’, paHandle, 0) but what happens then is that the sound starts playing once the condition becomes true, and it just continues playing forever and ever. StartTime1 = PsychPortAudio('Start', paHandle, 0) Option 2: if xMouse = 200 & yMouse = 200 This works, but the sound (even though it is a perfect sinusoid tone) still isn’t properly continuous, there is a small pause that makes it sound like discrete tones. StopTime1 = PsychPortAudio('Stop', paHandle) StartTime1 = PsychPortAudio('Start', paHandle) PsychPortAudio('FillBuffer', paHandle, tone1) Option 1: if xMouse = 200 & yMouse = 200 I am sorry to bother you again but I am not successful with the thing I was trying to achieve.
0 Comments
Leave a Reply. |