GNU bug report logs -
#74863
31.0.50; Problems with play-sound on MS-Windows
Previous Next
Reported by: Cecilio Pardo <cpardo <at> imayhem.com>
Date: Fri, 13 Dec 2024 23:51:01 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 74863 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 15 Dec 2024 12:55:35 +0100
> Cc: 74863 <at> debbugs.gnu.org
> From: Cecilio Pardo <cpardo <at> imayhem.com>
>
> This patch adds support for :data using PlaySound, keeping the current
> code for files.
Thanks.
> It also fixes a problem in the handling of the volume. Let me know if I
> have to make a separate patch/bug.
No need.
> 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))
What's wrong with insert-file-contents-literally?
> + 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?
Should we also use SND_SENTRY flag (on Vista and later)?
This bug report was last modified 209 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.