Hi all,
I’m trying to record audio using PsychPortAudio and noticed the following problems:
In my case, I’m recording music, and each recording is about 180 secs. I follow the PsychDemos’s BasicSoundInputDemo, and for each recording, I open the sound channel, record, append data, and then close the sound channel.
However, because I have many pieces of 180 secs each, I noticed that by the 2nd or 3rd piece, the recording started to have pops and in some cases severe distortion and tempo artifacts (matlab speeds up the recording and there are a lot of distortion present at the same time). The first recording is normally fine.
My guess is that this is a buffer issue—that I am not flushing my buffer after every recording. However, I noticed that in the DeleteBuffer documentation here: Psychtoolbox-3 - PsychPortAudio(‘DeleteBuffer’) , it specifies that I only need to do this when I’m doing a playback. In this case I am not doing a playback but rather recording.
Can someone offer any hints why the severe distortions happen? Do you have potential solutions for this issue?
Thank you so much in advance for your kind suggestions & generous help!
Best,
Emma