From: Takashi Iwai Subject: Re: Mix audio at different frequencies Date: Mon, 15 May 2006 13:33:27 +0200 Message-ID: References: <1147429541.26309.3.camel@jazc.fedora> <1147676786.2963.1.camel@jazc.fedora> <000601c67812$4b80e240$8ca8a8c0@gmvsistemas.es> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <000601c67812$4b80e240$8ca8a8c0@gmvsistemas.es> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Juan Antonio Zapatero Campo Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 15 May 2006 13:25:39 +0200, Juan Antonio Zapatero Campo wrote: >=20 > No, it returns wrong buffer sizes. Instead of 160 samples, which is wha= t I=20 > am expecting at 8000Hz, it returns a value of 341, which I do not=20 > understand. You cannot get always the exactly same buffer size you requested. Especially dmix limits the buffer size to its own and rate plugin rescales the size according to the rate conversion. Takashi >=20 > ----- Original Message -----=20 > From: "Takashi Iwai" > To: "Juan Zapatero" > Cc: > Sent: Monday, May 15, 2006 12:03 PM > Subject: Re: [Alsa-devel] Mix audio at different frequencies >=20 >=20 > > At Mon, 15 May 2006 09:06:26 +0200, > > Juan Zapatero wrote: > >> > >> What do you mean? Here is my .asoundrc, what has to be changed? > > > > It looks OK. And doesn't it work with your voip program? > > > > > > Takashi > > > >> > >> # this makes native ALSA apps default to using dmix > >> pcm.!default { > >> type plug > >> slave.pcm "duplex" > >> } > >> > >> ctl.!default { > >> type hw > >> card 0 > >> } > >> > >> pcm.duplex{ > >> type asym > >> playback.pcm "dmix0" > >> capture.pcm "plughw:0,0" > >> } > >> > >> pcm.dmix0 { > >> type dmix > >> ipc_key 219345 # any unique number here > >> slave { > >> pcm "hw:0,0" > >> period_time 0 > >> #buffer_time 0 > >> period_size 2048 # jm: much smoother than 1024/8192! > >> buffer_size 32768 > >> rate 44100 > >> } > >> bindings { > >> 0 0 # from 0 =3D> to 0 > >> 1 1 # from 1 =3D> to 1 > >> } > >> } > >> > >> > >> > >> > >> > >> El vie, 12-05-2006 a las 14:10 +0200, Takashi Iwai escribi=F3: > >> > At Fri, 12 May 2006 12:25:41 +0200, > >> > Juan Zapatero wrote: > >> > > > >> > > Hello, > >> > > I need to mix in playback two different audio streams, one comin= g=20 > >> > > from > >> > > an ogg player, which is at 44100Hz, and the other one, coming ou= t of=20 > >> > > a > >> > > VoIP application, in this case, at 8000Hz. As I am using the dmi= x=20 > >> > > plugin > >> > > for mixing, I can't find out how to implement the resampling=20 > >> > > operations > >> > > needed. > >> > > >> > Use plug or rate plugin. The default setting does it automaticall= y, > >> > too. > >> > > >> > Note that the rate plugin in 1.0.11 release has some bugs that was > >> > already fixed on HG repo. > >> > > >> > > >> > Takashi > >> > >> > >> ______________________ > >> Este mensaje, y en su caso, cualquier fichero anexo al mismo, > >> puede contener informacion clasificada por su emisor como confidenc= ial > >> en el marco de su Sistema de Gestion de Seguridad de la > >> Informacion siendo para uso exclusivo del destinatario, quedando > >> prohibida su divulgacion copia o distribucion a terceros sin la > >> autorizacion expresa del remitente. Si Vd. ha recibido este mensaje > >> erroneamente, se ruega lo notifique al remitente y proceda a su bor= rado. > >> Gracias por su colaboracion. > >> ______________________ > >> This message including any attachments may contain confidential > >> information, according to our Information Security Management System= , > >> and intended solely for a specific individual to whom they are=20 > >> addressed. > >> Any unauthorised copy, disclosure or distribution of this message > >> is strictly forbidden. If you have received this transmission in er= ror, > >> please notify the sender immediately and delete it. > >> ______________________ > >> > >=20 >=20 >=20 > ______________________ > Este mensaje, y en su caso, cualquier fichero anexo al mismo, > puede contener informacion clasificada por su emisor como confidencial > en el marco de su Sistema de Gestion de Seguridad de la=20 > Informacion siendo para uso exclusivo del destinatario, quedando=20 > prohibida su divulgacion copia o distribucion a terceros sin la=20 > autorizacion expresa del remitente. Si Vd. ha recibido este mensaje=20 > erroneamente, se ruega lo notifique al remitente y proceda a su borrad= o.=20 > Gracias por su colaboracion. > ______________________ > This message including any attachments may contain confidential=20 > information, according to our Information Security Management System, > and intended solely for a specific individual to whom they are address= ed. > Any unauthorised copy, disclosure or distribution of this message > is strictly forbidden. If you have received this transmission in error= , > please notify the sender immediately and delete it. > ______________________ >=20 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642