A
Andrew Collier
hello,
i am maintaining a system for acquiring very low frequency radio
waves. we have a receiver hooked up to the sound card. this system is
presently running at the south african base in antarctica. i have the
following question: is it possible to reset the kernel input buffer on
/dev/dsp? the reason i am concerned about this is that accurate timing
is critical for our data. presently the system gets a time stamp and
then starts reading from /dev/dsp. however, there is data present in
the buffer which was read from the sound card at some time prior to
getting the time stamp and this introduces a lag between the nominal
sample time and the actual sample time.
what i failed to mention was that the code is written in c for a linux
platform. i have tried both of:
ioctl(sndinit::devdspfd, SOUND_PCM_SYNC, 0);
and
ioctl(sndinit::devdspfd, SOUND_PCM_RESET, 0);
but neither has the desired effect. this is probably due to a large
dose of ignorance on my part!
what i am basically wanting is a way to make the kernel restart
filling its internal buffer from the beginning (_discarding_ any data
present in the buffer at that time).
any ideas?
best regards,
andrew collier.
i am maintaining a system for acquiring very low frequency radio
waves. we have a receiver hooked up to the sound card. this system is
presently running at the south african base in antarctica. i have the
following question: is it possible to reset the kernel input buffer on
/dev/dsp? the reason i am concerned about this is that accurate timing
is critical for our data. presently the system gets a time stamp and
then starts reading from /dev/dsp. however, there is data present in
the buffer which was read from the sound card at some time prior to
getting the time stamp and this introduces a lag between the nominal
sample time and the actual sample time.
what i failed to mention was that the code is written in c for a linux
platform. i have tried both of:
ioctl(sndinit::devdspfd, SOUND_PCM_SYNC, 0);
and
ioctl(sndinit::devdspfd, SOUND_PCM_RESET, 0);
but neither has the desired effect. this is probably due to a large
dose of ignorance on my part!
what i am basically wanting is a way to make the kernel restart
filling its internal buffer from the beginning (_discarding_ any data
present in the buffer at that time).
any ideas?
best regards,
andrew collier.