04-20-2012 10:20 PM
We are having some trouble getting OpenAL to work on the Playbook.
The first OpenAL call we make is:
alcOpenDevice(0);
When we call alGetError() immediately afterwards, it returns AL_INVALID_OPERATION.
Although the subsequent alGetError call returns AL_INVALID_OPERATION, the call to alcOpenDevice actually does not return 0. The subsequent call to alcCreateContext also generates AL_INVALID_OPERATION but appears to succeed by return value. alcMakeContextCurrent does not generate any errors.
Note: If we call alGetError() prior to the call to alcOpenDevice(), it also returns AL_INVALID_OPERATION. The OAL documentation says it should return AL_NO_ERROR in this case. This may or may not be a clue.
Also note: We have tried calling
alcOpenDevice(alcGetString(0, ALC_DEFAULT_DEVICE_SPECIFIER));
and
alcOpenDevice(alcGetString(0, ALC_DEVICE_SPECIFIER));
Both of these calls yield the same result as alcOpenDevice(0);
More information, which might be irrelevant due to the earlier issues: alutLoadMemoryFromFile returns 0 under these circumstances but does not generate an error. alBufferData then generates AL_INVALID_ENUM or AL_INVALID_VALUE, presumably due to the data parameter being passed as 0.
Has anyone here succeeded at using OpenAL in a Blackberry app on the Playbook? What could we be doing wrong? Thanks in advance for any potential leads on this issue.
Solved! Go to Solution.
04-21-2012 06:02 AM
I'm using openAL for one of our applications.
to init the device i use the following code snipet:
ALCcontext *context;
ALCdevice *device;
if (!alutInit(NULL, NULL)) {
fprintf(stderr, "init alut error\n");
}
device = alcOpenDevice(NULL);
if (device == NULL) {
fprintf(stderr, "device error\n");
}
//Create a context
context = alcCreateContext(device, NULL);
04-21-2012 05:20 PM
Thanks a lot! Adding the call to alutInit at the beginning fixed the problem.
03-31-2013 01:46 PM
04-02-2013 02:07 PM
Still have the problem, but managed to get around it.
When creating a new project you need to "Build Style" to choose "Managed Build".
Then with the connection libraries openAL is not a problem.