[Bf-committers] Soundlib crashes game engine
Peter den Bak
bf-committers@blender.org
Sun, 25 Jul 2004 17:35:50 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0027_01C4726D.D41C6950
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Hi,
I attached diff that should solve bug 1415.
The game engine creates its own audio scene, by making sure no audio =
scene
exists in the first place the game engine doesn't crash anymore when
reloading games.
Regards,
Peter den Bak
-----Original Message-----
From: bf-committers-admin@blender.org
[mailto:bf-committers-admin@blender.org] On Behalf Of Peter den Bak
Sent: Saturday, July 24, 2004 11:05 AM
To: bf-committers@blender.org
Subject: [Bf-committers] Soundlib crashes game engine
Take a look at bug 1415, it seems that after the function =
sound_init_audio()
is called the game engine crashes or objects fall true the floor.
Bypassing the sound_init_audio in space.c at line 460 seems to solve the
problem.
Maybe someone who knows about the sound libraries can take a look at =
this.
Regards,
Peter den Bak
_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
http://www.blender.org/mailman/listinfo/bf-committers
------=_NextPart_000_0027_01C4726D.D41C6950
Content-Type: application/octet-stream;
name="bug1415.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="bug1415.diff"
Index: editsound.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/editsound.c,v
retrieving revision 1.19
diff -u -r1.19 editsound.c
--- editsound.c 16 Jul 2004 01:34:19 -0000 1.19
+++ editsound.c 25 Jul 2004 15:17:28 -0000
@@ -1043,5 +1043,6 @@
if(ghSoundScene) {
SND_DeleteScene(ghSoundScene);
SND_ReleaseDevice();
+ ghSoundScene=NULL;
}
}
Index: space.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/space.c,v
retrieving revision 1.155
diff -u -r1.155 space.c
--- space.c 24 Jul 2004 16:43:16 -0000 1.155
+++ space.c 25 Jul 2004 15:17:29 -0000
@@ -456,9 +456,9 @@
scene_cfra_store= save_and_reset_all_scene_cfra();
- /* sound init is save, only handles once */
- sound_init_audio();
+ /* clear all audio resources before starting the game engine */
sound_stop_all_sounds();
+ sound_exit_audio();
/* Before jumping into Ketsji, we configure some settings. */
space_set_commmandline_options();
------=_NextPart_000_0027_01C4726D.D41C6950--