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/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 88ca0c33624..1756227260f 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -1,3 +1,6 @@
+/** \file blender/blenkernel/intern/sound.c
+ * \ingroup bke
+ */
/**
* sound.c (mar-2001 nzc)
*
@@ -326,7 +329,7 @@ static float sound_get_volume(Scene* scene, Sequence* sequence, float time)
fcu= list_find_fcurve(&adt->action->curves, buf, 0);
if(fcu)
- return evaluate_fcurve(fcu, time * FPS);
+ return evaluate_fcurve(fcu, time * (float)FPS);
else
return sequence->volume;
}
@@ -344,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)
@@ -355,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)