[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/sound.c
From: |
Ken Raeburn |
Subject: |
[Emacs-diffs] Changes to emacs/src/sound.c |
Date: |
Sun, 14 Jul 2002 20:00:57 -0400 |
Index: emacs/src/sound.c
diff -c emacs/src/sound.c:1.26 emacs/src/sound.c:1.27
*** emacs/src/sound.c:1.26 Thu Jul 11 10:14:51 2002
--- emacs/src/sound.c Sun Jul 14 20:00:37 2002
***************
*** 433,440 ****
else
{
s.data = attrs[SOUND_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. */
--- 433,440 ----
else
{
s.data = attrs[SOUND_DATA];
! s.header_size = min (MAX_SOUND_HEADER_BYTES, SBYTES (s.data));
! bcopy (SDATA (s.data), s.header, s.header_size);
}
/* Find out the type of sound. Give up if we can't tell. */
***************
*** 443,451 ****
/* Set up a device. */
if (STRINGP (attrs[SOUND_DEVICE]))
{
! int len = XSTRING (attrs[SOUND_DEVICE])->size;
sd.file = (char *) alloca (len + 1);
! strcpy (sd.file, XSTRING (attrs[SOUND_DEVICE])->data);
}
if (INTEGERP (attrs[SOUND_VOLUME]))
--- 443,451 ----
/* Set up a device. */
if (STRINGP (attrs[SOUND_DEVICE]))
{
! int len = SCHARS (attrs[SOUND_DEVICE]);
sd.file = (char *) alloca (len + 1);
! strcpy (sd.file, SDATA (attrs[SOUND_DEVICE]));
}
if (INTEGERP (attrs[SOUND_VOLUME]))
***************
*** 624,631 ****
files I found so far. If someone feels inclined to implement the
whole RIFF-WAVE spec, please do. */
if (STRINGP (s->data))
! sd->write (sd, XSTRING (s->data)->data + sizeof *header,
! STRING_BYTES (XSTRING (s->data)) - sizeof *header);
else
{
char *buffer;
--- 624,631 ----
files I found so far. If someone feels inclined to implement the
whole RIFF-WAVE spec, please do. */
if (STRINGP (s->data))
! sd->write (sd, SDATA (s->data) + sizeof *header,
! SBYTES (s->data) - sizeof *header);
else
{
char *buffer;
***************
*** 712,719 ****
sd->configure (sd);
if (STRINGP (s->data))
! sd->write (sd, XSTRING (s->data)->data + header->data_offset,
! STRING_BYTES (XSTRING (s->data)) - header->data_offset);
else
{
int blksize = 2048;
--- 712,719 ----
sd->configure (sd);
if (STRINGP (s->data))
! sd->write (sd, SDATA (s->data) + header->data_offset,
! SBYTES (s->data) - header->data_offset);
else
{
int blksize = 2048;