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

Properties

pitch

The frequency of the sound.

@property (nonatomic) float pitch

Discussion

Default: 1.0f

Declared In

PXSoundTransform.h

volume

The amplitude of the sound.

@property (nonatomic) float volume

Discussion

Default: 1.0f

Declared In

PXSoundTransform.h

Class Methods

soundTransformWithVolume:pitch:

Creates a sound transform with the given volume and pitch.

+ (PXSoundTransform *)soundTransformWithVolume:(float)volume pitch:(float)pitch

Parameters

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.m

Instance Methods

initWithVolume:pitch:

Creates a new sound transform with the given volume and pitch.

- (id)initWithVolume:(float)_volume pitch:(float)_pitch

Parameters

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