Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using alBufferDataStatic()



I'm trying to use alBufferDataStatic, mentioned in the WWDC 2008 Core Audio video on iTunes.  And having trouble compiling it in.

I searched the lists, and found that "site:apple.com alBufferDataStatic" turns out to be a Googlewhack that points over to TN2199's advice to use the alBufferDataStatic function instead of alBufferStatic to eliminate a memcpy().  OK, great. I'm pretty sure that this isn't a dupe question.

Here's the thing.  I've imported the header:
#import <OpenAL/oalStaticBufferExtension.h>

But on the following line:
//alBufferData (buffer[i], AL_FORMAT_STEREO16, data[i], alDataSize, alDataRate);
alBufferDataStatic (buffer[i], AL_FORMAT_STEREO16, data[i], alDataSize, alDataRate);

I still get a compiler error:
/Users/cadamson/dev/iphone throwaways/OpenALThrowaway5/Classes/OpenALThrowaway5ViewController.m:99: warning: implicit declaration of function 'alBufferDataStatic'

Looking at the header file, I don't quite know how to make sense of the declaration:
typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq);

Is there really a function here that I can use?  What do I need to do to get my code to compile with it?

--Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.