aboutsummaryrefslogtreecommitdiffstats
path: root/src/sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound.c')
-rw-r--r--src/sound.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/sound.c b/src/sound.c
index 3a1668e4903..a2fe7ccc8ce 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -595,12 +595,12 @@ wav_play (struct sound *s, struct sound_device *sd)
595 files I found so far. If someone feels inclined to implement the 595 files I found so far. If someone feels inclined to implement the
596 whole RIFF-WAVE spec, please do. */ 596 whole RIFF-WAVE spec, please do. */
597 if (STRINGP (s->data)) 597 if (STRINGP (s->data))
598 sd->write (sd, SDATA (s->data) + sizeof *header, 598 sd->write (sd, SSDATA (s->data) + sizeof *header,
599 SBYTES (s->data) - sizeof *header); 599 SBYTES (s->data) - sizeof *header);
600 else 600 else
601 { 601 {
602 char *buffer; 602 char *buffer;
603 int nbytes; 603 int nbytes = 0;
604 int blksize = sd->period_size ? sd->period_size (sd) : 2048; 604 int blksize = sd->period_size ? sd->period_size (sd) : 2048;
605 int data_left = header->data_length; 605 int data_left = header->data_length;
606 606
@@ -686,7 +686,7 @@ au_play (struct sound *s, struct sound_device *sd)
686 sd->configure (sd); 686 sd->configure (sd);
687 687
688 if (STRINGP (s->data)) 688 if (STRINGP (s->data))
689 sd->write (sd, SDATA (s->data) + header->data_offset, 689 sd->write (sd, SSDATA (s->data) + header->data_offset,
690 SBYTES (s->data) - header->data_offset); 690 SBYTES (s->data) - header->data_offset);
691 else 691 else
692 { 692 {
@@ -1104,7 +1104,6 @@ alsa_close (struct sound_device *sd)
1104static void 1104static void
1105alsa_choose_format (struct sound_device *sd, struct sound *s) 1105alsa_choose_format (struct sound_device *sd, struct sound *s)
1106{ 1106{
1107 struct alsa_params *p = (struct alsa_params *) sd->data;
1108 if (s->type == RIFF) 1107 if (s->type == RIFF)
1109 { 1108 {
1110 struct wav_header *h = (struct wav_header *) s->header; 1109 struct wav_header *h = (struct wav_header *) s->header;
@@ -1410,7 +1409,7 @@ Internal use only, use `play-sound' instead. */)
1410 { 1409 {
1411 int len = SCHARS (attrs[SOUND_DEVICE]); 1410 int len = SCHARS (attrs[SOUND_DEVICE]);
1412 current_sound_device->file = (char *) alloca (len + 1); 1411 current_sound_device->file = (char *) alloca (len + 1);
1413 strcpy (current_sound_device->file, SDATA (attrs[SOUND_DEVICE])); 1412 strcpy (current_sound_device->file, SSDATA (attrs[SOUND_DEVICE]));
1414 } 1413 }
1415 1414
1416 if (INTEGERP (attrs[SOUND_VOLUME])) 1415 if (INTEGERP (attrs[SOUND_VOLUME]))
@@ -1498,4 +1497,3 @@ init_sound (void)
1498} 1497}
1499 1498
1500#endif /* HAVE_SOUND */ 1499#endif /* HAVE_SOUND */
1501