[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [10994] branches/soc-2007-hcube/source/ blender/src: Fixed freeing bSamples.

Csaba Hruska csaba.hruska at gmail.com
Thu Jun 21 14:10:00 CEST 2007


Revision: 10994
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10994
Author:   hcube
Date:     2007-06-21 14:10:00 +0200 (Thu, 21 Jun 2007)

Log Message:
-----------
Fixed freeing bSamples.

Modified Paths:
--------------
    branches/soc-2007-hcube/source/blender/src/buttons_scene.c
    branches/soc-2007-hcube/source/blender/src/soundsystem.c

Modified: branches/soc-2007-hcube/source/blender/src/buttons_scene.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/buttons_scene.c	2007-06-21 12:08:57 UTC (rev 10993)
+++ branches/soc-2007-hcube/source/blender/src/buttons_scene.c	2007-06-21 12:10:00 UTC (rev 10994)
@@ -256,7 +256,7 @@
 		waitcursor(1);
 		sound = G.main->sound.first;
 		while (sound) {
-			free(sound->stream);
+			//free(sound->stream);
 			sound->stream = 0;
             // by hcube
 			//audio_makestream(sound);

Modified: branches/soc-2007-hcube/source/blender/src/soundsystem.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/soundsystem.c	2007-06-21 12:08:57 UTC (rev 10993)
+++ branches/soc-2007-hcube/source/blender/src/soundsystem.c	2007-06-21 12:10:00 UTC (rev 10994)
@@ -80,6 +80,7 @@
 void sound_finalize(void)
 {
 	seqaudio_finalize();
+	
 	if( SND_IsInitialized() )
 	{
 		SND_Finalize();
@@ -120,6 +121,9 @@
 		sound->snd_sound	= soundHandle;
 		
 		sample = MEM_callocN(sizeof(bSample), "sample");
+
+		// needed by sound_free_all_samples
+		BLI_addtail(samples, sample);	/* samples is ugly global */
 		
 		sample->len			= sndInfo.framesNum;
 		sample->channels	= sndInfo.channelsNum;





More information about the Bf-blender-cvs mailing list