Re: alBufferData, void * data
Re: alBufferData, void * data
- Subject: Re: alBufferData, void * data
- From: Jens Alfke <email@hidden>
- Date: Mon, 7 Apr 2008 23:52:16 -0700
On 7 Apr '08, at 11:20 PM, David Harper wrote:
I'm trying to figure out how to use openAL without alut (as alut is
no longer included in the openAL framework). The roadblock I am
facing is that alBufferData requires a pointer to a sound's bitmap
data.
By 'bitmap' do you mean the decompressed audio samples? You'll have to
use CoreAudio to convert the sound into those. But if openAL can work
with encoded sound formats like AIFF or MP3, you should be able to
just read the file into memory using something like [NSData
dataWithContentsOfFile:].
NSSound doesn't seem to have the appropriate method. Any suggestions?
NSSound is ultra high-level and doesn't support anything beyond simple
playback.
The best API to use to read the samples would probably be ExtAudioFile
(in the AudioToolbox framework).
Please let me know if this question would be better directed to a
different mailing list.
The CoreAudio-API mailing list (on this same listserv) is the most
appropriate place for audio discussions.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden