From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS6130 216.105.32.0/20 X-Spam-Status: No, score=1.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, FAKE_REPLY_C,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS, SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CBAD61F404 for ; Wed, 7 Mar 2018 15:15:12 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1etamX-006k1D-AO; Wed, 07 Mar 2018 15:15:05 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1etamW-006k0x-95 for sox-users@lists.sourceforge.net; Wed, 07 Mar 2018 15:15:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OzWgRpthRKqlQOc75Ef5+D//TlxUZWW5EVGcFrCklHQ=; b=bCcjBXye2+FqHpXwPlsBnlZfHl 0e0hmMu6YMXAiUgYF9V357H+9x9d0/Ll6+8CdsIxnsSaaloTmGPhPlg10vUaU1EXrZDF6Qqf9t2vO ew06ZzxX+Ti6Kx91e2POamlv/+JpLMNR0eV/exebdzVSKh8R7nCVnl4bQtNZ05Wuf2FQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=OzWgRpthRKqlQOc75Ef5+D//TlxUZWW5EVGcFrCklHQ=; b=F XrFLa14YRiWpmrWt/ptsIgIwcLxJHrAQHLd7gyO4laczyiLyNmgw+ZzUDJYnhngx2urcknTetXkWQ nyfYMxxvEmiDEn9LQjrZB7M9PC515JeswXlsbiJ4RZi2Bv9sygoSnqXKTjcvIY6VQr2pRobYp8abx UBY/8y4iC+wEcDzE=; Received: from sfi-lb-mx.v20.lw.sourceforge.com ([172.30.20.201] helo=mx.stare.cz) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1etamN-002siZ-BL for sox-users@lists.sourceforge.net; Wed, 07 Mar 2018 15:15:01 +0000 Received: from www.stare.cz (localhost [127.0.0.1]) by www.stare.cz (OpenSMTPD) with ESMTP id 880017f1 for ; Wed, 7 Mar 2018 16:14:50 +0100 (CET) Date: Wed, 7 Mar 2018 16:14:50 +0100 From: Jan Stary To: sox-users@lists.sourceforge.net Message-ID: <20180307151450.GA44044@www.stare.cz> Mail-Followup-To: sox-users@lists.sourceforge.net MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87efkxp9m1.fsf@gmail.com> <87r2oxpboh.fsf@gmail.com> <23db1c51b897db1a375bba03b22dd58d@wingsandbeaks.org.uk> <871sgxr2pa.fsf@gmail.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Headers-End: 1etamN-002siZ-BL Subject: Re: Playing multichannel audio files X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: sox-users-bounces@lists.sourceforge.net On Mar 06 10:08:33, rodolfo.medina@gmail.com wrote: > I have a multichannel audio file: suppose three channels. What I want is to > listen to that file by listening to each of those channels through a different > loud speaker. Do you have three loudspeakers? > In order to do so, I imagine each channel being sent > to a different sound card. Not necessarily. A typical soundcard will have a stereo output, a fancy soundcard might have more (rear speakers, subwoofer, etc). https://en.wikipedia.org/wiki/5.1_surround_sound Also, playing to more than one audio device might not be synchronized, depending on your OS's audio subsystem. > Can sox perform that, and how? I don't think this has anythng to do with SoX. SoX will read the three channels and will send them to your audio hardware (or whatever audio subsystem you have between SoX and the hardware, such as ALSA). It's their problem then. If your actual audio HW can only play two channels simultaneously (as is usual), a cheap version would be to stereo-mix your 3 channels to one in the middle, one left, one right (in the stereo panorama). That can be one with SoX. > Two different soundcards, and three devices, seem to be detected: > > $ arecord -l Recording (capturing) devices are irrelevant to this, obviously ... > **** List of CAPTURE Hardware Devices **** > card 1: Generic [HD-Audio Generic], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 1: Generic [HD-Audio Generic], device 2: ALC662 rev3 Alt Analog [ALC662 rev3 Alt Analog] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio] > Subdevices: 0/1 > Subdevice #0: subdevice #0 ... but you probably have two soundcards (sorry, I don't do ALSA). > Since sox can split a three-channel file into three one-channel files, the > problem is virtually solved once we manage to send two audio outputs into two > different audio cards. This seems to be done simply with `&&', e.g: > $ mplayer -ao alsa:device=hw=2.0 file1.wav && mplayer file2.wav > , but unfortunately only one output is heard at a time... The way you wrote it, the second mplayer process is waiting for the forst one to finish. On Mar 06 14:26:27, mans@mansr.com wrote: > Sox can't do that. However, you can configure ALSA to present a virtual > 3-channel card with each channel routed to a different slave device. Yes; it's not a SoX problem, it's an audio system problem: what to do with the three channels that SoX (or any other audio application for that matter) is sending. (You might want to try installing OpenBSD on a spare machine and try its 'sndio' audio system, which is both fly and dope.) Jan ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users