SndBreakpoint Class Reference

A simple storage class allowing SndEnvelope breakpoint information to be stored in NSArrays. More...

#import <SndBreakpoint.h>

List of all members.

Public Member Functions

(id) - initWithX:y:flags:
 Convenience method for creating breakpoints.
(int) - getFlags
 Returns the flags associated with the breakpoint.
(float) - getYVal
 Returns the y value of the breakpoint.
(double) - getXVal
 Returns the x value of the breakpoint.
(void) - setFlags:
 Sets new flags for the breakpoint.
(void) - setYVal:
 Sets new y value for the breakpoint.
(void) - setXVal:
 Sets x value for the breakpoint.
(NSComparisonResult) - compare:
 Allows easy array sorting according to x (time) value.

Protected Attributes

int flags
float yVal
double xVal


Detailed Description

A simple storage class allowing SndEnvelope breakpoint information to be stored in NSArrays.

This class is used primarily by SndEnvelope, the default envelope class utilised by SndAudioFader. It is unlikely that this class should need to be subclassed.
The contents of the "flags" iVar are defined in SndAudioFader.h (see SND_FADER_ATTACH_RAMP_RIGHT etc.). Although SndBreakpoint objects are not accessed directly by SndAudioFader, the information they hold is intrinsic to the SndEnveloping protocol (see SndEnvelope.h).


Member Function Documentation

- (id) initWithX: (double)  x
y: (float)  y
flags: (int)  f 

Convenience method for creating breakpoints.

Parameters:
x The x value of the breakpoint
y The y value of the breakpoint
f The flags to be associated with the breakpoint
Returns:
self, a newly initialised SndBreakpoint

- (int) getFlags  

Returns the flags associated with the breakpoint.

Returns:
int representing the flags associated with the breakpoint

- (float) getYVal  

Returns the y value of the breakpoint.

Returns:
float

- (double) getXVal  

Returns the x value of the breakpoint.

Returns:
double

- (void) setFlags: (int)  f  

Sets new flags for the breakpoint.

Parameters:
f The flags to be associated with the breakpoint

- (void) setYVal: (float)  yVal  

Sets new y value for the breakpoint.

Parameters:
yVal 

- (void) setXVal: (double)  xVal  

Sets x value for the breakpoint.

Parameters:
xVal 

- (NSComparisonResult) compare: (SndBreakpoint *)  other  

Allows easy array sorting according to x (time) value.

Example of use: [arrayOfBreakpoints sortUsingSelector: @selector(compare:)]

Parameters:
other another SndBreakpoint
Returns:
NSComparisonResult


Member Data Documentation

- (int) flags [protected]

holds flags pertaining to the state of the breakpoint, eg whether it is part of a ramp

- (float) yVal [protected]

the y value of the breakpoint, generally -1 to +1 for balance, or 0 to +1 for amplitude

- (double) xVal [protected]

the x value of the breakpoint, a time value measured from the start of the stream


The documentation for this class was generated from the following file:

Generated on Sat Dec 5 17:01:16 2009 for MusicKit by  doxygen 1.5.6