diff src/miscplay.c @ 564:001628b7a5b3

[xemacs-hg @ 2001-05-24 09:37:25 by yoshiki] Fix broken build on Linux. * buffer.c (Qtext_conversion_error): Moved from file-coding.c so that --with-file-coding=no will compile corectly. * buffer.c (syms_of_buffer): Define Qtext_conversion_error. Also moved from file-coding.c * file-coding.c (Qtext_conversion_error): Moved to buffer.c * file-coding.c (syms_of_file_coding): Moved Qtext_conversion_error initialization to buffer.c * emodules.c (Qdll_error): New error. * emodules.c (syms_of_module): Declare Qdll_error. * esd.c (esd_play_sound_data): sound_warn accepts only one arg. * miscplay.c (sndcnv8S_2mono): * miscplay.c (sndcnv2monounsigned): * miscplay.c (int2ulaw): * miscplay.c (sndcnv2byteLE): * miscplay.c (sndcnv2byteBE): * miscplay.c (sndcnv2monobyteLE): * miscplay.c (sndcnv2monobyteBE): Replace signed Char_Binary with Char_Binary. There's no type called signed char in C. Also remove audio: from error message. sound_warn and sound_perror prepends them.
author yoshiki
date Thu, 24 May 2001 09:37:30 +0000
parents 183866b06e0b
children db376c5066a7
line wrap: on
line diff
--- a/src/miscplay.c	Thu May 24 07:51:33 2001 +0000
+++ b/src/miscplay.c	Thu May 24 09:37:30 2001 +0000
@@ -386,8 +386,8 @@
   dest    = miscplay_sndbuf;
   while (count--)
     {
-      *dest++ = (UChar_Binary)(((int)*((signed Char_Binary *)(src)) +
-				 (int)*((signed Char_Binary *)(src+1))) / 2);
+      *dest++ = (UChar_Binary)(((int)*((Char_Binary *)(src)) +
+				 (int)*((Char_Binary *)(src+1))) / 2);
       src  += 2;
     }
   *data   = src;
@@ -410,8 +410,8 @@
   dest    = miscplay_sndbuf;
   while (count--)
     {
-      *dest++ = (UChar_Binary)(((int)*((signed Char_Binary *)(src)) +
-				 (int)*((signed Char_Binary *)(src+1))) / 2) ^ 0x80;
+      *dest++ = (UChar_Binary)(((int)*((Char_Binary *)(src)) +
+				 (int)*((Char_Binary *)(src+1))) / 2) ^ 0x80;
       src += 2;
     }
   *data   = src;
@@ -440,7 +440,7 @@
 
 /* Convert a number in the range -32768..32767 to an 8 bit ulaw encoded
    number --- I hope, I got this conversion right :-) */
-static inline signed Char_Binary int2ulaw(int i)
+static inline Char_Binary int2ulaw(int i)
 {
     /* Lookup table for fast calculation of number of bits that need shifting*/
     static short int t_bits[128] = {
@@ -664,7 +664,7 @@
   *outbuf =
   dest    = miscplay_sndbuf;
   while (count--) {
-    *dest++ = (UChar_Binary)(((signed Char_Binary *)src)[1] ^ (signed Char_Binary)0x80);
+    *dest++ = (UChar_Binary)(((Char_Binary *)src)[1] ^ (Char_Binary)0x80);
     src += 2;
   }
   *data = src;
@@ -686,7 +686,7 @@
   *outbuf =
   dest    = miscplay_sndbuf;
   while (count--) {
-    *dest++ = (UChar_Binary)(((signed Char_Binary *)src)[0] ^ (signed Char_Binary)0x80);
+    *dest++ = (UChar_Binary)(((Char_Binary *)src)[0] ^ (Char_Binary)0x80);
     src += 2;
   }
   *data = src;
@@ -709,8 +709,8 @@
   *outbuf =
   dest    = miscplay_sndbuf;
   while (count--) {
-    *dest++ = (UChar_Binary)(((int)((signed Char_Binary *)src)[1] +
-                              (int)((signed Char_Binary *)src)[3]) / 2 ^ 0x80);
+    *dest++ = (UChar_Binary)(((int)((Char_Binary *)src)[1] +
+                              (int)((Char_Binary *)src)[3]) / 2 ^ 0x80);
     src += 4;
   }
   *data = src;
@@ -733,8 +733,8 @@
   *outbuf =
   dest    = miscplay_sndbuf;
   while (count--) {
-    *dest++ = (UChar_Binary)(((int)((signed Char_Binary *)src)[0] +
-                              (int)((signed Char_Binary *)src)[2]) / 2 ^ 0x80);
+    *dest++ = (UChar_Binary)(((int)((Char_Binary *)src)[0] +
+                              (int)((Char_Binary *)src)[2]) / 2 ^ 0x80);
     src += 4;
   }
   *data = src;