<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
I have a C program constructing a pipeline recording from the sound card to a file. I need to add a few features and am not sure of the best approach. The features are:<BR>
<BR>
1) Record from a device, connected to the sound card, that sometimes has a sound input but is mostly quiet, not unlike a microphone. I need to be able to detect the state transitions to and from quiet and stop and start recording when the events occur. This is to reduce the time needed to process the resulting files by another application later. I am unsure how to detect the quiet state transitions.<BR>
<BR>
2) The output will be placed into one of several files. The file to use will be determined when a sound is detected. I do not want to lose any signal at the beginning or end of the recording. In other words, the first sound may go to file foo, the second and third sounds to bar, and the fourth to foo. I am unsure of how to most optimally configure the pipeline for this type of dynamic operation.<BR>
<BR>
Any advice as to how to proceed would be appreciated.<BR>
<BR>
</BODY>
</HTML>