Skip to content
Snippets Groups Projects
Commit 167aa707 authored by Chris Wolf's avatar Chris Wolf
Browse files

add cast to eliminate warning

git-svn-id: http://svn.xiph.org/trunk/ao@1969 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 95670b42
No related branches found
No related tags found
No related merge requests found
......@@ -67,8 +67,8 @@ int main(int argc, char **argv)
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 @@ int main(int argc, char **argv)
ao_close(device);
ao_shutdown();
return (0);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment