Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Mar 1998 19:58:33 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        graphix@toybox.cc.iastate.edu (Kent Vander Velden)
Cc:        freebsd-multimedia@FreeBSD.ORG
Subject:   Re: Flushing audio capture buffer
Message-ID:  <199803171858.TAA22476@labinfo.iet.unipi.it>
In-Reply-To: <199803171642.KAA07216@toybox.cc.iastate.edu> from "Kent Vander Velden" at Mar 17, 98 10:42:00 am

next in thread | previous in thread | raw e-mail | index | archive | help
>   I would like to flush the capture buffer of the sound card.  I want to do
> this inorder to have my program stay in sync with the data being captured.
...
> time required by the program for each read buffer is greater than how long
> before the capture buffer is full again.  My program does not have to receive
> all of the caputured data but it must stay in sync so I am willing to lose
> some of the data.  So what I thought I would do is flush the capture buffer 
> before each read.  Can the capture buffer be flushed?

i suppose you want to flush it _after_ a read() of useful data.

and yes, it can be flushed using read() and either non blocking mode,
or calling FIONREAD before the read to see how much data is queued.

	cheers
	luigi

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803171858.TAA22476>