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. 3 3157
>hello, i am maintaining a system for acquiring very low frequency radio
.... 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);
Uh, looks like C++.
and ioctl(sndinit::devdspfd, SOUND_PCM_RESET, 0);
Those ioctl()s may not be implemented for your soundcard. Try checking their
return status, or, see what they do in the kernel sources.
SOUND_PCM_RESET might only reset the DAC/ADC controller, leaving the kernel
buffers untouched.
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?
If there is no worldwide available solution, you might try modifying the linux
kernel a bit to suit your needs.
--
- Jan Engelhardt
> >ioctl(sndinit::devdspfd, SOUND_PCM_SYNC, 0); Uh, looks like C++.
okay, you got me there!
In comp.lang.c Andrew Collier <ab*******@phreaker.net> wrote: 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.
You might want to try asking in comp.os.linux.development.system and/or
comp.os.linux.development.apps.
- Kevin. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: The Plankmeister |
last post by:
Hi...
I'm getting to grips with custom error handling, and am wondering if it is
possible to somehow reset all the content already sent to the browser, and
send some new stuff in its place.
...
|
by: riprod |
last post by:
Someone in the IIS newsgroup suggest I post this here, so sorry in advance
for the cross posting.
I have a Win 2003 SP1 with IIS 6 and host about 40 websites, most of
them useing ASP/VB with...
|
by: jjleto |
last post by:
I want to reset an ostringstream so that:
ostringstream oss;
oss << "foo ";
cout << oss.str();
// what should go here ?
oss << "bar";
cout << oss.str();
issues
|
by: Bobby |
last post by:
I have this line, at this time the value of Session("Login") is 1:
Response.Write "<a href=" & Request("script_name") & _
"?action=show&o=" & rsCustOrders("OrderID") & _
">" &...
|
by: Frantic3d |
last post by:
I just started using Access' Template file "Time & Billing Database"
Well among other items I need to change the biggest right now is resetting
the Client, Employee, Project ID #'s to start at 1.
...
|
by: DeveloperPDX |
last post by:
I am creating a page and I need to add a reset button (like you would with
HTML forms). Is there any way to do this other than resetting individual
controls? Basically I need to page to return to...
|
by: Matthew Wieder |
last post by:
Hi - I wanted to capture the enter button on a form since I have a
datagrid with the first column being a delete button and if someone hits
enter it deletes the first record. I coded:
private...
|
by: No One |
last post by:
This seems to be related to the ViewState error that is now starting to
plague ASP.Net apps. When the Application Pool is recycled, the Session
seems to be getting reset. When this is done,...
|
by: Ian Davies |
last post by:
Hello
I am struggling for a solution to clear some fields on my webpage that takes
their values from some sessions
My solution below works when the button is clicked twice. I sort of know why
I...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |