From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Build-in mixer Date: Wed, 15 Oct 2003 16:19:57 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <3F8D3936.2080106@kky.zcu.cz> <200310151240.h9FCeluU021976@oud> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Wed_Oct_15_16:19:57_2003-1" Return-path: In-Reply-To: <200310151240.h9FCeluU021976@oud> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Paul Davis Cc: Dan Tihelka , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Wed_Oct_15_16:19:57_2003-1 Content-Type: text/plain; charset=US-ASCII At Wed, 15 Oct 2003 08:40:47 -0400, Paul Davis wrote: > > >Well, i am not author of this program actually. It is xmms plugin > >allowing to use ALSA for sound output (alsa-xmms-0.9). I only wanted to > >modify it, to be able to use dmix. I see, that it is out of my abilities > >:-( and, so i will have to conctact the author of it and ask him to > >correct it. It is pitty, because it will take time (if they ever do it). > >I thought, that ALSA interface is not dependent on way, how it is opened > >(because the same code with "hw:0:0" instead of "default" worked > >perfectly) or did not i comprehend anything?. I would like to > >understant, why opening "hw:0:0" works and only replacing it by > >"default" does not. It seems to mee very dificult for developpers.... > > it would have helped enormously if you had stated that you were > talking about alsa-xmms up front. its a known and important piece of > code, and one that someone here is much more likely to fix than (sorry > to say) your own pet project. > > takashi or jaroslav - does using dmix involve any threads? could the > alsa-xmms plugin be making calls to some xmms error code from a > non-GUI thread? it's not related with threads, but it invokes a fork for a server process (a main control only, doesn't do mixing stuffs). it looks like there is something wrong with this together with xmms. i've seen that Xlib got a spurious async. magically enough, the attached patch seems to fix. Jaroslav, what is the reason of the second fork? to daemonize? hmm, i still got many underruns. something broken atm... Takashi --Multipart_Wed_Oct_15_16:19:57_2003-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="pcm-dmix-fix.dif" Content-Transfer-Encoding: 7bit Index: alsa-lib/src/pcm/pcm_direct.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-lib/src/pcm/pcm_direct.c,v retrieving revision 1.5 diff -u -r1.5 pcm_direct.c --- alsa-lib/src/pcm/pcm_direct.c 8 Sep 2003 11:23:46 -0000 1.5 +++ alsa-lib/src/pcm/pcm_direct.c 15 Oct 2003 14:03:00 -0000 @@ -313,12 +313,12 @@ close(dmix->server_fd); return ret; } else if (ret == 0) { - ret = fork(); - if (ret == 0) + //ret = fork(); + //if (ret == 0) server_job(dmix); exit(EXIT_SUCCESS); } else { - waitpid(ret, NULL, 0); + //waitpid(ret, NULL, 0); } dmix->server_pid = ret; dmix->server = 1; --Multipart_Wed_Oct_15_16:19:57_2003-1-- ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php