Re: achieving very low latency
Re: achieving very low latency
- Subject: Re: achieving very low latency
- From: Markus Fritze <email@hidden>
- Date: Thu, 05 Jul 2012 08:58:25 -0700
Yes, that works too, but then you still have to deal with input latency of the A/D conversion and CoreAudio. I don't think the latency will be shorter, but one less framework/component to deal with.
Markus
On Jul 5, 2012, at 8:46 AM, Dave Fernandes <email@hidden> wrote:
> Very cool! Way better than I would have expected.
>
> I guess I was wondering whether you could do this entirely within CoreAudio by putting the pushbutton on the Line In (with appropriate signal level). It's a hack compared to using CoreMIDI, but it's one less framework to deal with.
>
> On 2012-07-05, at 10:50 AM, Markus Fritze wrote:
>
>> E.g. MainStage reports the output and the roundtrip latency. With minimal settings the output latency is 1.5ms. That obviously does not include the time to report the physical button down to the audio code, because CoreAudio only deals with audio (the name might act as a hint :-).
>>
>> If you want really low latency, you might want to talk to a USB device directly or use a MIDI device and then use CoreMIDI. In both cases I would expect about 1ms of additional latency because of the USB overhead, but both services can work in real-time without any additional OS delays, which are expected when you just ask the OS for key presses.
>>
>>
>> Markus
>>
>> On Jul 5, 2012, at 7:44 AM, Dave Fernandes <email@hidden> wrote:
>>
>>> The OP defined latency as the time between physical button press and sound output. Does Core Audio (or other framework) provide a low latency way to react to the button press?
>>>
>>> Dave
>>>
>>> On 2012-07-05, at 10:30 AM, Markus Fritze wrote:
>>>
>>>> Any current Mac supports 16 sample buffer settings and it works just fine. That would be a theoretical 360us of latency @ 44100 Hz without considering the hardware latency of D/A converters,. If you only need a stereo signal, there is no reason to use external hardware for low latency.
>>>>
>>>>
>>>> Markus
>>>>
>>>
>>>
>>>>> In the experiment, a physical pushbutton is pressed (the old system used a
>>>>> National Instruments card to record this; I am using an Arduino) that plays
>>>>> a sound. I am referring to latency as the time between when the physical
>>>>> button is pressed and when the sound outputs from the audio jack. I have
>>>>> been measuring this with an oscilloscope.
>>>>
>>>
>>
>
_______________________________________________
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