resetting buffer on /dev/dsp
From: Andrew Collier (abcollier_at_phreaker.net)
Date: 08/20/03
- Next message: Lew Pitcher: "Re: resetting buffer on /dev/dsp"
- Previous message: Bill Cunningham: "Spec file"
- Next in thread: Lew Pitcher: "Re: resetting buffer on /dev/dsp"
- Reply: Lew Pitcher: "Re: resetting buffer on /dev/dsp"
- Reply: Pete Zaitcev: "Re: resetting buffer on /dev/dsp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Aug 2003 12:08:10 -0700
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.
- Next message: Lew Pitcher: "Re: resetting buffer on /dev/dsp"
- Previous message: Bill Cunningham: "Spec file"
- Next in thread: Lew Pitcher: "Re: resetting buffer on /dev/dsp"
- Reply: Lew Pitcher: "Re: resetting buffer on /dev/dsp"
- Reply: Pete Zaitcev: "Re: resetting buffer on /dev/dsp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|