Thread: [Super-tux-devel] stereo sound patch
Brought to you by:
wkendrick
From: Duong-Khang N. <neo...@us...> - 2003-12-28 16:15:17
Attachments:
supertux-stereo-sound.patch.bz2
supertux.h
|
Changes, Fixes, Adds: 1. PLEASE keep spaces & empty lines while patching CVS since I used them to improve sources reading ! 2. Adds: Stereo sound effects. In "gameloop.c" the kicked laptop now produces stereo sound depending on the position of SuperTux 3. Changes: "play_sound( Mix_Chunk * snd)" now is "play_sound( Mix_Chunk * snd, enum Sound_Speaker whichSpeaker )" where whichSpeaker is SOUND_CENTER_SPEAKER, SOUND_LEFT_SPEAKER, SOUND_RIGHT_SPEAKER 4. Adds: "void close_audio(void)". Why has it not been here for a while ? ;-) "st_shutdown()" now calls "close_audio" 5. Bugs report: sometimes, two bad guys get stuck 6. Fixes: "static char * soundfilenames" is no more "static". No warning with "unused variable" is allowed ! 7. modified Makefile 8. added "supertux.h" If it is not in the diff, please look at the attached file -- Never say if I could turn back the time, life is going on ! |
From: Tobias <tob...@gm...> - 2003-12-28 16:28:16
|
Am So, den 28.12.2003 schrieb Duong-Khang NGUYEN um 11:16: > Changes, Fixes, Adds: > > 1. PLEASE keep spaces & empty lines while patching CVS since I used them to > improve sources reading ! Read my mail about indentations. > 2. Adds: Stereo sound effects. In "gameloop.c" the kicked laptop now produces > stereo sound depending on the position of SuperTux Very very cool. ! :) You receive 99 distros from me. :) > 3. Changes: "play_sound( Mix_Chunk * snd)" > now is "play_sound( Mix_Chunk * snd, enum Sound_Speaker whichSpeaker )" > where whichSpeaker is > SOUND_CENTER_SPEAKER, > SOUND_LEFT_SPEAKER, > SOUND_RIGHT_SPEAKER good work. > 4. Adds: "void close_audio(void)". Why has it not been here for a while ? ;-) > "st_shutdown()" now calls "close_audio" yo. > 5. Bugs report: sometimes, two bad guys get stuck > 6. Fixes: "static char * soundfilenames" is no more "static". No warning with > "unused variable" is allowed ! > > 7. modified Makefile > > 8. added "supertux.h" If it is not in the diff, please look at the attached > file I'll merge this together with the new leveleditor feature. Please stay tuned. There is no need to be in a hurry. ;) Greetz... Tobias Gläßer -- |
From: Tobias <tob...@gm...> - 2003-12-28 17:11:44
|
Your patch is already merged, I'll commit it together with the leveleditor. Greetz... Tobias Gläßer Am So, den 28.12.2003 schrieb Duong-Khang NGUYEN um 11:16: > Changes, Fixes, Adds: > > 1. PLEASE keep spaces & empty lines while patching CVS since I used them to > improve sources reading ! > > 2. Adds: Stereo sound effects. In "gameloop.c" the kicked laptop now produces > stereo sound depending on the position of SuperTux > > 3. Changes: "play_sound( Mix_Chunk * snd)" > now is "play_sound( Mix_Chunk * snd, enum Sound_Speaker whichSpeaker )" > where whichSpeaker is > SOUND_CENTER_SPEAKER, > SOUND_LEFT_SPEAKER, > SOUND_RIGHT_SPEAKER > > 4. Adds: "void close_audio(void)". Why has it not been here for a while ? ;-) > "st_shutdown()" now calls "close_audio" > > 5. Bugs report: sometimes, two bad guys get stuck > > 6. Fixes: "static char * soundfilenames" is no more "static". No warning with > "unused variable" is allowed ! > > 7. modified Makefile > > 8. added "supertux.h" If it is not in the diff, please look at the attached > file -- |
From: Ingo R. <gr...@gm...> - 2003-12-28 19:38:33
|
Duong-Khang NGUYEN <neo...@us...> writes: > 2. Adds: Stereo sound effects. In "gameloop.c" the kicked laptop now produces > stereo sound depending on the position of SuperTux I don't think that the position of Tux itself should be used for calculating the sound position, but instead the center of the screen/camera. After all the view of the player and Tux are not really the same, even so there are pretty close most of the time. > 3. Changes: "play_sound( Mix_Chunk * snd)" > now is "play_sound( Mix_Chunk * snd, enum Sound_Speaker whichSpeaker )" > where whichSpeaker is > SOUND_CENTER_SPEAKER, > SOUND_LEFT_SPEAKER, > SOUND_RIGHT_SPEAKER Why limit the sound to just three enums? Wouldn't it be better to have a play_sound(Mix_Chunk* snd, float pos) and thus allow sound to be positioned exactly, instead of being one speaker or the other (center will never be reached, since tux_x won't be equal to bad_guy_x in practice)? -- WWW: http://pingus.seul.org/~grumbel/ JabberID: gr...@ja... ICQ: 59461927 |
From: Bill K. <nb...@so...> - 2003-12-29 17:54:34
|
On Sun, Dec 28, 2003 at 08:38:24PM +0100, Ingo Ruhnke wrote: > > I don't think that the position of Tux itself should be used for > calculating the sound position, but instead the center of the > screen/camera. Agreed. We could use this for all bad-guy sounds. For example, when a laptop ricochets (hits a wall and bounces the other direction), the stereo value can help the player remember "oh crap, he's to the left of me, and now coming back!" :^) -bill! |