1

When I run my app with default OpenAL settings I can see that it mixes sounds at 44khz stereo, here's what I get in the console (running on an iPhone 4):

AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved

Due to performance problems I want OpenAL to mix sound at 22khz and in mono. I'm assuming this should consume less CPU. I've managed to force OpenAL to mix at 22khz. Here's how I did it:

    int params[3];
    params[0] = ALC_FREQUENCY;
    params[1] = 22000;
    params[2] = 0;
    context = alcCreateContext(device, params);

But how do I force OpenAL to mix in mono? I'm assuming "2 ch" means two channels - stereo.

Jonas
  • 121,568
  • 97
  • 310
  • 388
m4gicm4gic
  • 11
  • 2

1 Answers1

0

You can't control how many channels OpenAL outputs, but you can simply use mono data as inputs.

In general, OpenAL shouldn't cause performance problems except on older devices, and only if you're playing 20 or more sources at a time while running a physics engine or something.

Karl
  • 14,434
  • 9
  • 44
  • 61