Re: Using alBufferDataStatic()
Re: Using alBufferDataStatic()
- Subject: Re: Using alBufferDataStatic()
- From: Chris Adamson <email@hidden>
- Date: Thu, 18 Jun 2009 13:10:10 -0400
That worked great and was trivial to call. Thanks! I'm now streaming to OpenAL with static buffers.
--Chris
On Jun 17, 2009, at 6:16 PM, Bob Aron wrote: Chris,
Since alBufferDataStatic() is actually an extension and not part of the OpenAL spec, the correct practice is to retrieve a function ptr for this API via alGetProcAddress(). This ensures that the application has no runtime linkage issues should the API not be present. So you can do something like this in your application and then just call your function.
ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq) { static alBufferDataStaticProcPtr proc = NULL;
if (proc == NULL) { proc = (alBufferDataStaticProcPtr) alGetProcAddress((const ALCchar*) "alBufferDataStatic"); }
if (proc) proc(bid, format, data, size, freq);
return; }
|
_______________________________________________
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