PXSoundTransform Class Reference
| Inherits from | NSObject |
| Conforms to | NSCopying PXPooledObject |
| Declared in | PXSoundTransform.h PXSoundTransform.m |
Overview
A PXSoundTransform object represents the volume and pitch of a PXSoundChannel.
The following code creates a sound transform with 120% volume and 80% pitch:
PXSoundTransform *transform = [[PXSoundTransform alloc] initWithVolume:1.2f pitch:0.8f];
// Volume will be 120% and pitch will be 80%
Tasks
-
volumeThe amplitude of the sound.
property -
pitchThe frequency of the sound.
property -
– initWithVolume:pitch:Creates a new sound transform with the given volume and pitch.
-
+ soundTransformWithVolume:pitch:
Properties
Class Methods
soundTransformWithVolume:pitch:
+ (PXSoundTransform *)soundTransformWithVolume:(float)volume pitch:(float)pitchParameters
- volume
The amplitude of the sound.
- pitch
The frequency of the sound.
Return Value
The created sound transform.
Example:
PXSoundTransform *transform = [PXSoundTransform soundTransformWithVolume:1.2f pitch:0.8f];
// Volume will be 120% and pitch will be 80%
Declared In
PXSoundTransform.mInstance Methods
initWithVolume:pitch:
- (id)initWithVolume:(float)_volume pitch:(float)_pitchParameters
- volume
The amplitude of the sound.
- pitch
The frequency of the sound.
Example:
PXSoundTransform *transform = [[PXSoundTransform alloc] initWithVolume:1.2f pitch:0.8f]; // Volume will be 120% and pitch will be 80%
Declared In
PXSoundTransform.m