• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
OpenAL 5.1 support ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OpenAL 5.1 support ?


  • Subject: OpenAL 5.1 support ?
  • From: Sylvain Defresne <email@hidden>
  • Date: Thu, 13 Jan 2011 16:41:32 +0100

Hello,

I'm in the process of porting one of our game to Mac OS X. We are using OpenAL in our sound engine, but we are getting a strange behavior in the initialization of the engine on Mac OS X (the code is running on a MacBook Pro).

Here is the code:

ALCdevice *device;
ALCcontext *context;
ALenum format;
ALuint buffers[NB_BUFFERS];

device = alcOpenDevice(NULL);
if (device == NULL)
    goto failed;

context = alcCreateContext(device, NULL);
if (context == NULL)
    goto failed;

alcMakeContextCurrent(context);

format = alGetEnumValue("AL_FORMAT_51CHN16");
if (format == 0)
    goto failed;

alGenBuffers(NB_BUFFERS, buffers);
if (alGetError() != AL_NO_ERROR)
    goto failed;

for (int i = 0; i < NB_BUFFERS; ++ i)
{
    alBufferData(buffers[i], format, data[i], data_size[i], 48000);
    if (alGetError() != AL_NO_ERROR)
        goto failed;
}

This fails when during the call to alBufferData, with an error of AL_INVALID_VALUE. While tracing the code, we discovered that alGetEnumValue("AL_FORMAT_51CHN16") is returning 0xfffffffful, and we suspect this is the root of the issue.

So my question is : does Mac OS X supports 5.1 output via OpenAL ? Or should we port our code to use Core Audio directly ? Or do we need to convert our audio to another format (3.1, stereo) ?

Thank you,
-- 
Sylvain Defresne
Eugen Systems


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: saving and restoring all state of an AudioUnit
  • Next by Date: Understanding Parameter Handling & Constraints using a custom UI
  • Previous by thread: saving and restoring all state of an AudioUnit
  • Next by thread: Understanding Parameter Handling & Constraints using a custom UI
  • Index(es):
    • Date
    • Thread