|
From: | Cecilio Pardo |
Subject: | bug#74863: 31.0.50; Problems with play-sound on MS-Windows |
Date: | Sun, 15 Dec 2024 12:55:35 +0100 |
User-agent: | Mozilla Thunderbird |
On 14/12/2024 9:42, Eli Zaretskii wrote:
- To support :data, we can use the PlaySound function, but we will lose the ability to play files other than wav. We can maintain the current code for files, and use PlaySound for :data. Another option would be to simply save data to a temp file and play the file.I'd say the former is preferable, but without losing the ability to play the files we can today. That is, maintain the current code for files and add new code for :data.
This patch adds support for :data using PlaySound, keeping the current code for files.
It also fixes a problem in the handling of the volume. Let me know if I have to make a separate patch/bug.
Tested with mingw64 and mingw32. To test: (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))
(play-sound '(sound :file "awav.wav" :volume 100))
0001-Add-support-for-the-data-keyword-for-play-sound-in-M.patch
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |