From 2763da5f438bcc4ccc7a52cd815134825887a32c Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 23 Feb 2010 00:15:36 +0000 Subject: [PATCH] audio was working fine, i just had the wrong frequency... git-svn-id: svn://anubis/anaglym/trunk@259 99a6e188-d820-4881-8870-2d33a10e2619 --- Video.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Video.cc b/Video.cc index d997bce..daadce7 100644 --- a/Video.cc +++ b/Video.cc @@ -14,7 +14,7 @@ static void Video_sound_callback(void * userdata, Uint8 * stream, int len) Sint16 * str = (Sint16 *) stream; for (int i = 0; i < len / 4; i++) { - str[i*2] = (Sint16) (32000.0 * sin(pos / 44100.0 * M_PI)); + str[i*2] = (Sint16) (32000.0 * sin(pos * 263.0 / 44100.0 * 2.0 * M_PI)); str[i*2+1] = 0; pos++; }