At 17:35 21.08.2005, Miller Puckette wrote:
Yep, I've been thinking about that... since it would also be good to be able to query block size (particularly of the parent patch!), it might be time to make a more general DSP status notification object...
and if it's not too hard please add the possibility to query soundcard in/out latency pleeeeeaase!
thx. sven.
sven wrote:
and if it's not too hard please add the possibility to query soundcard in/out latency pleeeeeaase!
i cannot see, how this should work in the real world.
the latency of your soundcard is (as the term already indicates) heavily depending on your soundcard, which might not have a hook at all to query its latency. furthermore pd can send audio to the [dac~]s perfectly even if that is not connected to the soundcard at all (think jack); what does that mean then ?
however, it might be a very nice feature, if we could query all the settable parameters, like blocksize and audiobuf (which is related to the latency) and # of in/outchannels.
mfg.a.dsr IOhannes
and if it's not too hard please add the possibility to query soundcard in/out latency pleeeeeaase!
i cannot see, how this should work in the real world.
why?
the latency of your soundcard is (as the term already indicates) heavily depending on your soundcard, which might not have a hook at all to query its latency.
all apis i'm familiar with (asio, jack, portaudio) provide api functions that can query the driver to get the input and the output latency ...
it's definitely possible to add this feature, it would have to be coded for every api on its own, though ...
cheers ... tim
Tim Blechmann wrote:
all apis i'm familiar with (asio, jack, portaudio) provide api functions that can query the driver to get the input and the output latency ...
Wow, that's great. But it seem to easy to be true :-) Do they really provide the delay between start of playing a buffer and start of appearing the analog signal at the output?
I use Hammerfall/Digiface with some attached D/A-Cs. Do the driver know what's the latencies of D/A-C, especially if connected to a digital sound card output, like mine? Or do the API just deliver the value what can be set in settings of the Hammerfall "Buffer Size (Latency)", which, unfortunately, is not the latency between the software layer and analog output.
Tim, do you know whant latency do they provide?
br, Peter
all apis i'm familiar with (asio, jack, portaudio) provide api functions that can query the driver to get the input and the output latency ...
Wow, that's great. But it seem to easy to be true :-) Do they really provide the delay between start of playing a buffer and start of appearing the analog signal at the output?
in theory .... yes ... they also provde the delay between the time, a signal appears on the input and the time it's sent to the software ...
I use Hammerfall/Digiface with some attached D/A-Cs. Do the driver know what's the latencies of D/A-C, especially if connected to a digital sound card output, like mine? Or do the API just deliver the value what can be set in settings of the Hammerfall "Buffer Size (Latency)", which, unfortunately, is not the latency between the software layer and analog output.
i doubt that the hdsp would know about the attached hardware and their latencies ... but it should be possible to query the driver for the specific digital ports and read the specs of the dacs you're using for the additional latency ...
cheers ... tim
Tim Blechmann wrote:
i doubt that the hdsp would know about the attached hardware and their latencies ... but it should be possible to query the driver for the specific digital ports and read the specs of the dacs you're using for the additional latency ...
I tried to calculate the latency of my system summing up all pd-buffers, driver buffers, DACs and ADCs latency (given by the manufactorer) but, compared to the measured latency (analog loop-back) I get a difference of ~1.5ms (@fs=48kHz). Thus, I wonder what do I wrong and how to calculate which latency of a system which predicts the correct measurable latency.
Has anybody done a latency calculation and compared it to the measured latency?
br, Peter
I tried to calculate the latency of my system summing up all pd-buffers, driver buffers, DACs and ADCs latency (given by the manufactorer) but, compared to the measured latency (analog loop-back) I get a difference of ~1.5ms (@fs=48kHz). Thus, I wonder what do I wrong and how to calculate which latency of a system which predicts the correct measurable latency.
hm ... i've never done the actual calculations ... but one piece of hardware that has to be taken into account is the pci bus / cardbus bridge ... but this should be reported by the driver ...
the additional latency might result from miller's synchronous scheduler ... instead of using the hardware interrupt to run the dsp (the way devel_0_39 can operate), the dsp scheduler independently from the hardware ... in theory, this would result in one blocksize of latency ... about 1.3ms at 48kHz ...
currently the scheduler that's run by a driver callback at interrupt time is only implemented for portaudio, native asio and jack (although jack adds some additional latency)
cheers ... tim
Hi Piotr,
I tried to calculate the latency of my system summing up all pd-buffers, driver buffers, DACs and ADCs latency (given by the manufactorer) but, compared to the measured latency (analog loop-back) I get a difference of ~1.5ms (@fs=48kHz). Thus, I wonder what do I wrong and how to calculate which latency of a system which predicts the correct measurable latency.
Has anybody done a latency calculation and compared it to the measured latency?
i have done this several times with PD and Max and i found it pretty straightforward. It's easiest to express the measured latencies in samples, then you might see the connection to hardware buffer size etc. You can isolate the latencies of the different components by comparing digital/analog loopback (ADC/DAC latency), different hardware buffer sizes and software IO buffer size (i think this is hardcoded to be 64 samples in PD).
all the best, Thomas
At 20:13 21.08.2005, IOhannes m zmoelnig wrote:
sven wrote:
and if it's not too hard please add the possibility to query soundcard in/out latency pleeeeeaase!
i cannot see, how this should work in the real world.
the latency of your soundcard is (as the term already indicates) heavily depending on your soundcard, which might not have a hook at all to query its latency.
i know that the latency of my soundcard depends on my soundcard. thanks for that hint anyway. as tim already mentioned most soundapis provide that feature. and it's a quite important feature if you want to sync audio and video _tightly_.
sven.
sven wrote:
At 20:13 21.08.2005, IOhannes m zmoelnig wrote:
sven wrote:
and if it's not too hard please add the possibility to query soundcard in/out latency pleeeeeaase!
i cannot see, how this should work in the real world.
the latency of your soundcard is (as the term already indicates) heavily depending on your soundcard, which might not have a hook at all to query its latency.
i know that the latency of my soundcard depends on my soundcard. thanks for that hint anyway.
as tim already mentioned most soundapis provide that feature. and it's a quite important feature if you want to sync audio and video _tightly_.
allright, i should go back reading docs... sorry for being grumpy.
however, i still wouldn't trust what i haven't measured myself. i have seen a lot of numbers in the web, that i totally disbelieve and which i think are just numbers that were acquired via some APIs (or more precisely: via some GUI that claimed that the "latency is now 0.1ms") and which where never verified via measurements.
mfg.asd.r IOhannes
however, i still wouldn't trust what i haven't measured myself. i have seen a lot of numbers in the web, that i totally disbelieve and which i think are just numbers that were acquired via some APIs (or more precisely: via some GUI that claimed that the "latency is now 0.1ms") and which where never verified via measurements.
well, you don't have to trust the data ... but i think that most drivers of professional soundcards on professional platforms provide these information ... so a professional program should make use of these data ;-)
t