diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-08-03 13:25:40 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-08-03 13:25:40 +0400 |
commit | 6d7490632f13f9744c6b3e507c838a34f3481846 (patch) | |
tree | 941fa3faa93beb2fbb63798b2c1c416a5c3821f1 /source/blender/makesrna/intern/rna_scene.c | |
parent | 2b446aa280af60aefd304aae904bc16b1b15f373 (diff) |
3D Audio GSoC:
* Minor audaspace library improvements.
* Considering location, velocity and orientation in AUD_SequencerReader and AUD_SequencerHandle.
* Bugfix: Maximum and Minimum volume weren't used before in the software device.
* Bugfix: Adding speaker objects via info space crashed.
* Listener settings now get updated in the audio system.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 0a97344928f..f2618280fa2 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -337,6 +337,11 @@ static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA * sound_update_fps(scene); } +static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) +{ + sound_update_scene_listener(scene); +} + static void rna_Scene_volume_set(PointerRNA *ptr, float value) { Scene *scene= (Scene*)(ptr->data); @@ -3462,21 +3467,24 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "audio_doppler_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.01f, FLT_MAX); RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for Doppler effect calculation"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); prop= RNA_def_property(srna, "audio_doppler_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0, FLT_MAX); RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for Doppler effect calculation"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); prop= RNA_def_property(srna, "audio_distance_model", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, audio_distance_model_items); RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); prop= RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "audio.volume"); |