On Wed, 26.08.09 15:23, pl bossart (bossart.nospam at gmail.com) wrote: > Some fixes attached. The parameters were not handled properly. I also > added a means to disable SRC in case the source and sink are > synchronous (boolean parameter rate_adjust) Hmm, we probably should add a bit of code to detect this automatically. snd_pcm_info_get_sync() probably does what is needed here. Since quite some time I had on my list adding an API for wrapping this. This could e very handy here. /me rearranges the order of his todo list. > Overall the latency is somewhat higher that what I experienced with > the initial code. When forwarding my USB headset input to the HDAudio > out, I have 2-3 seconds of delay, even if I set the source/sink > latency to a low value. And I see Alsa underflow/overflow messages. > Not sure what's going on. I will work on this later this week when I > have more time. It worked quite well here. Even for very low latencies. Note that the current logic is to make sure that the buffer we maintain between sink and source is never below the max_request size of the sink. If it is lower than that we change the resampler a bit so that during the next iteration we buffer more. Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4