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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-10 19:10:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-10 19:10:51 +0400
commitefde4dbba868c3717e21fe87a8c28314129e8fb4 (patch)
treef58152eb37d5675c1171ee13c445186f294fe81a /source/blender/blenkernel/intern/sound.c
parentf91fa9d2ce57ee6488b86260b9617db7fca3cb33 (diff)
patch [#30871] VSE py-api
from Dan Eicher (dna) --- message from the tracker Classes for all effect types with proper input attributes Added new/delete functions for SequenceEditor.sequences. push/pop functions for ImageSequence.elements to add/remove images Moved waveform from the base class to SoundSequence (probably should be renamed use_waveform or show_waveform) Fixed user count for scene and movie clip types --- my own comments - dont have blending mode argument from sequencer.new_*() functions. Better edit this after. - dont change waveform attribute, seems unrelated change and should be kept for sound afaik. - dont apply scene, clip usercount changes - Sergey dealt with these separately.
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 896d0f4cf08..e4aa60805ee 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -756,6 +756,14 @@ void *sound_get_factory(void *sound)
return ((struct bSound *) sound)->playback_handle;
}
+/* stupid wrapper because AUD_C-API.h includes Python.h which makesrna doesn't like */
+float sound_get_length(struct bSound* sound)
+{
+ AUD_SoundInfo info = AUD_getInfo(sound->playback_handle);
+
+ return info.length;
+}
+
#else // WITH_AUDASPACE
#include "BLI_utildefines.h"
@@ -797,5 +805,5 @@ void sound_set_scene_sound_volume(void* handle, float volume, char animated) { (
void sound_set_scene_sound_pan(void* handle, float pan, char animated) { (void)handle; (void)pan; (void)animated; }
void sound_set_scene_volume(struct Scene *scene, float volume) { (void)scene; (void)volume; }
void sound_set_scene_sound_pitch(void* handle, float pitch, char animated) { (void)handle; (void)pitch; (void)animated; }
-
+float sound_get_length(struct bSound* sound) { (void)sound; return 0; }
#endif // WITH_AUDASPACE