[xiph-cvs] cvs commit: ao/doc ao_example.c

Chris Wolf cwolf at xiph.org
Wed Sep 5 12:23:23 PDT 2001



cwolf       01/09/05 12:23:23

  Modified:    doc      ao_example.c
  Log:
  add cast to eliminate warning

Revision  Changes    Path
1.3       +4 -2      ao/doc/ao_example.c

Index: ao_example.c
===================================================================
RCS file: /usr/local/cvsroot/ao/doc/ao_example.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ao_example.c	2001/08/04 02:56:08	1.2
+++ ao_example.c	2001/09/05 19:23:23	1.3
@@ -67,8 +67,8 @@
                         sizeof(char));
         
         for (i = 0; i < format.rate; i++) {
-		sample = 0.75 * 32768.0 * 
-			sin(2 * M_PI * freq * ((float) i/format.rate));
+		sample = (int)(0.75 * 32768.0 * 
+			sin(2 * M_PI * freq * ((float) i/format.rate)));
                 
                 /* Put the same stuff in left and right channel */
                 buffer[4*i] = buffer[4*i+2] = sample & 0xff;
@@ -80,4 +80,6 @@
         ao_close(device);
     
         ao_shutdown();
+
+  return (0);
 }

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list