MusicKit  0.0.0
Public Member Functions | Protected Attributes
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.
(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

- (NSComparisonResult) compare: (SndBreakpoint *)  other

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

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

Parameters:
otheranother SndBreakpoint
Returns:
NSComparisonResult
- (NSComparisonResult) compare: (SndBreakpoint *)  other

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

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

Parameters:
otheranother SndBreakpoint
Returns:
NSComparisonResult
- (int) getFlags

Returns the flags associated with the breakpoint.

Returns:
int representing the flags associated with the breakpoint
- (int) getFlags

Returns the flags associated with the breakpoint.

Returns:
int representing the flags associated with the breakpoint
- (double) getXVal

Returns the x value of the breakpoint.

Returns:
double
- (double) getXVal

Returns the x value of the breakpoint.

Returns:
double
- (float) getYVal

Returns the y value of the breakpoint.

Returns:
float
- (float) getYVal

Returns the y value of the breakpoint.

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

Convenience method for creating breakpoints.

Parameters:
xThe x value of the breakpoint
yThe y value of the breakpoint
fThe flags to be associated with the breakpoint
Returns:
self, a newly initialised SndBreakpoint
- (id) initWithX: (double)  x
y: (float)  y
flags: (int)  f 

Convenience method for creating breakpoints.

Parameters:
xThe x value of the breakpoint
yThe y value of the breakpoint
fThe flags to be associated with the breakpoint
Returns:
self, a newly initialised SndBreakpoint
- (void) setFlags: (int)  f

Sets new flags for the breakpoint.

Parameters:
fThe flags to be associated with the breakpoint
- (void) setFlags: (int)  f

Sets new flags for the breakpoint.

Parameters:
fThe flags to be associated with the breakpoint
- (void) setXVal: (double)  xVal

Sets x value for the breakpoint.

Parameters:
xVal
- (void) setXVal: (double)  xVal

Sets x value for the breakpoint.

Parameters:
xVal
- (void) setYVal: (float)  yVal

Sets new y value for the breakpoint.

Parameters:
yVal
- (void) setYVal: (float)  yVal

Sets new y value for the breakpoint.

Parameters:
yVal

Member Data Documentation

- (int) flags [protected]

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

- (double) xVal [protected]

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

- (float) yVal [protected]

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


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