emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to play sound from string correctly?


From: Pavel Janík
Subject: Re: How to play sound from string correctly?
Date: Sat, 05 Jan 2002 19:07:48 +0100
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1.50 (i386-suse-linux-gnu)

   From: "Eli Zaretskii" <address@hidden>
   Date: Sat, 05 Jan 2002 10:13:09 +0200

   > Could be a bug in sound.c, for example.

Yes, it was :-(

When :data was specified in play-sound, the header_size field of struct
s was not properly initialized and thus it did not worked.

Gerd, is this OK? Is this also for RC branch?

--- sound.c.~1.22.~     Fri Jan  4 21:06:45 2002
+++ sound.c     Sat Jan  5 18:02:02 2002
@@ -447,8 +447,8 @@
   else
     {
       s.data = attrs[SOUND_DATA];
-      bcopy (XSTRING (s.data)->data, s.header,
-            min (MAX_SOUND_HEADER_BYTES, STRING_BYTES (XSTRING (s.data))));
+      s.header_size = min (MAX_SOUND_HEADER_BYTES, STRING_BYTES (XSTRING 
(s.data)));
+      bcopy (XSTRING (s.data)->data, s.header, s.header_size);
     }
 
   /* Find out the type of sound.  Give up if we can't tell.  */
-- 
Pavel Janík

printk("??? No FDIV bug? Lucky you...\n");
                  -- 2.2.16 include/asm-i386/bugs.h



reply via email to

[Prev in Thread] Current Thread [Next in Thread]