Writing to File
Writing to File
- Subject: Writing to File
- From: Jeff LaMarche <email@hidden>
- Date: Thu, 05 Jun 2008 16:25:37 -0400
I think I must misunderstand something really basic. I thought that when you wrote an audio file (AIFF in my case), you called:
ExtAudioFileCreateNew()
to open the file, passing the in an AudioStreamBasicDescription that describes the data you wanted written to the file, and then you before writing any data you can call
err = ExtAudioFileSetProperty(outputFile, kExtAudioFileProperty_ClientDataFormat, sizeof(AudioStreamBasicDescription), &outAsbd);
passing in a different AudioStreamBasicDescription telling it what kind of data you are going to provide it with, and then it would handle the conversion when you wrote the data. However, if I use different AudioStreamBasicDescriptions for these two calls, I always get a fmt? error with the ExtAudioFileSetProperty call, but I can get it to work if I use the same ABSD. I'm guessing my understanding must be wrong and I need to do the conversion myself?
If so, is there a way to asychronously apply multiple Audio Units to raw data held in a buffer (not coming in AudioBufferList *s? I'm trying to take the raw data saved earlier from the selected device input and write it to an AIFF file, and I keep either getting errors or else files that are just filled with static. I've tried to piece together what the sample code projects do and have been searching the documentation, but for some reason I'm having trouble forming a gestalt of how this all works. Anyone who could provide some guidance, it would be greatly appreciated.
Thanks, Jeff |
_______________________________________________
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