Hi,
I read a post on the forum that was similar to my question (#9244), but did not quite answer it. I will have a sound sequence of about 10 seconds in duration that will repeat over and over again for around 40 minutes - just some quiet background sounds like crickets chirping etc... At certains times I will want to ask the sound card "which sample are you playing right now?" If I use the getStatus option of PsychPortAudio, I can read out the PositionSecs field, but when I do this I get a number that seems to be the sample number with respect to the time of sound 'start', rather than something modulo the number of samples in the sound sequence. This made me wonder whether or not I was really probing the sample the sound card just played, or a (perhaps drifty) estimate of the sample the sound card just played. I agree that for short trials any clock drift is negligible, but after 10, 20, 30 minutes, and not being able to tolerate more than about 100 ms of slop, drift will be a problem. If I can be sure that 'GetStatus' tells me which sample was being played at the time (give or take the time it takes to ping the sound card), then I will just take the modulus of 'PositionSecs' and the length of my sound sequence and be assured that this number is not drifting relative to the sound coming out of the speaker.
Thanks!
Aaron
I read a post on the forum that was similar to my question (#9244), but did not quite answer it. I will have a sound sequence of about 10 seconds in duration that will repeat over and over again for around 40 minutes - just some quiet background sounds like crickets chirping etc... At certains times I will want to ask the sound card "which sample are you playing right now?" If I use the getStatus option of PsychPortAudio, I can read out the PositionSecs field, but when I do this I get a number that seems to be the sample number with respect to the time of sound 'start', rather than something modulo the number of samples in the sound sequence. This made me wonder whether or not I was really probing the sample the sound card just played, or a (perhaps drifty) estimate of the sample the sound card just played. I agree that for short trials any clock drift is negligible, but after 10, 20, 30 minutes, and not being able to tolerate more than about 100 ms of slop, drift will be a problem. If I can be sure that 'GetStatus' tells me which sample was being played at the time (give or take the time it takes to ping the sound card), then I will just take the modulus of 'PositionSecs' and the length of my sound sequence and be assured that this number is not drifting relative to the sound coming out of the speaker.
Thanks!
Aaron