Re: ExtAudioFileConvert.cpp: can I get rid of mutex and thread handling?
Re: ExtAudioFileConvert.cpp: can I get rid of mutex and thread handling?
- Subject: Re: ExtAudioFileConvert.cpp: can I get rid of mutex and thread handling?
- From: William Stewart <email@hidden>
- Date: Fri, 5 Feb 2010 11:04:53 -0800
one additional point.
The comment you are referring to in the example is describing how the TWO ExtAudioFile objects are being set up - one the client and file format is the same, so that the transformation from the source file to the destination file involves a minimal conversion..
For example, lets say you are converting AIF to WAV (big to little endian).
(a) if the client format is float, then you have:
big -> float (ext audio file client from source)
float -> little (ext audio file client to dest)
(b) if you match the client and source format
big (client format and file format is same)
big -> little (ext audio file client to dest)
So, the example code goes to some pain to make sure a minimal set of conversions occur (in the example we use the write call to do the conversion, but it could just as easily be the read call).
Bill
On Feb 5, 2010, at 10:44 AM, William Stewart wrote:
> you can easily tell where the conversion happens.
>
> If there is a difference between your client format and the file format, then a conversion will happen whether you are reading or writing
>
>
> On Feb 4, 2010, at 1:11 PM, uɐıʇəqɐz pnoqɥɒɯ wrote:
>
>>
>> On Jan 4, 2010, at 6:16 PM, uɐıʇəqɐz pnoqɥɒɯ wrote:
>>
>>> Hi. Since my app runs one sound through ExtAudioFieConvert, using performSelectorInBackground, and there will not be any concurrency or re-entrance, can I get rid of all the code that handles thread states and mutex locking, etc.?
>>>
>>> I'm writing my own ExtAudioFileConvert with some extras (such as splitting my sound into multiple files) and hate to copy and paste code that I don't quite understand (thread handling).
>>>
>>> -mahboud
>>
>>
>> Hi. I have removed mutexes and have gone with NSOperationQueues to handle my audio conversion. However, I still have a few questions about the Apple iPhoneExtAudioFileConvertTest sample, which I don't seem to find answers to. Maybe the Apple folks can resolve these:
>>
>> 1- Will converting from MP3 to PCM ever cause a read or write to be interrupted? I guess I am asking if hardware encoders/decoders are sed for MP3 to PCM conversion.
>> 2- There is a comment in ExtAduioFileConvert.cpp:
>>
>> //***** do the read and write - the conversion is done on and by the write call *****//
>> I believe this to be incorrect. If I am converting from MP3 to PCM, the conversion happens during the read, not the write.
>>
>> Correct?
>>
>> Thanks.
>>
>> -mahboud
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
_______________________________________________
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