Mailing Lists: Apple Mailing Lists

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

Re: Deinterleave using ExtendedAudioFile



Thanks.  I had thought of that approach,  but correct me if I am wrong, won't that run through the whole process twice and take twice as long?

It seemed to me that the most efficient approach is to create 3 AudioBufferLists, that share 2 AudioBuffers.  I list that is deinterleaved with 2 channels and 2 lists that are each mono.  1 for the left and 1 for the right.  And to get the 2 AudioBuffers in the mono list to simply point to each of the buffers in the 2 channel list.

Then I can read into the Stereo list and write from each of the mono lists.  As long as I set the clientformat of the reader to be canonical, deinterleaved.  

I think I am correct in all of this - but I simply can not figure out the way to set up the AudiBufferLists correctly.  That is the only part that eludes me, and I am sure it is quite simple.

I have been able to find a number of examples on setting up the buffer lists - but none that do this, They seem to do this in the afInterleave example, but in a way that is fairly convoluted and I have not been able to duplicate it.

Any advice would be appreciated.

David Paterson



On Mar 19, 2007, at 6:27 PM, William Stewart wrote:

You can use the ExtendedAudioFile API (see the ConvertFile code in /Developer/Examples/CoreAudio/SimpleSDK/)

The only bit not covered in this is using the channel map property (to say which channel you do/don't want). So in the case of the mono file, this would be 1 UInt32 int, with either 0 (the first channel) or 1 (the second channel) to come from the file for your mono file

Bill

On 16/03/2007, at 4:18 PM, David Paterson wrote:

I know I am going to feel stupid.  Everywhere I search it implies that this is easy but I can not figure out how to do it.  I simply want to take an interleaved stereo file and convert it to 2 mono files.  I tried looking at afInterleave to see if I could reverse the process - but I couldn't figure it out.  If anyone can point me in the right direction I would greatly appreciate it.


David Paterson



 _______________________________________________
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

-- 
tel: +1 408 974 4056
__________________________________________________________________________
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
__________________________________________________________________________


 _______________________________________________
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

References: 
 >Deinterleave using ExtendedAudioFile (From: David Paterson <email@hidden>)
 >Re: Deinterleave using ExtendedAudioFile (From: William Stewart <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.