Re: How to play compressed audiofiles with RemoteIO on iPhone?
Re: How to play compressed audiofiles with RemoteIO on iPhone?
- Subject: Re: How to play compressed audiofiles with RemoteIO on iPhone?
- From: William Stewart <email@hidden>
- Date: Mon, 10 May 2010 17:27:51 -0700
Hi Martin
What Tahome said... The main problem is that with doing compressed audio with the remote IO is alot of extra work, but if its a learning experience that is what you want... :)
Bill
On May 10, 2010, at 4:48 AM, tahome izwah wrote:
> He is alluding to the fact that many people use services that can
> block in the render callback, like file i/o. This is bad because it
> will disrupt audio if the call doesn't return within the time that is
> available for processing the given block of data.
>
> A better approach is to use a queue and fill that on a separate
> thread, then just copy data from that queue to the output in your
> render call. This will guarantee that the CPU load and potential
> blocks are outside of the render call and do not affect playback as
> much as they would otherwise.
>
> HTH
> --th
>
>
> 2010/5/10 Martin <email@hidden>:
>>
>> On 5 maj 2010, at 03.01, William Stewart wrote:
>>
>>>
>>> On May 4, 2010, at 1:00 PM, Martin wrote:
>>>
>>>> Besides from having an interest in audio programming and wanting to explore AudioUnits, I need to be able to control the audio in detail in order to alter pitch, visualize the waveform and whatnot. As far as I know, and correct me if I'm wrong, the only way to really be in control of audio playback is to use AudioUnits.
>>>
>>> sure.. that is one way.
>>>
>>>>
>>>> That being said, I did get the compressed audio playback working and I'm interpolating the steps through the buffer to smooth the pitchshifting. So far so good, but thanks for the concern!
>>>
>>> so on what thread are you calling ExtAudioFileRead?
>>
>> Hi Bill!
>>
>> I'm currently calling ExtAudioFileRead on my main thread (although not explicitly asserting it with +isMainThread).
>>
>> As I previously mentioned, I'm a novice and using this primarily as a learning experience. You seem however to be very skeptic towards the use of compressed audio using RemoteIO. Could you perhaps guide me towards some good documentation since you mentioned a lot of people, most certainly myself, seem to make mistakes?
>>
>> Martin
>>
>>>
>>>>
>>>> Martin
>>>>
>>>>>
>>>>> The question really is why do you want to play compressed audio files back using the RemoteIO?
>>>>>
>>>>> There are many other API that you can use to play compressed audio back (AudioQueue, AVFoundation). Playing compressed audio back using remote I/O is difficult and requires alot of work. I haven't looked through the code you mention below, but some of the code we have already seen here is full of mistakes - the primary one being doing reads of the file system from the remote I/O render callback.
>>>>>
>>>>> Bill
>>>>
>>>> _______________________________________________
>>>> 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