From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.bugs Subject: bug#74863: 31.0.50; Problems with play-sound on MS-Windows Date: Sun, 15 Dec 2024 19:33:35 +0100 Message-ID: References: <86a5cywt9b.fsf@gnu.org> <13c75eef-5ba3-4d2b-bc6a-f6e64860552a@imayhem.com> <861py9rtz0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------fUCHB3nOBqXBOM8E79psRO2k" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34082"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 74863@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 15 19:34:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tMtRf-0008ho-1P for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Dec 2024 19:34:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMtRZ-0002lc-Gp; Sun, 15 Dec 2024 13:34:18 -0500 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 1tMtRK-0002kn-Ka for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2024 13:34:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMtRK-0005DS-CI for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2024 13:34:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=Ho03E6WtBejtCnXBmbeTI2LHRsoRb+IHUE7DQpFuhHU=; b=gFo7uvUQ/Uwm9+IXR24Q1THpOCX463zfdIEs2EyZn6wW3cwOD4OdViBZPK+2/u0v1AIkVnXof325iu8QLft6+WKK+rgEZEyz1KrYyblHVaXnQJwykRjETdfT1UfC5+dFov3Qy145OUlOGf+qEd/n/0K3+JmwgEzow00OfmoPeZ0KPPgZt1B2AJHxSMthwOu75bgTubLy7B5ZMGEICgGWkV8yrsADmN4sbqrqOAucKcuiZm5CG6t9NWE6xnx58zj+OhuOuB+HMb44eG0yYqETpa1+KeZVB6vtvOTm4vIYyCOGGlI+gNDEw61tMNJfZZqVx5i3R/gJSI8T39Bn9CMUOA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tMtRK-0004BT-5f for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2024 13:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Cecilio Pardo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Dec 2024 18:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74863 X-GNU-PR-Package: emacs Original-Received: via spool by 74863-submit@debbugs.gnu.org id=B74863.173428762816059 (code B ref 74863); Sun, 15 Dec 2024 18:34:02 +0000 Original-Received: (at 74863) by debbugs.gnu.org; 15 Dec 2024 18:33:48 +0000 Original-Received: from localhost ([127.0.0.1]:52031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMtR5-0004Aw-E8 for submit@debbugs.gnu.org; Sun, 15 Dec 2024 13:33:48 -0500 Original-Received: from mail.imayhem.com ([82.223.54.191]:39333 helo=zealous-pike.82-223-54-191.plesk.page) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMtR2-0004Ai-Sa for 74863@debbugs.gnu.org; Sun, 15 Dec 2024 13:33:46 -0500 Original-Received: from [192.168.68.104] (111.red-88-21-7.staticip.rima-tde.net [88.21.7.111]) by zealous-pike.82-223-54-191.plesk.page (Postfix) with ESMTPSA id A655780184; Sun, 15 Dec 2024 18:33:36 +0000 (UTC) Authentication-Results: zealous-pike.82-223-54-191.plesk.page; spf=pass (sender IP is 88.21.7.111) smtp.mailfrom=cpardo@imayhem.com smtp.helo=[192.168.68.104] Received-SPF: pass (zealous-pike.82-223-54-191.plesk.page: connection is authenticated) Content-Language: es-ES In-Reply-To: <861py9rtz0.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297121 Archived-At: This is a multi-part message in MIME format. --------------fUCHB3nOBqXBOM8E79psRO2k Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 15/12/2024 13:50, Eli Zaretskii wrote: >> (defun load-file-into-unibyte-string (file-path) >> (with-temp-buffer >> (set-buffer-multibyte nil) >> (insert-file-contents file-path) >> (buffer-string))) >> >> (play-sound `(sound :data ,(load-file-into-unibyte-string "awav.wav") >> :volume 100)) > > What's wrong with insert-file-contents-literally? Nothing. So many functions... > >> + if (in_memory) >> + i_result = !PlaySound (psz_file_or_data, NULL, SND_MEMORY); > > AFAIU, the documentation seems to say that the string passed as the > first argument to PlaySound is limited to 256 characters (i.e. bytes)? > If so, how do we play longer sounds? I think this limitation applies only when the argument points to a string, and not when using SND_MEMORY, which is documented with: "The pszSound parameter points to a sound loaded in memory." It's true the documentation doesn't say so, and I haven't found any clarification by Microsoft, but SND_MEMORY would be useless otherwise. Also I see normal usage searching the internet. > Should we also use SND_SENTRY flag (on Vista and later)? Yes, done in the attached patch. --------------fUCHB3nOBqXBOM8E79psRO2k Content-Type: text/plain; charset=UTF-8; name="0001-Add-support-for-the-data-keyword-for-play-sound-in-M.patch" Content-Disposition: attachment; filename*0="0001-Add-support-for-the-data-keyword-for-play-sound-in-M.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSBiNzQ5ZTc0ODY3MmRlYTVlNDI5ZjE2OGU1MzFkZTMzZjQ5OWYyYjkzIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBDZWNpbGlvIFBhcmRvIDxjcGFyZG9AaW1heWhlbS5j b20+CkRhdGU6IFN1biwgMTUgRGVjIDIwMjQgMDE6MTM6MTYgKzAxMDAKU3ViamVjdDogW1BB VENIXSBBZGQgc3VwcG9ydCBmb3IgdGhlICc6ZGF0YScga2V5d29yZCBmb3IgcGxheS1zb3Vu ZCBpbgogTVMtV2luZG93cy4KCkFsc28gZml4IGFuIGVycm9yIG9uIHZvbHVtZSBoYW5kbGlu Zy4KCiogZXRjL05FV1M6IEFkZCBlbnRyeSBmb3IgdGhpcyBjaGFuZ2UuCiogZXRjL1BST0JM RU1TOiBSZW1vdmUgZW50cnkgYWJvdXQgbWlzc2luZyBzdXBwb3J0IGZvciA6ZGF0YS4KKiBz cmMvc291bmQuYyAocGFyc2Vfc291bmQpOiBDaGVjayB0aGF0IGVpdGhlciA6ZmlsZSBvciA6 ZGF0YSBpcwpwcmVzZW50LgooZG9fcGxheV9zb3VuZCk6IEFkZGVkIHBhcmFtZXRlciB0byBz ZWxlY3QgZml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