home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
soundkit
/
NXSoundStream.h
< prev
next >
Wrap
Text File
|
1992-03-25
|
2KB
|
92 lines
/*
* NXSoundStream.h
*
* Abstract superclass for sound streams.
*
* Copyright (c) 1991, NeXT Computer, Inc. All rights reserved.
*/
#import <objc/Object.h>
#import <sys/time.h>
#import <mach/mach.h>
#import "NXSoundDevice.h"
typedef struct timeval NXSoundStreamTime;
#define NX_SOUNDSTREAM_TIME_NULL ((NXSoundStreamTime *)0)
@interface NXSoundStream:Object
{
id delegate;
BOOL _isActive;
BOOL _isPaused;
id _device;
port_t _streamPort;
unsigned int _delegateMessages;
kern_return_t _kernelError;
NXSoundDeviceError _lastError;
int _reserved;
}
/*
* Initialize on a SoundDevice.
*/
- init;
- initOnDevice:anObject;
- device;
- (NXSoundDeviceError)setDevice:anObject;
/*
* Get stream port.
*/
- (port_t)streamPort;
/*
* Activate and deactivate.
* Activate returns nil if stream cannot be activated.
*/
- (BOOL)isActive;
- (NXSoundDeviceError)activate;
- (NXSoundDeviceError)deactivate;
/*
* Stream control.
*/
- (BOOL)isPaused;
- pause:sender;
- resume:sender;
- abort:sender;
- (NXSoundDeviceError)pauseAtTime:(NXSoundStreamTime *)time;
- (NXSoundDeviceError)resumeAtTime:(NXSoundStreamTime *)time;
- (NXSoundDeviceError)abortAtTime:(NXSoundStreamTime *)time;
- (unsigned int)bytesProcessed;
/*
* Error handling.
*/
- (NXSoundDeviceError)lastError;
/*
* Get and set delegate.
*/
- delegate;
- setDelegate:anObject;
/*
* Release resources and free object.
*/
- free;
@end
/*
* Delegate interface.
*/
@interface Object(NXSoundStreamDelegate)
- soundStream:sender didStartBuffer:(int)tag;
- soundStream:sender didCompleteBuffer:(int)tag;
- soundStreamDidPause:sender;
- soundStreamDidResume:sender;
- soundStreamDidAbort:sender deviceReserved:(BOOL)flag;
@end