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/nla.c')
-rw-r--r--source/blender/blenkernel/intern/nla.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 15e53e12ece..d7546e5db0c 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -51,10 +51,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_nla.h"
-
-#ifdef WITH_AUDASPACE
-# include <AUD_Special.h>
-#endif
+#include "BKE_sound.h"
#include "RNA_access.h"
#include "nla_private.h"
@@ -392,7 +389,7 @@ NlaStrip *BKE_nlastack_add_strip(AnimData *adt, bAction *act)
}
/* Add a NLA Strip referencing the given speaker's sound */
-NlaStrip *BKE_nla_add_soundstrip(Scene *scene, Speaker *speaker)
+NlaStrip *BKE_nla_add_soundstrip(Main *bmain, Scene *scene, Speaker *speaker)
{
NlaStrip *strip = MEM_callocN(sizeof(NlaStrip), "NlaSoundStrip");
@@ -401,9 +398,10 @@ NlaStrip *BKE_nla_add_soundstrip(Scene *scene, Speaker *speaker)
*/
#ifdef WITH_AUDASPACE
if (speaker->sound) {
- AUD_SoundInfo info = AUD_getInfo(speaker->sound->playback_handle);
-
- strip->end = (float)ceil((double)info.length * FPS);
+ SoundInfo info;
+ if (BKE_sound_info_get(bmain, speaker->sound, &info)) {
+ strip->end = (float)ceil((double)info.length * FPS);
+ }
}
else
#endif