diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-08-11 15:41:24 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-08-11 15:41:24 +0400 |
commit | fee7337249342c3d5a332358883af9afe961f38d (patch) | |
tree | d7374f582cec6ca6d204c923d325c4db53d699cd /source/blender/makesrna | |
parent | 2c2fa877be6a1e7f6f1abbb131d3706948368248 (diff) |
3D Audio GSoC:
Adding a mono flag to mixdown non-mono sounds for 3D audio.
* Added mono sound loading.
* Bugfix: AUD_COMPARE_SPECS usage was wrong.
* Bugfix: JOS resampler = instead of ==.
* Bugfix: Change of a sound should apply settings in AUD_SequencerHandle.
* Bugfix: Memory leak when canceling open sound operator.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_sound.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c index e78bc092040..b224b55c20c 100644 --- a/source/blender/makesrna/intern/rna_sound.c +++ b/source/blender/makesrna/intern/rna_sound.c @@ -41,7 +41,7 @@ #include "BKE_sound.h" #include "BKE_context.h" -static void rna_Sound_filepath_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Sound_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { sound_load(bmain, (bSound*)ptr->data); } @@ -83,7 +83,7 @@ static void rna_def_sound(BlenderRNA *brna) prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_ui_text(prop, "File Path", "Sound sample file used by this Sound datablock"); - RNA_def_property_update(prop, 0, "rna_Sound_filepath_update"); + RNA_def_property_update(prop, 0, "rna_Sound_update"); prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "packedfile"); @@ -93,6 +93,11 @@ static void rna_def_sound(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_Sound_caching_get", "rna_Sound_caching_set"); RNA_def_property_ui_text(prop, "Caching", "The sound file is decoded and loaded into RAM"); RNA_def_property_update(prop, 0, "rna_Sound_caching_update"); + + prop= RNA_def_property(srna, "mono", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_MONO); + RNA_def_property_ui_text(prop, "Mono", "If the file contains multiple audio channels they are mixdown to a signle one."); + RNA_def_property_update(prop, 0, "rna_Sound_update"); } void RNA_def_sound(BlenderRNA *brna) |