Dear Shane
It’s been a while since I raised this issue, but have finally found time to
test out the options.
Initially, the code used PlayBackground then Wait(500), the duration of the
sound. I changed it so it uses PlayForeground, keeping the wait there just for
good measure, and got the same carryover. I then added a line to load the sound
file at the beginning, but had the same problem again.
Here’s a snippet:
if(result==1)
{
targetCoord <- Nth(gBoxCoord,target)
Move(gCorrectImage,First(targetCoord),Second(targetCoord))
Show(gCorrectImage)
gCorrectSound <- LoadSound(gCorrectSoundFile)
Draw()
PlayForeground(gCorrectSound)
Wait(500)
Hide(gCorrectImage)
Draw()
}
Do you have any suggestions? I may try playing 500 ms of silence to clear the
buffer.
Cheers
Paul
On 28/07/2015 22:26, "Shane Mueller"
<[email protected]<mailto:[email protected]>> wrote:
Paul,
Whatever is happening is deep within the sound mixer. The sound
information gets written to a buffer that gets sent via a background
process to the sound card, but the particular code you are using must
leave some of it in this buffer. Are you issuing a Stop() command maybe,
or waiting only a fixed period of time before continuing that is shorter
than the length of the audio? Does it happen if you use PlayForeground?
If that doesn't work, you might try re-loading the sound file on each
instance--the overhead is pretty low. If you can't figure it out, send me
a code snippet and I'll see if I can figure something out.
Shane
Hi
I have a task that has a "correct" sound and an "incorrect" sound. I find
there some carry-over between trials. It's noticeable when the subject
gets one incorrect then gets the next one correct. There's a tiny bit of
incorrect sound at the beginning of the correct sound. Is there a way of
clearing the buffer between trials? I'm using PlayBackground.
Thanks
Paul Wright, PhD
King's College London
Institute of Psychiatry, Psychology & Neuroscience (IoPPN)
Department of Basic and Clinical Neurosciences
http://kclpure.kcl.ac.uk/portal/p.wright.html
------------------------------------------------------------------------------
_______________________________________________
Pebl-list mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/pebl-list
------------------------------------------------------------------------------
_______________________________________________
Pebl-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pebl-list