Ticket #182 (new enhancement)

Opened 3 years ago

Last modified 3 years ago

need some additional API to implement somthing similar to alsa_in and alsa_out

Reported by: torbenh Assigned to:
Priority: minor Milestone: FFADO 2.1
Component: Version: FFADO SVN (trunk)
Keywords: Cc:
The device the bug applies to:

Description

in order to implement something similar to alsa_in (which can be found in the tools directory from jack1)

i need a way to determine the samplerate and/or buffer position of the sound interface.

you already stated, that you know the samplerate in firewire clock. so the alsa_in dll could operate on firewire clock, for example.

i also need some absolute value. but if the samplerate is quite accurate, it could be high granularity.

alsa_in operates like this:

double current_resamp_rate = 1.0;

process( nframes )
{
   snd_pcm_delay( pcm, &delay )

   offset = delay-target_delay;

   double resamp_rate = nframes/(nframes+offset);
   double diff_value = (current_resample_rate - resamp_rate) / catch_factor;

   current_resample_rate += diff_value;

   write( nframes * current_resample_rate );
}

I hope its clear, that this is in fact a dll.

So we might just use some cascades of dlls to get there.

Change History

05/17/09 04:31:22 changed by ppalmers

  • milestone changed from FFADO 2.0 to FFADO 2.1.