Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/src/editsound.c')
-rw-r--r--source/blender/src/editsound.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c
index 05eb094a7c2..2d70525f971 100644
--- a/source/blender/src/editsound.c
+++ b/source/blender/src/editsound.c
@@ -275,6 +275,12 @@ void sound_initialize_sounds(void)
bSound *sound;
if(ghSoundScene) {
+ for(sound=G.main->sound.first; sound; sound=sound->id.next) {
+ if(sound->snd_sound) {
+ SND_RemoveSound(ghSoundScene, sound->snd_sound);
+ sound->snd_sound = NULL;
+ }
+ }
/* clear the soundscene */
SND_RemoveAllSounds(ghSoundScene);
@@ -908,7 +914,16 @@ void sound_stop_all_sounds(void)
void sound_end_all_sounds(void)
{
#if GAMEBLENDER == 1
+ bSound *sound;
+
if(ghSoundScene) {
+ for(sound=G.main->sound.first; sound; sound=sound->id.next) {
+ if(sound->snd_sound) {
+ SND_RemoveSound(ghSoundScene, sound->snd_sound);
+ sound->snd_sound = NULL;
+ }
+ }
+
sound_stop_all_sounds();
SND_RemoveAllSounds(ghSoundScene);
}