File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / BreakApp / SoundEffect.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:39 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

#import <objc/Object.h>
#import <soundkit/Sound.h>
#import <soundkit/NXPlayStream.h>

@interface SoundEffect:Object
{
    Sound *sound;			// The sound data for this sound
    struct {
        unsigned int refCount:24;	// Number of play requests pending
	unsigned int freeWhenDone:1;	// Free when all are done
	unsigned int :7;
    } flags;
}

- initFromSection:(const char *)sound;
- play;
- play:(float)volume pan:(float)rads;
- free;

+ (void)setSoundEnabled:(BOOL)flag;
+ (BOOL)soundEnabled;

+ (void)setMaxSoundStreams:(unsigned int)max;
+ (unsigned int)maxSoundStreams;

// Internal methods.

+ (NXPlayStream *)soundStream;
+ (void)releaseSoundStream:(NXPlayStream *)soundStream;

@end


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.