#import <SndBreakpoint.h>
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 |
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).
- (id) initWithX: | (double) | x | ||
y: | (float) | y | ||
flags: | (int) | f | ||
Convenience method for creating breakpoints.
x | The x value of the breakpoint | |
y | The y value of the breakpoint | |
f | The flags to be associated with the breakpoint |
- (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: | (int) | f |
Sets new flags for the breakpoint.
f | The flags to be associated with the breakpoint |
- (void) setYVal: | (float) | yVal |
Sets new y value for the breakpoint.
yVal |
- (void) setXVal: | (double) | xVal |
Sets x value for the breakpoint.
xVal |
- (NSComparisonResult) compare: | (SndBreakpoint *) | other |
Allows easy array sorting according to x (time) value.
Example of use: [arrayOfBreakpoints sortUsingSelector: @selector(compare:)]
other | another SndBreakpoint |
- (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