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:
authorJoerg Mueller <nexyon@gmail.com>2011-07-26 17:56:31 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-07-26 17:56:31 +0400
commit9077b8bffc6731062bbd6997379b4bf6badd13e2 (patch)
tree641b4fdb97c201727107c398517233ca313d1f38 /source/blender/makesrna
parentc0373fb7ea2b6d36b57a7c43706626aa254c70b3 (diff)
3D Audio GSoC:
Main: Complete rewrite of the sequencer related audio code to support 3D Audio objects later and especially adressing the animation system problems (see mailing list if interested). Note: Animation is not working yet, so with this commit volume animation doesn't work anymore, that's the next step. Minor things: * Changed AUD_Reference behaviour a little to be more usage safe. * Fixed bug in AUD_I3DHandle: Missing virtual destructor * Fixed enmus in AUD_Space.h * Fixed a warning in rna_scene.c * Removed an unneeded call in rna_sound.c
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c25
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c4
-rw-r--r--source/blender/makesrna/intern/rna_sound.c9
3 files changed, 24 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 2923bb62000..3a3a805f3ce 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -100,14 +100,6 @@ EnumPropertyItem snap_element_items[] = {
{SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume"},
{0, NULL, 0, NULL, NULL}};
-static EnumPropertyItem audio_channel_items[] = {
- {1, "MONO", 0, "Mono", "Set audio channels to mono"},
- {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
- {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
- {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
- {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
- {0, NULL, 0, NULL, NULL}};
-
EnumPropertyItem image_type_items[] = {
{0, "", 0, "Image", NULL},
{R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
@@ -340,6 +332,11 @@ static void rna_Scene_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
DAG_on_visible_update(bmain, FALSE);
}
+static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
+{
+ sound_update_fps(scene);
+}
+
static void rna_Scene_framelen_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
scene->r.framelen= (float)scene->r.framapto/(float)scene->r.images;
@@ -2153,6 +2150,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
#endif
#ifdef WITH_FFMPEG
+ static EnumPropertyItem audio_channel_items[] = {
+ {1, "MONO", 0, "Mono", "Set audio channels to mono"},
+ {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
+ {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
+ {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
+ {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem ffmpeg_format_items[] = {
{FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
{FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
@@ -2497,14 +2502,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 120);
RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_fps_update");
prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.1f, 120.0f);
RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_fps_update");
/* frame mapping */
prop= RNA_def_property(srna, "frame_map_old", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index eb2d38e9778..3dab8266c2f 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -560,7 +560,7 @@ static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *p
free_imbuf_seq(scene, &ed->seqbase, FALSE, TRUE);
if(RNA_struct_is_a(ptr->type, &RNA_SoundSequence))
- seq_update_sound(scene, ptr->data);
+ seq_update_sound_bounds(scene, ptr->data);
}
static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
@@ -570,7 +570,7 @@ static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene,
free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE);
if(RNA_struct_is_a(ptr->type, &RNA_SoundSequence))
- seq_update_sound(scene, ptr->data);
+ seq_update_sound_bounds(scene, ptr->data);
}
static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 97339058794..f471e5e0fe5 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 *scene, PointerRNA *ptr)
+static void rna_Sound_filepath_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
sound_load(bmain, (bSound*)ptr->data);
}
@@ -61,6 +61,11 @@ static void rna_Sound_caching_set(PointerRNA *ptr, const int value)
sound_delete_cache(sound);
}
+static void rna_Sound_caching_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ sound_update_sequencer(bmain, (bSound*)(ptr->data));
+}
+
#else
static void rna_def_sound(BlenderRNA *brna)
@@ -87,7 +92,7 @@ static void rna_def_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_memory_cache", PROP_BOOLEAN, PROP_NONE);
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_filepath_update");
+ RNA_def_property_update(prop, 0, "rna_Sound_caching_update");
}
void RNA_def_sound(BlenderRNA *brna)