• 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
Re: Using alBufferDataStatic()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Using alBufferDataStatic() (From: Chris Adamson <email@hidden>)

  • Prev by Date: (no subject)
  • Next by Date: Re: AU automation gestures/scroll wheel events
  • Previous by thread: Using alBufferDataStatic()
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread