Release 1.2, Copyright ã1995 by Sean Luke.  All Rights Reserved.

MiscTapper

Inherits From:	Object

Declared In:	MiscTapper.h

Class Description

The MiscTapper has only one purpose in life:  to jam open the recording stream for NeXT's sound device.  Since NeXT's NXStream objects only return volume information when a sound object is recording, ordinarily there's no way for the MiscVolumeMeter or MiscVolumeLight objects to constantly reflect incoming sound without always recording to a sound object, which fills up memory very quickly.  The MiscTapper solves this by pretending to record sounds as long as it's on, when it's actually just throwing the sound data away.

To use the MiscTapper, initialize it in the standard way, then start it running with the run: method.  Stop the MiscTapper (lightening system load) with the stop: method.  It's fine to resume MiscTapper with run: after suspending it with stop:.

Bugs: 
NeXT's sound stream system does not like having to record for hours on end.  On black hardware the MiscTapper will typically freak out the recording system after many hours, and on Intel hardware this could be as little as a few minutes, depending on how bad the sound cards and drivers are.  The typical result:  hardware will steadfastly refuse to record (or sometimes play) sound until the MiscTapper is stopped or its application is quitted.  This is a NeXT bug and there's little I can do about it.

Note: 
Although it's fine to have more than one MiscTapper at a time, there's little reason to do so, since there's only one recording stream to jam open.  In addition, it's very wasteful of resources to do so.  Also note that the MiscTapper consumes fairly large chunks of system resources to work its magic.  The results are nifty, but the cost is a heavy system load as long as the MiscTapper is running.

Instance Variables

NXSoundIn*	tapper_device;
NXRecordStream*	tapper_stream;
DPSTimedEntry	teNum;
int	tapper_load;

tapper_device 	The NXSoundIn device to record from.

tapper_stream 	The NXRecordStream to record through.

teNum 	The timed entry tag for MiscTapper's updating function.

tapper_load 	Has the tapper loaded new sound data yet?

Method Types

Creating and freeing instances	±€init
	±€free

Starting and Stopping the Tapper	± run:
± stop:

Instance Methods

free
- free

Stops the MiscTapper, frees its sound device and stream, and frees the MiscTapper.

See also:  -€free (Object)

init
- init

Initializes the MiscTapper and generates its sound device and stream.

See also:  -€init (Object)  

run:
- run:sender

Runs or resumes running the MiscTapper.

See also:  -€stop:

stop
- stop:sender

Stops or suspends the MiscTapper.

See also:  -€run: