Fix for [#26652] "Audio Muted" in Time Line Editor is not working
[blender-staging.git] / source / blender / blenkernel / intern / sound.c
index 52e1faaabeeccdc9672629a5d3106b52d150e624..e0e456a371e213531cf2783f7ddcc53a3df173a6 100644 (file)
@@ -347,7 +347,7 @@ AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start,
 
 void sound_create_scene(struct Scene *scene)
 {
-       scene->sound_scene = AUD_createSequencer(scene, (AUD_volumeFunction)&sound_get_volume);
+       scene->sound_scene = AUD_createSequencer(scene->audio.flag & AUDIO_MUTE, scene, (AUD_volumeFunction)&sound_get_volume);
 }
 
 void sound_destroy_scene(struct Scene *scene)
@@ -358,6 +358,12 @@ void sound_destroy_scene(struct Scene *scene)
                AUD_destroySequencer(scene->sound_scene);
 }
 
+void sound_mute_scene(struct Scene *scene, int muted)
+{
+       if(scene->sound_scene)
+               AUD_setSequencerMuted(scene->sound_scene, muted);
+}
+
 void* sound_scene_add_scene_sound(struct Scene *scene, struct Sequence* sequence, int startframe, int endframe, int frameskip)
 {
        if(scene != sequence->scene)