🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #47

Setting a trigger for sampling

#47
From: I J Taylor
Date: Thu, 29 Oct 1992 11:24
20 lines
1345 bytes
Hi,
	I am trying to get the NeXT to sample a sound only when there is a
certain level of sound present (i.e. wait until there is a sound before
sampling it).  I am using the SNDStartRecording() command to sample the 
sound (in the background) and then repeatedly calling the SNDSamplesProcessed()
command to find out when the next sample has been fetched. This would enable me
to look at the data in the Sound Structure to see if its value was greater 
than a certain trigger value before recording the sound properly.
	The problem is that SNDSamplesProcessed() only seems to return the
amount of samples processed so far after a certain amount of sample have been
processed ( i.e. it only returns 0,256,512,768.....etc ).  I want to look at
each sample if possible (or at least every 20th or so).
	Am I on the right lines,  or does anybody know of a better way of doing
this??
	Thanks in advance

			Ian Taylor
			email ijt@uk.ac.cf.cm
A
	I would be 
Technical Details
Message-ID: <1992Oct29.112418.12865@cm.cf.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!cf-cm!ijt

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!cf-cm!ijt
From: ijt@cm.cf.ac.uk (I J Taylor)
Newsgroups: comp.sys.next.programmer
Subject: Setting a trigger for sampling
Message-ID: <1992Oct29.112418.12865@cm.cf.ac.uk>
Date: 29 Oct 92 11:24:16 GMT
Sender: news@cm.cf.ac.uk (Network News System)
Organization: University of Wales College of Cardiff, Cardiff, Wales, UK.
Lines: 20