At Mon, 20 Nov 2006 18:00:11 +0100, Giovanni Maruzzelli wrote: > > Hi Takashi, hi all, > > I have a problem of too much latency using from C the "default:n" > devices under ALSA (if I understood correctly, this is because the > "default:n" devices uses dmix and dsnoop, and I need dmix and dsnoop, > but dmix and dsnoop have a fixed period_time=125000). > > I was able to solve this problem with an asound.conf, specifying the > period_time in both the dmix and dsnoop that constitute the asym that > I made the default. The default pcm period_size (or period_time) can be defined globally per card-type such as cards.EMU10k1.pcm.dmix.period_size 512 or cards.ICE1712.pcm.dmix.period_time 20000 (I'm not sure whether it's available for 1.0.13 but at least HG version supports this.) > There is a way to do the same from the command line, in a way similar to: > aplay -D"plug:'dmix:RATE=44100'" Similarly, the default rate can be defined as defaults.pcm.dmix.rate 44100 (Optional) arguments can be defined together with the PCM definition, too. For example, to add RATE option to your dmixed PCM, define like below: pcm.dmixed { @args [ RATE ] @args.RATE { type integer default 48000 } type dmix ipc_key 1025 slave { pcm "hw:0" period_time 20000 rate $RATE } } > Also (and maybe better), there is a way to "build" a device similar to > the one builded by this asound.conf from the C api? A silly but workable solution would be to create a text file containing the new config and read it via snd_config_load() or such. Takashi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel