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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-04-15 16:23:13 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-04-15 16:25:33 +0400
commit9f17300d378f1905dbeeceb25a49a17fd256f9f2 (patch)
treed1c65ae142f93087eed1a94fedfb0429d8fa6ca3 /source/blender/blenkernel/intern/sound.c
parent08de05f3db64d6ab70f0bd93635ddb7f47530837 (diff)
Fix T39607: Audio not in synch when the blend file loads.
Root of issue is probably in AUDASPACE itself (or even in OpenAL?). Issue not present with SDL backend, only OpenAL afaik. For now, workaround in Blender is to call seek twice when starting play (not needed when resuming from pause).
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 5c7b86a6300..bdd06e92457 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -559,12 +559,15 @@ void sound_play_scene(struct Scene *scene)
status = scene->sound_scene_handle ? AUD_getStatus(scene->sound_scene_handle) : AUD_STATUS_INVALID;
- if (status == AUD_STATUS_INVALID)
+ if (status == AUD_STATUS_INVALID) {
sound_start_play_scene(scene);
- if (!scene->sound_scene_handle) {
- AUD_unlock();
- return;
+ if (!scene->sound_scene_handle) {
+ AUD_unlock();
+ return;
+ }
+
+ AUD_seek(scene->sound_scene_handle, cur_time);
}
if (status != AUD_STATUS_PLAYING) {