about summary refs log tree commit diff
path: root/src/engine/client/snd.c
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-08 20:36:37 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-08 20:36:37 +0000
commitb3f5ce5482ebc372f2a9e8237d7813a90c4a02c5 (patch)
tree48446e5d3b8a6e488c490e317d92e91cb22a1386 /src/engine/client/snd.c
parent4bd0274a2ef33312a55fc4c1a3df5f92173a829d (diff)
downloadzcatch-b3f5ce5482ebc372f2a9e8237d7813a90c4a02c5.tar.gz
zcatch-b3f5ce5482ebc372f2a9e8237d7813a90c4a02c5.zip
added some comments
Diffstat (limited to 'src/engine/client/snd.c')
-rw-r--r--src/engine/client/snd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/engine/client/snd.c b/src/engine/client/snd.c
index 18bc7f6a..79121584 100644
--- a/src/engine/client/snd.c
+++ b/src/engine/client/snd.c
@@ -57,7 +57,7 @@ static int mixing_rate = 48000;
 void snd_set_channel(int cid, float vol, float pan)
 {
 	channels[cid].vol = (int)(vol*255.0f);
-	channels[cid].pan = (int)(pan*255.0f);
+	channels[cid].pan = (int)(pan*255.0f); /* TODO: this is only on and off right now */
 }
 
 static int play(int cid, int sid, int flags, float x, float y)
@@ -112,7 +112,7 @@ void snd_stop(int vid)
 	lock_release(sound_lock);
 }
 
-/* there should be a faster way todo this */
+/* TODO: there should be a faster way todo this */
 static short int2short(int i)
 {
 	if(i > 0x7fff)
@@ -165,6 +165,7 @@ static void mix(short *final_out, unsigned frames)
 			/* volume calculation */
 			if(v->flags&SNDFLAG_POS && v->channel->pan)
 			{
+				/* TODO: we should respect the channel panning value */
 				const int range = 1500; /* magic value, remove */
 				int dx = v->x - center_x;
 				int dy = v->y - center_y;
@@ -205,6 +206,7 @@ static void mix(short *final_out, unsigned frames)
 	lock_release(sound_lock);
 
 	/* clamp accumulated values */
+	/* TODO: this seams slow */
 	for(i = 0; i < frames; i++)
 	{
 		int j = i<<1;