From owner-freebsd-multimedia@freebsd.org Thu Apr 28 20:59:11 2016 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BC79B1FDD7 for ; Thu, 28 Apr 2016 20:59:11 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from vfemail.net (onethreetwo.vfemail.net [199.16.11.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 196A71E20 for ; Thu, 28 Apr 2016 20:59:10 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: (qmail 18175 invoked by uid 89); 28 Apr 2016 20:59:08 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 28 Apr 2016 20:59:08 -0000 Received: (qmail 18111 invoked by uid 89); 28 Apr 2016 20:58:51 -0000 Received: by simscan 1.3.1 ppid: 18103, pid: 18107, t: 0.0051s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 28 Apr 2016 20:58:51 -0000 Received: (qmail 29445 invoked by uid 89); 28 Apr 2016 20:58:51 -0000 Received: by simscan 1.4.0 ppid: 29424, pid: 29442, t: 0.6229s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by mail.vfemail.net with ESMTPA; 28 Apr 2016 20:58:50 -0000 From: Jan Beich To: Matthias Apitz Cc: vit shatsillo , freebsd-multimedia@freebsd.org, gecko@FreeBSD.org Subject: Re: firefox-43 && no sound on MP3, MP4, HTML5 References: <60v1-ivm1-wny@vfemail.net> <20160428184312.GC3721__32639.8463490934$1461869020$gmane$org@c720-r292778-amd64> Date: Thu, 28 Apr 2016 22:58:41 +0200 In-Reply-To: <20160428184312.GC3721__32639.8463490934$1461869020$gmane$org@c720-r292778-amd64> (Matthias Apitz's message of "Thu, 28 Apr 2016 20:43:12 +0200") Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2016 20:59:11 -0000 --=-=-= Content-Type: text/plain Matthias Apitz writes: > # cd /usr/ports/www/firefox > # make config > > for what is the option PULSEAUDIO on/off exactly and why it is set to > 'on' as default(?); PULSEAUDIO=on rationale is described in r404687 commit message. HTML5 audio uses libcubeb which supports multiple audio backends but the logic to select one isn't particularly advanced. // simplified from // https://dxr.mozilla.org/mozilla-central/source/media/libcubeb/src/cubeb.c int cubeb_init(cubeb ** context, char const * context_name) { // Ordered list of available backends int (* init[])(cubeb **, char const *) = { pulse_init, alsa_init, oss_init, }; // Use the first successfully initialized backend for (int i = 0; i < NELEMS(init); ++i) { if (init[i](context, context_name) == CUBEB_OK) { return CUBEB_OK; } } return CUBEB_ERROR; } // https://dxr.mozilla.org/mozilla-central/source/media/libcubeb/src/cubeb_pulse.c int pulse_init(cubeb ** context, char const * context_name) { ... libpulse = dlopen("libpulse.so.0", RTLD_LAZY); if (!libpulse) { return CUBEB_ERROR; } ... WRAP(pa_threaded_mainloop_start)(ctx->mainloop); if (pulse_context_init(ctx) != 0) { pulse_destroy(ctx); return CUBEB_ERROR; } ... return CUBEB_OK; > $ LANG=C paplay Track01.mp3 > Failed to open audio file. paplay(1) doesn't support MP3. Try passing --list-file-formats then transcode to one of those e.g., $ ffmpeg -i Track01.mp3 Track01.wav $ paplay Track01.wav or $ ffmpeg -i Track01.mp3 -f wav pipe: 2>/dev/null | paplay >> firefox package built by pkg.freebsd.org doesn't pull pulseaudio. > > What does this mean 'pull pulseaudio'? "pkg install foo" only installs category/foo port dependencies that are necessary to run package. For example, BUILD_DEPENDS won't be installed. > How the PULSEAUDIO option is set in this official pkg? Maybe query pkg.freebsd.org using pkg(8) instead of asking e.g., $ pkg rquery "%n-%v" firefox firefox-46.0_1,1 $ pkg rquery "%Ok=%Ov" firefox | fgrep -i -e alsa -e pulse ALSA=on PULSEAUDIO=on $ pkg rquery "%dn-%dv" firefox | fgrep -i -e alsa -e pulse alsa-plugins-1.1.1 alsa-lib-1.1.1 Also see pkg-search(8). >> If audio/pulseaudio doesn't work *by default* file a bug for the >> maintainer (gnome@) to notice and maybe CC consumers (e.g. gecko@). > > Should I file a bug due to the above error, or do I something wrong? > I have applied the change in /usr/local/etc/pulse/default.pa paplay(1) producing silence with default pulse/default.pa would be a bug. Another example, if pulseaudio daemon opens /dev/dsp0 instead of /dev/dspN where N is the value of hw.snd.default_unit. $ sysctl -a | fgrep unit hw.snd.default_unit: 0 hw.pci.default_vgapci_unit: 0 $ procstat -f $(pgrep pulse) | fgrep dsp 49022 pulseaudio 10 v c -w---n-- 1 0 - /dev/dsp0.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJXInmCXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bxh0IAKOrmWNhlQdoGGzj+SU80Lo1 xXysYCwwRfiyO6lp1/edwRczYh+emj4RpLNIRsacEydESu2ailWKgXPSlHlC/mVv cM3feZS05x7PmmBQdkBJ6C/9ukQ+r/SAL8xZJGSfIEMwoCX+MayC+hzkwWuCRvTi yYVhxsw/X7yss6oIgsxNNhYgq/qzKsjNwQ3+1iaIbmdf3H91wF0J7WV1tfs7c/eR t44gvqS76ShU5vRwfGoeFuDOf/5Epjl+g1cmHSv7WTW0WHaeFPCBCIgd9lCHMq/e VscbNZQd8vUEH68ppGJJab8VETDfwLiNejhG5L/KDhS3kM2doCplPnyJsNRIPTI= =v+SE -----END PGP SIGNATURE----- --=-=-=--