Help with OpenAL alGenBuffers

Started by
1 comment, last by griffin2000 16 years, 7 months ago
Hello all, I am trying to write some OpenAL code, but am running into a problem. I have downloaded the OpenAL 1.1 SDK for Windows from the OpenAL.org website, but am having trouble getting the sample code included to work. I have it compiling, but when the alGenBuffers function is called the passed array is filled with invalid values, numbers like 10497768. However, the function genereates no errors! An error doesn't occur until a function tries to use one of the buffers, which then genereates the Invalid Value error. Any help would be appreciated. Thanks Golden Dragon
Advertisement
*bumps*

I get exactly the same error. Were you able to solve this ?

I am looking at some openAL code that works on Mac, but fails on PC. I have tracked down the code to this line that generates a set of buffers (16 of them currently, but I get the same problem regardless of the value of NUMBUFFERS).

alGenBuffers(NUMBUFFERS, mBufferList);

The handles generated are all invalid (and cause AL_INVALID_NAME errors whenever they are used). Though the actual alGenBuffers call does cause an error. This code works fine on Mac, any idea what the problem could be ?

Here are the values generated:
> - mBufferList 0x0aba7b3c unsigned int [16]
> [0x0] 0x03c3ff88 unsigned int
> [0x1] 0x19c8a6e0 unsigned int
> [0x2] 0x19c8a728 unsigned int
> [0x3] 0x19c8a770 unsigned int
> [0x4] 0x19c8a7b8 unsigned int
> [0x5] 0x19c8a800 unsigned int
> [0x6] 0x19c8a848 unsigned int
> [0x7] 0x19c8a890 unsigned int
> [0x8] 0x19c8a8d8 unsigned int
> [0x9] 0x19c8a920 unsigned int
> [0xa] 0x19c8a968 unsigned int
> [0xb] 0x19c8a9b0 unsigned int
> [0xc] 0x19c8a9f8 unsigned int
> [0xd] 0x19c8aa40 unsigned int
> [0xe] 0x19c8aa88 unsigned int
> [0xf] 0x19c8aad0 unsigned int

FYI I was able to fix this by passing a "Generic Hardware" into alcOpenDevice.

As described in the OpenAL mailing list here

This topic is closed to new replies.

Advertisement