Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 2
Registered: ‎04-20-2012
My Device: Blackberry Playbook
My Carrier: none
Accepted Solution

Need Help With OpenAL

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.

Developer
Posts: 101
Registered: ‎02-25-2011
My Device: Playbook, q5, z10
My Carrier: TM

Re: Need Help With OpenAL

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);

 

________________
mappau Dev Team
blackberry@mappau.com
twitter: mappau
New Contributor
Posts: 2
Registered: ‎04-20-2012
My Device: Blackberry Playbook
My Carrier: none

Re: Need Help With OpenAL

Thanks a lot! Adding the call to alutInit at the beginning fixed the problem.

Developer
Posts: 26
Registered: ‎09-23-2012
My Device: Playbook, Z10LE
My Carrier: tnl

Re: Need Help With OpenAL

I have a problem.

I can't add to the project openAL library.

When I add writing to a file "common.mk" LIBS+=openal,

in the console I get the error No rule to make target `libopenal.a'.

I read about this problem hereand about the way of a solution here.

To me it didn't help.

Developer
Posts: 26
Registered: ‎09-23-2012
My Device: Playbook, Z10LE
My Carrier: tnl

Re: Need Help With OpenAL

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.