Oolite
Loading...
Searching...
No Matches
OOOpenALController Class Reference

#include <OOOpenALController.h>

Inheritance diagram for OOOpenALController:
Collaboration diagram for OOOpenALController:

Instance Methods

(void) - setMasterVolume:
(ALfloat) - masterVolume
(void) - shutdown
(id) - init

Class Methods

(OOOpenALController *) + sharedController

Private Attributes

ALCdevice * device
ALCcontext * context

Detailed Description

Definition at line 33 of file OOOpenALController.h.

Method Documentation

◆ masterVolume

- (ALfloat) masterVolume

Definition at line 85 of file OOOpenALController.m.

86{
87 ALfloat fraction = 0.0;
88 OOAL(alGetListenerf(AL_GAIN, &fraction));
89 return fraction;
90}
#define OOAL(cmd)
Definition OOOpenAL.h:40

References masterVolume, and OOAL.

Referenced by OOSound::masterVolume, masterVolume, and OOSound::setMasterVolume:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMasterVolume:

- (void) setMasterVolume: (ALfloat) fraction

Definition at line 80 of file OOOpenALController.m.

80 :(ALfloat)fraction
81{
82 OOAL(alListenerf(AL_GAIN, fraction));
83}

References OOAL.

Referenced by OOSound::setMasterVolume:.

Here is the caller graph for this function:

◆ sharedController

+ (OOOpenALController *) sharedController

Definition at line 34 of file OOOpenALController.m.

35{
36 if (sSingleton == nil) {
37 sSingleton = [[self alloc] init];
38 }
39
40 return sSingleton;
41}
static OONullTexture * sSingleton
return nil

References nil, sharedController, and sSingleton.

Referenced by OOSound::masterVolume, OOSound::setMasterVolume:, OOSound::setUp, and sharedController.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shutdown

- (void) shutdown

Definition at line 94 of file OOOpenALController.m.

95{
96 [[OOSoundMixer sharedMixer] shutdown];
97 OOAL(alcMakeContextCurrent(NULL));
98 OOAL(alcDestroyContext(context));
99 OOAL(alcCloseDevice(device));
100}

References context, device, OOAL, OOSoundMixer::sharedMixer, and shutdown.

Referenced by shutdown.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ context

- (ALCcontext*) context
private

Definition at line 36 of file OOOpenALController.h.

Referenced by init, and shutdown.

◆ device

- (ALCdevice*) device
private

Definition at line 35 of file OOOpenALController.h.

Referenced by init, and shutdown.


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