about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--datasrc/teewars.ds6
-rw-r--r--src/engine/client/ec_snd.c18
-rw-r--r--src/engine/e_config_variables.h1
-rw-r--r--src/game/client/gc_client.cpp2
-rw-r--r--src/game/server/gs_server.cpp2
5 files changed, 25 insertions, 4 deletions
diff --git a/datasrc/teewars.ds b/datasrc/teewars.ds
index 65a426c4..45f1bef1 100644
--- a/datasrc/teewars.ds
+++ b/datasrc/teewars.ds
@@ -86,6 +86,12 @@ sounds {
 		"data/audio/foley_land-04.wv"
 	}
 	
+	player_airjump {
+		"data/audio/foley_dbljump-01.wv"
+		"data/audio/foley_dbljump-02.wv"
+		"data/audio/foley_dbljump-03.wv"
+	}
+
 	player_jump {
 		"data/audio/foley_foot_left-01.wv"
 		"data/audio/foley_foot_left-02.wv"
diff --git a/src/engine/client/ec_snd.c b/src/engine/client/ec_snd.c
index 89e18cb8..152eac53 100644
--- a/src/engine/client/ec_snd.c
+++ b/src/engine/client/ec_snd.c
@@ -208,7 +208,6 @@ static void mix(short *final_out, unsigned frames)
 			
 		}
 	}
-
 	/* release the lock */
 	lock_release(sound_lock);
 
@@ -249,9 +248,24 @@ int snd_init()
 	
 	mixing_rate = config.snd_rate;
 
-	params.device = Pa_GetDefaultOutputDevice();
+	{
+		int num = Pa_GetDeviceCount();
+		int i;
+		const PaDeviceInfo *info;
+		
+		for(i = 0; i < num; i++)
+		{
+			info = Pa_GetDeviceInfo(i);
+			dbg_msg("snd", "device #%d name='%s'", i, info->name);
+		}
+	}
+
+	params.device = config.snd_device;
+	if(params.device == -1)
+		params.device = Pa_GetDefaultOutputDevice();
 	if(params.device < 0)
 		return 1;
+	dbg_msg("snd", "device = %d", params.device);
 	params.channelCount = 2;
 	params.sampleFormat = paInt16;
 	params.suggestedLatency = Pa_GetDeviceInfo(params.device)->defaultLowOutputLatency;
diff --git a/src/engine/e_config_variables.h b/src/engine/e_config_variables.h
index 51ee7376..1aa6b799 100644
--- a/src/engine/e_config_variables.h
+++ b/src/engine/e_config_variables.h
@@ -22,6 +22,7 @@ MACRO_CONFIG_INT(b_max_requests, 10, 0, 1000)
 MACRO_CONFIG_INT(snd_rate, 48000, 0, 0)
 MACRO_CONFIG_INT(snd_enable, 1, 0, 1)
 MACRO_CONFIG_INT(snd_volume, 100, 0, 100)
+MACRO_CONFIG_INT(snd_device, -1, 0, 0)
 
 MACRO_CONFIG_INT(gfx_screen_width, 800, 0, 0)
 MACRO_CONFIG_INT(gfx_screen_height, 600, 0, 0)
diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp
index 950da682..95f322a1 100644
--- a/src/game/client/gc_client.cpp
+++ b/src/game/client/gc_client.cpp
@@ -802,7 +802,7 @@ extern "C" void modc_predict()
 				if(events&COREEVENT_AIR_JUMP)
 				{
 					create_air_jump_effect(pos);
-					snd_play_random(CHN_WORLD, SOUND_PLAYER_JUMP, 1.0f, pos);
+					snd_play_random(CHN_WORLD, SOUND_PLAYER_AIRJUMP, 1.0f, pos);
 				}
 				//if(events&COREEVENT_HOOK_LAUNCH) snd_play_random(CHN_WORLD, SOUND_HOOK_LOOP, 1.0f, pos);
 				if(events&COREEVENT_HOOK_ATTACH_PLAYER) snd_play_random(CHN_WORLD, SOUND_HOOK_ATTACH_PLAYER, 1.0f, pos);
diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp
index f7c2f005..47f5d0e5 100644
--- a/src/game/server/gs_server.cpp
+++ b/src/game/server/gs_server.cpp
@@ -1093,7 +1093,7 @@ void player::tick_defered()
 		if(events&COREEVENT_GROUND_JUMP) create_sound(pos, SOUND_PLAYER_JUMP, mask);
 		if(events&COREEVENT_AIR_JUMP)
 		{
-			create_sound(pos, SOUND_PLAYER_JUMP, mask);
+			create_sound(pos, SOUND_PLAYER_AIRJUMP, mask);
 			ev_common *c = (ev_common *)::events.create(EVENT_AIR_JUMP, sizeof(ev_common), mask);
 			if(c)
 			{