diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-07-17 17:41:22 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-07-17 17:41:22 +0400 |
commit | fd982af4471d55e756629c0aeffe60fe8f5b4687 (patch) | |
tree | 56e42f14e2dd576d366b2fef2cbe35efbfd44a76 /source/blender/blenkernel | |
parent | 06193537edfd0635b8a6edabf1ea2f87eb33b8c6 (diff) |
Merging revision 30434 from my GSoC branch, log: Fixed sound wave display bug for sounds that are not full length.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_sound.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index 50c86e80b08..190b0400aff 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -94,6 +94,6 @@ float sound_sync_scene(struct Scene *scene); int sound_scene_playing(struct Scene *scene); -int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length); +int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end); #endif diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 6402f908422..f780e71d5cd 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -468,7 +468,9 @@ int sound_scene_playing(struct Scene *scene) return -1; } -int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length) +int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end) { - return AUD_readSound(sound->cache, buffer, length); + AUD_Sound* limiter = AUD_limitSound(sound->cache, start, end); + return AUD_readSound(limiter, buffer, length); + AUD_unload(limiter); } |