Re: What sort of timer should I use for my sequencer?
Re: What sort of timer should I use for my sequencer?
- Subject: Re: What sort of timer should I use for my sequencer?
- From: Morgan Packard <email@hidden>
- Date: Sat, 29 Jan 2011 16:50:42 -0700
Thanks Brian,
So, setting the priority to one million isn't going to help :)
-m-
On Sat, Jan 29, 2011 at 4:49 PM, Brian Willoughby <email@hidden> wrote:
> You should not use the highest priority. If you just blindly crank up the
> priority then you'll either make the rest of the system perform poorly, or
> you'll get busted and the system will demote your priority as punishment.
> Instead, you should use fixed priority.
>
> Also, I seem to recall that priority is relative, so 0 priority is probably
> not the lowest, but normal. I think you can have positive and negative
> priorities. Plus, the system will alter your priority if your code behaves
> poorly. There should be tons of information in the comments of the various
> CoreAudio samples about just this sort of thing.
>
> Brian Willoughby
> Sound Consulting
>
>
> On Jan 29, 2011, at 12:08, Morgan Packard wrote:
>>
>> I set it to highest priority -- 1. It's working well now, but not 100%
>> perfectly. I'm pretty sure the last time I tested it, I got a few
>> glitches as the app was entering the background.
>>
>> -m-
>>
>> On Sat, Jan 29, 2011 at 3:27 AM, tahome izwah <email@hidden>
>> wrote:
>>>
>>> So what priority did you set it to?
>>>
>>> --th
>>>
>>> 2011/1/29 Morgan Packard <email@hidden>:
>>>>
>>>> I've managed to move my audio generation code out of the RemoteIO
>>>> callback thread. I'm now writing to a buffer on a separate thread,
>>>> using a while loop and [NSThread sleepForTimeInterval:] on a new
>>>> thread (NSThread detachNewThreadSelector). It took me a minute to
>>>> figure out that I need to set the priority on the thread. Seems that
>>>> the default priority is zero, so I was getting many more glitches than
>>>> I was with my objective-c selectors in the remote io callback thread!
>>>>
>>>> Anyway, things seem to be working well now. Thanks to all helped me
>>>> out with this.
>>
> _______________________________________________
> 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
>
--
================================
Web:
http://www.morganpackard.com
Music/Art:
Album Moment Again Elsewhere available Oct 11.
iOS app Thicket available on iTunes store.
================================
_______________________________________________
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