Newbie confusion!
Newbie confusion!
- Subject: Newbie confusion!
- From: "Jason Staczek" <email@hidden>
- Date: Mon, 27 Aug 2007 22:39:49 -0700
Hi,
I'm confused about a few things. Been working through some of the
examples as I try to get my own CA app up and running.
1. Are the CAxxx.cpp files in Examples/PublicUtility officially part
of the Core Audio SDK? I ask because they're sitting in "Examples" and
not part of the framework itself. Obviously lots of useful stuff, but
should I treat it as library code or sample code only, to be tweaked
and modified?
2. I'm perplexed by the various BufferList wrappers. I see
CABufferList and CAAudioBufferList. CABufferList seems to do
more/better stuff, but mentions AUBufferList as preferred, which I
can't find at all. Tips?
3. I'm trying to use the following code to open and read an audio file (.m4a):
CAAudioFile* file = new CAAudioFile();
file->Open(fileToOpen); // obtained from NSOpenPanel
int n = file->GetNumberFrames(); // returns 3485696
CABufferList* cabl = CABufferList::New("whatever",
file->GetFileDataFormat());
cabl->AllocateBuffers(0x40000);
UInt32 frames = 0x8000;
file->Read(frames, &cabl->GetModifiableBufferList());
file->Read succeeds, but sets frames == 1. What am I doing wrong to
make it read just one frame?
By the way, similar code will open and play that same .m4a file using
the CAChannelMappingPlayer...
Thanks,
Jason Staczek
www.chromasound.net
_______________________________________________
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