home *** CD-ROM | disk | FTP | other *** search
- /*
- * NXPlayStream.h
- *
- * Play sound data.
- *
- * Copyright (c) 1991, NeXT Computer, Inc. All rights reserved.
- */
-
- #import "NXSoundStream.h"
-
- @interface NXPlayStream:NXSoundStream
- {
- float _leftGain;
- float _rightGain;
- BOOL _isDetectingPeaks;
- unsigned int _peakHistory;
- int _reserved1;
- }
-
- /*
- * Overridden from superclass
- */
- - initOnDevice:anObject;
- - (NXSoundDeviceError)activate;
-
- /*
- * Get and set stream gain.
- * Default 1.0.
- */
- - getGainLeft:(float *)leftAmp right:(float *)rightAmp;
- - (NXSoundDeviceError)setGainLeft:(float)leftAmp right:(float)rightAmp;
-
- /*
- * Peak detection.
- * Default is NO peak detection.
- * Default peak history is one device buffer.
- */
- - (BOOL)isDetectingPeaks;
- - (NXSoundDeviceError)setDetectPeaks:(BOOL)flag;
- - (unsigned int)peakHistory;
- - (NXSoundDeviceError)setPeakHistory:(unsigned int)bufferCount;
- - (NXSoundDeviceError)getPeakLeft:(float *)leftAmp
- right:(float *)rightAmp;
-
- /*
- * Enqueue playback buffer.
- * Negative tags are reserved.
- * Channels must be 1 or 2.
- * Sampling rate must be 44100.0 or 22050.0.
- * Stream gain is scaled by bufferGain to get final
- * amplitude.
- */
- - (NXSoundDeviceError)playBuffer:(void *)data
- size:(unsigned int)bytes
- tag:(int)anInt
- channelCount:(unsigned int)channels
- samplingRate:(float)rate
- bufferGainLeft:(float)leftAmp right:(float)rightAmp
- lowWaterMark:(unsigned int)lowWater
- highWaterMark:(unsigned int)highWater;
-
- /*
- * Play with unity bufferGain and default water marks. LowWaterMark
- * defaults to (512*1024) and highWaterMark defaults to (768*1024).
- */
- - (NXSoundDeviceError)playBuffer:(void *)data
- size:(unsigned int)bytes
- tag:(int)anInt
- channelCount:(unsigned int)channels
- samplingRate:(float)rate;
-
- @end
-
- /*
- * Delegate interface.
- */
- @interface Object(NXPlayStreamDelegate)
- - soundS4Q$mDidUnderrun:sender;
- @end
-