From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Bj=C3=B6rn?= Bidar Newsgroups: gmane.emacs.devel Subject: Re: `play-sound-file', no mp3 support, sets global volume w/o reset Date: Sun, 22 Sep 2024 15:19:04 +0300 Message-ID: <44962.2410976858$1727007625@news.gmane.org> References: <87bk13w0he.fsf@dataswamp.org> <878qvyqtqs.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14023"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 22 14:20:18 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ssLZZ-0003Wm-4n for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Sep 2024 14:20:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssLYp-0000Rp-KE; Sun, 22 Sep 2024 08:19:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssLYV-0007uO-JG for emacs-devel@gnu.org; Sun, 22 Sep 2024 08:19:13 -0400 Original-Received: from thaodan.de ([185.216.177.71]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssLYR-0004hN-FX for emacs-devel@gnu.org; Sun, 22 Sep 2024 08:19:10 -0400 Original-Received: from odin (dsl-trebng12-50dc75-154.dhcp.inet.fi [80.220.117.154]) by thaodan.de (Postfix) with ESMTPSA id E135AD00024 for ; Sun, 22 Sep 2024 15:19:04 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1727007545; bh=1coo8sIUhcjesLaK2O6zxVp/PJthjOhiYK55t8twa7c=; h=From:To:Subject:In-Reply-To:References:Date; b=zH3tqfYJJ/QMg8yZiE03DE88UbvJLpnMOSXw0JGt1BYN6jjcyHfzSUFvH4gG7rkEC ZfQuxFBboPrukuj7RwdmkLFFmn5PJIczaebzDSbviqFW9/I6ZtlLSGHUlTJ2haWE04 ZQRYAIqISz4cTNC49RRU94wKJN7CWxR0shgaxvEzQ3jNig4ku/XjBO9ls79QFEUWJO mZFX5AyXZYr0PWfokYL316BI7zePVGdG3aqIzJ2RI86DutEE71LtfXxV/U+6ZmEW6u dOk96A6qHmamJPl0fEiKyOTTMTFkoRHFtpJX9+Vt9yjJxW9ai0Yu/YGj9ZjWfxwWvm SPXafDsTu5JSZjgpjO70KUeItbFElZfs1t2XEts2I3dVQLcRt6jLsHFOQGh2h0ot11 BS/Q8O5MZSQaJBPlwwUVU0+xHzAhymuGT0sxEDF/sS2Nu8rqARjBtv5/0nsVHZhU2t l8Dkpw4YvolsJMMMsBWJPImGpBDf1BsH5EUp60rWSc689MpAtzdj1bTUQclhV0r9g7 Qe4oRMu4oNQ5shZmskJJIYITVTGvmnIG28iFXJKMbKjn+SN0Y3e8o60IsGd6d97Hn7 mrFIDL+A/iq7Fp/5Niu/QBXUDGXIY1Y/TuOsFyNZkmN7J3b8MXPl9s6ZQZY2Cgvz+Q gH4y1HwJik8vdHRZZEBFI7So= In-Reply-To: <878qvyqtqs.fsf@dataswamp.org> (Emanuel Berg's message of "Wed, 11 Sep 2024 14:07:07 +0200") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH Received-SPF: pass client-ip=185.216.177.71; envelope-from=bjorn.bidar@thaodan.de; helo=thaodan.de X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, INVALID_MSGID=0.568, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323921 Archived-At: Emanuel Berg writes: >> But play-sound-file has another problem, namely, if you do >> e.g. >> >> (play-sound-file (file-name-concat bad-dir "data" "up.au") 0.4) >> >> it sets the global volume to 40% and worse, after it is >> done, it isn't reset. > Also, another bad thing is that the command monopolizes > execution. I know Elisp is single-threaded and the idle timer > and C threads don't change that, but what about > a child process? I recently looked into this as I wanted to play a sound when sending a notification in Emacs. There's package that implements a async play-sound using the async package: https://github.com/jcs-elpa/sound-async/blob/master/sound-async.el#L43