Inherits from NSObject
Conforms to OALSuspendManager
Declared in ALListener.h

Overview

The listener represents the user who is listening to sounds in 3D space. This object controls his position, orientation, and velocity, as well as providing a master gain.
A context contains one and only one listener.

Tasks

  •   context

    The context this listener belongs to.

    property
  •   muted

    Causes this listener to stop hearing sound. It’s called “muted” rather than “deaf” to give a consistent name with other mute functions.

    property
  •   gain

    Gain (volume), affecting every sound this listener hears (0.0 = no sound, 1.0 = max volume). Only valid if this listener’s context is the current context.

    property
  •   orientation

    Orientation (up: x, y, z, at: x, y, z). Only valid if this listener’s context is the current context.

    property
  •   position

    Position (x, y, z). Only valid if this listener’s context is the current context.

    property
  •   velocity

    Velocity (x, y, z). Only valid if this listener’s context is the current context.

    property
  • + listenerForContext:

    (INTERNAL USE) Create a listener for the specified context.

  • – initWithContext:

    (INTERNAL USE) Initialize a listener for the specified context.

Properties

context

The context this listener belongs to.

@property (nonatomic, readonly) ALContext *context

Declared In

ALListener.h

gain

Gain (volume), affecting every sound this listener hears (0.0 = no sound, 1.0 = max volume). Only valid if this listener’s context is the current context.

@property (readwrite, assign) float gain

Declared In

ALListener.h

muted

Causes this listener to stop hearing sound. It’s called “muted” rather than “deaf” to give a consistent name with other mute functions.

@property (readwrite, assign) bool muted

Declared In

ALListener.h

orientation

Orientation (up: x, y, z, at: x, y, z). Only valid if this listener’s context is the current context.

@property (readwrite, assign) ALOrientation orientation

Declared In

ALListener.h

position

Position (x, y, z). Only valid if this listener’s context is the current context.

@property (readwrite, assign) ALPoint position

Declared In

ALListener.h

velocity

Velocity (x, y, z). Only valid if this listener’s context is the current context.

@property (readwrite, assign) ALVector velocity

Declared In

ALListener.h

Class Methods

listenerForContext:

(INTERNAL USE) Create a listener for the specified context.

+ (id)listenerForContext:(ALContext *)context

Parameters

context

the context to create this listener on.

Return Value

A new listener.

Declared In

ALListener.h

Instance Methods

initWithContext:

(INTERNAL USE) Initialize a listener for the specified context.

- (id)initWithContext:(ALContext *)context

Parameters

context

the context to create this listener on.

Return Value

The initialized listener.

Declared In

ALListener.h